/* LUXURY THEME HEADER & MARQUEE */

/* Marquee Bar */
.marquee-bar {
    background: var(--marquee-bg, #000);
    color: var(--marquee-color, #fff);
    height: 40px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    font-size: var(--marquee-size, 0.85rem);
    font-weight: 500;
    letter-spacing: 1px;
    border-bottom: none;
}

.marquee-content a {
    text-decoration: none;
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: marquee var(--marquee-speed, 20s) linear infinite;
    gap: 100px;
    padding-left: 100%;
}

.marquee-content span {
    display: inline-block;
    padding-right: 50px;
    font-size: var(--marquee-size, inherit);
    color: var(--marquee-color, inherit);
}

.marquee-content a {
    color: var(--marquee-color, inherit);
    text-decoration: none;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

@keyframes marquee-scroll {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-100%, 0);
    }
}

/* Header Base */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    height: 80px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

body.is-home .main-header {
    top: 40px;
}

body.has-marquee .main-header {
    top: 40px;
}

body.is-home .main-header {
    top: 0;
    /* Reset */
}

body.is-home.has-marquee .main-header {
    top: 40px;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

/* Logo */
.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 1px;
}

.logo-dot {
    color: var(--accent);
}

/* Navigation Links */
.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
    background: rgba(0, 0, 0, 0.05);
    /* Luxury Override */
    border-radius: 4px;
}

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

.icon-btn {
    color: var(--primary);
    text-decoration: none;
    font-size: 1.2rem;
    position: relative;
    transition: 0.2s;
}

.icon-btn:hover {
    color: var(--accent);
}

.badge-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Menu & Helpers */
.mobile-only,
.mobile-menu-close,
.mobile-auth-links {
    display: none;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Search Trigger */
.header-inner .user-actions .search-trigger {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #1a1a1a;
    transition: all 0.2s ease;
    border-radius: 50%;
}

.search-trigger:hover {
    color: var(--accent);
    background: rgba(0, 0, 0, 0.03);
}

/* Search Dropdown */
.search-dropdown-wrapper {
    position: relative;
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 20px);
    right: -10px;
    width: 400px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border: 1px solid var(--border-color);
}

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

.search-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 22px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    border-top: 1px solid var(--border-color);
    border-left: 1px solid var(--border-color);
}

.search-input-group {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
}

.search-input-group input {
    border: none;
    background: transparent;
    padding: 5px;
    width: 100%;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.search-input-group i {
    color: #999;
    margin-right: 10px;
}

.search-submit {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 5px;
}

.search-quick-links {
    font-size: 0.9rem;
}

.search-quick-links .quick-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-quick-links a {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-light);
    color: var(--text-color);
    border-radius: 15px;
    margin-right: 5px;
    margin-bottom: 5px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.search-quick-links a:hover {
    background: var(--accent);
    color: white;
}

/* Recently Viewed in Dropdown */
.recently-viewed-section {
    margin-top: 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.recently-viewed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.recently-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
}

.recently-viewed-carousel {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
}

.recently-viewed-carousel::-webkit-scrollbar {
    height: 4px;
}

.recently-viewed-carousel::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

.rv-product-card {
    min-width: 120px;
    width: 120px;
    flex-shrink: 0;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px;
    transition: all 0.2s;
}

.rv-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.rv-image {
    width: 100%;
    height: 100px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.rv-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rv-rating-row {
    font-size: 0.7rem;
    color: #f39c12;
    margin-bottom: 3px;
}

.rv-review-count {
    color: var(--text-light);
    margin-left: 2px;
}

.rv-price {
    font-size: 0.85rem;
    font-weight: 600;
}

.scroll-buttons button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 0 5px;
}

.scroll-buttons button:hover {
    color: var(--accent);
}

/* Mobile Header & Responsive */
@media (max-width: 900px) {
    .main-header {
        height: 70px;
        padding: 0 15px;
    }

    .mobile-menu-btn {
        display: block;
        z-index: 1002;
        color: #000;
        font-size: 1.5rem;
        order: -1;
        margin-right: 10px;
        margin-left: -10px;
    }

    body.menu-open .mobile-menu-btn {
        visibility: hidden;
    }


    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        padding: 10px 20px 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease-in-out;
        z-index: 1001;
        gap: 0;
        overflow-y: auto;
    }

    .nav-links::after {
        content: '';
        display: block;
        min-height: 120px;
        flex-shrink: 0;
        width: 100%;
    }

    .mobile-icon-spacing {
        width: 20px;
        text-align: center;
        margin-right: 10px;
        color: var(--accent);
    }

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

    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        animation: fadeIn 0.3s;
    }

    .mobile-menu-close {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        position: relative;
        background: transparent;
        border: none;
        width: 100%;
        height: auto;
        box-shadow: none;
        border-radius: 0;
        z-index: 1002;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 2px solid var(--accent);
        color: var(--primary);
        font-size: 1.8rem;
        order: -3;
    }

    .mobile-auth-links {
        display: flex;
        gap: 10px;
        margin-bottom: 5px;
        order: -2;
    }

    .mobile-auth-links a {
        flex: 1;
        text-align: center;
        background: #f5f5f5;
        padding: 10px 5px;
        border-radius: 4px;
        color: #000;
        font-weight: 800;
        text-transform: uppercase;
        font-size: 0.85rem;
    }

    .nav-links a {
        display: block;
        width: 100%;
        padding: 12px 0 12px 15px;
        border-bottom: 1px solid #f0f0f0;
        font-size: 0.95rem;
        text-align: left;
    }

    /* Mobile Search Dropdown */
    .search-dropdown {
        position: fixed;
        top: 55px;
        left: 0;
        width: 100%;
        border-radius: 0;
        padding: 5px 8px;
        display: none;
    }

    .search-dropdown.active {
        display: block;
    }

    .search-dropdown::before {
        display: none;
    }
}

/* User Dropdown */
.user-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 220px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    border: 1px solid var(--border-color);
}

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

.user-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 15px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    border-top: 1px solid var(--border-color);
    border-left: 1px solid var(--border-color);
}

.user-dropdown-menu .dropdown-header {
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 5px;
}

.user-dropdown-menu .dropdown-header span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
}

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.user-dropdown-menu a i {
    width: 16px;
    font-size: 1rem;
    color: var(--text-light);
}

.user-dropdown-menu a:hover {
    background: var(--bg-light);
    color: var(--accent);
}

.user-dropdown-menu a:hover i {
    color: var(--accent);
}

.user-dropdown-menu .dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 5px 0;
}

/* Toast Notification Styles */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    border-left: 5px solid #2ecc71;
    /* Default success */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    min-width: 300px;
    z-index: 9999;
    transform: translateX(120%);
    animation: slideIn 0.5s forwards;
}

.toast-notification.type-error {
    border-left-color: #e74c3c;
}

.toast-notification.type-info {
    border-left-color: #3498db;
}

.toast-icon i {
    font-size: 1.5rem;
    color: #2ecc71;
}

.type-error .toast-icon i {
    color: #e74c3c;
}

.toast-content h4 {
    margin: 0 0 5px;
    font-size: 1rem;
    color: #333;
}

.toast-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
}

@keyframes slideIn {
    to {
        transform: translateX(0);
    }
}

@keyframes slideOut {
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}