/* Wish Header Styles */
:root {
    --wish-teal: #2db5a5;
    --wish-blue: #0ea5e9;
    --wish-dark: #212529;
    --wish-gray: #6c757d;
    --wish-light-gray: #f8f9fa;
    --wish-border: #e3e6ea;
}

/* Header Wrapper */
.header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: white;
}

/* Header Wrappers */
.mobile-header-wrapper,
.desktop-header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background-color: white;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.wish-header {
    background: white;
    width: 100%;
    overflow-x: hidden;
    height: var(--mobile-header-height);
}

.wish-nav-logo {
    width: 60px !important;
    object-fit: contain;
}

/* Desktop Header Styles */
.main-nav {
    background-color: #fff;
    height: var(--desktop-header-height);
}

.main-nav .navbar-brand img.desktop-logo {
    height: 50px;
    max-width: 100%;
    margin-left: -20px;
}

.main-nav .search-container {
    max-width: 600px;
    margin: 0 auto;
}

.main-nav .search-input-wrapper {
    position: relative;
    width: 100%;
    background: #f8f9fa;
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.main-nav .search-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 12px 50px 12px 20px;
    font-size: 16px;
    color: #333;
    outline: none;
}

.main-nav .search-input::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

.main-nav .search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

/* Main Navigation in Header */
.main-navbar {
    background-color: transparent;
}

.main-navbar .navbar-nav {
    display: flex;
    flex-direction: row;
}

.main-navbar .nav-item {
    position: relative;
}

.main-navbar .nav-link {
    color: var(--wish-dark);
    font-weight: 500;
    padding: 10px 15px;
    transition: all 0.3s ease;
    font-size: 16px;
}

.main-navbar .nav-item.active .nav-link,
.main-navbar .nav-link:hover {
    color: var(--wish-blue);
}

.desktop-header-wrapper .nav-link {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
    display: inline-block;
    vertical-align: middle;
    line-height: 1.2;
    text-align: center;
}

/* Desktop Menu Navigation */
.desktop-menu-nav {
    display: none; /* Hide the separate menu nav since we've moved it inline */
}

/* Dropdown Menus */
.main-navbar .dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 0;
    padding: 0;
    margin-top: 0;
}

.main-navbar .dropdown-item {
    padding: 10px 20px;
    color: var(--wish-dark);
    transition: all 0.2s ease;
}

.main-navbar .dropdown-item:hover {
    background-color: #f8f9fa;
    color: var(--wish-blue);
}

/* Mega Dropdown */
.main-navbar .mega-dropdown {
    position: static;
}

.main-navbar .mega-dropdown-menu {
    width: 100%;
    padding: 20px;
    left: 0;
    right: 0;
}

.main-navbar .category-heading {
    display: block;
    font-weight: 600;
    color: var(--wish-dark);
    text-transform: uppercase;
    font-size: 14px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--wish-border);
}

.main-navbar .category-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.main-navbar .category-list li {
    margin-bottom: 5px;
}

.main-navbar .category-list a {
    color: var(--wish-gray);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.main-navbar .category-list a:hover {
    color: var(--wish-blue);
    padding-left: 5px;
}

/* Legacy Desktop Menu Navigation - Kept for compatibility */
.desktop-menu-nav .dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 0;
    padding: 0;
    margin-top: 0;
}

.desktop-menu-nav .dropdown-item {
    padding: 10px 20px;
    color: var(--wish-dark);
    transition: all 0.2s ease;
}

.desktop-menu-nav .dropdown-item:hover {
    background-color: #f8f9fa;
    color: var(--wish-blue);
}

.desktop-menu-nav .mega-dropdown {
    position: static;
}

.desktop-menu-nav .mega-dropdown-menu {
    width: 100%;
    padding: 20px;
}

.desktop-menu-nav .category-heading {
    display: block;
    font-weight: 600;
    color: var(--wish-dark);
    text-transform: uppercase;
    font-size: 14px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--wish-border);
}

.desktop-menu-nav .category-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.desktop-menu-nav .category-list li {
    margin-bottom: 5px;
}

.desktop-menu-nav .category-list a {
    color: var(--wish-gray);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.desktop-menu-nav .category-list a:hover {
    color: var(--wish-blue);
    padding-left: 5px;
}

.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    background: #f8f9fa;
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.search-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 12px 50px 12px 20px;
    font-size: 16px;
    color: #333;
    outline: none;
}

.search-input::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

.search-input:focus {
    outline: none;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-btn {
    background: none;
    border: none;
    color: var(--wish-gray);
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
    text-decoration: none;
}

.header-btn:hover {
    color: var(--wish-dark);
    background-color: var(--wish-light-gray);
}

.get-app-btn {
    background: var(--wish-blue);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.get-app-btn:hover {
    background: #0284c7;
}

.hamburger-menu {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--wish-dark);
    padding: 8px;
}

/* Navigation Styles */
.wish-nav {
    background: white;
    padding: 8px 0;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Mobile Navigation */
@media (max-width: 767px) {
    .wish-nav {
        position: relative;
        padding: 10px 0;
    }

    .nav-items {
        padding: 0 10px;
        gap: 15px;
    }

    .nav-item {
        font-size: 14px;
    }
}

/* Desktop Navigation */
@media (min-width: 768px) {
    .wish-nav {
        position: relative;
    }
}

.wish-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.nav-items {
    display: flex;
    gap: 20px;
    align-items: center;
    margin: 0;
    padding: 0 15px;
    list-style: none;
    white-space: nowrap;
}

.nav-item {
    color: var(--wish-gray);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.nav-item:hover {
    color: var(--wish-dark);
}

.nav-item.active {
    color: var(--wish-dark);
}

.deals-badge {
    background: #dc3545;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 3px;
}

/* Count Badges */
.count-badge {
    position: absolute !important;
    z-index: 1000;
    top: -5px;
    right: -5px;
    background-color: var(--wish-teal);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-count-badge {
    position: absolute !important;
    z-index: 1000;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background-color: var(--wish-teal);
    color: white;
    border-radius: 12px;
    min-width: 20px;
    height: 20px;
    font-size: 12px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Offer Banner */
.mobile-offer-banner {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    padding: 15px;
    color: white;
    position: relative;
    overflow: hidden;
}

.offer-content {
    position: relative;
    z-index: 2;
}

.offer-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.offer-code {
    background: white;
    color: var(--wish-dark);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    display: inline-block;
    margin-top: 5px;
}

.offer-decorations {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    opacity: 0.8;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .header-actions {
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .search-container {
        max-width: 100%;
        margin: 0 5px;
    }

    .search-input {
        font-size: 13px;
        padding: 6px 30px 6px 10px;
        background: #f1f3f4;
        height: 32px;
    }

    .search-btn {
        right: 2px;
        padding: 4px;
        font-size: 14px;
    }

    .header-btn {
        padding: 4px 6px;
        font-size: 12px;
    }

    .count-badge {
        font-size: 8px;
        width: 14px;
        height: 14px;
        right: -3px;
        top: -3px;
    }

    .nav-items {
        gap: 20px;
        overflow-x: auto;
        white-space: nowrap;
        padding-left: 15px;
        padding-right: 15px;
        padding-top: 4px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .nav-items::-webkit-scrollbar {
        display: none;
    }

    .nav-item {
        flex-shrink: 0;
        font-size: 13px;
    }

    .header-actions .header-btn:not(.get-app-btn) span {
        display: none;
    }

    .get-app-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .deals-badge {
        position: relative;
        top: -2px;
    }
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 1001;
    display: none;
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 1001;
    padding: 0;
    overflow-y: auto;
}

.wish-menu {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    background: white;
    position: sticky;
    top: 0;
    z-index: 2;
}

#mobile-menu-close {
    background: none;
    border: none;
    font-size: 20px;
    padding: 5px;
}
