/* Anna Glasses Header - Correct Version */

:root {
    /* Legacy teal gradient replaced by brand pink gradient */
    --teal-gradient: var(--brand-gradient);
    --purple-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-white: #ffffff;
    --text-dark: #2c3e50;
    --text-teal: var(--primary-color);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    /* Neutral default background for all pages */
    background: #f5f7fa;
    min-height: 100vh;
    overflow-x: hidden;
}
/* Opt-in purple gradient when needed (e.g., homepage) */
body.has-purple-bg { background: var(--purple-gradient); }
body.page-category { background:#f5f7fa; }

/* Top Banner */
.top-banner {
    background: var(--brand-gradient);
    padding: 10px 0;
    color: var(--text-white);
    font-size: 13px;
    position: relative;
    z-index: 1001;
}
.sub-gia{font-size: 12px;
    color: #444444;}
.banner-text {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.banner-buttons {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.banner-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.banner-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.banner-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 16px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-close:hover {
    opacity: 1;
}

/* Header Wrapper */
.header-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 20px;
}

/* Global fixed header mode (JS adds .global-fixed-header to body) */
body.global-fixed-header .top-banner { position: fixed; top:0; left:0; right:0; z-index:1200; }
body.global-fixed-header .header-wrapper { position: fixed; left:0; right:0; z-index:1199; top: var(--top-banner-height,0px); }
/* When offcanvas is open, push header below overlay */
body.offcanvas-open .header-wrapper { z-index: 1000; }
body.global-fixed-header { padding-top: var(--global-header-total, 0px); }
body.global-fixed-header.has-floating-hero { padding-top: 0; } /* hero pages manage own spacing */

/* Main Header - Rounded Glass Effect */
.main-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 10px 16px;
    min-height: 56px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative; /* anchor for absolute children on mobile */
    /* Important: allow dropdowns to escape header on desktop */
    overflow: visible;
}

.main-header:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Logo */
.logo-section {
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-white);
    transition: transform 0.3s ease;
}

.logo:hover {
    color: var(--text-white);
    transform: scale(1.05);
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    color: var(--text-white);
    font-size: 16px;
    transition: all 0.3s ease;
}

.logo:hover .logo-icon {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(-5deg);
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-item {
    position: relative;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 15px;
    font-weight: 500;
    padding: 8px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.nav-btn:hover {
    color: var(--text-white);
    opacity: 0.8;
}

.nav-btn i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-item:hover .nav-btn i {
    transform: rotate(180deg);
}

/* Mega Dropdown base (animation only; layout handled by specific variants) */
.mega-dropdown { opacity:0; visibility:hidden; transform:translateY(-10px); transition:all .35s cubic-bezier(.22,.61,.36,1); }
.mega-dropdown.open { opacity:1; visibility:visible; transform:translateY(0); }

.mega-content {
    display: grid;
    grid-template-columns: 1fr 1fr 300px;
    gap: 30px;
    align-items: start;
}

.mega-left {
    background: var(--brand-gradient);
    padding: 25px;
    border-radius: 15px;
    color: var(--text-white);
}

.featured-category .category-title {
    color: var(--text-white);
    opacity: 0.9;
}

.mega-center {
    padding: 10px 0;
}

.mega-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.category-title {
    color: var(--text-accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.category-item {
    margin-bottom: 10px;
}

.category-item a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    transition: all 0.3s ease;
}

.featured-category .category-item a {
    color: var(--text-white);
}

.category-item.highlight a {
    color: var(--text-white);
    font-weight: 600;
}

.category-item a:hover {
    color: var(--text-accent);
    padding-left: 10px;
}

.featured-category .category-item a:hover {
    color: var(--text-white);
    opacity: 0.8;
}

.category-item a i {
    opacity: 0;
    font-size: 10px;
    transition: opacity 0.3s ease;
}

.category-item a:hover i {
    opacity: 1;
}

.mega-right {
    padding: 10px;
}

.featured-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.featured-image:hover img {
    transform: scale(1.05);
}

/* Search */
.search-section {
    flex: 1;
    max-width: 400px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    height: 45px;
    padding: 0 50px 0 20px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
}

.search-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

/* Actions */
.actions-section {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.link-btn {
    color: var(--text-white);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.link-btn:hover {
    color: var(--text-white);
    opacity: 0.8;
}

/* Mobile Toggle */
.mobile-toggle {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    color: var(--text-white);
}

/* Mobile Menu */
.offcanvas { z-index: 2000; }
.offcanvas-backdrop { z-index: 1990; }

/* ==== Primary text theme for MAIN HEADER only ==== */
.main-header .logo,
.main-header .logo-text,
.main-header .nav-btn,
.main-header .link-btn { color: var(--primary-color); }

.main-header .nav-btn:hover,
.main-header .link-btn:hover { color: var(--primary-color); opacity:.9; }

.main-header .nav-btn i { color: var(--primary-color); }

/* Search field tones to match primary */
.main-header .search-input { color: var(--primary-color); border-color: rgba(var(--primary-color-rgb),0.35); background: rgba(255,255,255,0.6); }
.main-header .search-input::placeholder { color: rgba(var(--primary-color-rgb),0.65); }
.main-header .search-btn { background: rgba(255,255,255,0.8); color: var(--primary-color); }
.offcanvas-header {
    background: var(--brand-gradient);
    color: var(--text-white);
    border-bottom: none;
    padding: 20px;
}

.offcanvas-header .logo {
    color: var(--text-white);
    font-size: 18px;
    font-weight: 700;
}

.mobile-search {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.mobile-search .search-input {
    background: white;
    color: var(--text-dark);
    border: 2px solid #e9ecef;
}

.mobile-search .search-input::placeholder {
    color: #6c757d;
}

.mobile-search .search-btn {
    background: var(--primary-color);
}

.mobile-nav {
    padding: 0;
}

.mobile-nav-link {
    display: block;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 15px 20px;
    border-bottom: 1px solid #f1f3f5;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    color: var(--text-accent);
    background: #f8f9fa;
}

/* Mega Dropdown - Full Width Version */
.mega-dropdown-full {
    position: fixed;
    top: 0; /* Will be set in JS to headerWrapper bottom (viewport coordinate) */
    left: 0;
    right: 0;
    width: 100%;
        /* Pink brand soft layered panel */
        background:
            var(--brand-gradient-soft),
            rgba(255,255,255,0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.12);
    border-radius: 0 0 26px 26px;
    /* Reduce top padding so content starts closer to header */
    padding: 26px 0 34px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all .32s cubic-bezier(.22,.61,.36,1);
    z-index: 5001; /* above overlay */
    max-height: 78vh;
    overflow-y: auto;
    pointer-events: none;
}

.mega-dropdown-full::before { /* arrow pointer */
    content: "";
    position: absolute;
    /* Nudge arrow upward to overlap header border and close visual gap */
    top: 2px;
    left: var(--arrow-left,160px);
    transform: translateY(-100%);
    width: 0; height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-bottom: 16px solid rgba(255,255,255,0.88); /* sync with panel */
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.10));
}

.mega-dropdown-full.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Overlay that blurs surrounding content when mega menu open */
/* Overlay & page blur reverted (previous blur removed for stability) */

.mega-content-full {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

.mega-left-sidebar {
    background: var(--brand-gradient);
    padding: 30px;
    border-radius: 15px;
    color: var(--text-white);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar-category {
    margin-bottom: 25px;
}

.sidebar-category:last-child {
    margin-bottom: 0;
}

.sidebar-category .category-title a{
    color: var(--text-white);
    opacity: 0.9;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0;
    padding: 12px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-category:last-child .category-title {
    border-bottom: none;
}

.sidebar-category .category-title:hover {
    opacity: 1;
    padding-left: 10px;
}

.mega-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1000px;
}

.grid-item {
    position: relative;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    position: relative;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.anna-logo {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.anna-logo i {
    font-size: 14px;
}

.product-action {
    padding: 20px;
}

.action-btn-card {
    width: 100%;
    background: var(--brand-gradient);
    border: none;
    color: var(--text-white);
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.action-btn-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4);
}

.action-btn-card i {
    font-size: 10px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.action-btn-card:hover i {
    opacity: 1;
    transform: translateX(0);
}

/* Responsive for full mega menu */
@media (max-width: 1399.98px) {
    .mega-content-full {
        max-width: 1200px;
        padding: 0 30px;
    }
}

@media (max-width: 1199.98px) {
    .mega-content-full {
        max-width: 1000px;
        padding: 0 25px;
        grid-template-columns: 250px 1fr;
        gap: 30px;
    }

    .mega-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 991.98px) {
    .mega-dropdown-full {
        /* Remove fixed top so JS dynamic positioning keeps it flush */
        padding: 28px 0;
    }

    .mega-content-full {
        padding: 0 20px;
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .mega-left-sidebar {
        padding: 20px;
        display: flex;
        gap: 20px;
        align-items: center;
        justify-content: center;
    }

    .sidebar-category {
        margin-bottom: 0;
        flex: 1;
        text-align: center;
    }

    .sidebar-category .category-title {
        border-bottom: none;
        padding: 8px 15px;
        font-size: 12px;
        white-space: nowrap;
    }

    .mega-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 767.98px) {
    .mega-dropdown-full {
        padding: 24px 0;
    }

    .mega-content-full {
        padding: 0 15px;
    }

    .mega-left-sidebar {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .sidebar-category .category-title {
        padding: 6px 12px;
        font-size: 11px;
    }

    .mega-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .product-image {
        height: 180px;
    }

    .action-btn-card {
        font-size: 11px;
        padding: 10px 16px;
    }
}

@media (max-width: 575.98px) {
    .mega-dropdown-full {
        padding: 20px 0;
    }

    .mega-content-full {
        padding: 0 10px;
    }

    .mega-left-sidebar {
        padding: 12px;
    }

    .sidebar-category .category-title {
        font-size: 10px;
        padding: 5px 8px;
    }

    .product-image {
        height: 160px;
    }
}

/* Removed legacy narrow mega dropdown overrides to allow full-width variant */

@media (max-width: 991.98px) {

    .main-nav { display: none; }

    .header-content {
        gap: 15px;
    }

    .search-section {
        max-width: 250px;
    }
}

@media (max-width: 767.98px) {
    .header-wrapper {
        padding: 10px 15px;
    }

    .main-header {
        padding: 12px 20px;
        border-radius: 40px;
        /* On mobile keep icons contained within pill */
        overflow: hidden;
    }

    .banner-buttons {
        justify-content: center;
        margin-top: 8px;
        flex-wrap: wrap;
    }

    .search-section {
        max-width: none;
    }

    /* Mobile layout: search icon left, logo centered, burger right */
    .header-content { position: static; justify-content: center; }
    .main-header .logo-section { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin:0; }
    .logo { gap:8px; }
    .logo-icon { margin-right: 0; }
    .main-header .search-section { position:absolute; left:16px; top:50%; transform:translateY(-50%); }
    .search-box { width:auto; }
    .search-input { display: none;}
	 body .show .mobile-search .search-btn {color: white;}
    body .show .search-input { display: block;
        width: 80%;
        float: left;         margin-right: 13px;}
    .search-btn { position: static; width:36px; height:36px; border-radius:50%; background: rgba(255,255,255,0.95); color: var(--primary-color); box-shadow: 0 4px 14px rgba(0,0,0,.12); display:flex; align-items:center; justify-content:center; transform:none; left:auto; right:auto; top:auto; }
    .mobile-toggle { position:absolute; right:12px; top:13%; transform:translateY(-50%); width:36px; height:36px; }

    /* Hide all right-side actions block on mobile */
    .actions-section { display: none !important; }

    .link-btn {
        font-size: 13px;
    }
    /* Hide top banner on mobile and let main header be the only bar */
    .top-banner { display: none !important; }
    body.global-fixed-header .header-wrapper { top: 0; }
    /* Disable dropdowns on mobile to avoid overlay chaos */
    .mega-dropdown, .mega-dropdown-full { display:none !important; }
    /* Offcanvas over header */
    .offcanvas { top: 0; height: 100vh; }
}

@media (max-width: 575.98px) {
    .banner-btn {
        font-size: 11px;
        padding: 4px 10px;
        margin: 2px;
    }

    .logo-text {
        font-size: 16px;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
        margin-right: 8px;
    }

    .search-section {
        max-width: 150px;
    }

    .actions-section {
        gap: 10px;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-header {
    animation: slideIn 0.6s ease-out;
}

/* Banner hide animation */
.top-banner.hide {
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.4s ease;
}