/* ═══════════════════════════════════════
   HEADER — Chethi Batik 2026
═══════════════════════════════════════ */

/* ─── Announcement Bar ─── */
.announcement-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: #b71c1c; /* Solid fallover */
    background: linear-gradient(90deg, #8e0000 0%, #b71c1c 50%, #8e0000 100%);
    background-image: 
        linear-gradient(rgba(142, 0, 0, 0.9), rgba(183, 28, 28, 0.9)),
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 10 L20 25 L15 40 M30 15 L45 30 L40 50 M60 20 L75 10 L80 30 M85 40 L95 55 L85 75 M20 60 L10 75 L25 85 M40 70 L55 85 L50 95 M70 60 L85 70 L75 90' stroke='rgba(255,255,255,0.08)' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-size: cover, 120px 120px;
    height: 38px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.ann-bar-track {
    display: flex;
    width: max-content;
    animation: marqueeRun 45s linear infinite;
}

.ann-group {
    display: flex;
    align-items: center;
    gap: 5rem;
    padding-right: 5rem; /* Crucial for seamless looping spacing */
}

.ann-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
}

.ann-item i {
    font-size: 0.95rem;
    color: var(--white);
    opacity: 0.9;
}

.announcement-bar:hover .ann-bar-track {
    animation-play-state: paused;
}

@keyframes marqueeRun {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
    .ann-item {
        font-size: 0.65rem;
        gap: 0.5rem;
    }
    .ann-group {
        gap: 2.5rem;
        padding-right: 2.5rem;
    }
}

/* ─── Navbar ─── */
.navbar {
    position: fixed;
    top: 36px;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.9rem 0;
    background: rgba(8, 8, 8, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), padding 0.4s var(--ease);
}

.navbar.scrolled {
    background: rgba(8, 8, 8, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 0.65rem 0;
    box-shadow: 0 1px 0 var(--border-light), 0 8px 40px rgba(0, 0, 0, 0.6);
}



.nav-inner {
    width: 100%;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}



/* ─── Logo ─── */
.nav-logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo img {
    height: 38px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.25)); /* Enhanced visibility on dark */
}

/* ─── Desktop Nav Links ─── */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    flex-shrink: 0;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    transition: color 0.3s var(--ease);
    cursor: none;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.85rem;
    right: 0.85rem;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s var(--ease);
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-chevron {
    font-size: 0.6rem;
    transition: transform 0.3s var(--ease);
}

/* ─── Dropdown ─── */
.nav-dropdown {
    position: relative;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown:hover .nav-chevron,
.nav-dropdown.open .nav-chevron {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 0;
    min-width: 220px;
    background: rgba(18, 18, 18, 0.98);
    border: 1px solid var(--border-gold);
    border-radius: 4px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    list-style: none;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease), transform 0.25s var(--ease);
    z-index: 1100;
}

/* Right-aligned dropdown (for account) */
.nav-dropdown-right {
    left: auto;
    right: 0;
}

.nav-dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1.1rem;
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s, background 0.2s, padding-left 0.2s;
    white-space: nowrap;
}

.nav-dropdown-menu li a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.04);
    padding-left: 1.4rem;
}

.nav-dropdown-menu li a i {
    font-size: 0.65rem;
    color: var(--gold);
    flex-shrink: 0;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 0.4rem 0;
    pointer-events: none;
}

.dropdown-logout {
    color: rgba(220, 53, 69, 0.8) !important;
}

.dropdown-logout:hover {
    color: #ff4444 !important;
}

/* ─── Search Bar (Desktop) ─── */
.nav-search-wrap {
    flex: 1;
    max-width: 380px;
    min-width: 0;
}

.nav-search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.4s var(--ease);
    backdrop-filter: blur(5px);
}

.nav-search-form:focus-within {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(211, 47, 47, 0.15);
}

.nav-search-cat {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.04);
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.72rem;
    font-family: var(--font-body);
    padding: 0 1rem 0 0.85rem;
    height: 40px;
    cursor: pointer;
    outline: none;
    max-width: 120px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(255,255,255,0.4)'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.nav-search-cat option {
    background: #111;
    color: #fff;
}

.nav-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 0.85rem;
    font-family: var(--font-body);
    padding: 0 1rem;
    height: 40px;
    outline: none;
    min-width: 0;
}

.nav-search-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.nav-search-btn {
    flex-shrink: 0;
    width: 46px;
    height: 40px;
    background: var(--red);
    border: none;
    color: var(--white);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.4s var(--ease);
}

.nav-search-btn:hover {
    background: var(--red-dark);
    box-shadow: -5px 0 20px rgba(211, 47, 47, 0.3);
}

/* ─── Mobile Search Toggle button ─── */
.nav-search-toggle {
    display: none;
}

/* ─── Mobile Search Bar (slides in below navbar) ─── */
.nav-mobile-search {
    display: none;
    border-top: 1px solid var(--border-light);
    background: rgba(10, 10, 10, 0.97);
    padding: 0.65rem 0;
    animation: searchSlideDown 0.3s var(--ease);
}

@keyframes searchSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-mobile-search.open {
    display: block;
}

/* Hide mobile search on desktop regardless of open class */
@media (min-width: 1025px) {
    .nav-mobile-search {
        display: none !important;
    }
}

.nav-search-form--mobile {
    width: 100%;
}

/* ─── Nav Actions ─── */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.nav-action-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    width: auto;
    height: 40px;
    padding: 0 5px;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 2px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-decoration: none;
    cursor: none;
    transition: all 0.3s var(--ease);
}

.nav-action-btn:hover {
    background: var(--bg-dark-3);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    transform: translateY(-2px);
}

.nav-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: var(--red);
    color: var(--white);
    border-radius: 10px;
    font-size: 0.62rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    animation: glowBeat 2.5s ease-in-out infinite;
}

.nav-user-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--white);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Account dropdown button adjustments */
.nav-account-dropdown .nav-action-btn {
    cursor: none;
}

/* ─── Hamburger ─── */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 2px;
    cursor: none;
    transition: border-color 0.3s;
    justify-content: center;
    align-items: center;
}

.nav-hamburger:hover {
    border-color: var(--red);
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.35s var(--ease), opacity 0.3s var(--ease), width 0.3s var(--ease);
    transform-origin: center;
}

.nav-hamburger.open .hamburger-line:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.nav-hamburger.open .hamburger-line:nth-child(2) {
    opacity: 0;
    width: 0;
}

.nav-hamburger.open .hamburger-line:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ─── Mobile Menu ─── */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(360px, 100vw);
    height: 100vh;
    background: var(--bg-dark-2);
    border-left: 1px solid var(--border-light);
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.5s var(--ease);
    display: flex;
    flex-direction: column;
    padding: 6rem 2rem 2rem;
    overflow-y: auto;
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}

.mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    list-style: none;
    border-top: 1px solid var(--border-light);
}

.mobile-nav-link {
    display: block;
    padding: 1.2rem 0;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid var(--border-light);
    transition: color 0.3s, transform 0.3s;
    cursor: none;
}

.mobile-nav-link:hover {
    color: var(--white);
    transform: translateX(8px);
}

.mobile-nav-link span {
    color: var(--red);
    font-style: italic;
}

.mobile-actions {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-actions .btn {
    justify-content: center;
}

.mobile-footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.mobile-footer p {
    font-size: 0.8rem;
    color: var(--gray);
    line-height: 1.6;
}

.mobile-footer strong {
    color: var(--red);
}

/* ─── Responsive ─── */
@media (max-width: 1180px) {
    .nav-search-wrap {
        max-width: 260px;
    }

    .nav-search-cat {
        display: none;
    }
}

@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }

    .nav-search-wrap {
        display: none;
    }

    .nav-search-toggle {
        display: none !important; /* Hide by default on desktop */
    }

    .nav-hamburger {
        display: flex;
    }
}

@media (max-width: 1024px) {
    .nav-search-toggle {
        display: flex !important;
    }
}

@media (max-width: 1024px) {
    .hero-split {
        grid-template-columns: 1fr;
    }
    
    .hero-right {
        height: 60vh;
    }
    
    .hero-slider-container {
        width: 100%;
        height: 100%;
        border-radius: 0;
        box-shadow: none;
    }
}

@media (max-width: 600px) {
    .nav-action-btn.hide-sm {
        display: none;
    }

    .hide-lg {
        display: flex;
    }
}

@media (max-width: 600px) {
    .nav-inner { padding: 0 1rem !important; }
    .nav-actions { gap: 0.5rem !important; }
    .nav-action-btn { min-width: 36px !important; height: 36px !important; font-size: 0.85rem !important; }
    .nav-logo img { height: 32px !important; }
    .nav-user-name { display: none !important; }
}
