/* ============================================
   KALP Announcement Bar + Header / Navigation
   ============================================ */

/* ---- ANNOUNCEMENT BAR ---- */
.kalp-announcement {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold);
    color: var(--deep-brown);
    padding: 8px 20px;
    position: relative;
    z-index: var(--z-announcement);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.kalp-announcement.is-dismissed {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    height: 0;
    padding: 0;
    overflow: hidden;
}

.announcement__content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.announcement__icon {
    font-size: 0.9rem;
}

.announcement__text {
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    margin: 0;
}

.announcement__text strong {
    font-weight: 700;
}

.announcement__cta {
    font-family: var(--font-button);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--deep-brown);
    text-decoration: none;
    border-bottom: var(--border-thin) solid var(--deep-brown);
    padding-bottom: 1px;
    transition: opacity 0.3s ease;
}

.announcement__cta:hover {
    opacity: 0.7;
}

.announcement__close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--deep-brown);
    cursor: pointer;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.announcement__close:hover {
    opacity: 1;
}

/* ---- HEADER ---- */
.kalp-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background: rgba(26, 10, 3, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: var(--border-thin) solid rgba(201, 168, 76, 0.1);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.kalp-header.is-scrolled {
    background: rgba(26, 10, 3, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Header becomes transparent when hero is in view */
.kalp-header.is-transparent {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 40px;
}

/* ---- Logo ---- */
.header__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.header__logo-img {
    height: 70px;
    width: auto;
    filter: brightness(0) invert(1); /* Make logo white on dark bg */
    transition: filter 0.3s ease;
}

/* ---- Desktop Nav ---- */
.header__nav {
    display: flex;
    align-items: center;
}

.header__menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 36px;
}

.header__menu-item a {
    font-family: var(--font-button);
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 248, 238, 0.7);
    text-decoration: none;
    position: relative;
    padding: 4px 0;
    transition: color 0.3s ease;
}

.header__menu-item a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.header__menu-item a:hover {
    color: var(--cream);
}

.header__menu-item a:hover::after {
    width: 100%;
}

.header__menu-item--active a {
    color: var(--gold);
}

.header__menu-item--active a::after {
    width: 100%;
}

/* ---- Header Actions ---- */
.header__actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header__action-btn {
    background: none;
    border: none;
    color: rgba(255, 248, 238, 0.7);
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header__action-btn:hover {
    color: var(--gold);
}

/* ---- Cart Badge ---- */
.header__cart {
    position: relative;
}

.header__cart-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--gold);
    color: var(--deep-brown);
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.header__cart-count.has-items {
    opacity: 1;
    transform: scale(1);
}

/* ---- Hamburger (mobile only) ---- */
.header__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    width: 28px;
}

.header__hamburger-line {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--cream);
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Hamburger → X animation */
.header__hamburger.is-active .header__hamburger-line:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.header__hamburger.is-active .header__hamburger-line:nth-child(2) {
    opacity: 0;
}

.header__hamburger.is-active .header__hamburger-line:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ---- Mobile Drawer ---- */
.header__mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: var(--deep-brown);
    border-left: var(--border-thin) solid rgba(201, 168, 76, 0.15);
    z-index: 998;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.header__mobile-drawer.is-open {
    display: block;
    transform: translateX(0);
}

.header__mobile-drawer-inner {
    padding: 80px 40px 40px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.header__mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.header__mobile-menu li {
    border-bottom: var(--border-thin) solid rgba(201, 168, 76, 0.08);
}

.header__mobile-menu a {
    display: block;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--cream);
    text-decoration: none;
    padding: 18px 0;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.header__mobile-menu a:hover {
    color: var(--gold);
    padding-left: 8px;
}

.header__mobile-cta {
    margin-top: auto;
    padding-top: 40px;
}

.header__mobile-shop-btn {
    display: block;
    text-align: center;
    padding: 14px 0;
    font-family: var(--font-button);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: var(--gold);
    color: var(--deep-brown);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background 0.3s ease;
}

.header__mobile-shop-btn:hover {
    background: var(--gold-light);
}

/* ---- Mobile Overlay ---- */
.header__mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 997;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.header__mobile-overlay.is-visible {
    opacity: 1;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .header__inner {
        padding: 10px 20px;
    }

    .header__nav {
        display: none;
    }

    .header__hamburger {
        display: flex;
    }

    /* Drawer stays display:none until JS adds .is-open — prevents horizontal overflow on mobile */

    .header__logo-img {
        height: 52px;
    }

    .announcement__text {
        font-size: 0.7rem;
    }

    .announcement__cta {
        display: none; /* Save space on mobile — the whole bar is clickable */
    }

    .kalp-announcement {
        cursor: pointer;
        padding: 6px 16px;
    }
}

@media (max-width: 480px) {
    .header__actions {
        gap: 14px;
    }

    .announcement__icon {
        display: none;
    }
}

/* Ultra-small screens */
@media (max-width: 360px) {
    .header__inner {
        padding: 8px 12px;
    }

    .header__logo-img {
        height: 42px;
    }

    .header__actions {
        gap: 10px;
    }

    .announcement__text {
        font-size: 0.6rem;
    }

    .kalp-announcement {
        padding: 5px 10px;
    }
}
