/* The block-theme template-part wrapper is only as tall as the header, which
   traps position:sticky (the header un-sticks the moment you scroll past it).
   Pin the wrapper itself — its parent .wp-site-blocks spans the whole page — so
   the header genuinely stays on scroll and the catalog filter bar sits below it. */
.wp-block-template-part:has(> .sw-hd) { position: sticky; top: 0; z-index: 50; }
.sw-hd { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--sw-border); }
.sw-hd.is-scrolled { box-shadow: 0 1px 0 rgba(15,23,42,.06), 0 10px 28px -18px rgba(15,23,42,.3); }

/* ── Utility strip (desktop only, compact) ── */
.sw-hd__util { background: var(--sw-surface-alt); border-bottom: 1px solid #eef2f6; }
.sw-hd__util-row { display: flex; align-items: center; justify-content: space-between; padding-block: .4rem; font-size: .8rem; color: #475569; }
.sw-hd__util-left { display: flex; align-items: center; gap: .5rem; }
.sw-hd__util-left a { color: inherit; text-decoration: none; font-weight: 600; }
.sw-hd__util-left a:hover { color: var(--sw-primary); }
.sw-hd__dot { color: #cbd5e1; }
.sw-hd__util-right { display: flex; align-items: center; gap: 1.25rem; }
.sw-hd__util-right a { color: #475569; text-decoration: none; }
.sw-hd__util-right a:hover { color: var(--sw-primary); }
@media (max-width: 1023px) { .sw-hd__util { display: none; } }

/* ── Main bar ── */
.sw-hd__bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.75rem; }
.sw-hd__bar .sw-logo { flex: none; }

/* ── Desktop nav ── */
.sw-hd__nav { display: flex; align-items: center; gap: .15rem; margin-left: auto; }
@media (max-width: 1023px) { .sw-hd__nav { display: none; } }
.sw-hd__item { position: relative; }
.sw-hd__link { display: inline-flex; align-items: center; gap: .25rem; padding: .5rem .7rem; font-size: .9rem; font-weight: 600; color: var(--sw-body); text-decoration: none; border-radius: .5rem; white-space: nowrap; }
.sw-hd__link:hover { color: var(--sw-primary); }
.sw-hd__chev { width: .8rem; height: .8rem; transition: transform .2s; }
.sw-hd__item:hover .sw-hd__chev, .sw-hd__item:focus-within .sw-hd__chev { transform: rotate(180deg); }

/* ── Solutions dropdown ── */
.sw-hd__drop { position: absolute; left: 0; top: 100%; margin-top: .25rem; min-width: 15rem; background: #fff; border: 1px solid var(--sw-border); border-radius: .9rem; box-shadow: 0 20px 40px -12px rgba(15,23,42,.2); padding: .4rem; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s; z-index: 60; }
.sw-hd__item--drop:hover .sw-hd__drop, .sw-hd__item--drop:focus-within .sw-hd__drop { opacity: 1; visibility: visible; transform: none; }
.sw-hd__drop-link { display: block; padding: .55rem .75rem; border-radius: .5rem; font-size: .875rem; color: var(--sw-body); text-decoration: none; }
.sw-hd__drop-link:hover { background: var(--sw-accent-tint); color: var(--sw-accent-text); }

/* ── Products mega-menu ── */
.sw-hd__mega { position: absolute; left: 0; top: 100%; margin-top: .25rem; width: 40rem; max-width: calc(100vw - 2rem); background: #fff; border: 1px solid var(--sw-border); border-radius: 1rem; box-shadow: 0 24px 50px -12px rgba(15,23,42,.25); overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s; z-index: 60; }
.sw-hd__item--mega:hover .sw-hd__mega, .sw-hd__item--mega:focus-within .sw-hd__mega { opacity: 1; visibility: visible; transform: none; }
.sw-hd__mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; padding: .75rem; }
.sw-hd__mega-card { display: flex; gap: .75rem; padding: .65rem; border-radius: .75rem; text-decoration: none; transition: background-color .2s; }
.sw-hd__mega-card:hover { background: var(--sw-accent-tint); }
.sw-hd__mega-media { position: relative; height: 4rem; width: 4rem; flex: none; border-radius: .6rem; overflow: hidden; background: #0f172a; }
.sw-hd__mega-media img { width: 100%; height: 100%; object-fit: cover; }
.sw-hd__mega-badge { position: absolute; top: .25rem; left: .25rem; background: #f59e0b; color: #fff; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border-radius: 9999px; padding: .05rem .35rem; }
.sw-hd__mega-body { display: flex; flex-direction: column; min-width: 0; justify-content: center; }
.sw-hd__mega-label { font-family: 'Golos Text', system-ui, sans-serif; font-weight: 700; font-size: .9rem; color: var(--sw-contrast); }
.sw-hd__mega-hint { font-size: .75rem; color: var(--sw-muted); margin-top: .1rem; }
.sw-hd__mega-count { font-size: .72rem; font-weight: 600; color: var(--sw-primary); margin-top: .25rem; }
.sw-hd__mega-foot { display: block; border-top: 1px solid #eef2f6; background: #f8fafc; padding: .8rem 1.25rem; font-size: .875rem; font-weight: 600; color: var(--sw-accent-text); text-decoration: none; }
.sw-hd__mega-foot:hover { background: #f1f5f9; }

/* ── Actions ── */
.sw-hd__actions { display: flex; align-items: center; gap: .5rem; }
.sw-hd__cart { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 2.5rem; width: 2.5rem; border: 1px solid var(--sw-border); border-radius: .6rem; color: var(--sw-body); }
.sw-hd__cart:hover { border-color: #cbd5e1; background: var(--sw-surface-alt); }
.sw-hd__cart svg { width: 1.15rem; height: 1.15rem; }
.sw-hd__cart-count { position: absolute; top: -.4rem; right: -.4rem; min-width: 1.15rem; height: 1.15rem; display: inline-flex; align-items: center; justify-content: center; padding: 0 .25rem; background: var(--sw-accent); color: #fff; font-size: .65rem; font-weight: 700; border-radius: 9999px; box-shadow: 0 0 0 2px #fff; }
.sw-hd__cta { white-space: nowrap; }
@media (max-width: 1023px) { .sw-hd__actions .sw-hd__cta { display: none; } }
.sw-hd__burger { display: none; align-items: center; justify-content: center; height: 2.75rem; width: 2.75rem; border: 0; background: none; color: var(--sw-contrast); cursor: pointer; }
.sw-hd__burger svg { width: 1.6rem; height: 1.6rem; }
@media (max-width: 1023px) { .sw-hd__burger { display: inline-flex; } }

/* ── Mobile drawer ── */
.sw-hd__drawer { display: none; }
@media (max-width: 1023px) {
	.sw-hd__drawer { display: block; position: fixed; inset-inline: 0; bottom: 0; overflow-y: auto; background: #fff; border-top: 1px solid var(--sw-border); padding: 1rem 1.25rem 2rem; z-index: 49; }
	.sw-hd__drawer[hidden] { display: none; }
}
.sw-hd__acc { border-bottom: 1px solid #f1f5f9; padding-bottom: .4rem; }
.sw-hd__acc summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; padding: .9rem 0; font-family: 'Golos Text', system-ui, sans-serif; font-weight: 700; font-size: 1.05rem; color: var(--sw-contrast); }
.sw-hd__acc summary::-webkit-details-marker { display: none; }
.sw-hd__acc[open] summary .sw-hd__chev { transform: rotate(180deg); }
.sw-hd__acc a { display: block; padding: .5rem 0 .5rem 1rem; font-size: .95rem; color: var(--sw-body); text-decoration: none; }
.sw-hd__acc a:hover { color: var(--sw-primary); }
.sw-hd__drawer-link { display: block; border-bottom: 1px solid #f1f5f9; padding: .9rem 0; font-family: 'Golos Text', system-ui, sans-serif; font-weight: 700; font-size: 1.05rem; color: var(--sw-contrast); text-decoration: none; }
.sw-hd__drawer-foot { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.sw-hd__drawer-phone { font-weight: 700; color: var(--sw-contrast); text-decoration: none; }
.sw-hd__drawer-cta { width: 100%; }
body.sw-hd-open { overflow: hidden; }

/* ── Mini-cart drawer (slide-out) ─────────────────────────── */
.sw-cart[hidden] { display: none; }
.sw-cart { position: fixed; inset: 0; z-index: 10000; }
/* While the drawer is open, suppress the competing sticky CTA bar. */
body.sw-cart-open .swcs-sticky { display: none !important; }
.sw-cart__overlay { position: absolute; inset: 0; background: rgba(15,23,42,.5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s ease; }
.sw-cart.is-open .sw-cart__overlay { opacity: 1; }
.sw-cart__panel { position: absolute; top: 0; right: 0; bottom: 0; width: 100%; max-width: 28rem; display: flex; flex-direction: column; background: #fff; border-left: 1px solid var(--sw-border); box-shadow: -12px 0 40px rgba(15,23,42,.18); transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1); }
.sw-cart.is-open .sw-cart__panel { transform: translateX(0); }

.sw-cart__head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--sw-border); }
.sw-cart__head-l { display: flex; align-items: center; gap: .5rem; }
.sw-cart__bag { width: 1.25rem; height: 1.25rem; color: var(--sw-primary); }
.sw-cart__title { margin: 0; font-family: 'Golos Text', system-ui, sans-serif; font-size: 1.125rem; font-weight: 800; color: var(--sw-contrast); }
.sw-cart__badge { background: var(--sw-accent-tint); color: var(--sw-accent-text); font-size: .75rem; font-weight: 800; border-radius: 999px; padding: .1rem .5rem; }
.sw-cart__close { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border: 0; background: transparent; color: var(--sw-muted); border-radius: .5rem; cursor: pointer; }
.sw-cart__close svg { width: 1.25rem; height: 1.25rem; }
.sw-cart__close:hover { background: #f1f5f9; color: var(--sw-contrast); }

.sw-cart__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sw-cart__status { padding: 2.5rem 1.25rem; text-align: center; color: var(--sw-muted); }

.sw-cart__items { list-style: none; margin: 0; padding: 0; }
.sw-cart__item { display: flex; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid #f1f5f9; }
.sw-cart__thumb { width: 5rem; height: 5rem; flex: none; border-radius: .5rem; background: #fff; box-shadow: inset 0 0 0 1px #f1f5f9; overflow: hidden; }
.sw-cart__thumb img { width: 100%; height: 100%; object-fit: contain; padding: .375rem; }
.sw-cart__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sw-cart__top { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.sw-cart__name { font-family: 'Golos Text', system-ui, sans-serif; font-size: .875rem; font-weight: 700; line-height: 1.25; color: var(--sw-contrast); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sw-cart__name:hover { color: var(--sw-primary); }
.sw-cart__sub { margin: .15rem 0 0; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .72rem; color: var(--sw-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-cart__remove { flex: none; border: 0; background: transparent; color: #94a3b8; cursor: pointer; padding: .15rem; line-height: 0; }
.sw-cart__remove svg { width: 1rem; height: 1rem; }
.sw-cart__remove:hover { color: #ef4444; }
.sw-cart__bottom { margin-top: auto; padding-top: .6rem; display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem; }
.sw-cart__qty { display: inline-flex; align-items: center; border: 1px solid var(--sw-border); border-radius: .5rem; }
.sw-cart__qty button { width: 2.5rem; height: 2.5rem; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: #475569; cursor: pointer; }
.sw-cart__qty button svg { width: .875rem; height: .875rem; }
.sw-cart__qty button:hover { background: #f8fafc; }
.sw-cart__q { min-width: 2rem; text-align: center; font-size: .875rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sw-cart__line { font-family: 'Golos Text', system-ui, sans-serif; font-size: .875rem; font-weight: 800; color: var(--sw-contrast); white-space: nowrap; }

.sw-cart__foot { border-top: 1px solid var(--sw-border); background: var(--sw-surface-alt); padding: 1rem 1.25rem; }
.sw-cart__foot[hidden] { display: none; }
.sw-cart__subtotal { display: flex; align-items: center; justify-content: space-between; font-size: .875rem; color: #475569; }
.sw-cart__subtotal-val { font-family: 'Golos Text', system-ui, sans-serif; font-size: 1.125rem; font-weight: 800; color: var(--sw-contrast); }
.sw-cart__note { margin: .25rem 0 0; font-size: .75rem; color: var(--sw-muted); }
.sw-cart__checkout, .sw-cart__open-page { width: 100%; margin-top: .75rem; }
.sw-cart__checkout svg { width: 1rem; height: 1rem; }
.sw-cart__open-page { margin-top: .5rem; }

.sw-cart__empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3rem 1.5rem; min-height: 100%; }
.sw-cart__empty svg { width: 3rem; height: 3rem; color: #cbd5e1; }
.sw-cart__empty h3 { margin: 1rem 0 0; font-family: 'Golos Text', system-ui, sans-serif; font-size: 1.125rem; font-weight: 800; color: var(--sw-contrast); }
.sw-cart__empty p { margin: .5rem 0 0; font-size: .875rem; color: var(--sw-muted); max-width: 22rem; }
.sw-cart__empty .sw-btn-primary { margin-top: 1.5rem; }

.sw-cart.is-busy .sw-cart__items { opacity: .55; pointer-events: none; }
