/* ============================
   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; }

/* ============================
   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 (no display:none) */
body.theme-shop .shop-cat-desc.is-collapsed .shop-cat-desc__content{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  overflow:hidden;
  -webkit-line-clamp:var(--shop-cat-desc-lines, 7);
}

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

@media (max-width: 900px){
  body.theme-shop .shop-cat-desc.is-collapsed .shop-cat-desc__content{
    -webkit-line-clamp:var(--shop-cat-desc-lines-mobile, 5);
  }
}

/* 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;
  height:42px;
}
body.theme-shop .shop-btn:hover{ background:#fff1e8; 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:#c9692b; border-color:#c9692b; }

/* 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:#006db7;
  color:#fff;
  font-size:.74rem;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  height: 25px;
}
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;
  grid-template-rows:auto 1fr;
  min-width:0;
}
body.theme-shop .product-media{
  background:var(--bg-soft);
  aspect-ratio:4/3;
  display:flex;
  position:relative;
  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:flex;
  flex-direction:column;
  gap:8px;
  min-width:0;
}
body.theme-shop .product-title{
  margin:0;
  font-size:1rem;
  color:var(--secondary);
}
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:900; color:var(--primary-dark); }
body.theme-shop .price-old{
  color:#9aa3a0;
  text-decoration:line-through;
  font-weight:400; /* niente bold */
  font-size:.92rem;
}

/* Prezzo "stile Amazon": intero grande + decimali piccoli (solo UI, testo reale) */
body.theme-shop .shop-price{
  display:inline-flex;
  align-items:flex-start; /* allineamento in alto senza andare sopra */
  line-height:1;
  font-variant-numeric: tabular-nums;
}
body.theme-shop .shop-price__int{
  font-size:2.0rem;
  font-weight:600;
  letter-spacing:-0.01em;
}
body.theme-shop .shop-price__dec{
  font-size:1.0rem;
  margin-left:2px;
}
body.theme-shop .shop-price__cur{
  font-size:1.0rem;
  margin-left:3px;
}

/* Varianti */
body.theme-shop .shop-price--hero .shop-price__int{ font-size:2.0rem; font-weight:600; }
body.theme-shop .shop-price--hero .shop-price__dec{ font-size:1.0rem; }
body.theme-shop .shop-price--hero .shop-price__cur{ font-size:1.0rem; }

body.theme-shop .shop-price--old .shop-price__int{ font-size:1.0rem; font-weight:400; letter-spacing:0; }
/* Prezzo "vecchio" barrato: mantieni intero+decimali+valuta con stessa dimensione (no decimali "in alto") */
body.theme-shop .shop-price--old{
  align-items:baseline;
  color:#9aa3a0;
  text-decoration:line-through;
  text-decoration-thickness:1px;
}
body.theme-shop .shop-price--old .shop-price__int,
body.theme-shop .shop-price--old .shop-price__dec,
body.theme-shop .shop-price--old .shop-price__cur{
  font-size:1.0rem;
  font-weight:400;
  letter-spacing:0;
}

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;
}

/* Badge prodotto (stile Amazon) */
body.theme-shop .shop-badge{
  position:absolute;
  top:10px;
  right:10px;
  z-index:3;
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  font-size:.78rem;
  font-weight:900;
  line-height:1;
  letter-spacing:.01em;
  box-shadow:var(--shadow-soft);
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
  color:var(--text);
}
body.theme-shop .shop-badge--bestseller{
  background:#fff3e0;
  border-color:#ffe0b2;
  color:#7a4b00;
}
body.theme-shop .shop-badge--new{
  background:#e8f5e9;
  border-color:#c8e6c9;
  color:#1b5e20;
}
body.theme-shop .shop-badge--deal{
  background:#ffebee;
  border-color:#ffcdd2;
  color:#b00020;
}
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;
  margin-top:auto;
}
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;
}

/* Prodotto: descrizione (uniforma peso testo come editoriale) */
body.theme-shop .product-summary h3 + .note-soft{
  font-weight:400;
}

/* 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;
  position:relative;
  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 (uniformato allo stile editoriale) */
body.theme-shop .shop-cart-btn{
  position:relative;
}
body.theme-shop .shop-cart-badge{
  position:absolute;
  top:-6px;
  right:-6px;
  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:0;
  pointer-events:none;
}

/* ✅ 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;
  font-weight: 400;
}
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:var(--secondary);
  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)
   Ripristino griglia + card orizzontali (scoped)
   ============================ */

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;
  margin-top:12px;
}

/* Card orizzontale SOLO nei correlati */
body.theme-shop .related-grid .product-card{
  display:grid;
  grid-template-columns:120px minmax(0, 1fr);
  align-items:stretch;
}
body.theme-shop .related-grid .product-media{
  aspect-ratio:auto;
  border-bottom:0;
  border-right:1px solid var(--border);
  min-height:100%;
}
body.theme-shop .related-grid .product-media picture,
body.theme-shop .related-grid .product-media img{
  width:100%;
  height:100%;
  object-fit:cover;
}
body.theme-shop .related-grid .product-body{
  padding:12px;
}

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

@media (max-width:760px){
  body.theme-shop .related-grid{ grid-template-columns:minmax(0, 1fr); }
  body.theme-shop .related-grid .product-card{ grid-template-columns:96px 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;
  font-weight: 400;
}
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;
  }
}


/* ============================
   Selettore formato (digitale/cartaceo) – solo prodotti digitali
   (UI + rollover + stato attivo)
   ============================ */

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:0.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:36px 16px 72px;
  box-sizing:border-box;
}

body.theme-shop .recently-viewed-title{
  margin:0 0 10px 0;
  font-size:1.25rem;
  font-weight:500;
  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
 * Plugin: shop-reviews-plugin (nessun file CSS esterno)
 * ========================================================== */

body.theme-shop .shop-reviews{
  margin-top:16px;
  border-radius:16px;
  background:#fff;
  padding:14px;
}
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:700;
  line-height:1;
  color:#222;
}
body.theme-shop .shop-reviews-stars{
  display:flex;
  align-items:center;
  gap:2px;
}
body.theme-shop .shop-reviews-count{
  font-size:14px;
  color:#666;
}

/* ── 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:#2d3748;
  color:#fff;
  font-size:13px;
  font-weight:400;
  line-height:1.45;
  padding:12px 14px;
  border-radius:8px;
  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:#2d3748;
}
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, #e7e7ef);
  border-radius:12px;
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
body.theme-shop .shop-review-stars{
  display:flex;
  gap:1px;
}
body.theme-shop .shop-review-title{
  font-weight:600;
  font-size:14px;
  color:#222;
}
body.theme-shop .shop-review-body{
  font-size:14px;
  font-weight:400;
  color:#444;
  line-height:1.5;
}
body.theme-shop .shop-review-meta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  font-size:12px;
  color:#888;
  margin-top:auto;
  padding-top:6px;
}
body.theme-shop .shop-review-author{ font-weight:500; color:#555; }
body.theme-shop .shop-review-source a{
  color:#1f4ea7;
  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 Home (admin-configurable) ── */
body.theme-shop .shop-home-intro{
  margin: 0;
}
body.theme-shop .shop-home-intro p{ margin: 0.55em 0; }
body.theme-shop .shop-home-intro p:first-child{ margin-top: 0; }

body.theme-shop .shop-home-banner{ margin-top: 12px; }
body.theme-shop .shop-home-banner-inner{
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
  background: #fff;
}
body.theme-shop .shop-home-banner-media img{
  width: 100%;
  height: auto;
  display: block;
}
body.theme-shop .shop-home-banner-content{
  padding: 12px 14px;
}
body.theme-shop .shop-home-banner-title{
  font-weight: 800;
  font-size: 1.05rem;
  margin: 0 0 6px;
}
body.theme-shop .shop-home-banner-text{
  margin: 0;
  color: #333;
}
body.theme-shop .shop-home-banner-actions{ padding: 0 14px 14px; }
