/* ============================
   SHOP THEME (isolato)
   FIX responsive come cms-template.css
   ============================ */

/* Extra sicurezza: niente overflow orizzontale nello shop */
body.theme-shop { overflow-x: hidden; }

/* HERO SHOP */
body.theme-shop .shop-hero{
  border:1px solid var(--border);
  border-radius:16px;
/*  background:var(--bg-soft);*/
  padding:16px;
/*  box-shadow:var(--shadow-soft);*/
  margin:10px 0 16px;
}
body.theme-shop .shop-hero h1{ margin:0 0 6px; }
body.theme-shop .shop-hero p{ margin:0; }

/* CTA / bottoni */
body.theme-shop .shop-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--primary-dark);
  font-weight:700;
  font-size:.9rem;
  cursor:pointer;
  text-decoration:none;
  white-space:nowrap;
  max-width:100%;
  box-sizing:border-box;
  line-height:1;
  min-height:42px;
}
body.theme-shop .shop-btn:hover{ background:#e8f0fb; text-decoration:none; }
body.theme-shop .shop-btn-primary{
  background:var(--primary-dark);
  color:#fff;
  border-color:var(--primary-dark);
}
body.theme-shop .shop-btn-primary:hover{ background:var(--primary); border-color:var(--primary); }

/* Pulsante secondario “meno importante” (es. svuota carrello) */
body.theme-shop .shop-btn-muted{
  background:var(--bg-soft);
  color:var(--text-muted);
  border-color:var(--border);
}
body.theme-shop .shop-btn-muted:hover{
  background:var(--bg-soft);
  opacity:.9;
}

body.theme-shop button.shop-btn{
  -webkit-appearance:none;
  appearance:none;
}

/* Grid categorie */
body.theme-shop .shop-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
  margin-top:10px;
}
body.theme-shop .shop-tile{
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--shadow-soft);
  padding:14px;
  display:grid;
  gap:8px;
  min-width:0;
}
body.theme-shop .shop-tile .pill{
  display:inline-flex;
  width:fit-content;
  padding:3px 10px;
  border-radius:999px;
  background:#fae847;
  color:#fff;
  font-size:.74rem;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  max-height:24.95px;
}
body.theme-shop .shop-tile h3{ margin:0; font-size:1.02rem; }
body.theme-shop .shop-tile p{ margin:0; }

/* Grid prodotti */
body.theme-shop .product-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
  margin-top:10px;
}
body.theme-shop .product-card{
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
/*  box-shadow:var(--shadow-soft); */
  overflow:hidden;
  display:grid;
  min-width:0;
}
body.theme-shop .product-media{
  background:var(--bg-soft);
  aspect-ratio:4/3;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--text-muted);
  font-weight:700;
  border-bottom:1px solid var(--border);
}
body.theme-shop .product-media picture,
body.theme-shop .product-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  max-width:100%;
}
body.theme-shop .product-body{
  padding:12px 12px 14px;
  display:grid;
  gap:8px;
  min-width:0;
}
body.theme-shop .product-title{
  margin:0;
  font-size:1rem;
  color:#000;
  font-weight:bolder;
}
body.theme-shop .product-meta{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:10px;
  min-width:0;
}

/* Prezzi + sconto */
body.theme-shop .price-wrap{
  display:inline-flex;
  align-items:baseline;
  gap:8px;
  flex-wrap:wrap;
  min-width:0;
}
body.theme-shop .price-wrap.has-discount{
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
}
body.theme-shop .price{ font-weight:700; color:var(--primary-dark); font-size:22px; color:#2c7eb7}
body.theme-shop .price-old{
  color:#9aa3a0;
  text-decoration:none;
  font-weight:400; /* niente bold */
  font-size:.92rem;
}
body.theme-shop .price-old .price-old-value{
  text-decoration:line-through;
}
body.theme-shop .discount-badge{
  display:inline-flex;
  align-items:center;
  padding:3px 8px;
  border-radius:999px;
  background:#ffebee;
  border:1px solid #ffcdd2;
  color:#b00020;
  font-weight:900;
  font-size:.78rem;
  letter-spacing:.02em;
}
body.theme-shop .sku{
  font-size:.82rem;
  color:var(--text-muted);
  overflow-wrap:anywhere;
  min-width:0;
}
body.theme-shop .product-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
body.theme-shop .note-soft{
  font-size:.85rem;
  color:var(--text-muted);
  margin:0;
  overflow-wrap:anywhere;
}

/* Recent sales notification (toast) */
body.theme-shop .rsn-toast{
  position:fixed;
  left:18px;
  bottom:18px;
  width:min(560px, calc(100% - 36px));
  z-index:9999;
  display:flex;
  gap:14px;
  align-items:stretch;
  border-radius:16px;
  box-shadow:var(--shadow-soft);
  overflow:hidden;
  opacity:0;
  transform:translateY(14px);
  pointer-events:none;
  will-change: opacity, transform;
  transition:opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
}
body.theme-shop .rsn-toast.is-visible{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}
body.theme-shop .rsn-toast .rsn-left{
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:12px;
  min-width:120px;
}
body.theme-shop .rsn-toast .rsn-left img{
  width:96px;
  height:96px;
  object-fit:contain;
  display:block;
  border-radius:12px;
  background:var(--bg-soft);
}
body.theme-shop .rsn-toast .rsn-right{
  position:relative;
  flex:1;
  background:var(--secondary);
  color:#fff;
  padding:14px 44px 14px 16px;
  display:flex;
  align-items:center;
}
body.theme-shop .rsn-toast .rsn-text{
  font-size:.95rem;
  line-height:1.35;
}
body.theme-shop .rsn-toast .rsn-text a{
  color:var(--accent);
  text-decoration:none;
  font-weight:700;
}
body.theme-shop .rsn-toast .rsn-text a:hover{ text-decoration:underline; }
body.theme-shop .rsn-toast .rsn-close{
  position:absolute;
  top:10px;
  right:10px;
  width:28px;
  height:28px;
  border-radius:999px;
  border:0;
  background:#111;
  color:#fff;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  line-height:1;
}
body.theme-shop .rsn-toast .rsn-close:focus{ outline:2px solid #fff; outline-offset:2px; }

/* Pagina prodotto */
body.theme-shop .product-page{
  display:grid;
  grid-template-columns:minmax(0, 1.1fr) minmax(0, .9fr);
  gap:16px;
  margin-top:10px;
  min-width:0;
}
body.theme-shop .product-gallery{
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--bg-soft);
  box-shadow:var(--shadow-soft);
  padding:14px;
  min-width:0;
}
body.theme-shop .product-summary{
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--shadow-soft);
  padding:14px;
  min-width:0;
}

/* Checkout form: griglie compatte (evita overflow e rende piccoli i campi corti) */
body.theme-shop .checkout-form{
  display:grid;
  gap:10px;
  min-width:0;
}
body.theme-shop .checkout-form label{ min-width:0; }
body.theme-shop .checkout-form input,
body.theme-shop .checkout-form textarea,
body.theme-shop .checkout-form select{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  min-width:0;
}
body.theme-shop .checkout-row{
  display:grid;
  gap:10px;
  min-width:0;
}
/* Indirizzo + numero civico (numero piccolo) */
body.theme-shop .checkout-row-addr{
  /* N. civico molto corto */
  grid-template-columns:minmax(0, 1fr) minmax(70px, 90px);
}
/* CAP piccolo, Citta flessibile, Provincia medio */
body.theme-shop .checkout-row-city{
  /* CAP corto, Citta flessibile, Provincia corta (ma può essere scritta anche per esteso) */
  grid-template-columns:minmax(70px, 95px) minmax(0, 1fr) minmax(70px, 140px);
}

/* Disponibilita */
body.theme-shop .stock-out{ color:#c62828; font-weight:900; }
body.theme-shop .stock-in{ color:var(--text-main); font-weight:700; }

@media (max-width:760px){
  body.theme-shop .checkout-row-addr,
  body.theme-shop .checkout-row-city{
    grid-template-columns:minmax(0, 1fr);
  }
}

/* Gallery scroll-snap + thumbs */
body.theme-shop .gallery-track{
  width:100%;
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:100%;
  gap:10px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scroll-padding:0;
  padding:0;
  margin:0;
  -webkit-overflow-scrolling:touch;
  border-radius:14px;
  min-width:0;
}
body.theme-shop .gallery-slide{
  scroll-snap-align:start;
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  overflow:hidden;
  min-width:0;
}
body.theme-shop .gallery-slide picture,
body.theme-shop .gallery-slide img{
  width:100%;
  height:auto;
  display:block;
  max-width:100%;
}
body.theme-shop .gallery-thumbs{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:10px 0 2px;
  -webkit-overflow-scrolling:touch;
  max-width:100%;
}
body.theme-shop .gallery-thumb{
  display:block;
  flex:0 0 auto;
  width:84px;
  height:64px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  overflow:hidden;
  cursor:pointer;
}
body.theme-shop .gallery-thumb picture,
body.theme-shop .gallery-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* ✅ Badge carrello in header shop */
body.theme-shop .shop-cart-btn{ position:relative; }
body.theme-shop .shop-cart-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  height:18px;
  padding:0 6px;
  border-radius:999px;
  background:#b00020;
  color:#fff;
  font-weight:900;
  font-size:12px;
  line-height:18px;
  margin-left:8px;
}

/* ✅ Nota “Acquisto sicuro” */
body.theme-shop .shop-secure-note{
  margin-top:12px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#e8f0fb;
  color:var(--text-muted);
  font-size:.86rem;
}
body.theme-shop .shop-lock{ font-size:1rem; }

/* ============================
   RESPONSIVE shop (griglie)
   ============================ */
@media (max-width:1100px){
  body.theme-shop .shop-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  body.theme-shop .product-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}

@media (max-width:980px){
  body.theme-shop .product-page{ grid-template-columns:minmax(0, 1fr); }
}

@media (max-width:760px){
  body.theme-shop main article{ padding:18px 14px; }
  body.theme-shop .shop-grid{ grid-template-columns:minmax(0, 1fr); }
  body.theme-shop .product-grid{ grid-template-columns:minmax(0, 1fr); }
}

/* ============================
   ✅ FIX DEFINITIVO (come cms-template.css):
   su mobile lo shop NON deve usare la colonna 1040px delle "Varianti layout"
   perché lo shop è layout-full.
   ============================ */
@media (max-width:900px){
  body.theme-shop.layout-full .main-layout,
  body.theme-shop.layout-no-left .main-layout,
  body.theme-shop.layout-no-right .main-layout{
    grid-template-columns:minmax(0, 1fr);
    justify-content:stretch;
  }
}
/* Spazio sopra i numeri della paginazione */
.shop-pagination{
  padding-top: 16px;
}


/* ============================
   BUNDLE - Spesso acquistati insieme (pagina prodotto)
   ============================ */

body.theme-shop .bundle-box{
  margin-top:16px;
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--shadow-soft);
  padding:14px;
}

body.theme-shop .bundle-box h2{ margin:0; }

body.theme-shop .bundle-form{ margin-top:12px; }

/* Desktop: fino a 3 prodotti in linea (con + tra i prodotti) */
body.theme-shop .bundle-items{
  display:flex;
  align-items:stretch;
  gap:10px;
  flex-wrap:nowrap;
  overflow:hidden;
}

body.theme-shop .bundle-item{
  flex:1 1 0;
  min-width:0;
  display:grid;
  grid-template-columns:22px 84px minmax(0, 1fr);
  gap:10px;
  align-items:center;
  padding:12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--bg-soft);
}

body.theme-shop .bundle-plus{
  flex:0 0 auto;
  align-self:center;
  width:28px;
  height:28px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text-muted);
  font-weight:900;
}

body.theme-shop .bundle-check input{
  width:18px;
  height:18px;
}

body.theme-shop .bundle-thumb{
  display:block;
  border-radius:12px;
  overflow:hidden;
  border:1px solid var(--border);
  background:#fff;
}

body.theme-shop .bundle-thumb picture,
body.theme-shop .bundle-thumb img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

body.theme-shop .bundle-thumb-fallback{
  display:block;
  width:100%;
  aspect-ratio: 1/1;
  background:#fff;
}

body.theme-shop .bundle-info{ min-width:0; }

body.theme-shop .bundle-name{
  display:block;
  font-weight:900;
  color:#000;
  line-height:1.2;
  text-decoration:none;
}
body.theme-shop .bundle-name:hover{ text-decoration:underline; }

body.theme-shop .bundle-price{
  display:flex;
  gap:8px;
  align-items:baseline;
  flex-wrap:wrap;
  margin-top:6px;
}

/* Totale + CTA */
body.theme-shop .bundle-summary{
  margin-top:12px;
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:12px;
  align-items:center;
}

body.theme-shop .bundle-total{ min-width:0; }

/* Ingrandisci SOLO "Prezzo totale" + prezzi (risparmio resta invariato) */
body.theme-shop .bundle-total > .note-soft{
  font-size:1rem;
  font-weight:800;
}
body.theme-shop .bundle-total-prices #bundleTotalOld{
  font-size:1.05rem;
}
body.theme-shop .bundle-total-prices #bundleTotal{
  font-size:1.55rem;
  line-height:1.1;
}

@media (max-width:980px){
  /* su tablet/mobile: consenti wrap e togli i + per non spaccare layout */
  body.theme-shop .bundle-items{ flex-wrap:wrap; }
  body.theme-shop .bundle-plus{ display:none; }
  body.theme-shop .bundle-item{ grid-template-columns:22px 74px minmax(0, 1fr); }
  body.theme-shop .bundle-summary{ grid-template-columns:minmax(0, 1fr); }
  body.theme-shop .bundle-summary .shop-btn{ width:100%; }
}

/* ✅ FIX MOBILE + 2 per riga
   - 2 prodotti per riga (SEO: visibili senza scrolling)
   - titolo/prezzo dentro il box, sotto l'immagine (leggibili)
*/
@media (max-width:760px){
  body.theme-shop .bundle-items{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:12px;
    overflow:visible;
  }

  body.theme-shop .bundle-item{
    position:relative;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:8px;
    padding:10px;
    overflow:hidden;
  }

  body.theme-shop .bundle-check{
    position:absolute;
    top:10px;
    left:10px;
    margin:0;
  }

  body.theme-shop .bundle-thumb{
    width:100%;
    max-width:120px;
    margin-top:18px; /* spazio per la checkbox */
  }

  body.theme-shop .bundle-thumb picture,
  body.theme-shop .bundle-thumb img{
    width:100%;
    height:auto;
    object-fit:cover;
  }

  body.theme-shop .bundle-info{
    width:100%;
    text-align:center;
    min-width:0;
  }

  body.theme-shop .bundle-name{
    font-size:0.82rem;
    line-height:1.15;
    font-weight:800;
    max-height:2.3em; /* 2 righe */
    overflow:hidden;
  }

  body.theme-shop .bundle-price{
    justify-content:center;
    margin-top:2px;
    font-size:0.82rem;
  }

  body.theme-shop .bundle-price .price-old{
    font-size:0.82rem;
  }
}

@media (max-width:420px){
  body.theme-shop .bundle-items{
    grid-template-columns:minmax(0, 1fr);
  }
}

/* ============================
   RELATED PRODUCTS (Potrebbero interessarti anche)
   Card verticali: foto sopra, contenuti sotto
   ============================ */

body.theme-shop .related-box{
  margin-top:16px;
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--shadow-soft);
  padding:14px;
}
body.theme-shop .related-box h2{ margin:0; }

body.theme-shop .related-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
  align-items:stretch;
  margin-top:12px;
}

/* Fase 9A.7 — nei correlati la card torna verticale, come richiesto: immagine sopra e testi sotto */
body.theme-shop .related-grid .product-card{
  display:flex;
  flex-direction:column;
  height:100%;
  min-width:0;
}
body.theme-shop .related-grid .product-media{
  position:relative;
  width:100%;
  aspect-ratio:4/3;
  min-height:0;
  padding:12px;
  border-right:0;
  border-bottom:1px solid var(--border);
  background:var(--bg-soft);
  box-sizing:border-box;
}
body.theme-shop .related-grid .product-media .shop-badge{
  position:absolute;
  top:12px;
  left:12px;
  z-index:2;
  display:inline-flex;
  align-items:center;
  max-width:calc(100% - 24px);
  padding:7px 10px;
  border:1px solid transparent;
  border-radius:999px;
  line-height:1;
  font-size:.76rem;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
  white-space:nowrap;
  box-shadow:0 6px 14px rgba(0,0,0,.10);
}
body.theme-shop .related-grid .product-media picture{
  display:flex;
  width:100%;
  height:100%;
  align-items:center;
  justify-content:center;
}
body.theme-shop .related-grid .product-media img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}
body.theme-shop .related-grid .product-body{
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  gap:8px;
  padding:12px;
}
body.theme-shop .related-grid .product-title{
  line-height:1.25;
}
body.theme-shop .related-grid .product-actions{
  margin-top:auto;
}

@media (max-width:1100px){
  body.theme-shop .related-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}

@media (max-width:760px){
  body.theme-shop .related-grid{ grid-template-columns:minmax(0, 1fr); }
}

/* ============================
   Shop info banners (categoria + prodotto)
   ============================ */

body.theme-shop .shop-info-banners{
  margin-top:18px;
}

body.theme-shop .shop-info-banners-row{
  display:flex;
  gap:12px;
  align-items:stretch;
  flex-wrap:wrap;
}

body.theme-shop .shop-info-banner{
  flex:1 1 240px;
  min-width:220px;
  padding:14px;
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  background-color:var(--bg-soft);
  display:flex;
  gap:12px;
  align-items:flex-start;
}
body.theme-shop .shop-info-banner-icon{
  flex:0 0 auto;
  color:var(--text-muted);
  margin-top:2px;
  line-height:0;
}
body.theme-shop .shop-info-banner-icon svg{
  width:22px;
  height:22px;
  display:block;
}
body.theme-shop .shop-info-banner-content{
  min-width:0;
}

body.theme-shop .shop-info-banner-title{
  font-weight:600;
  margin-bottom:6px;
  color:var(--text-main);
}

body.theme-shop .shop-info-banner-text{
  color:var(--text-muted);
  font-size:0.95rem;
  line-height:1.35;
}

@media (max-width: 900px){
  body.theme-shop .shop-info-banner{
    flex:1 1 100%;
    min-width:0;
  }
}

/* =========================================================
   MERGE non-color da shop_backup.css -> shop_nuovo.css
   (aggiunte/override SOLO layout/structure, nessun colore)
   ========================================================= */

body.theme-shop .product-summary h3 + .note-soft{
  font-weight:400;
}

body.theme-shop .shop-cart-badge{
  position:absolute;
  top:-6px;
  right:-6px;
  margin:0;
  pointer-events:none;
}

/* ------------------------------------------------------------
   Shop format selector (Digitale / Cartaceo)
   Consolidato da <style> inline in templates/shop-product.php
   Nota: regole neutrali, colori via variabili tema (no branding)
------------------------------------------------------------ */
body.theme-shop .shop-format-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:10px 0 12px;}
body.theme-shop .shop-format-card{display:block;text-decoration:none;border:1px solid var(--border);border-radius:var(--radius-md);background:#fff;padding:12px;cursor:pointer;text-align:left;transition:transform .08s ease,box-shadow .08s ease,border-color .08s ease;}
body.theme-shop .shop-format-card:hover{transform:translateY(-1px);box-shadow:0 6px 18px rgba(0,0,0,.08);}
body.theme-shop .shop-format-card.is-active{border-color:var(--text-main);box-shadow:0 6px 18px rgba(0,0,0,.10);}
body.theme-shop .shop-format-card__title{font-weight:700;color:var(--text-main);margin-bottom:6px;}
body.theme-shop .shop-format-card__price{font-weight:800;color:var(--text-main);}
body.theme-shop .shop-format-card__note{margin-top:4px;font-size:.82rem;color:var(--text-muted);}
body.theme-shop button.shop-format-card{width:100%;font:inherit;appearance:none;-webkit-appearance:none;}
body.theme-shop button.shop-format-card::-moz-focus-inner{border:0;padding:0;}
@media (max-width:760px){body.theme-shop .shop-format-picker{grid-template-columns:1fr;}}



/* =============================
   Recently viewed band (footer)
   Progressive enhancement: hidden until JS renders
   ============================= */
body.theme-shop .recently-viewed-band{
  background:#f3f4f6;
  border-top:1px solid rgba(0,0,0,0.08);
  margin-top:28px;
}

body.theme-shop .recently-viewed-inner{
  /* Full-width like footer: no max-width constraint */
  max-width:none;
  width:100%;
  margin:0;
  padding:14px 16px;
  box-sizing:border-box;
}

body.theme-shop .recently-viewed-title{
  margin:0 0 10px 0;
  font-size:0.95rem;
  font-weight:700;
  color:var(--text-main);
}

body.theme-shop .recently-viewed-list{
  display:grid;
  /* Use the available width: more columns on large screens without overflowing */
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:10px;
}

body.theme-shop .rv-card{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px;
  border:1px solid rgba(0,0,0,0.06);
  background:rgba(255,255,255,0.75);
  border-radius:12px;
  text-decoration:none;
  min-width:0;
}

body.theme-shop .rv-card:hover{
  background:#fff;
}

body.theme-shop .rv-thumb{
  width:56px;
  height:56px;
  border-radius:12px;
  overflow:hidden;
  flex:0 0 56px;
  background:rgba(0,0,0,0.04);
}

body.theme-shop .rv-thumb img{
  display:block;
  width:56px;
  height:56px;
  object-fit:cover;
}

body.theme-shop .rv-thumb-ph{
  display:block;
  width:56px;
  height:56px;
}

body.theme-shop .rv-meta{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}

body.theme-shop .rv-name{
  font-size:0.88rem;
  line-height:1.15;
  font-weight:700;
  color:var(--text-main);
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

body.theme-shop .rv-price{
  font-size:0.82rem;
  color:var(--text-muted);
  font-weight:600;
}

@media (max-width:900px){
  body.theme-shop .recently-viewed-list{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}

@media (max-width:600px){
  body.theme-shop .recently-viewed-inner{ padding:12px 12px; }
  body.theme-shop .recently-viewed-title{ font-size:0.9rem; margin-bottom:8px; }
  body.theme-shop .rv-card{ padding:8px 8px; border-radius:10px; }
  body.theme-shop .rv-thumb,
  body.theme-shop .rv-thumb img,
  body.theme-shop .rv-thumb-ph{
    width:48px;
    height:48px;
    flex-basis:48px;
  }
  body.theme-shop .rv-name{ font-size:0.85rem; }
  body.theme-shop .rv-price{ font-size:0.8rem; }
}

/* ==========================================================
 * SHOP REVIEWS — blocco recensioni prodotto
 * (solo stili; colori ereditano la palette Sparkly via CSS vars)
 * ========================================================== */

body.theme-shop .shop-reviews{
  margin-top:16px;
  border-radius:16px;
  background:#fff;
  padding:14px;
  border:1px solid rgba(0,0,0,0.06);
  box-shadow:var(--shadow-soft);
}
body.theme-shop .shop-reviews h2{ margin:0; }

/* ── Summary: media + stelle + conteggio ── */
body.theme-shop .shop-reviews-summary{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:10px;
  flex-wrap:wrap;
}
body.theme-shop .shop-reviews-avg{
  font-size:28px;
  font-weight:800;
  line-height:1;
  color:var(--text-main);
}
body.theme-shop .shop-reviews-stars{
  display:flex;
  align-items:center;
  gap:2px;
}
body.theme-shop .shop-reviews-count{
  font-size:14px;
  color:var(--text-muted);
}

/* ── Tooltip informativo (i) ── */
body.theme-shop .shop-reviews-info{
  position:relative;
  display:inline-flex;
  align-items:center;
  cursor:pointer;
  margin-left:4px;
  vertical-align:middle;
}
body.theme-shop .shop-reviews-tooltip{
  display:none;
  position:absolute;
  bottom:calc(100% + 10px);
  left:50%;
  transform:translateX(-50%);
  background:var(--primary-dark);
  color:#fff;
  font-size:13px;
  font-weight:400;
  line-height:1.45;
  padding:12px 14px;
  border-radius:10px;
  width:280px;
  box-shadow:0 4px 12px rgba(0,0,0,.2);
  z-index:10;
  pointer-events:none;
}
body.theme-shop .shop-reviews-tooltip::after{
  content:'';
  position:absolute;
  top:100%;
  left:50%;
  transform:translateX(-50%);
  border:6px solid transparent;
  border-top-color:var(--primary-dark);
}
body.theme-shop .shop-reviews-info:hover .shop-reviews-tooltip,
body.theme-shop .shop-reviews-info:focus .shop-reviews-tooltip{
  display:block;
}

/* ── Griglia cards ── */
body.theme-shop .shop-reviews-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
  margin-top:14px;
}

/* ── Singola card ── */
body.theme-shop .shop-review-card{
  border:1px solid var(--border);
  border-radius:12px;
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:6px;
  background:#fff;
}
body.theme-shop .shop-review-stars{
  display:flex;
  gap:1px;
}
body.theme-shop .shop-review-title{
  font-weight:800;
  font-size:14px;
  color:var(--text-main);
}
body.theme-shop .shop-review-body{
  font-size:14px;
  font-weight:500;
  color:var(--text-main);
  opacity:.86;
  line-height:1.5;
}
body.theme-shop .shop-review-meta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  font-size:12px;
  color:var(--text-muted);
  margin-top:auto;
  padding-top:6px;
}
body.theme-shop .shop-review-author{ font-weight:800; color:var(--text-main); opacity:.72; }
body.theme-shop .shop-review-source a{
  color:var(--primary-dark);
  text-decoration:none;
}
body.theme-shop .shop-review-source a:hover{ text-decoration:underline; }

/* ── Responsive ── */
@media (max-width:1100px){
  body.theme-shop .shop-reviews-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width:600px){
  body.theme-shop .shop-reviews-grid{ grid-template-columns:1fr; }
  body.theme-shop .shop-reviews-avg{ font-size:24px; }
}

/* ============================
   Shop Category: descrizione collassabile (Leggi tutto / Leggi meno)
   SEO-safe: testo sempre nel DOM, no display:none sul contenuto
   Progressive enhancement: senza JS resta tutto visibile
   ============================ */
body.theme-shop .shop-cat-desc{ margin-top:6px; }

/* Stato gestito via JS */
body.theme-shop .shop-cat-desc__toggle{
  display:none; /* mostrato solo se davvero serve */
  margin-top:8px;
  padding:0;
  border:0;
  background:transparent;
  color:var(--primary-dark);
  font-weight:700;
  font-size:1rem;
  cursor:pointer;
  text-decoration:none;
}

body.theme-shop .shop-cat-desc.has-toggle .shop-cat-desc__toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
}

body.theme-shop .shop-cat-desc__toggle:hover{ text-decoration:underline; }
body.theme-shop .shop-cat-desc__toggle:focus-visible{
  outline:2px solid rgba(0,0,0,.35);
  outline-offset:3px;
  border-radius:10px;
}

/* caret (chevron) */
body.theme-shop .shop-cat-desc__toggle::after{
  content:"";
  width:10px;
  height:10px;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(45deg);
  margin-top:-2px;
}
body.theme-shop .shop-cat-desc.is-expanded .shop-cat-desc__toggle::after{
  transform:rotate(-135deg);
  margin-top:2px;
}

/* Collassato: line-clamp + max-height fallback */
body.theme-shop .shop-cat-desc.is-collapsed .shop-cat-desc__content{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  overflow:hidden;
  -webkit-line-clamp:3;
  line-clamp:3;
  max-height:calc(1.55em * 3);
}

body.theme-shop .shop-cat-desc.is-expanded .shop-cat-desc__content{
  display:block;
  overflow:visible;
  -webkit-line-clamp:unset;
  line-clamp:unset;
  max-height:none;
}

@media (max-width: 900px){
  body.theme-shop .shop-cat-desc.is-collapsed .shop-cat-desc__content{
    -webkit-line-clamp:3;
    line-clamp:3;
    max-height:calc(1.55em * 3);
  }
}

/* =========================================================
   Fase 8 — Area Cliente B2B
   Stili funzionali, coerenti con il tema Shop esistente.
   ========================================================= */
body.theme-shop .account-shell{max-width:1180px;margin:32px auto 64px;padding:0 20px;}
body.theme-shop .account-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px;}
body.theme-shop .account-heading h1{margin:3px 0 4px;color:var(--secondary);font-size:clamp(1.65rem,3vw,2.25rem);}
body.theme-shop .account-heading p{margin:0;color:var(--text-soft,#666);}
body.theme-shop .account-eyebrow{display:block;font-size:.76rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:var(--primary-dark);}
body.theme-shop .account-nav{display:flex;gap:8px;overflow-x:auto;padding:8px;border:1px solid var(--border);border-radius:16px;background:#fff;margin-bottom:22px;scrollbar-width:thin;}
body.theme-shop .account-nav__link{white-space:nowrap;padding:10px 14px;border-radius:10px;text-decoration:none;font-weight:800;color:var(--text-main);}
body.theme-shop .account-nav__link:hover,body.theme-shop .account-nav__link.is-active{background:var(--primary-soft,#f2f6ff);color:var(--primary-dark);}
body.theme-shop .account-nav__logout{margin-left:auto;color:#9b2c2c;}
body.theme-shop .account-content{display:grid;gap:18px;}
body.theme-shop .account-panel{background:#fff;border:1px solid var(--border);border-radius:18px;padding:22px;box-shadow:0 2px 12px rgba(0,0,0,.035);}
body.theme-shop .account-panel--narrow{max-width:680px;}
body.theme-shop .account-panel h2{margin:0 0 8px;color:var(--secondary);font-size:1.25rem;}
body.theme-shop .account-panel>p,body.theme-shop .account-panel__head p{color:var(--text-soft,#666);margin:0 0 18px;}
body.theme-shop .account-panel__head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:16px;}
body.theme-shop .account-panel__head h2{margin-bottom:4px;}
body.theme-shop .account-panel__head p{margin:0;}
body.theme-shop .account-actions{display:flex;flex-wrap:wrap;gap:10px;}
body.theme-shop .account-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;}
body.theme-shop .account-stat{background:#fff;border:1px solid var(--border);border-radius:16px;padding:18px;display:grid;gap:7px;}
body.theme-shop .account-stat span{font-size:.86rem;color:var(--text-soft,#666);font-weight:700;}
body.theme-shop .account-stat strong{font-size:1.55rem;color:var(--secondary);}
body.theme-shop .account-alert{border-radius:13px;padding:13px 15px;border:1px solid;line-height:1.45;}
body.theme-shop .account-alert--success{background:#edf9f0;border-color:#b9dfc2;color:#216235;}
body.theme-shop .account-alert--warning{background:#fff8e7;border-color:#ead39a;color:#6a4b05;}
body.theme-shop .account-alert--info{background:#edf5ff;border-color:#bfd4ee;color:#244f7d;}
body.theme-shop .account-alert--error{background:#fff0f0;border-color:#efc1c1;color:#842727;}
body.theme-shop .account-status{display:inline-flex;align-items:center;border-radius:999px;padding:6px 10px;font-size:.78rem;font-weight:900;white-space:nowrap;}
body.theme-shop .account-status--approved{background:#e7f7eb;color:#246638;}
body.theme-shop .account-status--pending{background:#fff3d7;color:#74520b;}
body.theme-shop .account-order-list{display:grid;border-top:1px solid var(--border);}
body.theme-shop .account-order-row{display:grid;grid-template-columns:1.4fr 1fr 1fr auto;align-items:center;gap:16px;padding:15px 4px;border-bottom:1px solid var(--border);text-decoration:none;color:var(--text-main);}
body.theme-shop .account-order-row--full{grid-template-columns:1.25fr 1fr 1fr .8fr auto;}
body.theme-shop .account-order-row:hover{background:#fafbfc;}
body.theme-shop .account-order-row span{display:grid;gap:3px;min-width:0;}
body.theme-shop .account-order-row small{color:var(--text-soft,#666);}
body.theme-shop .account-empty{text-align:center;padding:30px 15px;color:var(--text-soft,#666);}
body.theme-shop .account-empty h3{color:var(--secondary);margin:0 0 6px;}
body.theme-shop .account-filter{display:grid;grid-template-columns:1.6fr 1fr 1fr auto;gap:12px;align-items:end;margin-bottom:16px;}
body.theme-shop .account-form{display:grid;gap:14px;}
body.theme-shop .account-form--grid{grid-template-columns:repeat(2,minmax(0,1fr));}
body.theme-shop .account-form label,body.theme-shop .account-filter label{display:grid;gap:6px;min-width:0;}
body.theme-shop .account-form label>span,body.theme-shop .account-filter label>span{font-size:.86rem;font-weight:800;color:var(--text-main);}
body.theme-shop .account-form input,body.theme-shop .account-form select,body.theme-shop .account-form textarea,body.theme-shop .account-filter input,body.theme-shop .account-filter select{width:100%;box-sizing:border-box;padding:11px 12px;border:1px solid var(--border);border-radius:10px;background:#fff;font:inherit;color:inherit;}
body.theme-shop .account-form input:focus,body.theme-shop .account-form textarea:focus,body.theme-shop .account-filter input:focus,body.theme-shop .account-filter select:focus{outline:2px solid rgba(31,78,167,.24);border-color:var(--primary-dark);}
body.theme-shop .account-form .full{grid-column:1/-1;}
body.theme-shop .account-form small{color:var(--text-soft,#666);}
body.theme-shop .account-check{display:flex!important;grid-column:1/-1;grid-template-columns:auto 1fr!important;align-items:center;}
body.theme-shop .account-check input{width:auto!important;}
body.theme-shop .account-two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;}
body.theme-shop .account-readonly{display:flex;flex-wrap:wrap;gap:14px 35px;}
body.theme-shop .account-readonly span{display:grid;gap:4px;color:var(--text-soft,#666);}
body.theme-shop .account-readonly strong{color:var(--text-main);}
body.theme-shop .account-address-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
body.theme-shop .account-address-card{border:1px solid var(--border);border-radius:14px;padding:16px;display:flex;justify-content:space-between;gap:14px;}
body.theme-shop .account-address-card h3{margin:8px 0 6px;}
body.theme-shop .account-address-card p{margin:0;color:var(--text-soft,#555);line-height:1.55;}
body.theme-shop .account-address-actions{display:flex;flex-direction:column;align-items:flex-end;gap:8px;}
body.theme-shop .account-back{display:inline-block;text-decoration:none;font-weight:800;margin-bottom:2px;}
body.theme-shop .account-order-title{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;}
body.theme-shop .account-order-title h2{font-size:1.55rem;margin:3px 0 18px;}
body.theme-shop .account-order-total{font-size:1.5rem;color:var(--secondary);}
body.theme-shop .account-status-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:20px;}
body.theme-shop .account-status-grid>div{border:1px solid var(--border);border-radius:12px;padding:13px;display:grid;gap:4px;}
body.theme-shop .account-status-grid small{color:var(--text-soft,#666);}
body.theme-shop .account-timeline{display:grid;grid-template-columns:repeat(5,1fr);list-style:none;padding:0;margin:24px 0 4px;}
body.theme-shop .account-timeline li{text-align:center;position:relative;color:#888;font-size:.78rem;}
body.theme-shop .account-timeline li:before{content:"";position:absolute;top:7px;left:-50%;width:100%;height:2px;background:#ddd;}
body.theme-shop .account-timeline li:first-child:before{display:none;}
body.theme-shop .account-timeline li span{display:block;width:15px;height:15px;border-radius:50%;background:#ddd;margin:0 auto 8px;position:relative;z-index:2;}
body.theme-shop .account-timeline li.is-done{color:var(--primary-dark);font-weight:800;}
body.theme-shop .account-timeline li.is-done:before,body.theme-shop .account-timeline li.is-done span{background:var(--primary-dark);}
body.theme-shop .account-tracking{margin-top:20px;padding:15px;border-radius:13px;background:#f6f8fb;}
body.theme-shop .account-tracking p{margin:5px 0 12px;}
body.theme-shop .account-items{display:grid;}
body.theme-shop .account-item{display:grid;grid-template-columns:64px minmax(0,1fr) auto;gap:14px;align-items:center;padding:14px 0;border-bottom:1px solid var(--border);}
body.theme-shop .account-item img{width:60px;height:60px;object-fit:contain;border-radius:10px;background:#f7f7f7;}
body.theme-shop .account-item>div:nth-child(2),body.theme-shop .account-item>div:nth-child(3){display:grid;gap:4px;}
body.theme-shop .account-item>div:nth-child(3){text-align:right;}
body.theme-shop .account-item small{color:var(--text-soft,#666);}
body.theme-shop .account-totals{margin-left:auto;max-width:380px;padding-top:16px;display:grid;gap:8px;}
body.theme-shop .account-totals span{display:flex;justify-content:space-between;gap:20px;}
body.theme-shop .account-totals__grand{font-size:1.15rem;border-top:1px solid var(--border);padding-top:10px;}
body.theme-shop .account-pagination{display:flex;gap:6px;justify-content:center;margin-top:18px;}
body.theme-shop .account-pagination a{display:grid;place-items:center;min-width:38px;height:38px;border:1px solid var(--border);border-radius:9px;text-decoration:none;}
body.theme-shop .account-pagination a.is-active{background:var(--primary-dark);color:#fff;border-color:var(--primary-dark);}
body.theme-shop .shop-account-btn{display:inline-flex;align-items:center;gap:6px;}
body.theme-shop .shop-account-mobile{display:none;}

/* Autenticazione: usata anche da recupero password */
body.theme-shop .b2b-auth{max-width:680px;margin:40px auto;padding:0 16px;}
body.theme-shop .b2b-card{background:#fff;border:1px solid var(--border);border-radius:16px;padding:28px;box-shadow:0 2px 14px rgba(0,0,0,.05);}
body.theme-shop .b2b-card h1{margin:0 0 6px;}
body.theme-shop .b2b-card .sub{margin:0 0 22px;color:var(--text-soft,#666);}
body.theme-shop .b2b-field{margin-bottom:16px;}
body.theme-shop .b2b-field label{display:block;font-weight:700;margin-bottom:6px;}
body.theme-shop .b2b-field input{width:100%;box-sizing:border-box;padding:12px 14px;border:1px solid var(--border);border-radius:10px;font:inherit;}
body.theme-shop .b2b-alert{padding:12px 14px;border-radius:10px;margin-bottom:18px;}
body.theme-shop .b2b-alert.err{background:#fdecec;border:1px solid #f5c2c2;color:#8a1f1f;}
body.theme-shop .b2b-alert.ok{background:#eaf7ee;border:1px solid #bfe6c9;color:#1d6b32;}
body.theme-shop .b2b-submit{width:100%;padding:13px;border:0;border-radius:10px;background:var(--primary-dark,#111);color:#fff;font-size:1rem;font-weight:800;cursor:pointer;}
body.theme-shop .b2b-foot{margin-top:16px;text-align:center;}

@media(max-width:900px){
  body.theme-shop .account-stats{grid-template-columns:repeat(2,1fr);}
  body.theme-shop .account-order-row,body.theme-shop .account-order-row--full{grid-template-columns:1fr 1fr;}
  body.theme-shop .account-order-row>strong{grid-column:2;text-align:right;}
  body.theme-shop .account-filter{grid-template-columns:1fr 1fr;}
  body.theme-shop .account-two-col{grid-template-columns:1fr;}
  body.theme-shop .account-address-grid{grid-template-columns:1fr;}
}
@media(max-width:650px){
  body.theme-shop .account-shell{padding:0 14px;margin-top:22px;}
  body.theme-shop .account-heading{display:grid;}
  body.theme-shop .account-nav__logout{margin-left:0;}
  body.theme-shop .account-stats{grid-template-columns:1fr 1fr;}
  body.theme-shop .account-panel{padding:17px;}
  body.theme-shop .account-form--grid,body.theme-shop .account-filter{grid-template-columns:1fr;}
  body.theme-shop .account-form .full{grid-column:auto;}
  body.theme-shop .account-order-row,body.theme-shop .account-order-row--full{grid-template-columns:1fr;gap:9px;padding:16px 3px;}
  body.theme-shop .account-order-row>strong{grid-column:auto;text-align:left;font-size:1.1rem;}
  body.theme-shop .account-status-grid{grid-template-columns:1fr;}
  body.theme-shop .account-timeline{overflow-x:auto;min-width:520px;}
  body.theme-shop .account-item{grid-template-columns:52px 1fr;}
  body.theme-shop .account-item img{width:48px;height:48px;}
  body.theme-shop .account-item>div:nth-child(3){grid-column:2;text-align:left;}
  body.theme-shop .account-address-card{display:grid;}
  body.theme-shop .account-address-actions{flex-direction:row;align-items:center;}
  body.theme-shop .shop-account-desktop{display:none!important;}
  body.theme-shop .shop-account-mobile{display:list-item;}
}

/* Fase 8E — Preordini B2B */
body.theme-shop .shop-badge--preorder{background:#d97706;color:#fff;border-color:#b45309;}
body.theme-shop .shop-badge--coming-soon{background:#4f46e5;color:#fff;border-color:#4338ca;}
body.theme-shop .preorder-card-date{display:block;color:#9a3412;font-size:.84rem;font-weight:800;margin-top:5px;}
body.theme-shop .preorder-line{display:block;color:#9a3412;background:#fff7ed;border:1px solid #fed7aa;border-radius:8px;padding:6px 8px;margin-top:6px;line-height:1.35;}
body.theme-shop .preorder-notice{display:grid;gap:4px;margin:0 0 14px;padding:14px 16px;border:1px solid #fdba74;border-left:5px solid #d97706;border-radius:12px;background:#fff7ed;color:#7c2d12;}
body.theme-shop .preorder-notice strong{color:#9a3412;letter-spacing:.02em;}
body.theme-shop .preorder-notice.is-hidden{display:none;}
body.theme-shop .preorder-checkout-notice{border-color:#fdba74;background:#fff7ed;color:#7c2d12;}
body.theme-shop .preorder-ack{padding:12px;border:1px solid #fdba74;border-radius:10px;background:#fffaf5;}

/* Fase 8F — Marche / Brand */
.product-brand-link{display:inline-flex;align-items:center;width:max-content;max-width:100%;margin:0 0 6px;color:#536276;font-size:.76rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;text-decoration:none}
.product-brand-link:hover{text-decoration:underline}
.product-brand-link--single{margin-bottom:8px;font-size:.86rem;letter-spacing:.03em;text-transform:none}
.brand-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:18px}
.brand-card{display:flex;min-height:124px;flex-direction:column;justify-content:center;align-items:center;gap:9px;padding:18px;border:1px solid #e2e7ef;border-radius:14px;background:#fff;color:inherit;text-align:center;text-decoration:none;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}
.brand-card:hover{transform:translateY(-2px);border-color:#aebed4;box-shadow:0 8px 22px rgba(24,46,79,.08)}
.brand-card img{display:block;max-width:150px;max-height:55px;object-fit:contain}
.brand-card strong{font-size:1rem}.brand-card span{color:#687386;font-size:.82rem}
.brand-directory-search{max-width:430px;margin-top:14px}.brand-directory-search label{display:block;margin-bottom:6px;font-weight:700}.brand-directory-search input{width:100%;padding:11px 12px;border:1px solid #d8dee8;border-radius:10px}
.brand-hero{display:flex;align-items:center;gap:22px}.brand-hero-logo{max-width:190px;max-height:85px;object-fit:contain}
.brand-filters-wrap{margin-top:8px}
@media(max-width:900px){.brand-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.brand-grid{grid-template-columns:1fr}.brand-hero{align-items:flex-start;flex-direction:column}.brand-card{min-height:100px}}

/* Fase 8G — pagina risultati ricerca */
.shop-search-page-form{display:flex;gap:10px;margin:18px 0 20px;max-width:920px}.shop-search-page-form input[type="search"]{flex:1;min-width:0;border:1px solid var(--border);border-radius:999px;padding:13px 20px;font:inherit}.shop-search-summary{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:14px 0}.shop-search-filters{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr)) auto auto;gap:10px;align-items:end;background:var(--bg-soft);border:1px solid var(--border);border-radius:14px;padding:14px;margin:12px 0 22px}.shop-search-filters label{font-size:.82rem;font-weight:750;color:var(--text-main)}.shop-search-filters select{display:block;width:100%;margin-top:5px;padding:9px;border:1px solid var(--border);border-radius:9px;background:#fff}.shop-search-empty{padding:34px;border:1px dashed var(--border);border-radius:16px;text-align:center;background:var(--bg-soft)}
@media(max-width:1000px){.shop-search-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.shop-search-page-form{flex-direction:column}.shop-search-filters{grid-template-columns:1fr}.shop-search-summary{align-items:flex-start;flex-direction:column}}

.search-variant-match{display:block;margin-top:4px;color:#275f9e;font-size:.78rem;font-weight:800;}

/* Fase 9A.10 — badge Preordine/In arrivo in overlay sulle card prodotto generiche
   Home shop, categorie, tassonomie, marche, collezioni e risultati: il badge non occupa spazio nel flex media,
   quindi l'immagine resta centrata e usa tutta l'area come le altre card. */
body.theme-shop .product-card .product-media{
  position:relative;
  overflow:hidden;
}

body.theme-shop .product-card .product-media .shop-badge{
  position:absolute;
  top:12px;
  left:12px;
  z-index:2;
  display:inline-flex;
  align-items:center;
  max-width:calc(100% - 24px);
  padding:7px 10px;
  border:1px solid transparent;
  border-radius:999px;
  line-height:1;
  font-size:.76rem;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
  white-space:nowrap;
  box-shadow:0 6px 14px rgba(0,0,0,.10);
}

body.theme-shop .product-card .product-media picture{
  flex:1 1 auto;
  min-width:0;
}


/* Fase 9A.11 — badge multipli prodotto/preordine
   Se un prodotto ha sia Preordine/In arrivo sia Novità/Offerta/Più venduto,
   i badge vengono mostrati uno sotto l'altro sullo stesso lato, senza occupare spazio nell'immagine. */
body.theme-shop .gallery-slide{
  position:relative;
}

body.theme-shop .product-card .product-media .shop-badge-stack,
body.theme-shop .gallery-slide .shop-badge-stack{
  position:absolute;
  top:12px;
  left:12px;
  z-index:5;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
  max-width:calc(100% - 24px);
  pointer-events:none;
}

body.theme-shop .product-card .product-media .shop-badge-stack .shop-badge,
body.theme-shop .related-grid .product-media .shop-badge-stack .shop-badge,
body.theme-shop .gallery-slide .shop-badge-stack .shop-badge{
  position:static;
  display:inline-flex;
  align-items:center;
  width:max-content;
  max-width:100%;
  padding:7px 10px;
  border:1px solid transparent;
  border-radius:999px;
  line-height:1;
  font-size:.76rem;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
  white-space:nowrap;
  box-shadow:0 6px 14px rgba(0,0,0,.10);
}

body.theme-shop .shop-badge--new{
  background:#0057ff;
  color:#fff;
  border-color:#0057ff;
}
body.theme-shop .shop-badge--deal{
  background:#b00020;
  color:#fff;
  border-color:#b00020;
}
body.theme-shop .shop-badge--bestseller{
  background:#014166;
  color:#fff;
  border-color:#014166;
}

@media (max-width:560px){
  body.theme-shop .product-card .product-media .shop-badge-stack,
  body.theme-shop .gallery-slide .shop-badge-stack{
    top:10px;
    left:10px;
    max-width:calc(100% - 20px);
  }

  body.theme-shop .product-card .product-media .shop-badge-stack .shop-badge,
  body.theme-shop .related-grid .product-media .shop-badge-stack .shop-badge,
  body.theme-shop .gallery-slide .shop-badge-stack .shop-badge{
    padding:6px 9px;
    font-size:.72rem;
  }
}

/* Fase 9A.15 — quantità acquistabili in scheda prodotto */
body.theme-shop .shop-product-purchase-form{
  width:100%;
  margin:0;
}
body.theme-shop .shop-simple-qty-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 12px;
  flex-wrap:wrap;
}
body.theme-shop .shop-simple-qty-row label,
body.theme-shop .shop-variant-matrix legend{
  color:#014166;
  font-weight:900;
}
body.theme-shop .shop-qty-input{
  width:88px;
  min-height:44px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  color:var(--text-main);
  font-weight:800;
  text-align:center;
}
body.theme-shop .shop-qty-input:focus{
  outline:0;
  border-color:#014166;
  box-shadow:0 0 0 3px rgba(1,65,102,.13);
}
body.theme-shop .shop-qty-input:disabled{
  opacity:.45;
  cursor:not-allowed;
  background:#f3f5f7;
}
body.theme-shop .shop-variant-matrix{
  border:0;
  padding:0;
  margin:0 0 14px;
}
body.theme-shop .shop-variant-matrix legend{
  margin:0 0 10px;
}
body.theme-shop .shop-variant-table{
  border:1px solid var(--border);
  border-radius:18px;
  overflow:hidden;
  background:#fff;
}
body.theme-shop .shop-variant-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 112px;
  gap:12px;
  align-items:center;
  padding:12px 14px;
  border-top:1px solid var(--border);
}
body.theme-shop .shop-variant-row:first-child{
  border-top:0;
}
body.theme-shop .shop-variant-head{
  background:var(--bg-soft);
  color:#014166;
  font-size:.82rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
}
body.theme-shop .shop-variant-size{
  min-width:0;
}
body.theme-shop .shop-variant-size strong{
  display:block;
  color:var(--text-main);
  font-size:1rem;
}
body.theme-shop .shop-variant-size small{
  display:block;
  margin-top:3px;
  color:var(--text-muted);
  font-size:.78rem;
  line-height:1.35;
}
body.theme-shop .shop-variant-row.is-disabled{
  background:#fafafa;
}
body.theme-shop .shop-variant-row.is-disabled .shop-variant-size{
  opacity:.55;
}
body.theme-shop .shop-variant-qty{
  display:flex;
  justify-content:flex-end;
  align-items:center;
}
body.theme-shop .shop-variant-help{
  margin-top:10px;
}

@media (max-width:640px){
  body.theme-shop .shop-simple-qty-row{
    align-items:flex-start;
    flex-direction:column;
  }
  body.theme-shop .shop-simple-qty-row .shop-qty-input{
    width:100%;
    max-width:150px;
  }
  body.theme-shop .shop-variant-head{
    display:none;
  }
  body.theme-shop .shop-variant-row{
    grid-template-columns:1fr;
    gap:8px;
    padding:14px;
  }
  body.theme-shop .shop-variant-qty{
    justify-content:flex-start;
  }
  body.theme-shop .shop-variant-qty::before{
    content:'Quantità';
    align-self:center;
    margin-right:10px;
    color:#014166;
    font-size:.82rem;
    font-weight:900;
  }
}

/* Fase 9A.20 — Etichetta MSRP accanto al prezzo di listino barrato */
body.theme-shop .price-old .price-old-label{
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
  margin-right: 4px;
  text-decoration:none;
}
body.theme-shop .price-old .price-old-value{
  text-decoration:line-through;
}

/* Fase 9A.22 — Sidebar shop accordion categorie/marche/misura */
body.theme-shop .shop-catalog-layout{
  display:grid;
  grid-template-columns:280px minmax(0,1fr);
  gap:22px;
  align-items:start;
  margin-top:12px;
}
body.theme-shop .shop-catalog-main{
  min-width:0;
}
body.theme-shop .shop-sidebar-accordion{
  min-width:0;
}
body.theme-shop .shop-sidebar-details{
  display:block;
}
body.theme-shop .shop-sidebar-mobile-summary{
  display:none;
}
body.theme-shop .shop-sidebar-card{
  position:sticky;
  top:18px;
  border:1px solid var(--border);
  border-radius:18px;
  background:#fff;
  box-shadow:0 12px 34px rgba(1,65,102,.08);
  padding:16px;
}
body.theme-shop .shop-sidebar-heading{
  color:#014166;
  font-size:.98rem;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
  margin:0 0 14px;
}
body.theme-shop .shop-sidebar-section{
  border-top:1px solid var(--border);
  padding-top:14px;
  margin-top:14px;
}
body.theme-shop .shop-sidebar-section:first-of-type{
  border-top:0;
  padding-top:0;
  margin-top:0;
}
body.theme-shop .shop-sidebar-section-title{
  color:var(--text-muted);
  font-size:.76rem;
  font-weight:900;
  letter-spacing:.09em;
  text-transform:uppercase;
  margin:0 0 8px;
}
body.theme-shop .shop-sidebar-list{
  display:grid;
  gap:3px;
}
body.theme-shop .shop-sidebar-brand-list{
  max-height:360px;
  overflow:auto;
  padding-right:2px;
}
body.theme-shop .shop-sidebar-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-width:0;
  padding:8px 10px;
  border-left:3px solid transparent;
  border-radius:10px;
  color:#263746;
  font-size:.94rem;
  font-weight:750;
  line-height:1.25;
  text-decoration:none;
  transition:background .16s ease,color .16s ease,border-color .16s ease;
}
body.theme-shop .shop-sidebar-link:hover{
  background:#f2f6ff;
  color:#014166;
  text-decoration:none;
}
body.theme-shop .shop-sidebar-link.is-active{
  background:#f2f6ff;
  border-left-color:#0057ff;
  color:#014166;
  font-weight:900;
}
body.theme-shop .shop-sidebar-link small{
  color:var(--text-muted);
  font-size:.74rem;
  font-weight:800;
}
body.theme-shop .shop-sidebar-acc{
  border:0;
  margin:0;
  padding:0;
}
body.theme-shop .shop-sidebar-acc-summary{
  display:grid;
  grid-template-columns:minmax(0,1fr) 24px;
  align-items:center;
  gap:6px;
  list-style:none;
  cursor:pointer;
  border-radius:10px;
}
body.theme-shop .shop-sidebar-acc-summary::-webkit-details-marker{
  display:none;
}
body.theme-shop .shop-sidebar-acc-summary .shop-sidebar-link{
  min-width:0;
}
body.theme-shop .shop-sidebar-chevron{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  color:#014166;
  font-size:1rem;
  font-weight:900;
  transform:rotate(-90deg);
  transition:transform .16s ease;
}
body.theme-shop .shop-sidebar-acc[open] > .shop-sidebar-acc-summary .shop-sidebar-chevron{
  transform:rotate(0deg);
}
body.theme-shop .shop-sidebar-children{
  display:grid;
  gap:2px;
  margin:2px 0 6px 12px;
  padding-left:9px;
  border-left:1px solid var(--border);
}
body.theme-shop .shop-sidebar-children .shop-sidebar-link{
  font-size:.9rem;
  font-weight:700;
  padding-top:7px;
  padding-bottom:7px;
}
body.theme-shop .shop-sidebar-measure-list .shop-sidebar-link.is-active::before{
  content:'✓';
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  margin-right:2px;
  border-radius:999px;
  background:#0057ff;
  color:#fff;
  font-size:.68rem;
  font-weight:900;
}
body.theme-shop .shop-sidebar-measure-list .shop-sidebar-link{
  justify-content:flex-start;
}
body.theme-shop .shop-sidebar-measure-list .shop-sidebar-link small{
  margin-left:auto;
}
body.theme-shop .shop-has-sidebar .shop-inline-filters{
  display:none;
}

@media (max-width:1100px){
  body.theme-shop .shop-catalog-layout{
    grid-template-columns:250px minmax(0,1fr);
    gap:16px;
  }
  body.theme-shop .shop-sidebar-card{
    padding:14px;
  }
}

@media (max-width:900px){
  body.theme-shop .shop-catalog-layout{
    display:block;
  }
  body.theme-shop .shop-sidebar-accordion{
    margin:0 0 16px;
  }
  body.theme-shop .shop-sidebar-mobile-summary{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    min-height:48px;
    padding:12px 16px;
    border:1px solid var(--border);
    border-radius:999px;
    background:#014166;
    color:#fff;
    font-weight:900;
    letter-spacing:.02em;
    cursor:pointer;
    list-style:none;
  }
  body.theme-shop .shop-sidebar-mobile-summary::-webkit-details-marker{
    display:none;
  }
  body.theme-shop .shop-sidebar-details[open] .shop-sidebar-mobile-icon{
    transform:rotate(180deg);
  }
  body.theme-shop .shop-sidebar-mobile-icon{
    transition:transform .16s ease;
  }
  body.theme-shop .shop-sidebar-card{
    position:static;
    margin-top:10px;
    max-height:none;
    box-shadow:0 10px 28px rgba(1,65,102,.08);
  }
  body.theme-shop .shop-sidebar-brand-list{
    max-height:260px;
  }
  body.theme-shop .shop-has-sidebar .shop-inline-filters{
    display:block;
  }
}

@media (max-width:560px){
  body.theme-shop .shop-sidebar-card{
    border-radius:16px;
    padding:12px;
  }
  body.theme-shop .shop-sidebar-link{
    padding:9px 10px;
    font-size:.92rem;
  }
}

/* Fase 9A.22A — allineamento sidebar shop come sidebar editoriale
   La sidebar resta laterale solo quando c'è spazio reale per mantenere la colonna prodotti ampia.
   Sotto tale soglia torna compatta sopra i prodotti come su mobile, evitando compressioni. */
@media (min-width:1360px){
  body.theme-shop.layout-full .main-layout:has(.shop-catalog-layout){
    grid-template-columns:minmax(0, calc(260px + 24px + var(--content-max)));
    justify-content:center;
  }
  body.theme-shop.layout-full .main-layout:has(.shop-catalog-layout) > main{
    width:100%;
    justify-self:stretch;
  }
  body.theme-shop .shop-catalog-layout{
    display:grid;
    grid-template-columns:260px minmax(0, var(--content-max));
    gap:24px;
    align-items:start;
    justify-content:center;
    width:100%;
    max-width:calc(260px + 24px + var(--content-max));
    margin:12px auto 0;
  }
  body.theme-shop .shop-catalog-main{
    width:100%;
    max-width:var(--content-max);
    min-width:0;
  }
  body.theme-shop .shop-sidebar-accordion{
    width:260px;
    max-width:260px;
  }
  body.theme-shop .shop-sidebar-card{
    top:90px;
  }
}

@media (max-width:1359px){
  body.theme-shop .shop-catalog-layout{
    display:block;
    width:100%;
    max-width:none;
    margin-top:12px;
  }
  body.theme-shop .shop-catalog-main{
    width:100%;
    max-width:none;
  }
  body.theme-shop .shop-sidebar-accordion{
    width:100%;
    max-width:none;
    margin:0 0 16px;
  }
  body.theme-shop .shop-sidebar-mobile-summary{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    min-height:48px;
    padding:12px 16px;
    border:1px solid var(--border);
    border-radius:999px;
    background:#014166;
    color:#fff;
    font-weight:900;
    letter-spacing:.02em;
    cursor:pointer;
    list-style:none;
  }
  body.theme-shop .shop-sidebar-mobile-summary::-webkit-details-marker{
    display:none;
  }
  body.theme-shop .shop-sidebar-details[open] .shop-sidebar-mobile-icon{
    transform:rotate(180deg);
  }
  body.theme-shop .shop-sidebar-mobile-icon{
    transition:transform .16s ease;
  }
  body.theme-shop .shop-sidebar-card{
    position:static;
    margin-top:10px;
    max-height:none;
    box-shadow:0 10px 28px rgba(1,65,102,.08);
  }
  body.theme-shop .shop-sidebar-brand-list{
    max-height:260px;
  }
  body.theme-shop .shop-has-sidebar .shop-inline-filters{
    display:block;
  }
}
