/* ============================================================
   SHARED SITE HEADER — BLNKBooks
   Applied consistently across ALL pages (desktop + mobile)
   ============================================================ */

/* Wrapper: sticky, white background, bottom border */
.site-header-wrap {
    background: white;
    border-bottom: 1px solid var(--pencil, #e8e4dd);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    overflow: hidden; /* logos must NOT bleed outside header */
}

/* Inner nav row */
.site-header {
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    height: 90px;
    gap: 24px;
    overflow: hidden; /* logos contained within header */
}

/* Logo — image, properly sized, links to / */
.site-header .header-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}

/* Desktop/tablet logo — horizontal layout, fits within 90px header */
.site-header .header-logo .logo-desktop {
    height: 68px;
    width: auto;
    display: block;
    background-color: #ffffff;
    object-fit: contain;
}

/* Mobile logo — hidden on desktop/tablet */
.site-header .header-logo .logo-mobile {
    display: none;
    background-color: #ffffff;
}

/* Right side container */
.site-header .header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Nav links group */
.site-header .header-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Individual nav links */
.site-header .header-nav-link {
    color: var(--muted, #555555);
    text-decoration: none;
    font-size: 15px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    transition: color 0.2s;
    padding: 8px 12px;
    border-radius: 6px;
}

.site-header .header-nav-link:hover {
    color: var(--ink, #1F1F1F);
    background: rgba(0,0,0,0.04);
}

/* Create Book CTA button */
.site-header .header-cta {
    background: var(--coral, #FF6B6B);
    color: white !important;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    text-decoration: none !important;
    display: inline-block;
    line-height: 1.4;
    margin-left: 8px;
    flex-shrink: 0;
}

.site-header .header-cta:hover {
    background: var(--coral-dark, #e55555) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    color: white !important;
}

/* ── Hamburger (mobile only) ── */
.site-header .header-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
    margin-left: 4px;
}

.site-header .header-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink, #1F1F1F);
    border-radius: 2px;
    transition: all 0.25s;
}

.site-header .header-hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-header .header-hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.site-header .header-hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile dropdown menu ── */
.site-header-mobile-menu {
    display: none;
    flex-direction: column;
    background: white;
    border-bottom: 2px solid var(--pencil, #e8e4dd);
    padding: 8px 20px 16px;
    position: sticky;
    top: 75px;
    z-index: 999;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.site-header-mobile-menu.open {
    display: flex;
}

.site-header-mobile-menu a {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--muted, #555555);
    padding: 14px 0;
    border-bottom: 1px solid var(--pencil, #e8e4dd);
    text-decoration: none;
    transition: color 0.2s;
}

.site-header-mobile-menu a:last-child {
    border-bottom: none;
}

.site-header-mobile-menu a:hover {
    color: var(--ink, #1F1F1F);
}

/* ── Responsive breakpoints ── */

/* Tablet: tighten spacing */
@media (max-width: 900px) {
    .site-header {
        padding: 0 24px;
    }

    .site-header .header-logo .logo-desktop {
        height: 62px; /* within 90px header */
        width: auto;
    }

    .site-header .header-nav-link {
        font-size: 14px;
        padding: 8px 8px;
    }

    .site-header .header-cta {
        padding: 9px 16px;
        font-size: 14px;
        margin-left: 4px;
    }
}

/* Mobile: hamburger layout */
@media (max-width: 768px) {
    .site-header {
        padding: 0 16px;
        height: 75px;
    }

    /* Hide horizontal desktop logo, show stacked mobile logo */
    .site-header .header-logo .logo-desktop {
        display: none;
    }

    .site-header .header-logo .logo-mobile {
        display: block;
        height: 58px; /* comfortably within 75px mobile header (8.5px top+bottom) */
        width: auto;
        background: none;
        object-fit: contain;
    }

    /* Hide desktop nav links */
    .site-header .header-nav-links {
        display: none;
    }

    /* Show hamburger */
    .site-header .header-hamburger {
        display: flex;
    }

    /* Mobile menu top offset matches header height */
    .site-header-mobile-menu {
        top: 75px;
    }

    .site-header .header-cta {
        padding: 9px 14px;
        font-size: 14px;
        margin-left: 0;
    }
}

/* ── Step indicator bar (order / preview / checkout pages) ── */
.nav-wrap.step-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 40px;
    background: white;
    border-bottom: 1px solid var(--pencil, #e8e4dd);
}

@media (max-width: 768px) {
    .nav-wrap.step-bar {
        padding: 10px 16px;
        overflow-x: auto;
    }
}
