/* assets/css/navbar.css */
/* Ultra-Premium Luxury Header Styles */

:root {
    --header-bg: rgba(255, 255, 255, 0.96);
    --header-scrolled: #FFFFFF;
    --header-height: 90px;
    --header-scrolled-height: 75px;
    --gold: #1f746d;
    --gold-hover: #2a8f86;
    --silver: #C0C0C0;
    --border-light: rgba(var(--ink-rgb), 0.08);
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================
   TOP ANNOUNCEMENT BAR
   ============================================ */
.luxury-announcement {
    background: #F5F7F6;
    height: 38px;
    overflow: hidden;
    position: relative;
    z-index: 1002;
}

.announcement-track {
    display: flex;
    animation: scrollAnnouncement 20s linear infinite;
    white-space: nowrap;
}

.announcement-message {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0 30px;
    height: 38px;
    color: rgba(var(--ink-rgb), 0.75);
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    font-weight: 400;
}

.announcement-message i {
    color: var(--gold);
    font-size: 0.75rem;
}

.announcement-divider {
    width: 4px;
    height: 4px;
    background: var(--gold);
    border-radius: 50%;
    display: inline-block;
    margin: 0 10px;
}

@keyframes scrollAnnouncement {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   MAIN HEADER
   ============================================ */
.luxury-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    transition: var(--transition-smooth);
    backdrop-filter: blur(0px);
}

.luxury-header.scrolled {
    background: var(--header-scrolled);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-light);
}

.luxury-header.scrolled .header-container {
    height: var(--header-scrolled-height);
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-smooth);
}

/* ============================================
   LOGO SECTION
   ============================================ */
.logo-area {
    width: 220px;
}

.logo-link {
    text-decoration: none;
    display: inline-block;
    transition: var(--transition-smooth);
}

.logo-link:hover {
    opacity: 0.95;
    filter: drop-shadow(0 0 8px rgba(31, 116, 109, 0.3));
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #FFFFFF 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}

.logo-tagline {
    font-family: 'Poppins', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: var(--gold);
    margin-top: 4px;
    display: block;
    text-align: center;
}

/* ============================================
   MAIN NAVIGATION
   ============================================ */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #FFFFFF;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    padding: 8px 0;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #FFFFFF;
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

.nav-link:hover {
    color: #FFFFFF;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link i {
    font-size: 0.7rem;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.nav-item:hover .nav-link i {
    transform: rotate(180deg);
}

/* ============================================
   MEGA MENU
   ============================================ */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 900px;
    /* Solid background instead of a translucent one — no backdrop-filter.
       backdrop-filter forces the browser to continuously re-blur
       everything behind the menu on every repaint (every frame of the
       opacity/transform transition, and again on scroll). On some
       browsers/GPU drivers that repaint is unstable and shows up as the
       menu "ghosting"/flashing semi-transparent over the page behind it
       — exactly the ghosted hero image you saw. A fully solid
       background needs no such recompute, so it can't glitch that way. */
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    will-change: opacity, transform;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Invisible bridge that closes the gap between the "Shop" link and the
   top of the mega menu, so moving the mouse straight down never leaves
   the hoverable area even for a frame. */
.mega-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
}

/* JS (see main.js initMegaMenu) adds/removes .mega-open on the nav-item
   with a short close-delay, so a momentary gap-crossing or fast mouse
   movement doesn't cause the menu to flicker shut and reopen. The
   :hover rule is kept as a no-JS fallback. */
.nav-item.has-mega.mega-open .mega-menu,
.nav-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.mega-menu-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);  /* was 4, now 5 */
    gap: 30px;
    padding: 40px;
}

.mega-column h4 {
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.mega-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-column ul li {
    margin-bottom: 12px;
}

.mega-column ul li a {
    color: rgba(var(--ink-rgb), 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mega-column ul li a:hover {
    color: var(--gold);
    transform: translateX(5px);
}

.mega-featured {
    background: linear-gradient(135deg, rgba(31, 116, 109, 0.1), transparent);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.mega-featured img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 12px;
}

.mega-featured p {
    color: var(--white);
    font-size: 0.8rem;
    margin: 0;
}

.mega-featured .price {
    color: var(--gold);
    font-weight: 600;
    margin-top: 8px;
}

/* ============================================
   RIGHT ACTIONS
   ============================================ */
.header-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.action-icon {
    position: relative;
    color: var(--white);
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.action-icon:hover {
    color: var(--gold);
    transform: scale(1.05);
}

.count-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--gold);
    color: #0F0F0F;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
}

/* ============================================
   SEARCH OVERLAY
   ============================================ */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    backdrop-filter: blur(20px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-content {
    max-width: 800px;
    margin: 100px auto 0;
    padding: 40px;
}

.search-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.search-close:hover {
    color: var(--gold);
    transform: rotate(90deg);
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 40px;
}

.search-input-wrapper i {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: 1.5rem;
}

.search-input-wrapper input {
    width: 100%;
    padding: 20px 0 20px 50px;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border-light);
    color: var(--white);
    font-size: 1.5rem;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition-smooth);
}

.search-input-wrapper input:focus {
    outline: none;
    border-bottom-color: var(--gold);
}

.search-results {
    max-height: 500px;
    overflow-y: auto;
}

/* ============================================
   CART DRAWER
   ============================================ */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: var(--bg-secondary);
    z-index: 2000;
    transition: right 0.3s ease;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.cart-drawer.open {
    right: 0;
}

.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-drawer-header {
    padding: 25px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-drawer-header h4 {
    color: var(--white);
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin: 0;
}

.close-cart {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.close-cart:hover {
    color: var(--gold);
    transform: rotate(90deg);
}

.cart-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    color: var(--white);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--gold);
    font-size: 0.85rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.cart-item-quantity button {
    background: var(--border-light);
    border: none;
    color: var(--white);
    width: 25px;
    height: 25px;
    border-radius: 4px;
    cursor: pointer;
}

.cart-drawer-footer {
    padding: 20px;
    border-top: 1px solid var(--border-light);
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    color: var(--white);
    margin-bottom: 20px;
}

.btn-cart-checkout {
    width: 100%;
    padding: 12px;
    background: var(--gold);
    color: #0F0F0F;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-cart-checkout:hover {
    background: var(--gold-hover);
    transform: translateY(-2px);
}

/* ============================================
   USER DROPDOWN
   ============================================ */
.user-dropdown {
    position: relative;
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 220px;
    background: #1A1A1A;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    margin-top: 15px;
}

.user-dropdown:hover .user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--white);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
}

.user-menu a:hover {
    background: rgba(31, 116, 109, 0.1);
    color: var(--gold);
    padding-left: 25px;
}

.user-menu hr {
    margin: 0;
    border-color: var(--border-light);
}

/* ============================================
   MOBILE HEADER
   ============================================ */
.mobile-header {
    display: none;
}

.hamburger-menu {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.hamburger-menu:hover {
    color: var(--gold);
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: #0F0F0F;
    z-index: 2000;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-nav-overlay.open {
    left: 0;
}

.mobile-nav-header {
    padding: 25px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav-links {
    padding: 20px;
}

.mobile-nav-links a {
    display: block;
    padding: 15px 0;
    color: var(--white);
    text-decoration: none;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-smooth);
}

.mobile-nav-links a:hover {
    color: var(--gold);
    padding-left: 10px;
}

/* ============================================
   BOTTOM MOBILE NAVIGATION
   ============================================ */
.bottom-mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-light);
    padding: 10px 20px;
    z-index: 1000;
}

.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--white);
    text-decoration: none;
    font-size: 0.7rem;
    transition: var(--transition-smooth);
}

.bottom-nav-item i {
    font-size: 1.2rem;
}

.bottom-nav-item:hover {
    color: var(--gold);
    transform: translateY(-3px);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1200px) {
    .nav-list {
        gap: 25px;
    }
    
    .mega-menu {
        width: 800px;
    }
}

@media (max-width: 992px) {
    .main-nav {
        display: none;
    }
    
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    
    .desktop-actions {
        display: flex;
        gap: 20px;
    }
    
    .bottom-mobile-nav {
        display: block;
    }
    
    .header-container {
        padding: 0 20px;
    }
    
    body {
        padding-bottom: 70px;
    }
    
    .cart-drawer {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 576px) {
    .logo-text {
        font-size: 1.3rem;
    }
    
    .logo-tagline {
        font-size: 0.55rem;
    }
    
    .header-actions {
        gap: 15px;
    }
    
    .action-icon {
        font-size: 1rem;
    }
    
    .announcement-message {
        font-size: 0.7rem;
        padding: 0 15px;
    }
}

/* Hide scrollbar for announcement */
.luxury-announcement::-webkit-scrollbar {
    display: none;
}

/* Sale Badge */
.sale-link {
    position: relative;
    padding-right: 16px;
}

.sale-count-badge {
    position: absolute;
    top: -8px;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 50%;
    background: var(--sale);
    color: #FFFFFF;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    font-family: 'Poppins', sans-serif;
}

.sale-badge {
    background: var(--sale);
    color: white;
    font-size: 8px;
    padding: 2px 6px;
    border-radius: 20px;
    margin-left: 6px;
    vertical-align: middle;
}

/* Mega Menu Small */
.mega-menu.small {
    width: 400px;
}

/* Featured Sale Box */
.mega-featured {
    background: linear-gradient(135deg, rgba(220,53,69,0.15), rgba(31, 116, 109,0.05));
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.mega-featured:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, rgba(220,53,69,0.25), rgba(31, 116, 109,0.1));
}

.mega-featured .sale-badge {
    background: var(--sale);
    color: white;
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 10px;
}

.mega-featured p {
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.mega-featured .price {
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Account Badge */
.account-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
}

/* ============================================
   SIMPLE DROPDOWN (About nav item: About Us /
   Contact Us / Blog). Same solid-background,
   hover-open pattern as .mega-menu, just a
   plain narrow list instead of a grid.
   ============================================ */
.nav-item.has-simple-menu {
    position: relative;
}

.simple-menu {
    position: absolute;
    top: 100%;
    left: 0;
    transform: translateY(8px);
    width: 200px;
    background: var(--bg-secondary);
    border: 1px solid rgba(31, 116, 109, 0.15);
    border-radius: 12px;
    padding: 8px 0;
    margin-top: 15px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    will-change: opacity, transform;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Invisible bridge closing the gap between the "About" link and the
   top of the dropdown, so moving the mouse straight down never leaves
   the hoverable area. */
.simple-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
}

.nav-item.has-simple-menu.menu-open .simple-menu,
.nav-item.has-simple-menu:hover .simple-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.simple-menu .dropdown-item {
    font-size: 0.85rem;
}

@media (max-width: 992px) {
    .simple-menu {
        display: none;
    }
}

/* Account Dropdown */
.account-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 260px;
    background: var(--bg-secondary);
    border: 1px solid rgba(31, 116, 109,0.15);
    border-radius: 12px;
    padding: 12px 0;
    margin-top: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.account-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 8px 16px;
}

.dropdown-header strong {
    display: block;
    color: var(--white);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.dropdown-header span {
    display: block;
    color: rgba(var(--ink-rgb),0.5);
    font-size: 0.7rem;
}

.dropdown-divider {
    height: 1px;
    background: rgba(var(--ink-rgb),0.06);
    margin: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: rgba(var(--ink-rgb),0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(31, 116, 109,0.1);
    color: var(--gold);
    padding-left: 20px;
}

.dropdown-item i {
    width: 20px;
    font-size: 0.9rem;
}

.dropdown-item.logout {
    color: #dc3545;
}

.dropdown-item.logout:hover {
    background: rgba(220,53,69,0.1);
    color: #dc3545;
}

/* Responsive */
@media (max-width: 992px) {
    .account-dropdown {
        right: auto;
        left: -100px;
    }
}
.mega-menu-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);  /* was 4, now 5 */
    gap: 30px;
    padding: 40px;
}

/* Adjust for smaller screens */
@media (max-width: 1200px) {
    .mega-menu-container {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 992px) {
    .mega-menu-container {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .mega-menu-container {
        grid-template-columns: 1fr 1fr;
    }
}