/* ==========================================
   VINX Header Styles
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --vinx-purple-dark: #231648;
    --vinx-purple-topbar: #291a52;
    --vinx-purple-text: #1d1538;
    --vinx-orange: #ffbb00;
    --vinx-orange-hover: #e5bb00;
    --vinx-gray-bg: #f5f6fa;
    --vinx-gray-border: #eaedf2;
    --vinx-gray-text: #6e7284;
    --vinx-gray-light-text: #969ab0;
    --vinx-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --vinx-container-max: 1320px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--vinx-font);
    color: var(--vinx-purple-text);
    background-color: #ffffff;
    line-height: 1.5;
}

/* Base Header Container */
.vinx-header-wrapper {
    width: 100%;
    position: relative;
    z-index: 1000;
    font-family: var(--vinx-font);
}

.vinx-container {
    width: 100%;
    max-width: var(--vinx-container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================
   1. TOP BAR STYLES
   ========================================== */
.vinx-top-bar {
    background-color: var(--vinx-purple-topbar);
    color: #ffffff;
    font-size: 13px;
    padding: 8px 0;
    font-weight: 500;
}

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

.top-bar-left,
.top-bar-center,
.top-bar-right {
    display: flex;
    align-items: center;
}

/* Top Left */
.top-bar-left {
    gap: 20px;
}

.top-bar-info-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.top-bar-info-item i {
    color: var(--vinx-orange);
    font-size: 14px;
}

.top-bar-info-item a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.top-bar-info-item a:hover {
    color: var(--vinx-orange);
}

.shipping-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.shipping-info i {
    color: var(--vinx-orange);
    font-size: 15px;
}


.lang-dropdown {
    position: relative;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    user-select: none;
}

.lang-dropdown i {
    font-size: 11px;
    transition: transform 0.2s ease;
}

.lang-dropdown:hover i {
    transform: translateY(2px);
}

.lang-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: #ffffff;
    color: var(--vinx-purple-text);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    padding: 8px 0;
    min-width: 120px;
    display: none;
    z-index: 1010;
}

.lang-dropdown.open .lang-menu {
    display: block;
}

.lang-option {
    padding: 6px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.lang-option:hover {
    background: var(--vinx-gray-bg);
    color: var(--vinx-orange);
}

/* Top Center Announcement */
.top-bar-center {
    gap: 14px;
    white-space: nowrap;
}

.promo-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.promo-tag i {
    color: var(--vinx-orange);
    font-size: 14px;
}

.track-order-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.08);
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.track-order-btn:hover {
    background-color: #ffffff;
    color: var(--vinx-purple-dark);
    border-color: #ffffff;
}

/* Top Right Socials */
.top-bar-right {
    gap: 10px;
}

.social-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: #ffffff;
    color: var(--vinx-purple-dark);
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s ease;
}

.social-icon-btn:hover {
    background-color: var(--vinx-orange);
    color: #ffffff;
    transform: translateY(-2px);
}

/* ==========================================
   2. MAIN HEADER STYLES
   ========================================== */
.vinx-main-header {
    background-color: #ffffff;
    padding: 16px 0;
    border-bottom: 1px solid var(--vinx-gray-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.vinx-main-header.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 12px 0;
    box-shadow: 0 6px 22px rgba(35, 22, 72, 0.1);
    animation: stickySlideDown 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes stickySlideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}


.vinx-main-header .vinx-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* Header Brand / Logo */
.header-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-brand img {
    height: 62px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Main Navigation Menu */
.header-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 32px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--vinx-purple-text);
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.nav-link i {
    font-size: 11px;
    color: var(--vinx-gray-light-text);
    transition: transform 0.2s ease, color 0.2s ease;
}

.nav-item:hover .nav-link,
.nav-item.active .nav-link {
    color: var(--vinx-purple-dark);
}

.nav-item:hover .nav-link i {
    color: var(--vinx-orange);
    transform: translateY(2px);
}

/* Active indicator underline */
.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 28px;
    height: 3px;
    background-color: var(--vinx-orange);
    border-radius: 2px;
}

/* Submenu Dropdown (for Shop, Products, Pages, etc.) */
.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 12px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(35, 22, 72, 0.12);
    border: 1px solid var(--vinx-gray-border);
    min-width: 200px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 100;
}

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

.dropdown-link {
    display: block;
    padding: 9px 20px;
    color: var(--vinx-purple-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.dropdown-link:hover {
    background-color: var(--vinx-gray-bg);
    color: var(--vinx-orange);
    padding-left: 24px;
}

/* Search Box Container */
.header-search-form {
    flex: 1;
    max-width: 320px;
    margin: 0 12px;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: var(--vinx-gray-bg);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 4px 6px 4px 16px;
    transition: all 0.2s ease;
}

.search-box:focus-within {
    border-color: rgba(35, 22, 72, 0.2);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(41, 26, 82, 0.05);
}

.search-input {
    width: 100%;
    border: none;
    background: transparent;
    font-family: var(--vinx-font);
    font-size: 14px;
    color: var(--vinx-purple-text);
    outline: none;
}

.search-input::placeholder {
    color: var(--vinx-gray-light-text);
    font-weight: 400;
}

.search-btn {
    border: none;
    background: transparent;
    color: var(--vinx-purple-dark);
    font-size: 15px;
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.search-btn:hover {
    color: var(--vinx-orange);
}

/* Search Auto-complete Modal Popup */
.header-search-form {
    position: relative;
}

.search-box {
    position: relative;
}

.search-suggestions-modal {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    min-width: 320px;
    background-color: #ffffff;
    border: 1px solid var(--vinx-gray-border, #eaedf2);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(35, 22, 72, 0.18);
    z-index: 9999;
    display: none;
    overflow: hidden;
    animation: modalFadeIn 0.2s ease;
}

.search-suggestions-modal.active {
    display: block !important;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background-color: var(--vinx-purple-dark);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.suggestions-count-badge {
    background-color: var(--vinx-orange);
    color: var(--vinx-purple-dark);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
}

.suggestions-list {
    display: flex;
    flex-direction: column;
}

.suggestion-item-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--vinx-purple-text);
    border-bottom: 1px solid var(--vinx-gray-border);
    transition: background-color 0.2s ease;
}

.suggestion-item-card:last-child {
    border-bottom: none;
}

.suggestion-item-card:hover {
    background-color: var(--vinx-gray-bg);
}

.suggestion-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    background-color: #f1f4fa;
    border: 1px solid var(--vinx-gray-border);
    flex-shrink: 0;
}

.suggestion-info {
    flex: 1;
    min-width: 0;
}

.suggestion-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--vinx-purple-dark);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.suggestion-cat {
    font-size: 10px;
    font-weight: 700;
    color: var(--vinx-gray-text);
    text-transform: uppercase;
}

.suggestion-price {
    font-size: 12px;
    font-weight: 800;
    color: var(--vinx-purple-dark);
}

.suggestion-price .old-price {
    font-size: 10px;
    color: var(--vinx-gray-light-text);
    text-decoration: line-through;
    margin-left: 4px;
}

.suggestions-empty {
    padding: 20px 14px;
    text-align: center;
    font-size: 13px;
    color: var(--vinx-gray-text);
    font-weight: 600;
}

.suggestions-footer {
    background-color: var(--vinx-gray-bg);
    border-top: 1px solid var(--vinx-gray-border);
    padding: 8px 14px;
    text-align: center;
}

.view-all-results-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    color: var(--vinx-purple-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.view-all-results-btn:hover {
    color: var(--vinx-orange);
}

/* Right Action Buttons (Account, Wishlist, Cart) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-shrink: 0;
}

.action-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--vinx-purple-dark);
    text-decoration: none;
    font-size: 20px;
    transition: color 0.2s ease;
}

.action-btn:hover {
    color: var(--vinx-orange);
}

/* Counter Badge */
.action-btn .badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background-color: var(--vinx-orange);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid #ffffff;
}

/* Mobile Hamburger Trigger */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--vinx-purple-dark);
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
}

/* Mobile Drawer Overlay & Menu */
.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.mobile-drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: #ffffff;
    z-index: 2001;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    transition: left 0.3s ease;
    overflow-y: auto;
}

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

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

.mobile-close-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--vinx-purple-text);
    cursor: pointer;
}

.mobile-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-nav-link {
    font-size: 16px;
    font-weight: 700;
    color: var(--vinx-purple-text);
    text-decoration: none;
    display: block;
}

.mobile-nav-link:hover {
    color: var(--vinx-orange);
}

/* ==========================================
   RESPONSIVE BREAKPOINTS
   ========================================== */
@media (max-width: 1100px) {
    .vinx-container {
        padding: 0 16px;
    }
    
    .nav-list {
        gap: 18px;
    }

    .header-search-form {
        max-width: 240px;
    }
}

@media (max-width: 991px) {
    .top-bar-center {
        display: none;
    }
    
    .header-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .header-search-form {
        max-width: 100%;
        order: 3;
        width: 100%;
        margin: 10px 0 0 0;
    }

    .vinx-main-header .vinx-container {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .vinx-top-bar .vinx-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 16px;
    }

    .top-bar-left {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 16px;
        font-size: 12px;
        text-align: center;
    }

    .top-bar-right {
        display: none; /* Hide top social icons on mobile for cleaner top bar */
    }
}

@media (max-width: 576px) {
    .vinx-main-header {
        padding: 12px 0;
    }

    .header-brand img {
        height: 34px;
    }

    .header-actions {
        gap: 14px;
    }

    .action-btn {
        font-size: 18px;
    }

    .address-info {
        font-size: 11px;
    }

    .hotline-info {
        font-size: 11px;
    }
}

@media (max-width: 400px) {
    .address-info {
        display: none; /* Hide full address text on extra small phones to preserve space */
    }
}

