/* ==========================================================================
   Global Header (Premium, Compact)
   ========================================================================== */

:root {
    /* Colors */
    --al-bg-primary: #ffffff;
    --al-bg-secondary: #fafafa;
    --al-bg-tertiary: #f2f2f2;
    --al-text-primary: #111111;
    --al-text-secondary: #555555;
    --al-text-muted: #888888;
    --al-accent-pink: #E0217A;
    --al-accent-pink-hover: #c91b6b;
    --al-accent-pink-subtle: rgba(224, 33, 122, 0.08);
    --al-border-light: rgba(0, 0, 0, 0.08);
    --al-border-medium: rgba(0, 0, 0, 0.12);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Sora', var(--font-sans);
    --font-editorial: 'Playfair Display', serif;
    --font-mono: 'DM Mono', monospace;

    /* Shadows & Elevation */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.08);
    
    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Spacing */
    --max-width: 1200px;
    --container-padding: 24px;
}

@media (max-width: 768px) {
    :root {
        --container-padding: 16px;
    }
}

body, html {
    margin: 0 !important;
    padding: 0 !important;
}

.al-container-v2 {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Fixes position: sticky inside body and removes default margin */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: clip !important;
}

.al-header-v2 {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid transparent;
    height: 64px;
    display: flex;
    align-items: center;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.al-header-v2.scrolled {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(224, 33, 122, 0.1); /* Subtle pink-tinted border */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

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

.al-logo-v2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--al-text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.al-logo-v2 span {
    color: var(--al-accent-pink);
}
.al-logo-v2:hover { text-decoration: none; color: var(--al-text-primary); }

.al-nav-center-v2 {
    display: flex;
    gap: 32px;
}
.al-nav-center-v2 a {
    color: var(--al-text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}
.al-nav-center-v2 a:hover,
.al-nav-center-v2 a.active,
.al-nav-center-v2 a.al-active {
    color: var(--al-accent-pink);
}

.al-nav-right-v2 {
    display: flex;
    align-items: center;
    gap: 16px;
}
.al-nav-right-v2 .al-login-v2 {
    font-size: 14px;
    font-weight: 500;
    color: var(--al-text-primary);
    text-decoration: none;
}
.al-btn-primary-v2 {
    background: var(--al-accent-pink);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none !important;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}
.al-btn-primary-v2:hover {
    background: var(--al-accent-pink-hover);
    color: #fff;
    text-decoration: none !important;
}

/* LovePoints Pill */
.al-header-points-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(224, 33, 122, 0.07);
    border: 1px solid rgba(224, 33, 122, 0.2);
    color: var(--al-accent-pink, #E0217A);
    padding: 6px 13px;
    border-radius: 999px;
    text-decoration: none !important;
    font-size: 13.5px;
    font-weight: 700;
    font-family: var(--font-sans, 'Inter', sans-serif);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.al-header-points-pill:hover {
    background: rgba(224, 33, 122, 0.13);
    border-color: rgba(224, 33, 122, 0.38);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(224, 33, 122, 0.15);
    color: var(--al-accent-pink, #E0217A) !important;
}

.al-header-points-pill:active {
    transform: scale(0.97);
}

.al-points-icon {
    width: 15px;
    height: 15px;
    stroke-width: 2.2px;
    color: #E0217A;
    animation: alSparklePulse 2.5s ease-in-out infinite;
}

@keyframes alSparklePulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 4px rgba(224, 33, 122, 0.45)); }
}

.al-points-count {
    color: #111;
    font-weight: 700;
}

.al-points-unit {
    color: #E0217A;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

@media (max-width: 480px) {
    .al-header-points-pill {
        padding: 5px 9px;
        font-size: 12px;
    }
}

/* Premium Profile Link */
.al-header-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px; /* small padding for focus/hover ring, not a giant pill */
    border-radius: 40px;
    text-decoration: none;
    color: #111; /* deep charcoal */
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.al-header-profile:hover {
    background-color: #FFF0F6; /* very light warm/pink background */
    text-decoration: none;
    color: #111;
}

.al-header-profile:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(224, 33, 122, 0.2); /* subtle AapkaLove pink outline/ring */
}

.al-header-profile:active {
    transform: scale(0.98);
}

.al-header-profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.08); /* subtle 1px border */
    flex-shrink: 0;
}

@media (min-width: 992px) {
    .al-header-profile-avatar {
        width: 34px;
        height: 34px;
    }
}

.al-header-profile-name {
    font-size: 14px;
    font-weight: 600;
    margin-right: -1px; /* adjusts gap smoothly to 7px */
}

.al-header-profile-chevron {
    width: 14px;
    height: 14px;
    stroke-width: 2px;
    color: #888; /* muted gray */
    transition: color 0.15s ease;
    margin-left: -2px; /* spacing: Username -> chevron 5-7px (gap is 8px, -2 = 6px) */
}

.al-header-profile:hover .al-header-profile-chevron {
    color: #E0217A; /* slightly darker / AapkaLove pink */
}

/* Fix d-none d-sm-inline */
.al-header-profile .d-none {
    display: none;
}
@media (min-width: 576px) {
    .al-header-profile .d-sm-inline {
        display: inline !important;
    }
}

@media (max-width: 768px) {
    .al-nav-center-v2 { display: none; }
    .al-nav-right-v2 .al-btn-primary-v2 { display: none; }
    .al-header-profile-dropdown { display: none !important; }
    .al-header-points-pill { display: none !important; } /* Rendered in mobile bottom nav */
    
    .al-nav-right-v2 {
        gap: 10px;
        align-items: center;
    }
    
    .al-header-v2 {
        height: 56px;
    }
    .al-logo-v2 {
        font-size: 18px;
    }
    #al-hamburger-btn {
        display: block !important;
        padding: 4px;
        margin-left: 2px;
    }

    .al-nav-notifications {
        width: 36px !important;
        height: 36px !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .al-notif-dropdown {
        right: -30px;
        width: min(340px, calc(100vw - 32px));
    }
}

@media (max-width: 480px) {
    .al-nav-right-v2 {
        gap: 8px;
    }
    .al-nav-notifications {
        width: 34px !important;
        height: 34px !important;
        margin-right: 0 !important;
    }
    .al-header-profile {
        padding: 2px 4px;
    }
    .al-header-profile-avatar {
        width: 30px;
        height: 30px;
    }
}

#al-hamburger-btn {
    display: none;
}

/* Mobile Menu Drawer */
.al-mobile-menu {
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    height: calc(100vh - 64px);
    background: #ffffff;
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    display: none;
    flex-direction: column;
}
.al-mobile-menu.is-open {
    transform: translateX(0);
}

@media (max-width: 768px) {
    .al-mobile-menu {
        display: flex;
        top: 56px;
        height: calc(100vh - 56px);
    }
}
