/*
Theme Name: Kisae Lean
Theme URI: https://nustart.solutions
Description: A modern, ultra-fast, and highly accessible PHP 8.4 block theme specifically built to replace the legacy Quake framework for Kisae Power. Built with native WordPress Gutenberg blocks.
Version: 1.0.41
Requires at least: 6.4
Tested up to: 6.5
Requires PHP: 8.0
Author: NuStart Solutions
Author URI: https://nustart.solutions/
License: GPL v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kisae-lean
Tags: custom-colors, custom-logo, custom-menu, block-patterns, full-site-editing
*/

/* 
* No heavy layout CSS exists here. 
* All major layout, coloring, and typography are defined purely in theme.json.
* Only hyper-specific component overrides belong here.
*/

/* Fix Quake Legacy Button Conflicts (Removes double-pill effect) */
.wp-block-button.btn-orange,
.wp-block-button.btn-trans {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Orange Button Inner Restyle */
.wp-block-button.btn-orange .wp-block-button__link {
    background-color: #f15a24 !important;
    color: #ffffff !important;
    border: 1px solid #f15a24 !important;
    border-radius: 40px !important;
    padding: 12px 32px !important;
    font-weight: 700 !important;
}

.wp-block-button.btn-orange .wp-block-button__link:hover {
    background-color: #d94d1b !important;
    border-color: #d94d1b !important;
}

/* Transparent Button Inner Restyle */
.wp-block-button.btn-trans .wp-block-button__link {
    background-color: transparent !important;
    color: #ffffff !important;
    border: 1px solid #ffffff !important;
    border-radius: 40px !important;
    padding: 12px 32px !important;
    font-weight: 700 !important;
}

.wp-block-button.btn-trans .wp-block-button__link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Force specific Nav Menu behaviors */
.wp-block-navigation-item.has-child:hover>.wp-block-navigation-submenu {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* =========================================================================
   CLASSIC HYBRID HEADER STYLING
   ========================================================================= */

:root {
    --kisae-wrap-width: 1200px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

body {
    margin: 0;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

/* 1. TOP GREY BAR */
.top-bar-wrapper {
    background-color: #f7f7f7;
    border-bottom: 1px solid #eaeaea;
    padding: 8px 0;
    font-size: 13px;
    font-family: inherit;
}

.top-bar-container {
    max-width: 1200px;
    /* Adjust according to original theme width */
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Top Menus CSS Reset */
.top-bar-container ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.top-bar-container li {
    display: flex;
    align-items: center;
}

.top-bar-container a {
    color: #4b85a6;
    /* Exact Kisae Blue */
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    padding: 0 10px;
    transition: color 0.2s;
}

.top-bar-container a:hover {
    color: #d94d1b;
    /* Kisae Orange */
}

/* Separator Pipes for Top Bar Menus */
.top-left-menu ul li:not(:last-child)::after,
.top-right-menu ul li:not(:last-child)::after {
    content: "|";
    color: #ccc;
    font-size: 11px;
    display: inline-block;
}

/* Remove first/last padding to align perfectly with edges */
.top-left-menu ul li:first-child a {
    padding-left: 0;
}

.top-right-menu ul li:last-child a {
    padding-right: 0;
}

/* 2. MAIN WHITE HEADER */
.main-header-wrapper {
    background-color: #ffffff;
    border-bottom: 2px solid #eaeaea;
    padding: 15px 0;
}

.main-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Setup */
.site-branding img,
.custom-logo {
    max-width: 250px;
    height: auto;
    display: block;
}

/* Primary Navigation Reset */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
    align-items: center;
}

.main-navigation a {
    color: #555555;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-transform: capitalize;
    transition: color 0.2s;
}

.main-navigation a:hover {
    color: #d94d1b;
}



/* 3. MOBILE RESPONSIVENESS */
@media screen and (max-width: 900px) {
    .top-bar-container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .main-header-container {
        flex-wrap: wrap;
    }

    .kisae-header .logo img {
        max-width: 140px;
    }
}

/* =========================================================================
   FOOTER CAROUSEL (BRAND LOGOS)
   ========================================================================= */

.brands-carousel {
    padding: 30px 0;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.brands_slick {
    width: 100%;
    margin: 0 auto;
    display: block;
}

/* Force slick internal logic to remain physically open securely */
.brands_slick .slick-list,
.brands_slick .slick-track,
.brands_slick .slick-slide {
    min-height: 75px !important;
    display: block !important;
}

.brand-item {
    display: block;
    width: 100%;
    height: 75px;
    min-height: 75px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    cursor: pointer;
    margin: 0 15px;
    opacity: 0.7;
    transition: opacity 0.3s ease-in-out;
}

.brand-item:hover {
    opacity: 1;
}

/* =========================================================================
   FOOTER STYLING
   ========================================================================= */

.footer-tier {
    width: 100%;
}

.wrap {
    max-width: var(--kisae-wrap-width);
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.footer-tier-footer-contact,
.footer-tier-footer-socials,
.footer-tier-footer-menus {
    padding-top: 50px;
    padding-bottom: 50px;
}

/* Footer Tier Background Colors */
.footer-tier-footer-contact {
    background-color: #000000;
    color: #ffffff;
}

.footer-contact-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
}

.footer-contact-column {
    flex: 1 1 250px;
    min-width: 0;
}

.footer-tier-footer-socials {
    background-color: #1a2024;
    color: #ffffff;
}

.footer-tier-footer-menus {
    background-color: #e0e0e0;
}

/* =========================================================================
   SOCIAL ICONS SHORTCODE
   ========================================================================= */
.kisae-socials-list {
    display: flex;
    flex-direction: row;
    gap: 15px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.kisae-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    /* Colors inherit from CSS variables injected by the shortcode */
    background-color: var(--social-bg);
    color: var(--social-fg);
    border: 2px solid var(--social-bg);
    transition: all 0.3s ease-in-out;
}

.kisae-social-icon svg {
    display: block;
    width: 20px;
    height: 20px;
}

.kisae-social-icon:hover {
    background-color: var(--social-fg);
    color: var(--social-bg);
    border-color: var(--social-bg);
}

/* =========================================================================
   FOOTER WIDGET LAYOUTS
   ========================================================================= */

.footer-tier-footer-socials .wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

.kisae-socials-list {
    justify-content: center;
}

.footer-tier-footer-menus .wrap {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
}

@media (max-width: 900px) {
    .footer-tier-footer-menus .wrap {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .footer-tier-footer-menus .wrap {
        grid-template-columns: 1fr;
    }
}

.footer-tier-footer-menus a {
    font-weight: 400;
    color: #4f5052;
    text-decoration: none;
}

.footer-tier-footer-menus a:hover {
    color: #d94d1b;
    /* Kisae Orange Hover */
}

/* =========================================================================
   COPYRIGHT TIER
   ========================================================================= */
.footer-tier-copyright {
    background-color: #121212;
    color: #ffffff;
    overflow: hidden;
}

/* =========================================================================
   GUTENBERG CUSTOM COLOR PALETTE CLASSES
   ========================================================================= */
.has-kisae-orange-color {
    color: #f15a24 !important;
}

.has-kisae-orange-background-color {
    background-color: #f15a24 !important;
}

.has-kisae-dark-orange-color {
    color: #d94d1b !important;
}

.has-kisae-dark-orange-background-color {
    background-color: #d94d1b !important;
}

.has-kisae-blue-color {
    color: #317d9f !important;
}

.has-kisae-blue-background-color {
    background-color: #317d9f !important;
}

.has-black-color {
    color: #000000 !important;
}

.has-black-background-color {
    background-color: #000000 !important;
}

.has-white-color {
    color: #ffffff !important;
}

.has-white-background-color {
    background-color: #ffffff !important;
}

/* =========================================================================
   CUSTOM GRID LAYOUTS
   ========================================================================= */
.kisae-grid-3 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
}

.kisae-grid-2 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 30px !important;
}

/* Bulletproof native Gutenberg Column overrides if applied to a Columns block */
.wp-block-columns.kisae-grid-3 .wp-block-column,
.wp-block-columns.kisae-grid-2 .wp-block-column {
    margin: 0 !important;
    width: 100% !important;
    flex-basis: auto !important;
}

@media (max-width: 900px) {

    .kisae-grid-3,
    .kisae-grid-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {

    .kisae-grid-3,
    .kisae-grid-2 {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================================================
   PRODUCT GRID UTILITIES
   ========================================================================= */
.product-item {
    text-align: center;
    margin: 25px 0;
    display: block;
}

.product-thumb {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    width: 100%;
    padding-bottom: 65%;
    transition: .5s;
}

.product-thumb:hover {
    opacity: 0.9;
}

.product-title {
    color: #000;
    font-weight: 700;
    font-size: 1.5rem;
    margin-top: 15px;
    margin-bottom: 5px;
}

.product-item p {
    margin-top: 0;
}

/* =========================================================================
   FOOTER LAYOUT OVERRIDES
   ========================================================================= */
.footer-tier-footer-logos .wrap {
    max-width: 100%;
}

/* =========================================================================
   GUTENBERG ALIGNMENT CLASSES
   ========================================================================= */
.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignwide {
    max-width: var(--kisae-wrap-width) !important;
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
}

.alignfull {
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    max-width: 100vw !important;
    width: 100vw !important;
}

/* =========================================================================
   TYPOGRAPHY UTILITIES
   ========================================================================= */
h5 {
    font-size: 20px;
    font-weight: 500;
}

.fs36 {
    font-size: 36px !important;
}

/* =========================================================================
   INTRO & CONNECT WIDGET (acf/introduction)
   ========================================================================= */
.connect-no-padd {
    padding-left: 0 !important;
}

.intro-left {
    padding-right: 40px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.connect {
    text-align: center;
    background: #ee652e;
    position: relative;
    padding: 100px 0;
    margin-bottom: 0 !important;
}

.connect:after {
    right: -999em;
    background: #ee652e;
    content: '';
    display: block;
    position: absolute;
    width: 999em;
    top: 0;
    bottom: 0;
}

.plugged {
    text-align: center;
    background: #1a1f23;
    position: relative;
    padding: 100px 0;
    margin-top: 0 !important;
}

.plugged:after {
    right: -999em;
    background: #1a1f23;
    content: '';
    display: block;
    position: absolute;
    width: 999em;
    top: 0;
    bottom: 0;
}

.connect h4,
.plugged h4 {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 25px;
}

.connect-social {
    list-style: none;
    margin: 0;
    padding: 0;
}

.connect-social li {
    display: inline-block;
    margin: 0 5px;
}

.connect-social li a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none !important;
    transition: .5s;
}

.connect-social li a .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    line-height: 1;
}

.connect-social li a img {
    width: 22px;
    height: auto;
    position: relative;
    top: -3px;
    left: 0px;
}

.connect-social li a:hover {
    background-color: #1a1f23;
    color: #fff;
}

.plugged-buttons .btn {
    border-radius: 25px;
    padding: 15px 15px;
    color: #fff;
    display: inline-block;
    min-width: 150px;
    font-size: .8rem;
    margin: 0 5px;
    text-decoration: none !important;
}

/* =========================================================================
   PRODUCT SUBNAVIGATION (kisae_category_siblings)
   ========================================================================= */
.sub-navigation {
    margin-bottom: 0px;
    border-top: 1px solid #e4e4e4;
    padding-top: 1px;
    padding-bottom: 1px;
    text-align: center;
}

.sub-nav {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center;
}

.sub-nav li {
    position: relative;
    display: inline-block;
    font-size: .9rem;
}

.sub-nav li:after {
    position: absolute;
    right: -3px;
    top: 50%;
    transform: translateY(-50%);
    content: "";
    height: 1rem;
    border-right: 1px solid #888888;
}

.sub-nav li:last-child:after {
    display: none;
}

.sub-nav li a {
    display: block;
    color: #888888;
    text-decoration: none;
    padding: 5px 15px;
    transition: color 0.2s;
}

.sub-nav li a:hover {
    color: #f15a24;
}

/* =========================================================================
   PRODUCT GRID OVERRIDES ([kisae_product_grid])
   ========================================================================= */
.kisae-product-card {
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: inherit;
    text-align: center;
    transition: opacity 0.3s;
}

.kisae-product-card .img-wrapper {
    overflow: hidden;
    /* Critical for controlling hover scale constraint */
    margin-bottom: 15px;
    background: #fdfdfd;
    border-radius: 4px;
}

.kisae-product-card img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center center;
}

.kisae-product-card:hover img {
    transform: scale(1.1);
    /* Smooth expansion requested by user */
}

.kisae-product-card h4 {
    font-size: 1.25rem;
    color: #f15a24;
    margin: 0 0 5px 0;
    transition: color 0.3s;
}

.kisae-product-card:hover h4 {
    color: #d94d1b;
}

.kisae-product-card p.subheading {
    font-size: 0.95rem;
    color: #555;
    margin: 0;
    line-height: 1.4;
}

/* =========================================================================
   GLOBAL LAYOUT CONSTRAINT
   ========================================================================= */
@media (max-width: 767px) {
    .wp-block-group.is-layout-constrained> :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
        width: 90% !important;
        max-width: var(--wp--style--global--content-size, 1200px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}