/* ── prodotti.css — Mattiussi-inspired ────────────────── */

.page-hero {
  background: var(--off-white);
  padding: calc(var(--navbar-h) + clamp(2rem, 4vw, 3.5rem)) var(--gutter) clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--grey);
}
.breadcrumb {
  font-size: clamp(0.6875rem, 0.65rem + 0.1vw, 0.75rem);
  color: var(--text-3);
  margin-bottom: 1.125rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.breadcrumb a { color: var(--text-3); transition: color .3s ease-out; }
.breadcrumb a:hover { color: var(--green-d); }
.breadcrumb span { color: var(--text-1); }

/* TAB BAR */
.prod-tabs-bar {
  position: sticky;
  top: var(--navbar-h);
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--grey);
}
.prod-tabs {
  display: flex;
  gap: 0;
}
.prod-tab {
  padding: clamp(0.75rem, 1.5vw, 1rem) clamp(1rem, 2vw, 1.75rem);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(0.75rem, 0.7rem + 0.1vw, 0.8125rem);
  color: var(--text-3);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .3s ease-out, border-color .3s ease-out;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.prod-tab:hover { color: var(--green-d); }
.prod-tab.active {
  color: var(--green-d);
  border-bottom-color: var(--green-d);
}

/* PROD LAYOUT */
.prod-section {
  padding: clamp(3rem, 5vw, 5rem) var(--gutter);
}
.prod-section:nth-child(even) {
  background: var(--off-white);
}
.prod-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
.prod-layout-reverse { direction: rtl; }
.prod-layout-reverse > * { direction: ltr; }

/* GALLERY */
.prod-gallery { display: flex; flex-direction: column; gap: 0.75rem; }
.prod-main-img { position: relative; overflow: hidden; }
.prod-main-img img {
  width: 100%; height: clamp(240px, 25vw, 380px);
  object-fit: cover; display: block;
  transition: transform .6s ease-out;
}
.prod-main-img:hover img { transform: scale(1.03); }
.prod-new-badge {
  position: absolute;
  top: 1rem; left: 1rem;
  background: var(--green-d);
  color: var(--white);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 0.375rem 0.875rem;
}
.prod-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem;
}
.prod-thumbs img {
  width: 100%; height: clamp(60px, 7vw, 100px);
  object-fit: cover;
  cursor: pointer;
  opacity: .6;
  transition: opacity .3s ease-out;
}
.prod-thumbs img:hover { opacity: 1; }

/* PROD INFO */
.prod-tags { display: flex; gap: 0.5rem; margin-bottom: 0.875rem; flex-wrap: wrap; }
.specs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.625rem;
  margin-bottom: 1.75rem;
}
.spec-box {
  background: var(--off-white);
  border: 1px solid var(--grey);
  padding: clamp(0.75rem, 1.5vw, 1rem) 0.625rem;
  text-align: center;
}
.spec-n {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.125rem, 1rem + 0.3vw, 1.375rem);
  color: var(--green-d);
  line-height: 1;
}
.spec-l {
  font-size: 0.625rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 0.25rem;
}

/* ACCORDION */
.features-accordion { margin-bottom: 1.75rem; }
.feat-group {
  border: 1px solid var(--grey);
  overflow: hidden;
  margin-bottom: -1px;
}
.feat-group-title {
  padding: clamp(0.75rem, 1vw, 0.875rem) 1.125rem;
  font-size: clamp(0.8125rem, 0.75rem + 0.1vw, 0.875rem);
  font-weight: 600;
  color: var(--text-1);
  cursor: pointer;
  background: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background .3s ease-out;
  user-select: none;
}
.feat-group-title::after {
  content: '+';
  font-size: 1.125rem;
  color: var(--green-d);
  font-weight: 400;
}
.feat-group.open .feat-group-title {
  background: var(--off-white);
  color: var(--black-l);
}
.feat-group.open .feat-group-title::after { content: '−'; }
.feat-group .product-features {
  padding: 0.25rem 1.125rem 0.875rem;
  background: var(--white);
}

.prod-btns { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* HOW WORKS */
.how-works-section {
  padding: clamp(3rem, 5vw, 5rem) var(--gutter);
  background: var(--off-white);
}
.mechanism-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
}
.mech-step {
  background: var(--white);
  border: 1px solid var(--grey);
  padding: clamp(1.25rem, 2vw, 1.5rem) clamp(1rem, 1.5vw, 1.25rem);
  text-align: center;
}
.mech-n {
  width: 2.25rem; height: 2.25rem;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1rem;
  color: var(--green-d);
  border: 1px solid var(--green-l);
  margin: 0 auto 0.75rem;
}
.mech-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(0.75rem, 0.7rem + 0.1vw, 0.8125rem);
  color: var(--black-l);
  margin-bottom: 0.5rem;
}
.mech-desc { font-size: 0.6875rem; color: var(--text-3); line-height: 1.6; }
.mech-arrow {
  font-size: 1.25rem;
  color: var(--green-l);
  text-align: center;
}

/* DIVISORE */
.prod-divider { padding: 0 var(--gutter); }
.prod-divider-line {
  height: 1px;
  background: var(--grey);
  margin: 1rem 0;
}

/* MASK SECTORS */
.mask-sectors {
  padding: clamp(3rem, 5vw, 5rem) var(--gutter);
  background: var(--off-white);
}
.mask-sectors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.mask-sector-card {
  background: var(--white);
  border: 1px solid var(--grey);
  border-right: none;
  overflow: hidden;
  transition: border-color .3s ease-out;
}
.mask-sector-card:last-child { border-right: 1px solid var(--grey); }
.mask-sector-card:hover { border-color: var(--green-l); }
.mask-sector-img img {
  width: 100%; height: clamp(140px, 14vw, 200px);
  object-fit: cover; display: block;
  transition: transform .6s ease-out;
}
.mask-sector-card:hover .mask-sector-img img { transform: scale(1.03); }
.mask-sector-body { padding: clamp(1rem, 2vw, 1.5rem); }
.mask-sector-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(0.875rem, 0.8rem + 0.15vw, 1rem);
  color: var(--black-l);
  margin-bottom: 0.375rem;
}
.mask-sector-desc { font-size: clamp(0.75rem, 0.7rem + 0.1vw, 0.8125rem); color: var(--text-3); line-height: 1.7; }

/* ── COMPARISON TABLE ─────────────────────────────── */
.comparison-section {
  padding: clamp(3rem, 5vw, 5rem) var(--gutter);
  background: var(--off-white);
}
.comparison-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(0.75rem, 0.7rem + 0.12vw, 0.875rem);
}
.comparison-table thead th {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(0.8125rem, 0.75rem + 0.15vw, 0.9375rem);
  color: var(--black-l);
  padding: 1rem 0.875rem;
  text-align: center;
  border-bottom: 2px solid var(--green-d);
  background: var(--white);
}
.comparison-table thead th.ct-feature-col {
  text-align: left;
  width: 34%;
}
.comparison-table thead th.ct-highlight {
  background: var(--green-d);
  color: var(--white);
}
.comparison-table tbody td {
  padding: 0.75rem 0.875rem;
  text-align: center;
  border-bottom: 1px solid var(--grey);
  color: var(--text-2);
  background: var(--white);
  transition: background .2s ease-out;
}
.comparison-table tbody td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--text-1);
}
.comparison-table tbody tr:hover td {
  background: var(--off-white);
}
/* Highlight column */
.comparison-table tbody td:nth-child(3) {
  background: rgba(116, 132, 116, 0.06);
}
.comparison-table tbody tr:hover td:nth-child(3) {
  background: rgba(116, 132, 116, 0.12);
}

/* Check / dash icons via CSS */
.ct-check,
.ct-dash {
  display: inline-block;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  position: relative;
}
.ct-check {
  background: var(--green-d);
}
.ct-check::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0.4375rem; height: 0.25rem;
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: translate(-50%, -60%) rotate(-45deg);
}
.ct-dash {
  background: var(--grey);
}
.ct-dash::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0.5rem; height: 2px;
  background: var(--white);
  transform: translate(-50%, -50%);
}

/* ── COMPARISON MOBILE CARDS (hidden on desktop) ── */
.comparison-cards {
  display: none;
}
.comp-card {
  background: var(--white);
  border: 1px solid var(--grey);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.comp-card-highlight {
  border-color: var(--green-d);
  box-shadow: 0 0 0 1px var(--green-d);
}
.comp-card-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(0.9375rem, 0.85rem + 0.15vw, 1.0625rem);
  color: var(--black-l);
  margin-bottom: 0.875rem;
  padding-bottom: 0.625rem;
  border-bottom: 2px solid var(--green-d);
}
.comp-card-highlight .comp-card-title {
  color: var(--green-deep);
}
.comp-card-list {
  list-style: none;
}
.comp-card-list li {
  padding: 0.4375rem 0 0.4375rem 1.75rem;
  font-size: clamp(0.75rem, 0.7rem + 0.1vw, 0.8125rem);
  color: var(--text-2);
  border-bottom: 1px solid var(--grey-l);
  position: relative;
}
.comp-card-list li:last-child {
  border-bottom: none;
}
.comp-card-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  transform: translateY(-50%);
}
.comp-yes::before {
  background: var(--green-d);
  box-shadow: none;
}
.comp-yes::after {
  content: '';
  position: absolute;
  left: 0.34375rem;
  top: 50%;
  width: 0.375rem;
  height: 0.1875rem;
  border-left: 1.5px solid var(--white);
  border-bottom: 1.5px solid var(--white);
  transform: translateY(-60%) rotate(-45deg);
}
.comp-no::before {
  background: var(--grey);
}
.comp-no::after {
  content: '';
  position: absolute;
  left: 0.3125rem;
  top: 50%;
  width: 0.4375rem;
  height: 1.5px;
  background: var(--white);
  transform: translateY(-50%);
}
.comp-no {
  color: var(--text-3);
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 860px) {
  .prod-layout { grid-template-columns: 1fr; gap: 2rem; }
  .prod-layout-reverse { direction: ltr; }
  .specs-grid { grid-template-columns: repeat(2, 1fr); }
  .mechanism-grid { grid-template-columns: 1fr; gap: 0.75rem; }
  .mech-arrow { display: none; }
  .mask-sectors-grid { grid-template-columns: 1fr; }
  .mask-sector-card { border-right: 1px solid var(--grey) !important; border-bottom: none; }
  .mask-sector-card:last-child { border-bottom: 1px solid var(--grey); }
  /* Comparison: hide table, show cards */
  .comparison-table-wrap { display: none; }
  .comparison-cards { display: block; }
}
@media (max-width: 600px) {
  .prod-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .prod-tab { white-space: nowrap; font-size: clamp(0.625rem, 0.6rem + 0.08vw, 0.75rem); }
  .prod-thumbs { grid-template-columns: repeat(2, 1fr); }
  .prod-thumbs img:last-child { display: none; }
  .prod-btns { flex-direction: column; }
  .prod-btns .btn-primary,
  .prod-btns .btn-outline { width: 100%; text-align: center; }
}
