/* ==========================================================================
   Site Header / Entablature
   Classical architecture styling: cornice → frieze → architrave.
   Visual design lives in components/entablature.css.
   This file retains legacy utility rules (logo, utilities, cart badge,
   hamburger, search overlay, mobile nav) that are shared across all pages.
   ========================================================================== */

/*
 * .site-header is kept as a selector alias alongside .museum-entablature
 * so that existing WooCommerce and plugin hooks targeting .site-header still work.
 */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--entablature-height);
    z-index: var(--z-header);
    /* SAFARI: do NOT add filter/opacity here — would collapse child 3D contexts */
}

/* -------------------------------------------------------------------------- */
/* Logo                                                                         */
/* -------------------------------------------------------------------------- */
.site-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    flex-shrink: 0;
}

.site-logo__image {
    height: 36px;
    width: auto;
}

.site-logo__text {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1;
}

.site-logo__text span {
    color: var(--color-gold);
}

/* -------------------------------------------------------------------------- */
/* Utility bar                                                                  */
/* -------------------------------------------------------------------------- */
.site-header__utilities {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    flex-shrink: 0;
}

.header-utility-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    cursor: pointer;
    text-decoration: none;
    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast);
}

.header-utility-btn:hover {
    background: var(--color-vault);
    border-color: var(--color-olive-deep);
    color: var(--color-text-primary);
}

.header-utility-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Cart count badge */
.header-cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: var(--color-purple);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
}

.header-cart-count:empty,
.header-cart-count[data-count="0"] {
    display: none;
}

.header-cart-count.updated {
    animation: badge-pulse 0.4s var(--transition-bounce);
}

/* -------------------------------------------------------------------------- */
/* Mobile hamburger                                                             */
/* -------------------------------------------------------------------------- */
.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--color-olive-deep);
    border-radius: var(--radius-base);
    color: var(--color-text-secondary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-toggle svg { width: 20px; height: 20px; }

/* -------------------------------------------------------------------------- */
/* Search overlay                                                               */
/* -------------------------------------------------------------------------- */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.search-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.search-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28,28,24,0.88);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#search-overlay-input:focus {
    border-color: var(--color-gold) !important;
    box-shadow: 0 0 0 3px rgba(201,168,76,0.2) !important;
}

/* -------------------------------------------------------------------------- */
/* Mobile nav overlay                                                           */
/* -------------------------------------------------------------------------- */
/* (nav overlay styles in navigation.css) */

/* -------------------------------------------------------------------------- */
/* Free-shipping bar — suppressed (moved to pediment inscription)               */
/* -------------------------------------------------------------------------- */
.free-shipping-bar { display: none !important; }

/* -------------------------------------------------------------------------- */
/* Responsive                                                                   */
/* -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .nav-toggle { display: inline-flex; }
}

@media (max-width: 480px) {
    .site-logo__text { display: none; }
}
