/* Top Bar Styles */
.top-bar { 
    background: #2d5a5a; /* Darker teal from your logo */
    padding: 8px 0;
    font-size: 14px;
    color: white;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left span {
    margin-right: 20px;
    color: #b8d4d4; /* Light teal */
}

.top-bar-left i {
    color: #c8a882; /* Gold accent from logo */
    margin-right: 5px;
}

.top-bar-right a {
    color: #b8d4d4;
    margin-left: 15px;
    transition: color 0.3s;
}

.top-bar-right a:hover {
    color: #c8a882; /* Gold hover effect */
}

/* Main Header Styles */
.main-header {
    background: #1a4a4a; /* Main teal color from your logo */
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo Styles */
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
}

.logo-img {
    height: 50px; /* Slightly larger for better visibility */
    margin-right: 15px;
}

.logo-text {
    font-size: 28px;
    font-weight: bold;
    color: white;
}

.logo-text .accent {
    color: #c8a882; /* Gold accent matching your logo */
}

/* Search Container */
.search-container {
    flex: 1;
    max-width: 500px;
    margin: 0 40px;
}

.search-form {
    display: flex;
    border: 2px solid #c8a882; /* Gold border */
    border-radius: 25px;
    overflow: hidden;
    background: white;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: 16px;
    background: white;
}

.search-btn {
    background: #c8a882; /* Gold button */
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #b8976f; /* Darker gold on hover */
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.account-link, .cart-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: color 0.3s;
    padding: 8px 12px;
    border-radius: 5px;
}

.account-link:hover, .cart-link:hover {
    color: #c8a882;
    background: rgba(200, 168, 130, 0.1);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    z-index: 5000;
}

.dropdown-content {
    display:none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 180px;
    border-radius: 5px;
    border: 1px solid #c8a882;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 6000 !important; /* higher than everything */
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #1a4a4a;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-content a:hover {
    background: #f8f9fa;
    color: #c8a882;
}

/* Cart Counter */
.cart-container {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #c8a882; /* Gold counter */
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Navigation Menu */
.main-navigation {
    background: #0f3333; /* Darker teal for navigation */
    padding: 0;
    border-top: 2px solid #c8a882; /* Gold accent line */
     z-index: 1500;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 15px 10px;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.nav-link:hover {
    background: #1a4a4a;
    border-bottom-color: #c8a882;
}

.nav-link.special {
    background: #c8a882; /* Gold for special items */
    font-weight: bold;
    color: white;
}

.nav-link.special:hover {
    background: #b8976f;
}

/* Dropdown Menu in Navigation */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 1000;
    border: 1px solid #c8a882;
    border-radius: 5px;
}

.nav-item:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: #1a4a4a;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
    color: #c8a882;
}



/* Main dropdown menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    min-width: 200px;
    background: #fff;
    border: 1px solid #ddd;
    z-index: 1000;
    max-height: 200px; /* max height before scroll */
    overflow-y: auto;  /* makes it scrollable */
}

/* Show on hover */
.nav-item.dropdown:hover > .dropdown-menu {
    display: block;
}

/* Sub-dropdown menu (flyout to the right) */
.sub-dropdown-menu {
    position: absolute;
    top: 0;
    left: 100%; /* opens to the right */
    display: none;
    min-width: 200px;
    background: #fff;
    /* border: 1px solid #ddd; */
    z-index: 1001;
}

/* Show submenu when parent is hovered */
.has-submenu:hover > .sub-dropdown-menu {
    display: block;
}

/* Style for links */
.dropdown-menu li,
.sub-dropdown-menu li {
    position: relative;
}

.dropdown-menu a,
.sub-dropdown-menu a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}

.dropdown-menu a:hover,
.sub-dropdown-menu a:hover {
    background: #f5f5f5;
    color: #000;
}

/* Remove bullets from all navigation menus */
.nav-menu,
.dropdown-menu,
.sub-dropdown-menu,
.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Ensure li elements don’t inherit */
.nav-menu li,
.dropdown-menu li,
.sub-dropdown-menu li,
.mobile-nav-menu li {
    list-style: none;
}

/* Dropdown Menu in Navigation */
/* .sub-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    background: red;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 1000;
    border: 1px solid #c8a882;
    border-radius: 5px;
}

.nav-item:hover .sub-dropdown-menu {
    display: block;
}

.sub-dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: #1a4a4a;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
}

.sub-dropdown-menu a:hover {
    background: #f8f9fa;
    color: #c8a882;
} */

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: white; /* White for visibility on teal background */
    margin: 3px 0;
    transition: 0.3s;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 2000;
    transition: left 0.3s;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
}

.mobile-nav.active {
    left: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding:  0px 5px;
    background: #1a4a4a; /* Teal header */
    color: white;
}

.mobile-nav-title {
    font-size: 18px;
    font-weight: bold;
    color: white;
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
}

.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-menu a {
    display: block;
    padding: 5px 10px;
    color: #1a4a4a;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-menu a:hover {
    background: #f8f9fa;
    color: #c8a882;
}

/* Responsive Design */
@media (max-width: 768px) {
    .top-bar {
        padding: 5px 0;
    }
    
    .header-content {
        flex-wrap: wrap;
    }
    
    .search-container {
        order: 3;
        width: 100%;
        margin: 15px 0 0 0;
        max-width: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-navigation {
        display: none;
    }
    
    .mobile-nav {
        display: block;
    }
    
    .header-actions {
        gap: 15px;
    }
    
    .account-link span, .cart-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 20px;
    }
    
    .search-input {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .search-btn {
        padding: 10px 15px;
    }

    /* Make the entire header lower priority */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Create a NEW stacking context only for the dropdown */
.account-menu {
    position: relative;
    z-index: 999999; /* TOP OF EVERYTHING */
}

.dropdown {
    position: relative;
    z-index: 999999;
}

.dropdown-content {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background: white;
    min-width: 180px;
    border: 1px solid #c8a882;
    border-radius: 5px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 999999999 !important;
}

}
