/*
 * FornitureitcTheme — prodotto.css (redesign 2026, Fase 4)
 * Pagina singolo prodotto (woocommerce/single-product.php).
 * Riferimento: REDESIGN/mockup/Prodotto.dc.html
 * Card, pulsanti, griglia e selettore quantità sono in layout.css.
 */

.prod { padding-top: 20px; }

/* =============================================
   SCHEDA: galleria 620px + informazioni
   ============================================= */
.prod-top {
  display: grid;
  grid-template-columns: 620px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

/* Galleria */
.prod-gallery { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.prod-gallery__main {
  position: relative;
  height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.prod-gallery__img { width: 440px !important; height: 440px !important; max-width: 90%; object-fit: contain; }
.prod-gallery__badge { top: 18px; left: 18px; padding: 5px 10px; font-size: 12px; }
.prod-gallery__thumbs { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.prod-gallery__thumbs::-webkit-scrollbar { display: none; }
.prod-gallery__thumb {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}
.prod-gallery__thumb img { width: 72px; height: 72px; object-fit: contain; }
.prod-gallery__thumb:hover { border-color: var(--line-strong); }
.prod-gallery__thumb.is-on { border: 2px solid var(--brand); padding: 5px; }

/* Informazioni */
.prod-info { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.prod-info__head { display: flex; flex-direction: column; gap: 10px; }
.prod-info__brand {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 0;
}
.prod-info h1 { margin: 0; font-size: 34px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }

.prod-codes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.prod-code {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 13px;
  user-select: all;
}
.prod-code > span:first-child { color: var(--muted); user-select: none; }
.prod-codes__copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.prod-codes__copy:hover span { text-decoration: underline; }
.prod-codes__copy.is-done { color: var(--ok); }

/* Box prezzo */
.prod-buy {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.prod-buy__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.prod-buy__price { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.prod-buy__label { font-size: 13px; color: var(--muted); }
.prod-buy__amount { line-height: 1; }
.prod-buy__amount .amount { font-family: var(--font-display); font-size: 44px; font-weight: 800; color: var(--ink); }
.prod-buy__amount del { display: block; margin-bottom: 6px; }
.prod-buy__amount del .amount { font-size: 18px; font-weight: 500; color: var(--muted); }
.prod-buy__amount ins { text-decoration: none; }
.prod-buy__amount ins .amount { color: var(--sale); }
.prod-buy__amount .price-iva { display: none; } /* qui c'è la versione estesa sotto */
.prod-buy__amount .fit-pr-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--ok-bg);
  color: var(--ok-ink);
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}
.prod-buy__iva { margin-top: 6px; font-size: 13px; color: var(--ink-2); }

.prod-stock {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.prod-stock > span { width: 8px; height: 8px; border-radius: 4px; background: currentColor; }
.prod-stock--ok   { background: var(--ok-bg); color: #0F6B3D; }
.prod-stock--wait { background: #FDF3E4; color: #9A4A06; }
.prod-stock--no   { background: #FBE9EC; color: #A50E26; }

.prod-buy__form { display: flex; gap: 12px; margin: 0; }
.fit-qty--lg { height: 54px; }
.fit-qty--lg .fit-qty__btn { width: 48px; height: 52px; }
.fit-qty--lg .fit-qty__input { width: 52px; height: 52px; font-size: 17px; }
.prod-buy__add { flex: 1 1 auto; min-height: 54px; }
.prod-buy__more { display: flex; gap: 12px; }
.prod-buy__more .fit-btn { flex: 1 1 auto; min-height: 46px; font-size: 15px; }

/* Prodotti variabili: form standard di WooCommerce, ripulito */
.prod-buy__wc form.cart { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.prod-buy__wc table.variations { width: 100%; border: 0; margin: 0 0 8px; }
.prod-buy__wc table.variations th, .prod-buy__wc table.variations td { padding: 6px 0; border: 0; text-align: left; font-size: 14px; }
.prod-buy__wc select { height: 44px; min-width: 200px; padding: 0 10px; border: 1px solid var(--line-input); border-radius: var(--r-sm); background: #fff; }
.prod-buy__wc .quantity input { height: 54px; width: 80px; text-align: center; border: 1px solid var(--line-input); border-radius: var(--r); font-family: var(--font-mono); font-size: 17px; }
.prod-buy__wc button.single_add_to_cart_button {
  flex: 1 1 auto;
  min-height: 54px;
  border: 0;
  border-radius: var(--r);
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.prod-buy__wc button.single_add_to_cart_button:hover { background: var(--brand-deep); }

/* Gate rivenditori (ospiti) — riprende .reseller-gate */
.reseller-gate.prod-gate {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  margin: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-align: left;
}
.prod-gate__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.prod-gate__icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--brand-tint);
  color: var(--brand);
}
.prod-gate__txt { display: flex; flex-direction: column; gap: 6px; }
.prod-gate__txt strong { font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.25; color: var(--ink); }
.prod-gate__txt span { font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.prod-gate__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.prod-gate__cta .fit-btn { flex: 1 1 auto; }

/* Servizi */
.prod-services {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.prod-services li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.prod-services .fit-ico { color: var(--brand); }
.prod-services strong { font-size: 14px; }
.prod-services span { font-size: 13px; line-height: 1.45; color: var(--muted); }
.prod-services a { color: var(--muted); }
.prod-services a:hover { color: var(--brand); }

/* =============================================
   CARATTERISTICHE + PER IL RIVENDITORE
   ============================================= */
.prod-details {
  display: grid;
  grid-template-columns: 620px minmax(0, 1fr);
  gap: 32px;
  margin-top: 40px;
}
.prod-details > :only-child { grid-column: 1 / -1; }
.prod-details h2,
.prod-desc h2 { margin: 0; font-size: 24px; font-weight: 700; }
.prod-specs {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.prod-specs dl { margin: 0; display: grid; grid-template-columns: 180px minmax(0, 1fr); font-size: 15px; }
.prod-specs dt,
.prod-specs dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.prod-specs dt { color: var(--muted); }
.prod-specs dd { font-weight: 500; overflow-wrap: anywhere; }
.prod-specs dt:last-of-type,
.prod-specs dd:last-of-type { border-bottom: 0; }

.prod-reseller {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  background: var(--ground-2);
  border-radius: var(--r-lg);
}
.prod-reseller ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.prod-reseller li { display: flex; gap: 10px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.prod-reseller li .fit-ico { color: var(--ok); stroke-width: 2.2; margin-top: 1px; }

/* =============================================
   DESCRIZIONE
   ============================================= */
.prod-desc {
  margin-top: 32px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.prod-desc__body { margin-top: 14px; max-width: 820px; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.prod-desc__body p { margin: 0 0 1em; }
.prod-desc__body ul, .prod-desc__body ol { margin: 0 0 1em 1.2em; list-style: revert; }
.prod-desc__body img { height: auto; border-radius: var(--r); }

/* =============================================
   CORRELATI
   ============================================= */
.prod-related { margin-top: 48px; }
.prod-related .fit-sec-head h2 { font-size: 28px; }
.prod-related__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.prod-related .fit-card__media { height: 200px; }
.prod-related .fit-card__img { width: 170px !important; height: 170px !important; }

/* =============================================
   DESKTOP STRETTO
   ============================================= */
@media (max-width: 1279px) and (min-width: 1025px) {
  .prod-top, .prod-details { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .prod-gallery__main { height: 480px; }
  .prod-gallery__img { width: 380px !important; height: 380px !important; }
}

/* =============================================
   MOBILE E TABLET (< 1025px)
   ============================================= */
@media (max-width: 1024px) {
  .prod { padding-top: 12px; }
  .prod-top, .prod-details { grid-template-columns: 1fr; gap: 16px; }
  .prod-gallery__main { height: 340px; border-radius: var(--r-md); }
  .prod-gallery__img { width: 280px !important; height: 280px !important; }
  .prod-gallery__thumb { width: 64px; height: 64px; padding: 4px; }
  .prod-gallery__thumb.is-on { padding: 3px; }
  .prod-gallery__thumb img { width: 54px; height: 54px; }
  .prod-info { gap: 16px; }
  .prod-info h1 { font-size: 24px; }
  .prod-buy, .reseller-gate.prod-gate { padding: 18px; border-radius: var(--r-md); }
  .prod-buy__top { flex-direction: column; gap: 12px; }
  .prod-buy__amount .amount { font-size: 36px; }
  .prod-buy__form { flex-direction: column; }
  .fit-qty--lg { align-self: stretch; }
  .fit-qty--lg .fit-qty__input { flex: 1 1 auto; }
  .prod-services { grid-template-columns: 1fr; gap: 8px; }
  .prod-services li { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 14px; }
  .prod-services li span { flex-basis: 100%; padding-left: 34px; }
  .prod-details { margin-top: 24px; }
  .prod-specs, .prod-reseller, .prod-desc { padding: 20px; border-radius: var(--r-md); }
  .prod-details h2, .prod-desc h2 { font-size: 20px; }
  .prod-specs dl { grid-template-columns: 130px minmax(0, 1fr); font-size: 14px; }
  .prod-related { margin-top: 32px; }
  .prod-related .fit-sec-head h2 { font-size: 22px; }
  .prod-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prod-related .fit-card__media { height: 150px; }
  .prod-related .fit-card__img { width: 130px !important; height: 130px !important; }
}

/* Tablet (768–1024px): galleria e informazioni affiancate, 4 correlati su una riga */
@media (min-width: 700px) and (max-width: 1024px) {
  .prod-related__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .prod-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
  .prod-gallery__main { height: 400px; }
  .prod-gallery__img { width: 320px !important; height: 320px !important; }
  .prod-info h1 { font-size: 26px; }
  .prod-buy__form { flex-direction: row; }
  .fit-qty--lg { align-self: auto; }
}
