/**
 * Hespora Luxury Black & Gold Design System
 */
:root {
    --hespora-black: #0a0a0a;
    --hespora-gold: #d4af37;
    --hespora-gold-hover: #f3e5ab;
    --hespora-white: #ffffff;
    --hespora-gray: #8e8e93;
    --hespora-glass: rgba(10, 10, 10, 0.95);
    --hespora-border-gold: rgba(212, 175, 55, 0.25);
    --hespora-transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    --hespora-font-spacing: 0.14em;
}

/* Hard Mobile Viewport Containment Framework */
html, body {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-text-size-adjust: 100% !important;
}

/* Clear Headroom for Fixed Header Layout */
body {
    padding-top: 90px !important;
}

/* Block Content Wrappers from Over-Expanding Horizontally */
#page, .site, #content, .site-content, main {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Deactivate theme structure header settings */
header.site-header, .site-header {
    background: transparent !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Fixed Main Header Navigation Bar */
.hespora-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 90px !important;
    z-index: 99999 !important;
    background-color: var(--hespora-black);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--hespora-transition);
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
}

.hespora-header.is-sticky {
    background-color: var(--hespora-glass) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid var(--hespora-border-gold);
    height: 75px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.hespora-header-container {
    width: 100% !important;
    padding: 0 4% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.gold-text, .hespora-logo-container a {
    color: var(--hespora-gold) !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--hespora-font-spacing);
    text-decoration: none;
    font-size: 20px;
}

.hespora-logo-container img {
    height: 40px !important;
    width: auto !important;
    object-fit: contain !important;
    display: block !important;
}

/* Desktop Menu Controls */
.hespora-desktop-nav {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-grow: 1 !important;
}

.hespora-nav-menu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    gap: 32px !important;
}

.hespora-nav-menu a {
    color: var(--hespora-white) !important;
    text-decoration: none !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: var(--hespora-font-spacing);
    font-weight: 500 !important;
    padding: 8px 0 !important;
    display: block !important;
    transition: var(--hespora-transition);
}

.hespora-nav-menu a:hover { color: var(--hespora-gold) !important; }

/* Actions & Cart Controls */
.hespora-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
}

.hespora-action-btn {
    background: transparent !important;
    border: none !important;
    color: var(--hespora-white) !important;
    cursor: pointer !important;
    width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    text-decoration: none !important;
}

.hespora-action-btn svg { width: 22px !important; height: 22px !important; color: var(--hespora-white) !important; }
.hespora-action-btn:hover svg { color: var(--hespora-gold) !important; }

.hespora-cart-count {
    position: absolute !important;
    top: -2px !important;
    right: -4px !important;
    background-color: var(--hespora-gold) !important;
    color: var(--hespora-black) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    border-radius: 50% !important;
    width: 16px !important;
    height: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Hamburger Configuration Layout */
.hespora-mobile-toggle {
    display: none !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    width: 44px !important;
    height: 44px !important;
}

.hamburger-box { width: 24px !important; height: 14px !important; display: inline-block !important; position: relative !important; }
.hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
    width: 24px !important; height: 2px !important; background-color: var(--hespora-white) !important; position: absolute !important; transition: var(--hespora-transition);
}
.hamburger-inner { top: 50% !important; transform: translateY(-50%) !important; }
.hamburger-inner::before { content: "" !important; top: -6px; }
.hamburger-inner::after { content: "" !important; bottom: -6px; }

/* Structural App Mobile Drawer Layer styling */
.hespora-drawer {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 100000 !important;
}

.hespora-drawer-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

.hespora-drawer-content {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: 85% !important;
    max-width: 340px !important;
    height: 100% !important;
    background-color: var(--hespora-black) !important;
    border-left: 1px solid var(--hespora-border-gold) !important;
    padding: 30px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    box-shadow: -10px 0 40px rgba(0,0,0,0.8);
}

.hespora-drawer-header { display: flex !important; align-items: center !important; justify-content: space-between !important; margin-bottom: 40px !important; }
.hespora-mobile-close { background: transparent !important; border: none !important; color: var(--hespora-white) !important; cursor: pointer !important; }
.hespora-mobile-close svg { width: 26px !important; height: 26px !important; }
.hespora-mobile-menu-list { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.hespora-mobile-menu-list a {
    color: var(--hespora-white) !important; text-decoration: none !important; font-size: 16px !important; text-transform: uppercase !important;
    letter-spacing: var(--hespora-font-spacing) !important; padding: 16px 0 !important; display: block !important; border-bottom: 1px solid rgba(255,255,255,0.05) !important;
}

/* Fullscreen Search Modal Engine */
.hespora-search-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: var(--hespora-black) !important;
    z-index: 100005 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
}

.hespora-search-close { position: absolute !important; top: 30px !important; right: 30px !important; background: transparent !important; border: none !important; color: var(--hespora-white) !important; cursor: pointer !important; }
.hespora-search-close svg { width: 28px !important; height: 28px !important; }
.hespora-search-inner { width: 100% !important; max-width: 500px !important; padding: 20px !important; }
.hespora-search-form { display: flex !important; align-items: center !important; border-bottom: 2px solid var(--hespora-gold) !important; }
.hespora-search-field { width: 100% !important; background: transparent !important; border: none !important; color: var(--hespora-white) !important; font-size: 20px !important; padding: 10px 0 !important; outline: none !important; }
.hespora-search-submit { background: transparent !important; border: none !important; color: var(--hespora-gold) !important; cursor: pointer !important; }

/* WP Bar Fixes */
body.logged-in .hespora-header,
body.logged-in .hespora-drawer-content,
body.logged-in .hespora-drawer-backdrop { top: 32px !important; }

/* Responsive Grid Rules */
@media (max-width: 1024px) {
    .hespora-desktop-nav { display: none !important; }
    .hespora-mobile-toggle { display: block !important; }
}

@media screen and (max-width: 782px) {
    body.logged-in .hespora-header,
    body.logged-in .hespora-drawer-content,
    body.logged-in .hespora-drawer-backdrop { top: 46px !important; }
    
    /* Clean up product loops from forcing wide rows on search pages */
    .products, ul.products, .woocommerce-page .products, .site-content {
        max-width: 100% !important; width: 100% !important; display: flex !important; flex-wrap: wrap !important; justify-content: space-between !important; padding: 0 10px !important;
    }
    .woocommerce-page ul.products li.product, .woocommerce ul.products li.product {
        width: 48% !important; margin: 0 0 20px 0 !important;
    }
}/* --- THEME WRAPPER VISIBILITY OVERRIDES --- */

/* Force parent structural tags to display and scroll fluidly */
#page, 
.site, 
#content, 
.site-content, 
.site-content-contain,
#primary,
main#main {
    display: block !important;
    position: relative !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 100vh !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

/* Hard separation fallback: ensure mobile browsers push content down precisely */
@media (max-width: 1024px) {
    body {
        padding-top: 90px !important;
    }
    
    #content, .site-content, main {
        margin-top: 0 !important;
        padding-top: 20px !important;
    }
/* Fix for themes that run absolute container transformations */
.site-inner, .wrapper {
    max-width: 100% !important;
    width: 100% !important;
    display: block !important;
}