:root {
  --brand: var(--brand);   /* bordò: titoli, bottoni, fascia header */
  --accent: var(--accent);  /* oro: bordi, hover, evidenziazioni */
  --paper: var(--paper);   /* panna: campi, strisce note */
  --cream: var(--cream);   /* fondo riquadri catalogo */
  --cream2: var(--cream2);  /* fondo riquadri secondari */
  --ink: var(--ink);        /* testo marrone dei riquadri */
  --line: var(--line);    /* bordi sottili */
}

/* Decoricamo — identità grafica legacy (stile.css ASP + home server.py):
   rosso var(--brand), crema var(--paper), oro var(--accent), verde prezzo #163, Trebuchet MS. */

body {
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: #333;
  font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

[hidden] { display: none !important; }

img { max-width: 100%; height: auto; }

/* ---------- strisce legacy ---------- */
.top-div {
  width: 100%;
  height: 40px;
  line-height: 40px;
  border-bottom: 1px dashed var(--accent);
}
.top-div .contenuto {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 10px;
  text-align: right;
  font-size: 13px;
  color: #996633;
}
.top-div strong { color: var(--brand); }

/* ---------- header ---------- */
.top { text-align: center; }
img.banner {
  display: block;
  margin: 0.6rem auto 0;
  max-width: min(100%, 520px);
  height: auto;
}
/* R52: fino a 4 banner accanto al logo, solo se c'è una campagna in onda. */
.mast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.45rem;
  align-items: center;
  max-width: 1100px;
  margin: 0.45rem auto 0.2rem;
  padding: 0 0.4rem;
}
.mast-side { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; min-width: 0; }
.mast-sx { justify-content: flex-end; }
.mast-dx { justify-content: flex-start; }
.mast-side a { display: block; line-height: 0; }
.mast-side img {
  height: 72px; width: auto; max-width: 180px; object-fit: contain;
  border-radius: 6px; border: 1px solid var(--line); background: #fff;
}
.mast-logo { display: block; line-height: 0; }
.mast-logo img { display: block; max-height: 96px; width: auto; max-width: min(420px, 46vw); margin: 0 auto; }
.brand-row { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.brand-row .count { font-weight: 400; }
.cat-sort { display: flex; flex-wrap: wrap; gap: 0.35rem; }
button.btn-lite { font: inherit; cursor: pointer; }
button.btn-lite.on, a.btn-lite.on { background: var(--brand); color: #fff; border-color: var(--brand); }
@media (max-width: 720px) {
  .mast { grid-template-columns: 1fr; justify-items: center; }
  .mast-sx, .mast-dx { justify-content: center; }
  .mast-logo { order: -1; }
}
.deco-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.35rem 0.6rem;
  color: #996633;
}
.deco-tog {
  display: none;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 1.15rem;
}

nav.deco {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: center;
  border-bottom: 1px dashed var(--accent);
  padding: 0.4rem;
}
nav.deco a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--brand);
  text-decoration: none;
  padding: 0.35rem 0.7rem;
  font-weight: 700;
}
nav.deco a .ico { width: 28px; height: 28px; flex: none; }
nav.deco a.on, nav.deco a:hover { background: var(--accent); color: #fff; }

#search-form {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  padding: 0.6rem 0.4rem;
}
#search-input {
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  min-width: min(20rem, 60vw);
  font: inherit;
  background: var(--paper);
  color: var(--ink);
}
#search-form button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem 0.35rem 0.35rem;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
#search-form button .ico { width: 26px; height: 26px; }
#search-form button:hover { background: var(--accent); border-color: var(--accent); }

/* R58 — ricerca predittiva: pannello sotto il campo mentre si digita */
#search-form { position: relative; }
.suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  width: min(34rem, 92vw);
  background: #fff;
  border: 1px solid var(--accent);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(60, 20, 0, 0.25);
  overflow: hidden;
  z-index: 60;
}
.suggest-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.6rem;
  color: #442200;
  text-decoration: none;
  border-bottom: 1px solid #f3e6c8;
}
.suggest-item:last-child { border-bottom: 0; }
.suggest-item:hover, .suggest-item.sel { background: #fdf3d7; }
.suggest-item img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e6d3a8;
  flex: none;
}
.suggest-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.suggest-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggest-brand { font-size: 0.78rem; color: #996b1f; }
.suggest-price { white-space: nowrap; font-size: 0.92rem; }
.suggest-price s { color: #a08c6a; margin-right: 0.25rem; }
.suggest-price b { color: #7a1f1f; }
.suggest-price .badge {
  font-style: normal;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  padding: 0 0.4rem;
  font-size: 0.72rem;
  margin-left: 0.3rem;
}

/* ---------- layout ---------- */
.wrap { max-width: 940px; margin: 0 auto; padding: 1rem; }

h1 { font-size: 1.45rem; color: var(--brand); margin: 0.6rem 0 0.9rem; }
h2 { font-size: 1.1rem; }
h1 .ico, h2 .ico { width: 36px; height: 36px; vertical-align: middle; margin-right: 0.35rem; }
h2 .ico { width: 28px; height: 28px; }
a { color: var(--brand); }

.loading, .meta { color: #996633; font-style: italic; }
.error { color: var(--brand); font-weight: 700; }
.lead { color: var(--ink); line-height: 1.45; }
.titolo { font-weight: 700; color: var(--brand); }

/* ---------- home: card sezioni ---------- */
.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.9rem;
}
.card a { text-decoration: none; color: inherit; }
.card img.tab { width: 100%; height: 180px; object-fit: cover; display: block; }
.card h2 a { color: var(--brand); }

/* chips categorie (stile legacy) */
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.8rem 0; }
.chips a {
  border: 1px solid var(--accent);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  color: var(--brand);
  text-decoration: none;
  font-size: 0.85rem;
  background: #fff;
}
.chips a.on, .chips a:hover { background: var(--accent); color: #fff; }
.chips .count { color: #996633; font-size: 0.8em; }
.chips a:hover .count { color: #fff; }
/* R19 §2: foto categoria nelle chip (thumb quadrata) */
.chips a { display: inline-flex; align-items: center; gap: 0.35rem; }
.chips a img { width: 26px; height: 26px; object-fit: cover; border-radius: 50%; border: 1px solid var(--line); }
.chips a img.ico { object-fit: contain; border-radius: 8px; background: #fff; }

/* griglia categorie */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 1rem; }
.cat-grid { list-style: none; padding: 0; margin: 0.8rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 0.5rem; }
.cat-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border: 1px dashed var(--accent);
  background: #fff;
  text-decoration: none;
  color: var(--brand);
  font-size: 1rem;
}
.cat-grid a:hover { background: var(--accent); color: #fff; }
.cat-grid .count { color: #996633; white-space: nowrap; margin-left: auto; }
.cat-grid a:hover .count { color: #fff; }
/* R19 §2: foto categoria nella card del catalogo. Segno e nome stanno affiancati. */
.cat-grid a .cat-main { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.cat-grid a .name { font-size: 1.08rem; font-weight: 700; color: var(--brand); line-height: 1.25; }
.cat-grid a:hover .name { color: #fff; }
.cat-grid a img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); flex: none; }
.cat-grid a img.ico { object-fit: contain; background: #fff; }

/* ---------- card prodotto ---------- */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: 1rem;
}
.pcard {
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
}
.pcard a { text-decoration: none; color: inherit; display: flex; flex-direction: column; width: 100%; }
.pcard img.prod { width: 100%; height: 160px; object-fit: cover; background: #eee; }
.pcard .body { padding: 0.6rem 0.7rem; display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.pcard .name { font-weight: 700; color: var(--brand); }
.pcard .price { font-weight: 700; color: #116633; margin-top: auto; }
.pcard .cat { font-size: 0.8rem; color: #996633; }
.badge {
  display: inline-block;
  font-size: 0.72rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
  color: var(--brand);
  background: #fff;
  width: fit-content;
}

/* ---------- scheda prodotto ---------- */
.crumbs { font-size: 0.85rem; color: #996633; }
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 0.6rem; }
@media (max-width: 720px) { .product, .cols { grid-template-columns: 1fr; } }

.gallery { display: flex; gap: 0.7rem; margin: 0.8rem 0; align-items: flex-start; }
.gallery .g-main { flex: 1; min-width: 0; }
.gallery img.hero { width: 100%; height: auto; max-height: 420px; object-fit: contain; background: #fff; cursor: default; }
.gallery .g-thumbs { display: flex; flex-direction: column; gap: 0.4rem; max-height: 420px; overflow-y: auto; flex-shrink: 0; }
.gallery .g-thumbs img { width: 76px; height: 76px; object-fit: cover; border: 1px solid var(--line); cursor: pointer; }
.gallery .g-thumbs img:hover { border-color: var(--brand); }
.more-wrap { text-align: center; margin: 1rem 0; }

.price-big { font-weight: 700; color: #116633; font-size: 1.5rem; }
.description { color: #333; }
select, input[type="number"] {
  padding: 0.4rem;
  border: 1px solid var(--accent);
  font: inherit;
  background: var(--paper);
  color: var(--ink);
}

/* ---------- dove siamo / footer ---------- */
.dove p { color: var(--ink); }
.foot {
  border-top: 1px dashed var(--accent);
  color: #996633;
  padding: 1.1rem;
  font-size: 0.9rem;
  text-align: center;
}
.foot a { color: var(--brand); }

/* ---------- banner cookie (come legacy) ---------- */
#cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--paper);
  border-top: 2px solid var(--accent);
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  color: var(--ink);
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  justify-content: center;
}
#cookie-bar button {
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font: inherit;
  cursor: pointer;
}
#cookie-bar button.ghost { background: var(--accent); }

@media (max-width: 800px) {
  .deco-bar { display: flex; }
  .deco-tog { display: inline-block; }
  nav.deco { display: none; flex-direction: column; }
  nav.deco.open { display: flex; }
}

/* banner spedizione (leva vendita: GRATIS sopra X) */
.ship-banner {
  background: var(--brand);
  color: var(--paper);
  text-align: center;
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 700;
}

/* R58 — striscia scorrente (marquee) sotto l'intestazione, spunto microcarscout */
.marquee {
  overflow: hidden;
  background: #2b1c10;
  color: #ffe9b3;
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  white-space: nowrap;
}
.mq-track {
  display: inline-flex;
  align-items: center;
  gap: 2.2rem;
  padding: 0.45rem 1.1rem;
  animation: mq-scroll 28s linear infinite;
  will-change: transform;
}
.marquee:hover .mq-track { animation-play-state: paused; }
.mq-track a { color: #ffe9b3; text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.mq-track a:hover { color: var(--accent); text-decoration: underline; }
.mq-track span { font-weight: 600; font-size: 0.92rem; }
.mq-dot { color: var(--accent); font-style: normal; font-size: 0.6rem; }
@keyframes mq-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .mq-track { animation: none; }
}

/* carrello */
.cart-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.8rem;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.6rem;
  margin-bottom: 0.5rem;
}
.cart-row img { width: 64px; height: 64px; object-fit: cover; background: #fff; }
.cart-row .qty input { width: 3.4rem; text-align: center; }
.cart-row .line { font-weight: 700; color: #116633; white-space: nowrap; }
.cart-totals { max-width: 340px; margin-left: auto; }
.cart-totals div { display: flex; justify-content: space-between; padding: 0.2rem 0; }
.cart-totals .grand { font-size: 1.2rem; font-weight: 700; color: var(--brand); border-top: 1px dashed var(--accent); margin-top: 0.3rem; padding-top: 0.4rem; }

/* checkout */
.checkout label { display: block; font-weight: 700; color: var(--ink); font-size: 0.85rem; margin-top: 0.5rem; }
.checkout input, .checkout select, .checkout textarea {
  width: 100%; padding: 0.45rem; border: 1px solid var(--accent); font: inherit; background: var(--cream);
}
.pay-methods label { font-weight: 400; color: #333; border: 1px solid var(--line); background: var(--paper); padding: 0.5rem 0.7rem; margin: 0.3rem 0; border-radius: 4px; }
.order-box { background: var(--paper); border: 1px solid var(--line); padding: 1rem; }
.order-status { font-weight: 700; color: #116633; }

@media (max-width: 600px) {
  .cart-row { grid-template-columns: 52px 1fr; }
  .cart-row .line { grid-column: 2; }
  .cart-row .actions { grid-column: 1 / -1; display: flex; gap: 0.5rem; justify-content: flex-end; }
}

/* ---------- responsive raffinato (telefoni) ---------- */
@media (max-width: 600px) {
  .top-div { height: auto; line-height: 1.3; padding: 0.3rem 0; }
  .top-div .contenuto { text-align: center; font-size: 11px; }
  img.banner { max-width: 100%; }
  nav.deco a { padding: 0.6rem 0.5rem; font-size: 0.92rem; }
  .wrap { padding: 0.7rem; }
  h1 { font-size: 1.2rem; }
  h2 { font-size: 1rem; }
  .card { padding: 0.7rem; }
  .card img.tab { height: 130px; }
  .pcard img.prod { height: 140px; }
  .gallery { flex-direction: column; }
  .gallery .g-thumbs { flex-direction: row; flex-wrap: wrap; max-height: none; order: 2; }
  .gallery .g-thumbs img { width: 64px; height: 64px; }
  .gallery img.hero { max-height: 300px; }
  .price-big { font-size: 1.3rem; }
  #search-input { min-width: 0; flex: 1; }
  #search-form button { padding: 0.45rem 0.7rem; }
  .product { gap: 0.8rem; }
  .chips a { padding: 0.45rem 0.6rem; font-size: 0.85rem; }
}

/* ---------- Round 6: dove siamo, area cliente, pulsanti flottanti, fidelity ---------- */

/* Pulsanti contatto "lite" (Dove siamo) */
.btn-lite {
  display: inline-block;
  margin: 0.15rem 0.25rem 0.15rem 0;
  padding: 0.45rem 0.9rem;
  background: var(--paper);
  border: 1px solid var(--accent);
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
}
.btn-lite:hover { background: var(--accent); color: #fff; }
.btn-lite.wa { background: #25d366; border-color: #1da851; color: #fff; }
.btn-lite.wa:hover { background: #1da851; }

/* Pagina Dove siamo: testo + mappa affiancati */
.dove-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 1rem;
  align-items: start;
}
iframe.mappa {
  width: 100%;
  height: 340px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--paper);
}
.mappa-consent {
  width: 100%;
  height: 340px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-align: center;
  padding: 1rem;
}
.dove { background: var(--paper); border: 1px solid var(--line); padding: 1rem; }

/* Area cliente */
.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.account-grid form.card label { display: block; font-weight: 700; color: var(--ink); font-size: 0.85rem; margin-top: 0.5rem; }
.account-grid form.card input {
  width: 100%; padding: 0.45rem; border: 1px solid var(--accent); font: inherit; background: var(--cream);
  box-sizing: border-box;
}
.area-badge { color: #116633; font-size: 0.8em; }

.fidelity-card { background: linear-gradient(135deg, var(--brand) 0%, #7a0000 100%); color: var(--paper); border: 2px solid var(--accent); }
.fidelity-card h2 { color: var(--accent); margin-top: 0; }
.fid-code {
  font-family: "Courier New", monospace;
  font-size: 1.5rem; font-weight: 700; letter-spacing: 2px;
  background: var(--paper); color: var(--brand); display: inline-block;
  padding: 0.3rem 0.9rem; border-radius: 6px; border: 1px dashed var(--accent);
}

.order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem; align-items: center;
  padding: 0.55rem 0.3rem;
  border-bottom: 1px dashed var(--line);
}
.order-row .thumb { width: 52px; height: 52px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; vertical-align: middle; margin-right: 0.5rem; }
.legacy-orders { margin: 0.8rem 0; }
.legacy-orders summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 0.4rem 0; }

/* Pulsanti flottanti (come VHH): WA in basso a sinistra, torna-su a destra */
.wa-float {
  position: fixed; left: 18px; bottom: 18px; z-index: 60;
  width: 54px; height: 54px; border-radius: 50%;
  background: #25d366; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }

.back-to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: var(--accent); color: #fff; font-size: 1.4rem; font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  opacity: 0; pointer-events: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
  transition: opacity 0.25s, transform 0.2s;
}
.back-to-top .ico { width: 26px; height: 26px; }
.back-to-top.show { opacity: 0.95; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-2px); }

/* Cookie bar: stile coerente (già presente? qui garantiamo il minimo) */
#cookie-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: var(--paper); border-top: 2px solid var(--accent);
  padding: 0.6rem 1rem; text-align: center; font-size: 0.92rem;
}
#cookie-bar p { margin: 0.3rem 0; }
#cookie-bar button { margin: 0 0.25rem; }

@media (max-width: 760px) {
  .dove-grid { grid-template-columns: 1fr; }
  iframe.mappa { height: 260px; }
  .mappa-consent { height: 260px; }
  .order-row { grid-template-columns: 1fr; text-align: left; }
  .order-row > div:last-child { text-align: left !important; }
  .order-row .thumb { width: 44px; height: 44px; }
  .wa-float { width: 48px; height: 48px; left: 12px; bottom: 12px; }
  .back-to-top { width: 42px; height: 42px; right: 12px; bottom: 12px; }
}

/* ---------- M1: feedback (form pubblico) + roadmap ---------- */

/* Honeypot anti-spam: invisibile a chi naviga, compilato dai bot */
.hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

.roadmap { display: grid; gap: 0.5rem; max-width: 640px; }
.rm-item {
  display: flex; align-items: center; gap: 0.8rem;
  background: var(--paper); border: 1px solid var(--line); padding: 0.6rem 0.9rem; border-radius: 6px;
}
.rm-status {
  flex: 0 0 auto; font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  padding: 0.15rem 0.55rem; border-radius: 999px; background: var(--accent); color: #fff;
}
.rm-fatto .rm-status { background: #116633; }
.rm-pianificato .rm-status { background: var(--brand); }

/* Fondo crema: spento di default, si riaccende da Impostazioni (shop_theme.creamBoxes). */
body.theme-cream .card,
body.theme-cream .cat-grid a,
body.theme-cream .pcard { background: var(--paper); }

/* ---------- Pagine guida / pagine statiche (stessa veste del negozio) ---------- */
.etichetta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid var(--accent);
  background: var(--paper);
  color: var(--brand);
  border-radius: 999px;
  padding: 0.12rem 0.7rem 0.12rem 0.2rem;
  font-size: 0.8rem;
  font-weight: 700;
  font-style: normal;
}
.etichetta .ico { width: 22px; height: 22px; }
.page-body { line-height: 1.65; }
.page-body h2 { color: var(--brand); }
.page-body figure { margin: 1rem 0; }
.page-body figure img { border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.page-body figcaption { color: #996633; font-size: 0.85rem; font-style: italic; margin-top: 0.3rem; }
.video-consent {
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--paper);
  padding: 1rem;
  text-align: center;
  margin: 0.8rem 0;
}
.video-consent button {
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.sources { border-top: 1px dashed var(--accent); margin-top: 1.5rem; padding-top: 0.8rem; color: var(--ink); }
.move {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: space-between;
  margin-top: 1.4rem;
}
.btn-move {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  background: var(--paper);
  border: 1px solid var(--accent);
  color: var(--brand);
  text-decoration: none;
  border-radius: 10px;
  font-weight: 700;
}
.btn-move.next { justify-content: flex-end; text-align: right; }
.btn-move small { display: block; font-weight: 400; color: #996633; font-size: 0.75rem; }
.btn-move .ico { width: 36px; height: 36px; flex: none; }
.btn-move:hover { background: var(--accent); color: #fff; }
.btn-move:hover small { color: #fff; }
.link-list { line-height: 1.6; }
.link-list li { margin: 0.55rem 0; }

form.card select, form.card input[type="email"], form.card input:not([type]), form.card textarea {
  width: 100%; box-sizing: border-box; padding: 0.45rem; border: 1px solid var(--accent); font: inherit; background: var(--cream);
}
form.card label { display: block; font-weight: 700; color: var(--ink); font-size: 0.85rem; margin-top: 0.6rem; }

/* R27: descrizione categoria + sezione Novità */
.cat-desc {
  margin: 0 0 1rem;
  padding: 0.7rem 1rem;
  background: #fff;
  border: 1px solid var(--accent);
  border-radius: 10px;
  line-height: 1.55;
}
.cat-desc a, .description a { color: var(--brand); text-decoration: underline; }
.cat-desc p, .description p { margin: 0.4rem 0; }

/* R31: scheda prodotto — torna indietro, genere, swatch colore, taglie a pulsanti */
.back-btn { margin-right: 0.6rem; padding: 0.2rem 0.7rem; font-size: 0.85rem; }
.gender-chip {
  display: inline-block; padding: 0.05rem 0.55rem; border-radius: 999px;
  background: var(--cream2); border: 1px solid var(--accent); color: var(--ink); font-weight: 700; font-size: 0.8rem;
}
.sel-label { margin: 0.8rem 0 0.35rem; font-weight: 700; color: var(--ink); }
.sg-link { margin-left: 0.7rem; padding: 0.1rem 0.6rem; font-size: 0.78rem; }
.swatches { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.4rem; }
.swatch {
  display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer;
  padding: 0.28rem 0.7rem; border: 2px solid var(--accent); border-radius: 999px;
  background: var(--cream); font: inherit; font-size: 0.85rem;
}
.swatch span { order: 2; }
.swatch.has-hex::before {
  order: 1; content: ""; width: 16px; height: 16px; border-radius: 50%;
  background: var(--sw, #ccc); border: 1px solid rgba(0,0,0,0.25);
}
.swatch:hover { border-color: var(--brand); }
.swatch.on { border-color: var(--brand); background: var(--cream2); font-weight: 700; }
/* R32: swatch con la FOTO della scarpa di quel colore (pattern green-comfort) */
.swatch.sw-img { padding: 2px; border-radius: 50%; }
.swatch.sw-img img {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover; display: block;
  border: 2px solid transparent;
}
.swatch.sw-img.on { border-color: var(--brand); background: var(--cream2); }
.swatch.sw-img.on img { border-color: #fff; }
.sizes { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.4rem; }
/* R32: disponibili evidenti (verde), esaurite in grigio tratteggiato */
.size-btn {
  min-width: 2.7rem; padding: 0.4rem 0.5rem; cursor: pointer; font: inherit; font-size: 0.95rem;
  border: 2px solid #116633; border-radius: 8px; background: #f2f9f2; color: #116633; font-weight: 600;
}
.size-btn:hover { border-color: var(--brand); color: var(--brand); }
.size-btn.on { border-color: #116633; background: #116633; color: #fff; font-weight: 700; }
.size-btn.out { opacity: 0.5; border: 2px dashed #999; background: #f2f2f2; color: #888; font-weight: 400; }
.gallery img.hero { cursor: zoom-in; }

/* R31: lightbox foto + guida taglie (modali) */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; background: rgba(20, 12, 4, 0.88);
  display: flex; align-items: center; justify-content: center;
}
.lightbox .lb-img {
  max-width: 92vw; max-height: 86vh; object-fit: contain; background: #fff;
  border-radius: 6px; cursor: pointer; box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.lightbox .lb-close {
  position: absolute; top: 0.6rem; right: 1rem; font-size: 2.2rem; line-height: 1;
  background: none; border: 0; color: #fff; cursor: pointer;
}
.lightbox .lb-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 2rem; padding: 0.6rem 0.9rem; background: rgba(255,255,255,0.12);
  border: 0; border-radius: 8px; color: #fff; cursor: pointer;
}
.lightbox .lb-arrow:hover { background: rgba(255,255,255,0.25); }
.lightbox .lb-prev { left: 0.6rem; }
.lightbox .lb-next { right: 0.6rem; }
.lightbox .lb-count { position: absolute; bottom: 0.8rem; left: 0; right: 0; text-align: center; color: #eee; font-size: 0.9rem; }
.lightbox.size-guide { background: rgba(20, 12, 4, 0.7); }
.sg-box {
  background: var(--cream); border: 1px solid var(--accent); border-radius: 12px;
  padding: 1.2rem 1.4rem; max-width: 92vw; max-height: 86vh; overflow: auto;
}
.sg-box h2 { margin-top: 0; color: var(--brand); }
.sg-table { border-collapse: collapse; margin: 0.6rem 0; }
.sg-table th, .sg-table td { border: 1px solid var(--accent); padding: 0.3rem 0.8rem; text-align: center; }
.sg-table th { background: var(--cream2); }

/* R31: prodotti correlati in scheda */
.related { margin-top: 1.6rem; }
.related h2 { color: var(--brand); margin-bottom: 0.2rem; }

/* R32: modale "Chiedi informazioni" — form dentro la stessa shell della guida taglie */
.ask-modal .sg-box { max-width: 30rem; width: 92vw; }
.ask-modal label { display: block; font-weight: 700; color: var(--ink); font-size: 0.85rem; margin-top: 0.6rem; }
.ask-modal input, .ask-modal textarea {
  width: 100%; box-sizing: border-box; padding: 0.45rem; border: 1px solid var(--accent);
  border-radius: 6px; font: inherit; background: #fff;
}

/* R34: box kit nella scheda prodotto */
.kit-card { margin: 0.6rem 0; }
.kit-card h2 { font-size: 1rem; color: var(--ink); margin: 0 0 0.4rem; }
.kit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.kit-list li { display: flex; align-items: center; gap: 0.6rem; }
.kit-list img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }



.news-list { display: grid; gap: 1rem; margin-top: 1rem; }
.news-card a {
  display: flex; gap: 1rem; align-items: flex-start;
  background: #fff; border: 1px solid var(--accent); border-radius: 10px;
  padding: 0.8rem; text-decoration: none; color: inherit;
}
.news-card a:hover { background: var(--cream); }
.news-card img { width: 150px; height: 105px; object-fit: cover; border-radius: 8px; flex: none; }
.news-card h2 { margin: 0.15rem 0; font-size: 1.05rem; color: var(--brand); }
.news-card p { margin: 0.2rem 0 0; font-size: 0.9rem; }
.news-photos { display: flex; gap: 0.7rem; flex-wrap: wrap; margin: 1rem 0; }
.news-photos img { max-width: 240px; border-radius: 8px; border: 1px solid var(--accent); }
@media (max-width: 600px) {
  .news-card a { flex-direction: column; }
  .news-card img { width: 100%; height: auto; }
}


/* R53 — cartellino della marca in pagina #/marca/<nome> */
.brand-hero {
  display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--accent); border-radius: 12px;
  padding: 1rem 1.2rem; margin: 0.8rem 0 1rem;
}
.brand-hero-logo { max-height: 96px; max-width: 220px; object-fit: contain; flex: none; }
.brand-hero-desc { margin: 0.2rem 0 0.5rem; font-size: 1rem; }
.brand-hero-links { margin: 0; }
.brand-hero-links .btn-lite { margin: 0 0.4rem 0.3rem 0; display: inline-block; }

/* R53 — chip con logo nello strip «Marche che trattiamo» */
.brand-chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: #fff; border: 1px solid var(--accent); border-radius: 10px;
  padding: 0.3rem 0.7rem 0.3rem 0.35rem; text-decoration: none; color: inherit;
  margin: 0 0.35rem 0.45rem 0; vertical-align: middle;
}
.brand-chip:hover { background: var(--cream); }
.brand-chip img { height: 30px; max-width: 90px; object-fit: contain; }
.brand-chip .count { color: var(--brand); font-size: 0.85em; }

/* R61 — colonna laterale della home (box del sito: assistenza, servizi, promozioni) */
.home-cols { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 1rem; align-items: start; }
.side-boxes { display: flex; flex-direction: column; gap: 0.8rem; }
.side-box { border: 1px solid var(--line); border-radius: 12px; background: var(--cream); overflow: hidden; }
.side-box a { color: inherit; text-decoration: none; display: block; }
.side-box img { width: 100%; display: block; }
.side-box h3 { margin: 0.5rem 0.7rem 0.2rem; font-size: 0.95rem; color: var(--brand); }
.side-box p { margin: 0 0.7rem 0.7rem; font-size: 0.85rem; }
@media (max-width: 900px) {
  .home-cols { grid-template-columns: 1fr; }
}

/* R62 — strip "Disponibile in altri colori" nella scheda prodotto */
.color-strip { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.color-chip {
  width: 72px; height: 72px; border-radius: 12px; overflow: hidden;
  border: 2px solid var(--line); background: #fff; display: inline-flex;
  align-items: center; justify-content: center; text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.color-chip:hover { border-color: var(--brand); transform: translateY(-2px); }
.color-chip img { width: 100%; height: 100%; object-fit: cover; }
.color-chip-name { font-size: 0.7rem; color: var(--ink); text-align: center; padding: 0.2rem; }
