/* =========================================================
   SITE HEADER — fluid responsive
   ========================================================= */

:root {
  --hdr-bg:      #2f80ed;
  --hdr-nav-bg:  #f2c94c;
  --hdr-accent:  #e31720;
  --hdr-text:    #fff;
  --hdr-height:  clamp(60px, 7vw, 80px);
  --hdr-pad:     clamp(16px, 4vw, 80px);
}

/* ── Sticky wrapper ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: var(--hdr-bg);
  box-shadow: 0 2px 16px rgba(0,0,0,.18);
  overflow: visible; /* логотип може трохи заходити на смугу меню */
}

/* ── Shared container ── */
.header-container {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding-inline: var(--hdr-pad);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 32px);
}

/* ═══════════════════════════════════════
   TOP ROW: logo + search + cart
═══════════════════════════════════════ */
.header-top {
  background: var(--hdr-bg);
  border-bottom: 1px solid rgba(255,255,255,.15);
  overflow: visible;
}

.header-top .header-container {
  min-height: var(--hdr-height);
  padding-block: clamp(8px, 1vw, 14px);
}

/* ── Logo ── */
.header-logo {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1vw, 14px);
  text-decoration: none;
  flex-shrink: 0;
}

/* Розмір під екран (vw) — трохи більший за попередній фікс, без «гіганта» */
.header-logo__img {
  height: auto;
  width: auto;
  max-height: clamp(46px, 5.5vw, 72px);
  max-width: clamp(104px, 13vw, 158px);
  object-fit: contain;
  display: block;
}

/* Десктоп: трохи «сідає» на жовту смугу меню */
@media (min-width: 1101px) {
  .header-top {
    position: relative;
    z-index: 2;
  }

  .header-logo {
    align-self: flex-end;
    margin-bottom: clamp(-14px, -1.1vw, -10px);
  }
}

/* Fallback text badge (shown when no ACF logo image) */
.header-logo__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #111;
  color: #fff;
  font-size: clamp(11px, 1.3vw, 16px);
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
  padding: clamp(6px, .7vw, 10px) clamp(12px, 1.5vw, 22px);
  border-radius: 50px;
  text-transform: uppercase;
  line-height: 1;
}

/* ── Tagline — separate block between logo and search ── */
.header-tagline {
  font-size: clamp(9px, .8vw, 13px);
  color: rgba(255,255,255,.85);
  line-height: 1.4;
  max-width: clamp(130px, 14vw, 220px);
  flex-shrink: 0;
}

/* ── Search ── */
.header-search {
  flex: 1 1 180px;   /* won't shrink below 180px */
  min-width: 0;
  position: relative;
}

.header-search__wrap {
  display: flex;
  border: 1.5px solid rgba(255,255,255,.35);
  border-radius: clamp(6px, .7vw, 10px);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
  background: rgba(255,255,255,.15);
}

.header-search__wrap:focus-within {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,.2);
}

.header-search__input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: clamp(8px, .9vw, 13px) clamp(10px, 1.2vw, 18px);
  font-size: clamp(12px, 1vw, 15px);
  background: #fff;
  color: #111;
}

.header-search__input::placeholder {
  color: #aaa;
}

.header-search__btn {
  flex-shrink: 0;
  background: var(--hdr-nav-bg);
  color: #111;
  border: none;
  padding: 0 clamp(14px, 1.8vw, 28px);
  font-size: clamp(11px, .9vw, 13px);
  font-weight: 700;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background .18s;
  white-space: nowrap;
}

.header-search__btn:hover {
  background: #e0b800;
}

/* ═══════════════════════════════════════
   PHONE NUMBERS BLOCK
═══════════════════════════════════════ */
.header-phones {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.5vw, 24px);
  flex-shrink: 0;
}

.header-phones__divider {
  width: 1px;
  align-self: stretch;
  background: rgba(255,255,255,.3);
}

.header-phones__group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.header-phones__label {
  font-size: clamp(9px, .75vw, 11px);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.2;
  text-align: center;
}

.header-phones__icon {
  flex-shrink: 0;
  color: rgba(255,255,255,.7);
}

/* phone-ico (filled path SVG from footer) used inside header — inherit white */
.header-phones .phone-ico {
  fill: currentColor;
  color: rgba(255,255,255,.8);
  width: 13px;
  height: 13px;
}

.header-phones__num {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: clamp(11px, .9vw, 13px);
  font-weight: 500;
  color: rgba(255,255,255,.9);
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s;
  line-height: 1.4;
}

.header-phones__num:hover { color: #fff; }

.header-phones__main {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: clamp(13px, 1.1vw, 16px);
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s, opacity .18s;
}

.header-phones__main:hover { opacity: .85; }

/* ── Clear button ── */
.srch-clear {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: #aaa;
  padding: 0 8px;
  flex-shrink: 0;
  transition: color .18s;
}

.srch-clear:hover { color: #555; }

/* ── Search results dropdown ── */
.header-search__results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: clamp(8px, .9vw, 12px);
  box-shadow: 0 12px 40px rgba(0,0,0,.14);
  z-index: 500;
  max-height: clamp(300px, 55vh, 480px);
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s, transform .2s, visibility .2s;
  scrollbar-width: thin;
  scrollbar-color: #ddd transparent;
}

.header-search__results.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ── Section label ── */
.srch-section-label {
  font-size: clamp(10px, .8vw, 11px);
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #aaa;
  padding: clamp(8px, 1vw, 12px) clamp(12px, 1.2vw, 18px) 4px;
}

/* ── Category list ── */
.srch-cats {
  list-style: none;
  margin: 0;
  padding: 0 0 6px;
}

.srch-cat-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: clamp(7px, .8vw, 10px) clamp(12px, 1.2vw, 18px);
  text-decoration: none;
  color: #222;
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 500;
  transition: background .15s;
}

.srch-cat-link:hover,
.srch-cat-link.is-active {
  background: #fff8e1;
}

.srch-cat-icon {
  flex-shrink: 0;
  color: #aaa;
}

.srch-cat-name {
  flex: 1;
  min-width: 0;
}

.srch-cat-name strong { color: #e31720; font-weight: 700; }

.srch-cat-parent {
  font-size: clamp(10px, .8vw, 12px);
  color: #aaa;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Products divider ── */
.srch-cats + .srch-section-label {
  border-top: 1px solid #f0f0f0;
  margin-top: 4px;
  padding-top: clamp(8px, 1vw, 12px);
}

/* ── Products list ── */
.srch-products {
  list-style: none;
  margin: 0;
  padding: 0 0 6px;
}

.srch-product-link {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1vw, 14px);
  padding: clamp(7px, .8vw, 10px) clamp(12px, 1.2vw, 18px);
  text-decoration: none;
  color: #222;
  transition: background .15s;
}

.srch-product-link:hover,
.srch-product-link.is-active {
  background: #f5f5f5;
}

.srch-product-img {
  width: clamp(40px, 4vw, 56px);
  height: clamp(40px, 4vw, 56px);
  flex-shrink: 0;
  border-radius: 6px;
  background: #f5f5f5;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.srch-product-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.srch-no-img {
  width: 100%;
  height: 100%;
  background: #eee;
  border-radius: 6px;
}

.srch-product-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.srch-product-name {
  font-size: clamp(12px, .95vw, 14px);
  font-weight: 400;
  color: #222;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.srch-product-name strong { color: #e31720; font-weight: 700; }

.srch-product-price {
  font-size: clamp(11px, .9vw, 13px);
  font-weight: 600;
  color: #35c345;
  white-space: nowrap;
}

/* ── Footer link ── */
.srch-footer {
  border-top: 1px solid #f0f0f0;
  padding: clamp(8px, 1vw, 12px) clamp(12px, 1.2vw, 18px);
}

.srch-footer-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: clamp(12px, .95vw, 14px);
  font-weight: 600;
  color: #555;
  text-decoration: none;
  padding: clamp(7px, .8vw, 10px);
  border-radius: 8px;
  background: #f7f7f7;
  transition: background .18s, color .18s;
}

.srch-footer-link:hover {
  background: #fff5f5;
  color: #e31720;
}

.srch-footer-count {
  color: #999;
  font-weight: 400;
}

/* ── Empty state ── */
.srch-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 3vw, 36px) 16px;
  gap: 8px;
  color: #bbb;
  font-size: clamp(12px, 1vw, 14px);
}

.srch-empty p { margin: 0; }

/* ── Loading spinner ── */
.srch-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 2vw, 28px);
}

.srch-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2.5px solid #e0e0e0;
  border-top-color: #e31720;
  border-radius: 50%;
  animation: srch-spin .7s linear infinite;
}

@keyframes srch-spin {
  to { transform: rotate(360deg); }
}

/* ── Mobile drawer: results below full-width ── */
.mobile-drawer__search .header-search__results {
  position: relative;
  top: 0;
  border: 1px solid #eee;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  max-height: 50vh;
  margin-top: 6px;
}

/* ── Cart button ── */
.header-cart {
  display: flex;
  align-items: center;
  gap: clamp(6px, .7vw, 10px);
  flex-shrink: 0;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.35);
  border-radius: clamp(8px, .9vw, 12px);
  padding: clamp(7px, .8vw, 12px) clamp(10px, 1.2vw, 18px);
  cursor: pointer;
  color: #fff;
  transition: border-color .2s, background .2s;
  white-space: nowrap;
}

.header-cart:hover {
  border-color: #fff;
  background: rgba(255,255,255,.25);
  color: #fff;
}

.header-cart__icon {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-cart__icon svg {
  width: clamp(20px, 2vw, 26px);
  height: clamp(20px, 2vw, 26px);
}

.header-cart__badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: clamp(16px, 1.6vw, 20px);
  height: clamp(16px, 1.6vw, 20px);
  background: var(--hdr-accent);
  color: #fff;
  font-size: clamp(9px, .75vw, 11px);
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 1px;
}

.header-cart__total {
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 600;
  color: inherit;
}

/* Bump cart total on count change */
.header-cart__total bdi,
.header-cart__total .woocommerce-Price-amount {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

/* ── Burger (hidden on desktop) ── */
.header-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: clamp(4px, .5vw, 6px);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
}

.header-burger__line {
  display: block;
  width: clamp(20px, 2.5vw, 26px);
  height: 2.5px;
  background: #fff;
  border-radius: 2px;
  transition: transform .28s, opacity .2s;
  transform-origin: center;
}

.header-burger.is-active .header-burger__line:nth-child(1) {
  transform: translateY(calc(clamp(4px, .5vw, 6px) + 2.5px)) rotate(45deg);
}

.header-burger.is-active .header-burger__line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.header-burger.is-active .header-burger__line:nth-child(3) {
  transform: translateY(calc(-1 * (clamp(4px, .5vw, 6px) + 2.5px))) rotate(-45deg);
}

/* ═══════════════════════════════════════
   NAVIGATION BAR
═══════════════════════════════════════ */
.header-nav {
  background: var(--hdr-nav-bg);
  /* overflow must stay visible so position:absolute sub-menus can escape */
}

.header-nav .header-container {
  container-type: inline-size;
  container-name: hdr-nav;
  min-height: clamp(34px, 4vw, 52px);
  padding-block: 0;
  /* менше за верхній рядок — більше ширини під пункти меню */
  padding-inline: clamp(4px, 1vw, 36px);
  overflow: visible;
}

.header-nav__list {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  justify-content: center;
  /* відстань лише між пунктами, без «рівних колонок» на всю ширину */
  gap: clamp(2px, 0.45vw, 8px);
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  /* no overflow:hidden — sub-menus are position:absolute and must be visible */
}

.header-nav__list li {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  align-items: stretch;
}

.header-nav__list li > a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
  padding: clamp(3px, 0.4vw, 7px) clamp(5px, 0.55vw, 12px);
  /* ПК: ~0.7vw; межі щоб на вузьких/широких екранах лишався читабельним */
  font-size: clamp(10px, 0.7vw, 15px);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #111;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: clip;
  text-align: center;
  transition: background .18s, color .18s;
}

.header-nav__list li > a:hover,
.header-nav__list li.current-menu-item > a {
  background: rgba(0,0,0,.12);
  color: #111;
}

/* ── Dropdown submenu ── */
.header-nav__list .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
  list-style: none;
  padding: 6px 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .18s, transform .18s, visibility .18s;
  z-index: 999;                     /* high enough to clear page content */
}

.header-nav__list li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-nav__list .sub-menu li a {
  padding: 8px 12px;
  font-size: clamp(11px, .9vw, 13px);
  font-weight: 500;
  text-transform: none;
  white-space: normal;
  letter-spacing: 0;
  color: #333;
  background: transparent;
}

.header-nav__list .sub-menu li a:hover {
  background: #fff5f5;
  color: var(--hdr-accent);
}

/* ═══════════════════════════════════════
   MOBILE OVERLAY + DRAWER
═══════════════════════════════════════ */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}

.mobile-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, 88vw);
  background: #fff;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .32s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  overflow-x: hidden;
}

.mobile-drawer.is-open {
  transform: translateX(0);
}

.mobile-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(14px, 4vw, 22px) clamp(16px, 5vw, 24px);
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.mobile-drawer__logo img {
  height: 36px;
  object-fit: contain;
}

.mobile-drawer__close {
  background: none;
  border: none;
  cursor: pointer;
  color: #555;
  padding: 4px;
  display: flex;
  transition: color .18s;
}

.mobile-drawer__close:hover {
  color: var(--hdr-accent);
}

/* Mobile search inside drawer */
.mobile-drawer__search {
  padding: clamp(12px, 4vw, 20px) clamp(16px, 5vw, 24px);
  border-bottom: 1px solid #f0f0f0;
  position: relative;
  flex-shrink: 0;
}

/* Mobile menu */
.mobile-drawer__menu {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  flex: 1;
}

.mobile-drawer__menu li a {
  display: block;
  padding: clamp(10px, 3vw, 14px) clamp(16px, 5vw, 24px);
  font-size: clamp(13px, 4vw, 16px);
  font-weight: 600;
  color: #111;
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
  text-transform: uppercase;
  letter-spacing: .03em;
  transition: background .18s, color .18s;
}

.mobile-drawer__menu li a:hover,
.mobile-drawer__menu li.current-menu-item > a {
  background: #fff5f5;
  color: var(--hdr-accent);
}

/* Submenu in drawer */
.mobile-drawer__menu .sub-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #fafafa;
}

.mobile-drawer__menu .sub-menu li a {
  padding-left: clamp(28px, 8vw, 40px);
  font-size: clamp(12px, 3.5vw, 14px);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: #444;
}

.mobile-drawer__tagline {
  font-size: clamp(11px, 3vw, 13px);
  color: #888;
  line-height: 1.5;
  padding: clamp(12px, 4vw, 20px) clamp(16px, 5vw, 24px);
  border-top: 1px solid #f0f0f0;
  margin: 0;
}

/* ── Mobile icon buttons (shared base) ── */
.header-search-icon,
.header-phone-icon {
  display: none;           /* shown via media query below */
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.35);
  border-radius: 8px;
  padding: clamp(7px, 2vw, 10px);
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
  transition: border-color .18s, background .18s;
}

.header-search-icon:hover,
.header-search-icon.is-active,
.header-phone-icon:hover,
.header-phone-icon.is-active {
  border-color: #fff;
  background: rgba(255,255,255,.28);
}

/* ── Mobile contacts panel ── */
.header-contacts-mobile {
  display: block;
  background: var(--hdr-bg);
  border-top: 1px solid rgba(255,255,255,.15);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: max-height .3s ease, opacity .22s;
}

.header-contacts-mobile.is-open {
  max-height: 300px;
  opacity: 1;
  pointer-events: auto;
}

.header-contacts-mobile__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(14px, 3vw, 20px) var(--hdr-pad);
}

.header-contacts-mobile__groups {
  display: flex;
  gap: clamp(20px, 6vw, 40px);
  flex-wrap: wrap;
}

.header-contacts-mobile__group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header-contacts-mobile__label {
  font-size: 11px;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
}

.header-contacts-mobile__phone {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(14px, 4vw, 17px);
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: color .18s;
}

.header-contacts-mobile__phone:hover {
  color: rgba(255,255,255,.75);
}

.header-contacts-mobile__phone svg {
  flex-shrink: 0;
  opacity: .75;
}

.header-contacts-mobile__close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.18);
  border: 1.5px solid rgba(255,255,255,.4);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .18s;
}

.header-contacts-mobile__close:hover {
  background: rgba(255,255,255,.28);
}

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */

/* ── 1100px: burger mode — all icons become equal squares ── */
@media (max-width: 1100px) {
  :root { --hdr-pad: clamp(12px, 3vw, 40px); }

  /* Hide desktop-only blocks */
  .header-phones        { display: none; }
  .header-tagline       { display: none; }
  .header-search--desktop { display: none !important; }
  .header-nav           { display: none; }

  /* Logo grows → pushes icon group to the right */
  .header-logo {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    overflow: hidden;
    align-self: center;
    margin-bottom: 0;
  }

  /* Tighter container gap */
  .header-top .header-container { gap: 8px; }

  /* Show burger + phone icon + search icon */
  .header-burger     { display: flex; }
  .header-phone-icon { display: flex; }
  .header-search-icon { display: flex; }

  /* ── Cart: same square size as phone/search icons ── */
  .header-cart__total { display: none; }   /* hide price text */
  .header-cart {
    padding: clamp(7px, 2vw, 10px);        /* same as icon buttons */
    border-radius: 8px;
    flex-shrink: 0;
  }
  .header-cart__icon svg {
    width: 21px;
    height: 21px;
  }
}

/* ── Mobile expandable search bar ── */
.header-search-mobile {
  display: block;
  background: var(--hdr-bg);       /* same as header, no color mismatch */
  border-top: 1px solid rgba(255,255,255,.15);
  max-height: 0;
  overflow: hidden;                 /* stays hidden; no jump to "visible" */
  opacity: 0;
  pointer-events: none;
  transition: max-height .3s ease, opacity .22s;
}

.header-search-mobile.is-open {
  max-height: 540px;                /* enough for input + results list */
  opacity: 1;
  pointer-events: auto;
  /* keep overflow: hidden so search results stay within max-height */
}

.header-search-mobile__inner {
  padding: 10px clamp(12px, 4vw, 20px) 12px;
}

/* Results inside mobile icon-search: position inline so they're not clipped */
.header-search__results--inline {
  position: relative !important;
  top: 0 !important;
  transform: none !important;
  margin-top: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

.header-search__results--inline.is-open {
  opacity: 1 !important;
  visibility: visible !important;
}

/* ── 768px: small tablet / phone ── */
@media (max-width: 768px) {
  :root { --hdr-pad: clamp(10px, 4vw, 16px); }

  .header-top .header-container { gap: 6px; }
}

/* ── 480px: small phone ── */
@media (max-width: 480px) {
  :root { --hdr-pad: 12px; }

  .header-top .header-container { gap: 6px; }

  .header-logo__badge {
    font-size: 11px;
    padding: 5px 10px;
  }

  .header-cart       { padding: 7px; }
  .header-search-icon { padding: 7px; }
}
