/* --- 1. HEADER GRID SYSTEM (Clean 12-Col) --- */

/* TOPBAR (Explicit Stack) */
#topbar {
    position: relative;
    z-index: 1100;
}

/* Parent Container */
/* Parent Container */
#masthead {
    width: 100%;
    z-index: 1000;
    /* High z-index */
    transition: background-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
    position: sticky;
    /* NATIVE STICKY */
    top: 0;
}

/* HOME DEFAULT: Overlay via Negative Margin */
.home #masthead {
    margin-bottom: -120px;
    /* Pull Hero under header exactly */
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* INNER PAGES: Normal Flow */
body:not(.home) {
    padding-top: 0 !important;
}

body:not(.home) #page {
    padding-top: 0 !important;
    /* Let Sticky Header take space normally */
}

/* HEADER CONTAINER (Height Transition) */
#header-grid {
    height: 120px;
    /* Default Tall */
    transition: height 0.3s ease;
}

/* SCROLLED / SOLID STATE (Styling Only) */
#masthead.is-scrolled,
body:not(.home) #masthead {
    background-color: #1B2632 !important;
    /* Navy Blue */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Shrink on Scroll */
#masthead.is-scrolled #header-grid,
body:not(.home) #header-grid {
    height: 80px !important;
    /* Shrink comfortably */
}

/* LOGO SCALING */
.logo-img {
    /* Height defined in HTML (80px) */
    width: auto;
    object-fit: contain;
    transition: height 0.3s ease;
}

#masthead.is-scrolled .logo-img,
body:not(.home) .logo-img {
    height: 45px !important;
    /* Shrink to 45px on scroll */
}

/* NAVIGATION STYLING */
.main-navigation ul {
    display: flex;
    justify-content: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: #ffffff !important;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    font-weight: 500;
    text-decoration: none;
}

/* --- 2. SEARCH OVERLAY (Fibosearch Refinement) --- */
/* --- 2. SEARCH OVERLAY (Fibosearch Luxury Reset) --- */

/* Wrap Reset */
.dgwt-wcas-search-wrapp.dgwt-wcas-active {
    max-width: 900px !important;
    width: 90% !important;
    margin: 0 auto !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Input Styles */
.dgwt-wcas-search-input {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 3rem !important;
    /* Giant Text */
    font-weight: 300 !important;
    padding: 20px 0 !important;
    text-align: center;
    transition: border-color 0.4s ease !important;
    box-shadow: none !important;
}

.dgwt-wcas-search-input:focus {
    border-bottom: 1px solid #ffffff !important;
    outline: none !important;
}

.dgwt-wcas-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 1.2rem;
}

/* Hide Unnecessary Elements */
.dgwt-wcas-preloader,
.dgwt-wcas-voice-search {
    display: none !important;
}

/* Minimalist Icon */
.dgwt-wcas-search-submit {
    background: transparent !important;
    right: 0 !important;
}

.dgwt-wcas-ico-magnifier {
    filter: invert(1);
    /* White Icon */
}

/* Modal Wrapper (if Fibo inserts its own, though we use custom #search-overlay) */
.dgwt-wcas-modal-wrapper {
    background: rgba(27, 38, 50, 0.95) !important;
    backdrop-filter: blur(12px) !important;
}

/* --- 3. SHOP REDESIGN (WooCommerce) --- */
/* Sticky Header Force */
body.woocommerce-page #masthead {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Product Grid */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem !important;
}

@media(max-width: 1024px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width: 640px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr;
    }
}

/* Product Card */
.woocommerce ul.products li.product {
    border: 1px solid #f3f4f6;
    /* Very subtle light gray */
    padding: 2rem;
    transition: all 0.3s ease;
    background: white;
}

.woocommerce ul.products li.product:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Image Zoom */
.woocommerce ul.products li.product a img {
    transition: transform 0.6s ease;
}

.woocommerce ul.products li.product:hover a img {
    transform: scale(1.05);
}

/* Typography */
.woocommerce-loop-product__title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.05em !important;
    margin-top: 1rem !important;
    color: #1B2632 !important;
}

.price {
    font-family: 'Inter', sans-serif !important;
    color: #6b7280 !important;
    font-size: 0.9rem !important;
}

/* Sidebar Filters (Minimalist) */
.widget_layered_nav .widget-title {
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}