:root {
  --bg: #121212;
  --bg-alt: #1a1a1a;
  --surface: #1f1f1f;
  --border: #302c26;
  --text: #f2ede4;
  --text-dim: #b8b0a2;
  --accent: #ccd2d8;
  --accent-dim: #8d939a;
  --accent-text-on: #16171a;
  --danger-strike: #8a8378;
  --radius: 10px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Arial, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  object-fit: contain;
}
.brand-wordmark {
  height: 20px;
  width: auto;
  display: block;
}
.main-nav { display: flex; gap: 24px; margin-left: auto; }
.main-nav a {
  color: var(--text-dim);
  font-size: 0.95rem;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.cart-toggle {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 24px;
  background: none;
  border: none;
  color: var(--text-dim);
  line-height: 0;
  cursor: pointer;
  padding: 0;
}
.cart-toggle:hover { color: var(--text); }
.cart-count {
  position: absolute;
  top: -8px;
  right: -9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text-on);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
}

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  border-bottom: 1px solid var(--border);
  padding: 56px 0 40px;
}
.hero h1 {
  font-size: clamp(1.1rem, 2.6vw, 2.4rem);
  margin: 0 0 12px;
  line-height: 1.25;
  white-space: nowrap;
}
.hero p {
  color: var(--text-dim);
  margin: 0;
  line-height: 1.5;
  white-space: nowrap;
  font-size: clamp(0.75rem, 1.3vw, 1rem);
}

/* Catalog */
#rows { padding: 28px 0 40px; }
.model-row {
  margin-bottom: 40px;
}
.model-row:last-child { margin-bottom: 0; }
.model-row-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.row-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x proximity;
  scrollbar-color: var(--accent-dim) transparent;
}
.row-scroll::-webkit-scrollbar { height: 8px; }
.row-scroll::-webkit-scrollbar-track { background: transparent; }
.row-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.row-scroll::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  flex: 0 0 240px;
  width: 240px;
  scroll-snap-align: start;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-dim);
}
.card-img {
  aspect-ratio: 1 / 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.card-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.card-title {
  font-size: 0.92rem;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.card-subtitle {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-dim);
  margin: -4px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.price-row {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: auto;
}
.price-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.price-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
}
.list-price {
  font-size: 0.85rem;
  color: var(--danger-strike);
  text-decoration: line-through;
  text-decoration-color: #d13c3c;
}
.btn-cart {
  margin-top: 4px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-cart:hover {
  background: var(--accent);
  color: var(--accent-text-on);
}
.btn-cart.solid {
  background: var(--accent);
  color: var(--accent-text-on);
}
.btn-cart.solid:hover { opacity: 0.9; }
.btn-cart:disabled {
  background: var(--accent);
  color: var(--accent-text-on);
  border-color: var(--accent);
  opacity: 0.75;
  cursor: default;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.footer-links a {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.footer-links a:hover { color: var(--text); }
.footer-note {
  color: var(--text-dim);
  font-size: 0.85rem;
  max-width: 480px;
  margin: 0;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  z-index: 100;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 920px;
  width: 100%;
  padding: 28px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
@media (max-width: 720px) {
  .modal-grid { grid-template-columns: 1fr; }
  .modal { padding: 20px; }
}
.gallery-main {
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.gallery-thumbs img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  border: 2px solid var(--border);
  cursor: pointer;
  padding: 2px;
}
.gallery-thumbs img.active { border-color: var(--accent); }

.modal-info h2 {
  font-size: 1.3rem;
  margin: 0 0 6px;
  line-height: 1.35;
}
.modal-subtitle {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin: 0 0 16px;
  line-height: 1.45;
}
.modal-price-row {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 18px;
}
.modal-price-row .price { font-size: 1.6rem; }
.modal-price-row .list-price { font-size: 1rem; }
.bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-ean {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: -12px 0 20px;
}
.bullets li {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-dim);
  padding-left: 26px;
  position: relative;
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ccd2d8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 13 9.5 18.5 20 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}
.modal-info .btn-cart { padding: 13px 18px; font-size: 0.95rem; }

/* Contatti page */
.contact-page {
  padding: 60px 0 80px;
  max-width: 640px;
}
.contact-page h1 { margin-top: 0; }
.contact-page p { color: var(--text-dim); line-height: 1.6; }
.contact-form {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-form label {
  font-size: 0.85rem;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-form input,
.contact-form textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}
.contact-form button {
  align-self: flex-start;
}

/* Etichetta ambientale page */
.etichetta-page {
  padding: 60px 0 80px;
  max-width: 760px;
}
.etichetta-page h1 { margin-top: 0; }
.etichetta-page > p { color: var(--text-dim); line-height: 1.6; }

.etichetta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 32px;
}
.etichetta-item {
  flex: 1 1 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.etichetta-img {
  aspect-ratio: 4 / 3;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.etichetta-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}
.etichetta-info {
  padding: 16px 18px 20px;
}
.etichetta-info h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
}
.etichetta-info p {
  margin: 0 0 4px;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.etichetta-footnote {
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Cart panel */
.cart-modal {
  max-width: 520px;
}
.cart-modal h2 {
  font-size: 1.3rem;
  margin: 0 0 18px;
}
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 4px;
}
.cart-empty {
  color: var(--text-dim);
  padding: 20px 0;
}
.cart-item {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}
.cart-item img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  padding: 4px;
}
.cart-item-title {
  font-size: 0.85rem;
  line-height: 1.35;
  margin: 0 0 8px;
}
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 10px;
}
.qty-btn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}
.qty-btn:hover { border-color: var(--accent-dim); }
.cart-item-price {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}
.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}
.cart-item-remove:hover { color: var(--text); }
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 20px 0 16px;
  font-size: 1.05rem;
  font-weight: 700;
}
.cart-checkout { width: 100%; }
