/* ==========================================================================
   KapanStore (zpro.am) — Option A 2-Tier Flagship Header & Mobile Nav Drawer
   Standalone ZPro Crimson (#CC0000) + Charcoal (#111827) + Pure White (#FFFFFF)
   Tailwind v2.2.19 Safe Scoped CSS (360px - 2560px+)
   ========================================================================== */

.zpro-topbar,
.zpro-topbar *,
.zpro-site-header,
.zpro-site-header *,
#mobile-menu-drawer,
#mobile-menu-drawer * {
    box-sizing: border-box;
}

/* ==========================================================================
   Tier 1: Slim Charcoal Top Utility Bar (Desktop >= 1024px)
   ========================================================================== */
.zpro-topbar {
    display: none;
    position: relative;
    z-index: 105;
    background-color: #111827;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

@media (min-width: 1024px) {
    .zpro-topbar {
        display: block;
    }
}

.zpro-topbar-inner {
    width: 100%;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.zpro-topbar-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
    flex-wrap: nowrap;
}

.zpro-topbar-link {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    font-size: 0.78125rem;
    font-weight: 600;
    color: #e2e8f0;
    text-decoration: none;
    white-space: nowrap;
    transition: color 140ms ease;
}

.zpro-topbar-link:hover,
.zpro-topbar-link.is-active {
    color: #ffffff;
}

.zpro-topbar-link.is-active {
    text-decoration: underline;
    text-decoration-color: #cc0000;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

.zpro-topbar-link:focus-visible,
.zpro-topbar-phone:focus-visible,
.zpro-lang-link:focus-visible {
    outline: 2px solid #cc0000;
    outline-offset: 2px;
    border-radius: 4px;
}

.zpro-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

.zpro-topbar-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #f8fafc;
    font-size: 0.78125rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
    white-space: nowrap;
    transition: color 140ms ease;
}

.zpro-topbar-phone svg {
    width: 14px;
    height: 14px;
    color: #f87171;
    flex-shrink: 0;
}

.zpro-topbar-phone:hover {
    color: #fecaca;
}

.zpro-topbar-divider {
    width: 1px;
    height: 14px;
    background-color: rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}

.zpro-lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background-color: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 7px;
    padding: 2px;
    flex-shrink: 0;
}

.zpro-lang-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 1px 7px;
    border-radius: 5px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #cbd5e1;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 140ms ease, color 140ms ease;
}

.zpro-lang-link:hover {
    color: #ffffff;
}

.zpro-lang-link.is-active {
    background-color: #cc0000;
    color: #ffffff;
}

/* ==========================================================================
   Tier 2: Pure White Sticky Flagship Main Bar (Desktop & Mobile)
   ========================================================================== */
.zpro-site-header {
    position: sticky;
    top: 0;
    z-index: 100 !important;
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    transition: box-shadow 180ms ease, background-color 180ms ease;
}

.zpro-site-header.is-scrolled {
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 22px -8px rgba(15, 23, 42, 0.14);
}

.zpro-header-inner {
    width: 100%;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding: 8px 12px 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    row-gap: 8px;
    column-gap: 8px;
}

@media (min-width: 640px) {
    .zpro-header-inner {
        padding: 10px 20px;
        column-gap: 12px;
    }
}

@media (min-width: 1024px) {
    .zpro-header-inner {
        padding: 11px 1.5rem;
        min-height: 68px;
        flex-wrap: nowrap;
        gap: 16px;
    }
}

.zpro-header-brand-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 0;
}

.zpro-mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    color: #0f172a;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 140ms ease, color 140ms ease, background-color 140ms ease;
}

.zpro-mobile-menu-btn:hover {
    border-color: #cc0000;
    color: #cc0000;
    background-color: #fef2f2;
}

.zpro-mobile-menu-btn:focus-visible,
.zpro-catalog-btn:focus-visible,
.zpro-account-btn:focus-visible,
.zpro-cart-btn:focus-visible,
.zpro-search-submit:focus-visible {
    outline: 2px solid #cc0000;
    outline-offset: 2px;
}

@media (min-width: 1024px) {
    .zpro-mobile-menu-btn {
        display: none;
    }
}

.zpro-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    text-decoration: none;
    flex-shrink: 0;
}

.zpro-brand-emblem {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background-color: #cc0000;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(204, 0, 0, 0.24);
    flex-shrink: 0;
}

.zpro-brand-emblem svg {
    width: 19px;
    height: 19px;
}

@media (min-width: 640px) {
    .zpro-brand-emblem {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .zpro-brand-emblem svg {
        width: 21px;
        height: 21px;
    }
}

.zpro-brand-wordmark {
    font-size: 1.1875rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    color: #0f172a;
    white-space: nowrap;
}

.zpro-brand-wordmark span {
    color: #cc0000;
}

@media (min-width: 640px) {
    .zpro-brand-wordmark {
        font-size: 1.375rem;
    }
}

/* Middle Cluster: Catalog Trigger + Wide Search Bar */
.zpro-header-mid {
    order: 3;
    flex: 1 0 100%;
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (min-width: 1024px) {
    .zpro-header-mid {
        order: 0;
        flex: 1 1 0%;
        width: auto;
        gap: 16px;
    }
}

.zpro-catalog-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 42px;
    min-height: 42px;
    padding: 0 11px;
    border-radius: 9px;
    background-color: #cc0000;
    border: 1px solid #cc0000;
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(204, 0, 0, 0.2);
    transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

@media (min-width: 640px) {
    .zpro-catalog-btn {
        height: 44px;
        min-height: 44px;
        padding: 0 16px;
        gap: 7px;
        font-size: 0.875rem;
        border-radius: 10px;
    }
}

.zpro-catalog-btn:hover {
    background-color: #b30000;
    border-color: #b30000;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(204, 0, 0, 0.28);
}

.zpro-catalog-btn.is-megamenu-open,
.zpro-catalog-btn[aria-expanded="true"] {
    background-color: #991b1b;
    border-color: #991b1b;
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.2);
}

.zpro-catalog-grid-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.zpro-catalog-btn .zpro-mm-trigger-chevron {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    transition: transform 160ms ease;
}

.zpro-catalog-btn.is-megamenu-open .zpro-mm-trigger-chevron,
.zpro-catalog-btn[aria-expanded="true"] .zpro-mm-trigger-chevron {
    transform: rotate(180deg);
}

/* Wide Search Bar */
.zpro-header-search {
    flex: 1 1 0%;
    min-width: 0;
}

.zpro-search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 42px;
    min-height: 42px;
    width: 100%;
    background-color: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    padding: 0 4px 0 10px;
    transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

@media (min-width: 640px) {
    .zpro-search-box {
        height: 44px;
        min-height: 44px;
        border-radius: 10px;
        padding: 0 4px 0 14px;
    }
}

.zpro-search-box:hover {
    border-color: #cbd5e1;
}

.zpro-search-box:focus-within {
    background-color: #ffffff;
    border-color: #cc0000;
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.14);
}

.zpro-search-input {
    flex: 1 1 0%;
    min-width: 0;
    height: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    color: #0f172a;
    font-size: 1rem;
    outline: none;
}

@media (min-width: 640px) {
    .zpro-search-input {
        font-size: 0.9375rem;
    }
}

.zpro-search-input::placeholder {
    color: #64748b;
    font-size: 0.875rem;
}

.zpro-search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 32px;
    width: 34px;
    min-width: 34px;
    padding: 0;
    border-radius: 7px;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 140ms ease, color 140ms ease, background-color 140ms ease;
}

.zpro-search-submit svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.zpro-search-submit-text {
    display: none;
}

@media (min-width: 640px) {
    .zpro-search-submit {
        height: 34px;
        width: auto;
        padding: 0 12px;
    }

    .zpro-search-submit-text {
        display: inline;
    }
}

.zpro-search-submit:hover {
    border-color: #cc0000;
    color: #cc0000;
    background-color: #fef2f2;
}

/* Right Action Cluster: Account | Divider | Cart */
.zpro-header-actions {
    order: 2;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .zpro-header-actions {
        gap: 8px;
    }
}

@media (min-width: 1024px) {
    .zpro-header-actions {
        order: 0;
        margin-left: 0;
    }
}

.zpro-actions-divider {
    display: none;
    width: 1px;
    height: 22px;
    background-color: #e2e8f0;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .zpro-actions-divider {
        display: block;
    }
}

.zpro-account-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    color: #0f172a;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

@media (min-width: 640px) {
    .zpro-account-btn {
        width: auto;
        height: 42px;
        min-height: 42px;
        padding: 0 12px;
        border-color: transparent;
        background-color: transparent;
    }
}

.zpro-account-btn:hover {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    color: #cc0000;
}

.zpro-account-btn.is-signed-in {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
    font-weight: 700;
}

.zpro-account-dropdown {
    z-index: 140 !important;
}

.zpro-cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    color: #0f172a;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

@media (min-width: 640px) {
    .zpro-cart-btn {
        height: 42px;
        min-height: 42px;
        padding: 0 12px;
    }
}

.zpro-cart-btn:hover {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #cc0000;
}

.zpro-cart-label {
    display: none;
}

@media (min-width: 1120px) {
    .zpro-cart-label {
        display: inline;
    }
}

.zpro-cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 9999px;
    background-color: #cc0000;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.zpro-cart-badge.hidden {
    display: none !important;
}

/* ==========================================================================
   Mobile Hamburger Drawer (#mobile-menu-drawer — Layered above cookie banner)
   ========================================================================== */
#mobile-menu-backdrop {
    z-index: 1000005 !important;
}

#mobile-menu-drawer {
    z-index: 1000010 !important;
    width: 100%;
    max-width: 340px;
    overflow-x: hidden;
}

.zpro-mnav-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 14px calc(24px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.zpro-mnav-lang-switcher {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 4px;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.zpro-mnav-lang-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 7px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #334155;
    text-decoration: none;
    transition: background-color 140ms ease, color 140ms ease;
}

.zpro-mnav-lang-link:hover {
    background-color: #ffffff;
    color: #0f172a;
}

.zpro-mnav-lang-link.is-active {
    background-color: #cc0000;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(204, 0, 0, 0.25);
}

.zpro-mnav-catalog-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 46px;
    padding: 10px 14px;
    border-radius: 11px;
    background-color: #cc0000;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(204, 0, 0, 0.22);
}

.zpro-mnav-catalog-cta:hover {
    background-color: #b30000;
    color: #ffffff;
}

.zpro-mnav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.zpro-mnav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #1e293b;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 140ms ease, color 140ms ease;
}

.zpro-mnav-link:hover,
.zpro-mnav-link.is-active {
    background-color: #fef2f2;
    color: #cc0000;
}

.zpro-mnav-phone {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 10px 14px;
    border-radius: 11px;
    background-color: #111827;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
}

.zpro-mnav-phone svg {
    width: 17px;
    height: 17px;
    color: #f87171;
    flex-shrink: 0;
}

@media print {
    .zpro-topbar,
    .zpro-site-header,
    #mobile-menu-backdrop,
    #mobile-menu-drawer {
        display: none !important;
    }
}
