/*
 * FornitureitcTheme — layout.css (redesign 2026)
 * Base tipografica, header, mega menu, riga reparti, breadcrumb,
 * footer, tab bar e drawer mobile (Fase 1); pulsanti, card prodotto
 * unica e fasce a carosello (Fase 2).
 * Token in style.css (:root). Riferimento: REDESIGN/mockup/Main.dc.html e Mobile.dc.html
 * Caricato dopo style.css e main.css: qui vincono le regole nuove.
 */

/* =============================================
   BASE
   ============================================= */
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--ground);
  line-height: 1.55;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -.01em;
}
h1, h2 { font-weight: 800; }
a { color: var(--brand); }
a:hover { color: var(--brand-deep); }
input, button, select, textarea { font-family: inherit; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Icone a tratto: il vecchio CSS colorava le icone piene con `fill` */
svg.fit-ico { fill: none !important; stroke: currentColor; }
svg.fit-ico--fill { fill: currentColor !important; stroke: none; }

/* Gli elementi con [hidden] restano nascosti anche se hanno un display proprio */
.mega[hidden], .mega__pane[hidden], .drawer[hidden], .drawer-overlay[hidden] { display: none !important; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 2000;
  padding: 12px 18px; border-radius: var(--r);
  background: var(--brand); color: #fff; font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }

/* =============================================
   UTILITY BAR (36px, --brand-deep)
   ============================================= */
.hdr-utility {
  background: var(--brand-deep);
  color: #D9DDEB;
  font-size: 13px;
}
.hdr-utility__inner {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.hdr-utility__group { display: flex; align-items: center; gap: 24px; }
.hdr-utility__item { display: inline-flex; align-items: center; gap: 8px; color: #D9DDEB; }
.hdr-utility__item:hover { color: #fff; }
.hdr-utility__item .fit-ico { stroke-width: 2; }
.hdr-utility__link { color: #fff; font-weight: 500; }
.hdr-utility__link:hover { color: #fff; text-decoration: underline; }

/* =============================================
   HEADER — riga principale (84px, sticky)
   ============================================= */
.hdr {
  position: sticky;
  top: var(--wp-admin--admin-bar--height, 0px);
  z-index: 1000;
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
}
.hdr__inner {
  height: 84px;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Logo */
.hdr__logo { display: flex; align-items: center; flex-shrink: 0; }
.hdr__logo-img { height: 52px; width: auto; display: block; }
.hdr__logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em;
  color: var(--brand);
}
.hdr__logo-text span { color: var(--ink-2); }

/* Pulsante Categorie */
.hdr__cat-btn {
  height: 48px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: var(--r);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.hdr__cat-btn:hover,
.hdr__cat-btn[aria-expanded="true"] { background: var(--brand-deep); }
.hdr__cat-btn .fit-ico { stroke-width: 2; }

/* Ricerca */
.hdr__search { flex: 1 1 auto; min-width: 0; position: relative; }
.hdr-search {
  display: flex;
  height: 48px;
  border: 1.5px solid var(--brand);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface);
}
.hdr-search:focus-within { box-shadow: 0 0 0 3px var(--brand-tint); }
.hdr-search input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  padding: 0 16px;
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.hdr-search input::placeholder { color: var(--placeholder); }
.hdr-search__btn {
  width: 56px;
  flex-shrink: 0;
  border: 0;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.hdr-search__btn:hover { background: var(--brand-deep); }
.hdr-search__btn .fit-ico { stroke-width: 2; }

/* Azioni: Listini, Account, Carrello */
.hdr__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.hdr-action {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--ink);
  font-size: 14px;
  border-radius: var(--r);
  text-decoration: none;
}
.hdr-action:hover { color: var(--brand); background: var(--ground); text-decoration: none; }
.hdr-action__txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.hdr-action__top { font-size: 12px; color: var(--muted); white-space: nowrap; }
.hdr-action__main {
  font-weight: 600;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hdr-action--cart { gap: 16px; padding: 8px 14px; border: 1px solid var(--line); }
.hdr-action__icon { position: relative; display: flex; }

/* Badge carrello (rosso) — nascosto a 0 */
.fit-cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--sale);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.fit-cart-badge[data-count="0"] { display: none; }

/* =============================================
   MEGA MENU "Categorie"
   ============================================= */
.mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 48px rgba(15,26,69,.14);
}
.mega__inner {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  max-height: calc(100vh - 140px);
}
.mega__reparti {
  list-style: none;
  margin: 0;
  padding: 16px 16px 16px 0;
  border-right: 1px solid var(--line-soft);
  overflow-y: auto;
}
.mega__reparto {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--r);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.mega__reparto .fit-ico { color: var(--line-strong); }
.mega__reparto:hover,
.mega__reparto.is-active { background: var(--brand-tint); color: var(--brand); text-decoration: none; }
.mega__reparto.is-active .fit-ico { color: var(--brand); }
.mega__reparto.is-sale { color: var(--sale); font-weight: 600; }

.mega__pane { padding: 20px 0 28px 32px; overflow-y: auto; }
.mega__pane-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}
.mega__pane-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--ink);
}
.mega__all { font-size: 14px; font-weight: 600; white-space: nowrap; }
.mega__n {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.mega__all .mega__n { margin-left: 6px; }
.mega__cols {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px 32px;
  align-items: start;
}
.mega__flat { list-style: none; margin: 0; padding: 0; gap: 0 32px; }
.mega__flat .mega__link { border-bottom: 1px solid var(--line-soft); }
.mega__group ul { list-style: none; margin: 6px 0 0; padding: 0; }
.mega__group-title {
  display: block;
  padding: 6px 0;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}
.mega__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 6px 0;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
}
.mega__link:hover,
.mega__group-title:hover { color: var(--brand); text-decoration: underline; }

/* =============================================
   RIGA REPARTI (48px) — chip su mobile
   ============================================= */
.hdr-reparti {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.hdr-reparti__inner {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.hdr-reparti__inner::-webkit-scrollbar { display: none; }
.hdr-reparti__link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  text-decoration: none;
  box-shadow: inset 0 -2px 0 transparent;
}
.hdr-reparti__link:hover { color: var(--brand); text-decoration: none; box-shadow: inset 0 -2px 0 var(--line-strong); }
.hdr-reparti__link.is-current { color: var(--brand); font-weight: 600; box-shadow: inset 0 -2px 0 var(--brand); }
.hdr-reparti__link.is-sale { color: var(--sale); font-weight: 600; }
.hdr-reparti__link.is-sale.is-current { box-shadow: inset 0 -2px 0 var(--sale); }
.hdr-reparti__listino { color: var(--brand); font-weight: 600; }
.hdr-reparti__spacer { flex: 1 0 8px; }
.hdr-reparti__short { display: none; }

/* =============================================
   BREADCRUMB
   ============================================= */
.breadcrumb-bar { background: transparent; border: 0; }
.breadcrumb-bar .breadcrumb,
.breadcrumb-bar .woocommerce-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 24px 0 0;
  font-size: 13px;
  color: var(--ink);
}
.breadcrumb-bar .breadcrumb a { color: var(--brand); }
.breadcrumb-bar .breadcrumb span { margin: 0; }
.breadcrumb__sep { color: var(--muted); }

/* =============================================
   RICERCA ISTANTANEA — rifiniture del pannello
   ============================================= */
.hdr__search .mk-search-panel {
  top: calc(100% + 6px);
  border-color: var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 16px 40px rgba(15,26,69,.16);
  z-index: 1100;
}
.mk-search-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 16px;
  border-top: 1px solid var(--line-soft);
  background: var(--ground);
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}
.mk-search-opt input { width: 18px; height: 18px; accent-color: var(--brand); }

/* =============================================
   FOOTER (scuro, 4 colonne)
   ============================================= */
.ftr {
  margin-top: 64px;
  background: var(--brand-deep);
  color: #C4CAE0;
  font-size: 14px;
}
.ftr a { color: #C4CAE0; }
.ftr a:hover { color: #fff; text-decoration: underline; }
.ftr__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 32px;
}
.ftr__brand { display: flex; flex-direction: column; gap: 16px; }
.ftr__brand p { margin: 0; line-height: 1.6; }
.ftr__logo {
  align-self: flex-start;
  display: flex;
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 14px;
}
.ftr__logo:hover { text-decoration: none; }
.ftr__logo-img { height: 40px; width: auto; display: block; }
.ftr__social { display: flex; gap: 8px; }
.ftr__social a {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #2A366A;
  border-radius: var(--r);
}
.ftr__social a:hover { background: #1B2757; }
.ftr__col { display: flex; flex-direction: column; gap: 10px; line-height: 1.5; }
.ftr__col a { align-self: flex-start; }
.ftr__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}
.ftr__contacts strong { color: #fff; font-weight: 400; }
.ftr__legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 20px;
  padding-bottom: 28px;
  border-top: 1px solid #2A366A;
  font-size: 13px;
}
.ftr__company p { margin: 0; line-height: 1.6; }
.ftr__company strong { color: #fff; font-weight: 600; }
.ftr__pay { display: flex; flex-wrap: wrap; gap: 8px; }
.ftr__pay span {
  padding: 4px 10px;
  border: 1px solid #2A366A;
  border-radius: 4px;
}

/* =============================================
   PULSANTI
   ============================================= */
.fit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: var(--r);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.fit-btn:hover { text-decoration: none; }
.fit-btn .fit-ico { stroke-width: 2; }
.fit-btn--primary { background: var(--brand); color: #fff; }
.fit-btn--primary:hover { background: var(--brand-deep); color: #fff; }
.fit-btn--white { background: #fff; color: var(--brand); }
.fit-btn--white:hover { background: var(--brand-tint); color: var(--brand-deep); }
.fit-btn--outline { border-color: var(--brand); color: var(--brand); background: transparent; }
.fit-btn--outline:hover { background: var(--brand-tint); color: var(--brand-deep); }
.fit-btn--outline-light { border-color: #8C9BD0; color: #fff; background: transparent; }
.fit-btn--outline-light:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.fit-btn--block { width: 100%; }
.fit-btn[disabled], .fit-btn.is-loading { opacity: .6; cursor: progress; }

/* =============================================
   TESTATA DI SEZIONE (titolo + "Vedi tutti" + frecce)
   ============================================= */
.fit-sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.fit-sec-head h2 { margin: 0; font-size: 36px; line-height: 1.1; }
.fit-sec-head__txt p { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.fit-sec-head__act { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.fit-sec-head__all { margin-right: 12px; font-size: 15px; font-weight: 600; }
.fit-arrow {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 22px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.fit-arrow:hover { border-color: var(--brand); color: var(--brand); }
.fit-arrow[disabled] { opacity: .35; cursor: default; }
.fit-arrow .fit-ico { stroke-width: 2; }

/* =============================================
   FASCIA A CAROSELLO (4 card visibili)
   ============================================= */
.fit-fascia { padding-top: 56px; }
.fit-carousel {
  list-style: none;
  margin: 0;
  padding: 0 0 4px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 3 * 16px) / 4);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.fit-carousel::-webkit-scrollbar { display: none; }
.fit-carousel > * { scroll-snap-align: start; min-width: 0; }

/* =============================================
   CARD PRODOTTO UNICA (template-parts/product-card.php)
   ============================================= */
.fit-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  list-style: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.fit-card:hover { border-color: var(--line-strong); box-shadow: 0 8px 24px rgba(20,23,31,.08); }
.fit-card__media {
  position: relative;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--img-bg);
}
.fit-card__img {
  width: 200px !important;
  height: 200px !important;
  max-width: 85%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.fit-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.fit-card__badge--sale { background: var(--sale); }
.fit-card__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 18px;
}
.fit-card__brand,
.fit-card__sku {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.fit-card__brand { text-transform: uppercase; letter-spacing: .06em; }
.fit-card__sku { overflow-wrap: anywhere; }
.fit-card__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(2 * 1.35em);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}
.fit-card__name:hover { color: var(--brand); }
/* tutta la card cliccabile, pulsanti sopra */
.fit-card__name::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.fit-card__foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.fit-card__price { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.fit-card__price .price-locked { font-size: 13px; color: var(--ink-2); }
.fit-card__price .amount {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}
.fit-card__price del { order: -1; color: var(--muted); }
.fit-card__price del .amount { font-size: 13px; font-weight: 500; color: var(--muted); }
.fit-card__price ins { text-decoration: none; }
.fit-card__price ins .amount { color: var(--sale); }
.fit-card__price .price-iva { font-size: 12px; color: var(--muted); margin-top: 2px; }
.fit-card__price .fit-pr-badge {
  align-self: flex-start;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--ok-bg);
  color: var(--ok-ink);
  font-size: 11px;
  font-weight: 600;
}
.fit-card__oos { font-size: 12px; font-weight: 600; color: var(--sale); margin-top: 2px; }
.fit-card__add {
  position: relative;
  z-index: 2;
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r);
  background: var(--brand);
  color: #fff;
}
.fit-card__add:hover { background: var(--brand-deep); color: #fff; }
.fit-card__add .fit-ico { stroke-width: 2; }
.fit-card__add .fit-ico--check { display: none; }
.fit-card__add.added { background: var(--ok); }
.fit-card__add.added .fit-ico--plus { display: none; }
.fit-card__add.added .fit-ico--check { display: block; }
.fit-card__add.loading { opacity: .55; pointer-events: none; }
.fit-card__add.loading::after { display: none; } /* spinner di WooCommerce */
.fit-card__add--ghost { background: var(--surface); color: var(--brand); border: 1px solid var(--line-strong); }
.fit-card__add--ghost:hover { background: var(--brand-tint); color: var(--brand); }
.fit-card .added_to_cart { display: none; } /* link "Visualizza carrello" aggiunto da WooCommerce */
.fit-card__lock {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink-2);
}
.fit-card__login { position: relative; z-index: 2; flex-shrink: 0; font-size: 14px; font-weight: 600; padding: 12px 0; }
.fit-card.is-oos .fit-card__img { opacity: .6; }

/* =============================================
   GRIGLIA DI CARD (loop WooCommerce, archivio, correlati)
   ============================================= */
.arch-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

/* =============================================
   SELETTORE DI QUANTITÀ (− 0 +)
   ============================================= */
.fit-qty {
  display: inline-flex;
  align-items: center;
  height: 44px;
  border: 1px solid var(--line-input);
  border-radius: var(--r);
  background: var(--surface);
}
.fit-qty:focus-within { border-color: var(--brand); }
.fit-qty__btn {
  width: 38px;
  height: 42px;
  display: flex; align-items: center; justify-content: center;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.fit-qty__btn:hover { color: var(--brand); }
.fit-qty__btn .fit-ico { stroke-width: 2; }
.fit-qty__input {
  width: 40px;
  height: 42px;
  border: 0;
  padding: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  -moz-appearance: textfield;
  appearance: textfield;
}
.fit-qty__input::-webkit-outer-spin-button,
.fit-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fit-qty__input:focus { outline: none; }

/* =============================================
   TAB BAR + DRAWER (solo mobile)
   ============================================= */
.tabbar { display: none; }
.drawer, .drawer-overlay { display: none; }

/* =============================================
   DESKTOP STRETTO (1025–1279px)
   ============================================= */
@media (max-width: 1279px) {
  .hdr__inner { gap: 16px; }
  .hdr-action { padding: 8px; }
  .hdr-action__main { max-width: 120px; }
  .hdr-reparti__link { padding: 0 10px; font-size: 13.5px; }
}
@media (min-width: 1025px) and (max-width: 1140px) {
  .hdr-action--listini .hdr-action__txt,
  .hdr-action--account .hdr-action__top { display: none; }
}

/* =============================================
   MOBILE E TABLET (< 1025px)
   ============================================= */
@media (max-width: 1024px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .container { padding-left: 16px; padding-right: 16px; }

  .hdr-utility { display: none; }

  /* Header: logo + Accedi, ricerca a tutta larghezza */
  .hdr { position: relative; top: auto; border-bottom: 1px solid var(--line); }
  .hdr__inner {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 12px;
  }
  .hdr__logo { order: 1; }
  .hdr__logo-img { height: 38px; }
  .hdr__cat-btn,
  .hdr-action--listini,
  .hdr-action--cart,
  .mega { display: none !important; }
  .hdr__actions { order: 2; margin-left: auto; }
  .hdr__search { order: 3; flex: 1 0 100%; }
  .hdr-search { height: 46px; }
  .hdr-search input[type="search"] { padding: 0 14px; font-size: 16px; } /* 16px: niente zoom su iOS */
  .hdr-search__btn { width: 48px; }

  .hdr-action--account {
    min-height: 36px;
    padding: 0 12px;
    border: 1.5px solid var(--brand);
    color: var(--brand);
    font-size: 13px;
  }
  .hdr-action--account .fit-ico,
  .hdr-action--account .hdr-action__top { display: none; }
  .hdr-action--account .hdr-action__main { max-width: 140px; }
  .hdr-action--account:hover { background: var(--brand-tint); }

  /* Chip e pulsante Accedi sono alti 36px come nel mockup:
     l'area cliccabile viene estesa a 44px con uno pseudo-elemento */
  .hdr-action--account,
  .hdr-reparti__link { position: relative; }
  .hdr-action--account::after,
  .hdr-reparti__link::after { content: ''; position: absolute; left: 0; right: 0; top: -4px; bottom: -4px; }

  /* Reparti: chip in una riga scorrevole */
  .hdr-reparti { background: transparent; border: 0; }
  .hdr-reparti__inner {
    height: auto;
    gap: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 16px; /* senza, lo snap incolla il primo chip al bordo */
  }
  .hdr-reparti__link {
    height: 36px;
    padding: 0 14px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    font-size: 14px;
    box-shadow: none;
    scroll-snap-align: start;
  }
  .hdr-reparti__link:hover { box-shadow: none; border-color: var(--brand); }
  .hdr-reparti__link.is-current,
  .hdr-reparti__link.is-sale.is-current {
    background: var(--brand-tint);
    border-color: var(--brand);
    box-shadow: none;
  }
  .hdr-reparti__full { display: none; }
  .hdr-reparti__short { display: inline; }
  .hdr-reparti__spacer,
  .hdr-reparti__listino { display: none; }

  .breadcrumb-bar .breadcrumb,
  .breadcrumb-bar .woocommerce-breadcrumb { padding-top: 12px; }

  /* Tab bar fissa in basso */
  .tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1100;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--surface);
    border-top: 1px solid var(--line);
  }
  .tabbar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 44px;
    padding: 0 2px;
    border: 0;
    background: none;
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .tabbar__item > span:not(.tabbar__icon) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .tabbar__item:hover { color: var(--brand); text-decoration: none; }
  .tabbar__item.is-current,
  .tabbar__item[aria-expanded="true"] { color: var(--brand); font-weight: 600; }
  .tabbar__item.is-current .fit-ico { stroke-width: 2; }
  .tabbar__icon { position: relative; display: flex; }

  /* Drawer reparti */
  html.drawer-open { overflow: hidden; }
  .drawer-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1190;
    background: rgba(15,26,69,.45);
  }
  .drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 1200;
    width: min(360px, 88vw);
    background: var(--surface);
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: 16px 0 40px rgba(15,26,69,.18);
  }
  .drawer.is-open { transform: translateX(0); }
  .drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 8px 8px 20px;
    border-bottom: 1px solid var(--line);
  }
  .drawer__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    color: var(--ink);
  }
  .drawer__close {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: var(--r);
    background: none; color: var(--ink); cursor: pointer;
  }
  .drawer__close:hover { background: var(--ground); }
  .drawer__body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .drawer__group { border-bottom: 1px solid var(--line-soft); }
  .drawer__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 0 16px 0 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    list-style: none;
    cursor: pointer;
  }
  .drawer__summary::-webkit-details-marker { display: none; }
  .drawer__summary .fit-ico { color: var(--muted); transition: transform .2s ease; }
  .drawer__group[open] > .drawer__summary .fit-ico { transform: rotate(180deg); }
  .drawer__summary.is-sale { color: var(--sale); }
  .drawer__list { list-style: none; margin: 0; padding: 0 0 8px; }
  .drawer__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 0 20px 0 32px;
    font-size: 15px;
    color: var(--ink-2);
    text-decoration: none;
  }
  .drawer__link:hover { background: var(--ground); color: var(--brand); text-decoration: none; }
  .drawer__link--all { font-weight: 600; color: var(--brand); }
  .drawer__extra { padding: 12px 0 24px; background: var(--ground); }
  .drawer__extra .drawer__link { justify-content: flex-start; padding-left: 20px; color: var(--ink); }
  .drawer__extra .fit-ico { color: var(--brand); }

  /* Sezioni, fasce e card */
  .fit-sec-head { margin-bottom: 14px; align-items: baseline; }
  .fit-sec-head h2 { font-size: 24px; }
  .fit-sec-head__txt p { display: none; }
  .fit-sec-head__all { margin-right: 0; font-size: 14px; }
  .fit-arrow { display: none; }
  .fit-fascia { padding-top: 28px; }
  .fit-fascia .container { padding-right: 0; }
  .fit-carousel { grid-auto-columns: minmax(168px, 44%); gap: 10px; scroll-padding-inline: 0; padding-right: 16px; }
  .fit-card__media { height: 150px; }
  .fit-card__img { width: 130px !important; height: 130px !important; }
  .fit-card__body { padding: 12px; gap: 4px; }
  .fit-card__name { font-size: 14px; }
  .fit-card__price .amount { font-size: 18px; }
  .fit-card__foot { min-height: 56px; padding-top: 10px; gap: 8px; }
  .fit-card__lock { font-size: 12px; }
  .fit-card__login { display: none; } /* "Accedi" è già nell'header e nella tab bar */
  .arch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

  /* Footer */
  .ftr { margin-top: 40px; }
  .ftr__grid { grid-template-columns: 1fr 1fr; gap: 32px; padding-top: 40px; }
  .ftr__brand { grid-column: 1 / -1; }
  .ftr__col a { min-height: 32px; display: inline-flex; align-items: center; }
}

/* Tablet (700–1024px): griglie di card a 3 colonne invece di 2 */
@media (min-width: 700px) and (max-width: 1024px) {
  .arch-grid,
  .arch-main .arch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fit-carousel { grid-auto-columns: minmax(200px, 31%); }
}

@media (max-width: 600px) {
  /* Ricerca istantanea: prezzo (o "riservato") sotto al nome, così il nome non si tronca */
  .mk-res { flex-wrap: wrap; row-gap: 4px; }
  .mk-res__body { flex: 1 1 calc(100% - 58px); }
  .mk-res__price { flex-basis: 100%; padding-left: 58px; text-align: left; }
  .ftr__grid { grid-template-columns: 1fr; gap: 28px; }
  .ftr__legal { flex-direction: column; align-items: flex-start; }
}

/* Movimento ridotto */
@media (prefers-reduced-motion: reduce) {
  .drawer, .drawer__summary .fit-ico { transition: none; }
}

/* Stampa */
@media print {
  .hdr-utility, .hdr, .hdr-reparti, .ftr, .tabbar, .drawer, .drawer-overlay { display: none !important; }
  body { padding-bottom: 0; }
}
