/* ==========================================================================
   FEB STORE - MODERN FLAGSHIP HEADER
   Designed per taste-skill & soft-skill guidelines:
   - Unified single-line desktop navigation (cap 70px)
   - Double-bezel search & button-in-button hotline architecture
   - Liquid frosted glassmorphism (backdrop-filter: blur(20px))
   - Fluid cubic-bezier transitions (no linear easing)
   - Clean luxury responsive collapse
   ========================================================================== */

/* Base Body Offset for Fixed Header */
body {
    margin: 0 !important;
    padding-top: 104px !important;
}

@media (max-width: 991px) {
    body {
        margin: 0 !important;
        padding-top: 58px !important;
    }
}

@media (max-width: 767px) {
    body {
        margin: 0 !important;
        padding-top: 58px !important;
        padding-bottom: calc(var(--mobile-bottom-nav-h, 56px) + var(--sab, 0px) + 14px) !important;
    }
}

/* ==========================================================================
   HEADER MAIN WRAPPER (Fixed Glassmorphic Bar)
   ========================================================================== */
.site-header-v2 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.06);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Component 1: Top Announcement Bar */
.hdr-top-bar {
    background: linear-gradient(90deg, #071529 0%, #003a8c 50%, #071529 100%);
    color: #e0f2fe;
    font-size: 11.5px;
    font-weight: 500;
    height: 34px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hdr-top-inner {
    width: min(1360px, calc(100% - 40px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hdr-top-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.15px;
}

.hdr-top-msg .badge-hot {
    background: #ff4757;
    color: #fff;
    font-size: 9.5px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulseGlow 2.2s infinite;
}

.hdr-top-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.hdr-top-link {
    color: #bae6fd;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.hdr-top-link:hover {
    color: #ffffff;
}

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

/* ==========================================================================
   Component 2: Main Navigation Bar (Single Line Desktop Layout)
   ========================================================================== */
.hdr-main {
    background: transparent;
}

.hdr-main-inner {
    width: min(1360px, calc(100% - 40px));
    margin: 0 auto;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Brand Logo */
.hdr-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hdr-brand:hover {
    transform: scale(1.02);
}

.hdr-brand-logo-img {
    height: 42px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
}

/* Desktop Navigation (Pill System) */
.hdr-desktop-nav {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.hdr-nav-pills {
    display: flex;
    align-items: center;
    gap: 3px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.hdr-nav-item {
    position: relative;
}

.hdr-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: 9999px;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.hdr-nav-link:hover {
    background: rgba(0, 98, 255, 0.08);
    color: #0062ff;
}

.hdr-nav-item.active .hdr-nav-link {
    background: #0062ff;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 98, 255, 0.28);
}

.hdr-nav-item.active .hdr-nav-link:hover {
    background: #0052cc;
    color: #ffffff;
}

.hdr-pill-badge {
    background: #ff4757;
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    padding: 1.5px 5px;
    border-radius: 999px;
    line-height: 1;
    letter-spacing: 0.3px;
    margin-left: 2px;
}

.hdr-nav-item.active .hdr-pill-badge {
    background: #ffffff;
    color: #0062ff;
}

/* Actions Cluster */
.hdr-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Double-Bezel Smart Search */
.hdr-search-pill {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    border-radius: 9999px;
    height: 40px;
    padding: 0 4px 0 14px;
    width: 220px;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.hdr-search-pill:focus-within {
    width: 280px;
    background: #ffffff;
    border-color: #0062ff;
    box-shadow: 0 0 0 3px rgba(0, 98, 255, 0.12);
}

.hdr-search-icon {
    color: #94a3b8;
    font-size: 13px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.hdr-search-pill:focus-within .hdr-search-icon {
    color: #0062ff;
}

.hdr-search-pill input {
    border: none;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    color: #1e293b;
    width: 100%;
    padding: 0;
}

.hdr-search-pill input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.hdr-search-submit {
    background: #0062ff;
    color: #ffffff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hdr-search-submit:hover {
    background: #004ecc;
    transform: scale(1.06);
}

/* Button-in-Button Hotline Pill (Soft-skill architecture) */
.hdr-hotline-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 4px 14px 4px 5px;
    border-radius: 9999px;
    background: rgba(0, 98, 255, 0.05);
    border: 1px solid rgba(0, 98, 255, 0.15);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hdr-hotline-pill:hover {
    background: rgba(0, 98, 255, 0.1);
    border-color: rgba(0, 98, 255, 0.32);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 98, 255, 0.12);
}

.hdr-hotline-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0062ff;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0, 98, 255, 0.35);
    transition: transform 0.2s ease;
}

.hdr-hotline-pill:hover .hdr-hotline-icon-wrap {
    transform: scale(1.05) rotate(-6deg);
}

.hdr-hotline-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.hdr-hotline-label {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.hdr-hotline-number {
    font-size: 13.5px;
    font-weight: 800;
    color: #0062ff;
    letter-spacing: -0.2px;
}

/* Cart Button */
.hdr-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    text-decoration: none;
    position: relative;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hdr-cart-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #0062ff;
    transform: scale(1.06);
}

.hdr-cart-icon-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.hdr-cart-badge {
    position: absolute;
    top: -9px;
    right: -11px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #0062ff;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 98, 255, 0.4);
}

/* Minimal 2-Bar Mobile Trigger */
.hdr-mobile-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.hdr-mobile-btn:hover {
    background: #e2e8f0;
}

.hdr-burger-line {
    display: block;
    width: 18px;
    height: 2px;
    background: #1e293b;
    border-radius: 2px;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1240px) and (min-width: 992px) {
    .hdr-main-inner {
        gap: 12px;
    }
    .hdr-nav-link {
        padding: 7px 10px;
        font-size: 12.5px;
    }
    .hdr-search-pill {
        width: 160px;
    }
    .hdr-search-pill:focus-within {
        width: 210px;
    }
    .hdr-hotline-pill {
        padding: 4px 10px 4px 5px;
    }
    .hdr-hotline-number {
        font-size: 12.5px;
    }
}

@media (max-width: 991px) {
    .hdr-desktop-nav {
        display: none;
    }
    .hdr-hotline-pill {
        display: none;
    }
    .hdr-mobile-btn {
        display: flex;
    }
    .hdr-main-inner {
        height: 58px;
        gap: 10px;
        width: calc(100% - 24px);
    }
    .hdr-brand-logo-img {
        height: 32px;
        max-width: 130px;
    }
    .hdr-search-pill {
        flex: 1;
        width: auto;
        height: 36px;
        padding: 0 4px 0 10px;
    }
    .hdr-search-pill:focus-within {
        width: auto;
    }
    .hdr-search-pill input {
        font-size: 12px;
    }
    .hdr-search-submit {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }
    .hdr-cart-btn {
        width: 36px;
        height: 36px;
    }
}

/* ==========================================================================
   Component 3: Mobile Offcanvas Drawer Menu
   ========================================================================== */
.hdr-mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(340px, 86vw);
    height: 100vh;
    background: #ffffff;
    z-index: 2000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.hdr-drawer-open .hdr-mobile-drawer {
    right: 0;
}

.hdr-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 17, 24, 0.55);
    backdrop-filter: blur(4px);
    z-index: 1990;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.25s ease;
}

.hdr-drawer-open .hdr-drawer-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.hdr-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.hdr-drawer-close {
    background: #f1f5f9;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    transition: all 0.2s ease;
}

.hdr-drawer-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.hdr-drawer-search {
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.hdr-drawer-search .hdr-search-pill {
    display: flex !important;
    width: 100% !important;
}

.hdr-drawer-body {
    padding: 14px 20px;
    flex: 1;
}

.hdr-drawer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hdr-drawer-nav li {
    border-bottom: 1px solid #f1f5f9;
}

.hdr-drawer-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 0;
    color: #1e293b;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.hdr-drawer-nav a:hover {
    color: #0062ff;
}

.hdr-drawer-footer {
    padding: 18px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hdr-action-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.hdr-action-link:hover {
    border-color: #0062ff;
    color: #0062ff;
}

.hdr-zalo-pill {
    background: #0068ff;
    color: #ffffff;
    border-color: #0068ff;
}

.hdr-zalo-pill:hover {
    background: #0056d6;
    color: #ffffff;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.4);
    animation: livePulse 1.8s infinite;
}

/* ==========================================================================
   Component 4: Mobile Bottom Navigation Bar (Retail Mobile App UX)
   ========================================================================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
    padding-bottom: var(--sab, 0px);
}

@media (max-width: 767px) {
    .mobile-bottom-nav {
        display: block;
    }
}

.bottom-nav-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: var(--mobile-bottom-nav-h, 56px);
    align-items: center;
    max-width: 540px;
    margin: 0 auto;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: none;
    border: none;
    padding: 6px 2px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.nav-icon-box {
    position: relative;
    font-size: 17px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
    transition: transform 0.2s ease;
}

.nav-label {
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    transition: color 0.15s ease;
    letter-spacing: -0.2px;
}

.bottom-nav-item:active .nav-icon-box {
    transform: scale(0.9);
}

.bottom-nav-item.active {
    color: #0062ff;
}

.bottom-nav-item.active .nav-icon-box {
    color: #0062ff;
    transform: translateY(-1px);
}

.bottom-nav-item.active .nav-label {
    color: #0062ff;
    font-weight: 800;
}

.bottom-nav-badge {
    position: absolute;
    top: -4px;
    right: -9px;
    background: #d70018;
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #ffffff;
    box-shadow: 0 1px 4px rgba(215, 0, 24, 0.4);
}

/* Header Micro-Animations */
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.6); }
    50% { box-shadow: 0 0 0 6px rgba(255, 71, 87, 0); }
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}
