/* =============================================================
   GVT Imballaggi Industriali — Frontend CSS
   Namespace: .gvt-*  →  zero conflitti con Salient
   ============================================================= */

/* --- Variabili --- */
:root {
  --gvt-gold:       #034249;
  --gvt-gold-light: #FDF3D0;
  --gvt-dark:       #1a1a1a;
  --gvt-gray:       #6b6b6b;
  --gvt-border:     #e0d8c8;
  --gvt-bg-alt:     #F9F7F2;
  --gvt-radius:     6px;
  --gvt-font:       inherit;
}

/* =============================================================
   SCHEDA PRODOTTO
   ============================================================= */
.gvt-scheda {
  max-width: 1100px;
  margin: 0 auto;
  font-family: var(--gvt-font);
}

/* HERO */
.gvt-hero {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 40px;
}
.gvt-hero-text { flex: 1; }
.gvt-hero-img  { flex: 0 0 340px; text-align: right; }
.gvt-hero-img img { max-width: 100%; height: auto; }

.gvt-diametro {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gvt-gold);
  margin: 0 0 4px;
  line-height: 1;
  padding-bottom: 0px;
}
.gvt-nome {
  font-size: 2.4rem;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--gvt-dark);
}

/* Badge ADR */
.gvt-badge-adr {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #FFF;
  border: 1px solid var(--gvt-gold);
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 0.875rem;
  width: 300px;
}
.gvt-badge-adr__icon { font-size: 1.1rem; color: var(--gvt-gold); flex-shrink: 0; }
.gvt-badge-adr p { margin: 0; }

/* Sezioni */
.gvt-section { margin-bottom: 32px; }
.gvt-section__title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gvt-gold);
  border-bottom: 1px solid var(--gvt-gold);
  padding-bottom: 6px;
  margin: 0 0 16px;
}
.gvt-section__body { font-weight: 600; margin: 0; }

/* Griglie tipologie / chiusure */
.gvt-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.gvt-grid__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--gvt-border);
  border-radius: var(--gvt-radius);
  background: #fff;
  min-width: 90px;
  max-width: 120px;
  text-align: center;
}
.gvt-grid__item img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.gvt-grid__item p { margin: 0; font-size: 0.75rem; font-weight: 600; }
.gvt-chiusura__diam { font-size: 0.72rem; font-weight: 700; }
.gvt-chiusura__tipo { font-size: 0.7rem; color: var(--gvt-gray); }

/* Tabella dimensioni */
.gvt-table-wrap { overflow-x: auto; }
.gvt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.gvt-table thead tr { background: var(--gvt-gold); color: #fff; }
.gvt-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.gvt-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--gvt-border);
}
.gvt-row-even { background: var(--gvt-bg-alt); }
.gvt-row-odd  { background: #fff; }

/* CTA bar */
.gvt-cta-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.gvt-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--gvt-radius);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .2s;
}
.gvt-btn:hover { opacity: .85; }
.gvt-btn--primary {
  background: var(--gvt-gold);
  color: #fff;
}
.gvt-btn--secondary {
  background: transparent;
  color: var(--gvt-dark);
  border: 2px solid var(--gvt-dark);
}

/* =============================================================
   CONFIGURATORE
   ============================================================= */
.gvt-configuratore {
  max-width: 1100px;
  margin: 48px auto 0;
  padding-top: 48px;
  border-top: 1px solid var(--gvt-border);
}
.gvt-cfg__title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 28px;
}
.gvt-cfg__layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
.gvt-cfg__photo-col { flex: 0 0 300px; position: sticky; top: 80px; }
.gvt-cfg__steps-col { flex: 1; }

/* Foto live */
.gvt-cfg__photo-wrap { position: relative; border-radius: var(--gvt-radius); overflow: hidden; }
.gvt-cfg__photo { width: 100%; height: auto; display: block; transition: opacity .3s; }
.gvt-cfg__photo-loading {
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,.7);
}
.gvt-cfg__photo-loading.active { display: flex; }
.gvt-cfg__spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--gvt-border);
  border-top-color: var(--gvt-gold);
  border-radius: 50%;
  animation: gvt-spin .7s linear infinite;
}
@keyframes gvt-spin { to { transform: rotate(360deg); } }

/* Riepilogo configurazione */
.gvt-cfg__summary {
  margin-top: 14px;
  padding: 12px;
  background: var(--gvt-bg-alt);
  border-radius: var(--gvt-radius);
  font-size: 0.82rem;
  line-height: 1.6;
}
.gvt-cfg__summary:empty { display: none; }

/* Step */
.gvt-cfg__step {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--gvt-border);
}
.gvt-cfg__step:last-child { border-bottom: none; }
.gvt-cfg__step-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gvt-gold);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gvt-cfg__step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: var(--gvt-gold);
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Opzioni (bottoni selezione) */
.gvt-cfg__options { display: flex; flex-wrap: wrap; gap: 10px; }
.gvt-cfg__opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
  border: 2px solid var(--gvt-border);
  border-radius: var(--gvt-radius);
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  min-width: 90px;
  max-width: 120px;
  text-align: center;
}
.gvt-cfg__opt img {
  width: 60px; height: 60px;
  object-fit: contain;
}
.gvt-cfg__opt span { font-size: 0.72rem; font-weight: 600; }
.gvt-cfg__opt:hover  { border-color: var(--gvt-gold); }
.gvt-cfg__opt.active {
  border-color: var(--gvt-gold);
  background: var(--gvt-gold-light);
}

/* Opzione dimensione */
.gvt-cfg__opt--dim {
  flex-direction: row;
  min-width: 140px;
  max-width: 180px;
  padding: 8px 14px;
  gap: 12px;
  justify-content: space-between;
}
.gvt-dim__value { font-weight: 700; font-size: 0.85rem; }
.gvt-dim__cap   { font-size: 0.78rem; color: var(--gvt-gray); }

/* Dati tecnici live */
.gvt-cfg__tech-data { margin-bottom: 20px; }
.gvt-cfg__tech-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.gvt-cfg__tech-table th {
  padding: 7px 10px;
  background: var(--gvt-bg-alt);
  font-weight: 600;
  text-align: left;
  width: 50%;
  border-bottom: 1px solid var(--gvt-border);
}
.gvt-cfg__tech-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--gvt-border);
}

/* CTA PDF configuratore */
.gvt-cfg__pdf-cta { margin-top: 8px; }

/* =============================================================
   ARCHIVIO / PRODUCT LIST
   ============================================================= */

/* Header archivio */
.gvt-archive-wrap { padding: 60px 0; }
.gvt-archive__header { margin-bottom: 32px; }
.gvt-archive__title { font-size: 2rem; font-weight: 700; margin: 0 0 8px; }
.gvt-archive__desc  { color: var(--gvt-gray); margin: 0; }

/* Filtri */
.gvt-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 28px;
  padding: 16px 20px;
  background: var(--gvt-bg-alt);
  border-radius: var(--gvt-radius);
}
.gvt-filters__group { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.gvt-filters__label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
                       letter-spacing: 0.6px; color: var(--gvt-gray); margin-right: 4px; }
.gvt-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  border: 1.5px solid var(--gvt-border);
  border-radius: 20px;
  background: #fff;
  font-size: 0.8rem; font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.gvt-pill:hover      { border-color: var(--gvt-gold); }
.gvt-pill--active    { border-color: var(--gvt-gold); background: var(--gvt-gold); color: #fff; }
.gvt-pill__count     { font-size: 0.7rem; opacity: .75; }

/* Griglia prodotti */
.gvt-product-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, 1fr);
}
.gvt-product-grid--cols-1 { grid-template-columns: 1fr; }
.gvt-product-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.gvt-product-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.gvt-product-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Card */
.gvt-card { border: 1.5px solid var(--gvt-border); border-radius: 10px;
            background: #fff; overflow: hidden;
            transition: box-shadow .2s, border-color .2s; }
.gvt-card:hover { border-color: var(--gvt-gold); box-shadow: 0 4px 20px rgba(200,168,75,.15); }
.gvt-card__inner { display: flex; flex-direction: column; height: 100%;
                   text-decoration: none; color: inherit; }

.gvt-card__img-wrap { position: relative; aspect-ratio: 4/3; overflow: hidden;
                      background: var(--gvt-bg-alt); }
.gvt-card__img { width: 100%; height: 100%; object-fit: cover;
                 transition: transform .3s; }
.gvt-card:hover .gvt-card__img { transform: scale(1.04); }
.gvt-card__img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 700; color: var(--gvt-border);
}

.gvt-card__badge-adr {
  position: absolute; top: 10px; right: 10px;
  background: var(--gvt-gold); color: #fff;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 1px;
  padding: 3px 7px; border-radius: 3px;
}

.gvt-card__body   { flex: 1; padding: 16px 18px 8px; }
.gvt-card__famiglia { font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
                       letter-spacing: 0.6px; color: var(--gvt-gold); margin: 0 0 4px; }
.gvt-card__diam   { font-size: 0.8rem; font-weight: 700; color: var(--gvt-gray); margin: 0 0 4px; }
.gvt-card__title  { font-size: 1rem; font-weight: 700; margin: 0 0 8px; color: var(--gvt-dark); }
.gvt-card__cap    { font-size: 0.82rem; color: var(--gvt-gray); margin: 0 0 4px; }
.gvt-card__variants { font-size: 0.75rem; color: var(--gvt-gray); margin: 0; }
.gvt-card__footer { padding: 10px 18px 14px; }
.gvt-card__cta    { font-size: 0.8rem; font-weight: 700; color: var(--gvt-gold); }

/* Card nascosta dal filtro */
.gvt-card.gvt-hidden { display: none; }

/* No results */
.gvt-no-results { color: var(--gvt-gray); font-style: italic; padding: 24px 0; }

/* Paginazione */
.gvt-pagination { margin-top: 32px; text-align: center; }
.gvt-pagination .page-numbers {
  display: inline-block; padding: 6px 12px; margin: 0 2px;
  border: 1.5px solid var(--gvt-border); border-radius: 4px;
  font-size: 0.85rem; color: var(--gvt-dark); text-decoration: none;
}
.gvt-pagination .page-numbers.current {
  background: var(--gvt-gold); border-color: var(--gvt-gold); color: #fff;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 768px) {
  .gvt-hero        { flex-direction: column-reverse; gap: 20px; }
  .gvt-hero-img    { flex: none; width: 100%; }
  .gvt-cfg__layout { flex-direction: column; }
  .gvt-cfg__photo-col { flex: none; width: 100%; position: static; }
  .gvt-product-grid,
  .gvt-product-grid--cols-3,
  .gvt-product-grid--cols-4 { grid-template-columns: repeat(2, 1fr); }
  .gvt-product-grid--cols-1 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .gvt-product-grid,
  .gvt-product-grid--cols-2,
  .gvt-product-grid--cols-3,
  .gvt-product-grid--cols-4 { grid-template-columns: 1fr; }
}
