/* MINERALE – stile del sito */
:root {
  --ink: #1F2A1E;
  --text: #2A2620;
  --muted: #5C5246;
  --soft: #4A4238;
  --brown: #6B4A35;
  --cream: #F6F1E7;
  --sand: #EDE5D6;
  --line: #D9CBB2;
  --tan: #C9B89A;
  --green: #2F3B2C;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Work Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }
a:hover { color: var(--brown); }
img, video { display: block; max-width: 100%; }
button { font-family: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.serif { font-family: var(--serif); }
.eyebrow { margin: 0; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brown); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Bottoni */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; font-size: 15px; letter-spacing: 0.06em; border-radius: 2px; cursor: pointer; text-decoration: none; border: 1px solid var(--ink); }
.btn-dark { background: var(--ink); color: var(--cream); }
.btn-dark:hover { background: #2c3a2a; color: var(--cream); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--sand); color: var(--ink); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 14px; letter-spacing: 0.04em; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* Barra annunci e header */
.announce { background: var(--ink); color: var(--sand); font-size: 13px; letter-spacing: 0.08em; text-align: center; padding: 10px 16px; }
.header { border-bottom: 1px solid var(--line); background: var(--cream); position: sticky; top: 0; z-index: 30; }
.header-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 58px; width: auto; }
.logo-text { font-family: var(--serif); font-size: 30px; letter-spacing: 0.22em; color: var(--ink); }
.nav { display: flex; flex-wrap: wrap; gap: 6px; font-size: 15px; letter-spacing: 0.03em; }
.nav a { text-decoration: none; padding: 12px 10px; }
.nav a[aria-current="page"] { font-weight: 600; }
.cart-btn { width: 48px; height: 48px; border: none; background: transparent; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; position: relative; }
.cart-badge { position: absolute; top: 6px; right: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--brown); color: var(--cream); font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; }

/* Hero */
.hero { background: var(--sand); }
.hero-in { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 72px; padding-bottom: 72px; }
.hero-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 64px; line-height: 1.02; color: var(--ink); }
.hero-text > p { margin: 0; font-size: 18px; line-height: 1.6; max-width: 480px; color: var(--soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.hero-media { flex: 1 1 460px; min-width: 0; height: 560px; position: relative; background: var(--tan); border-radius: 2px; }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 25% 40%; border-radius: 2px; }
.hero-card { position: absolute; left: -24px; bottom: -24px; background: var(--green); padding: 22px 26px; max-width: 260px; text-decoration: none; display: flex; flex-direction: column; gap: 8px; }
.hero-card span:first-child { font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.25; color: var(--sand); }
.hero-card span:last-child { font-size: 13px; letter-spacing: 0.06em; color: var(--tan); }

/* Sezioni */
.section { padding-top: 72px; padding-bottom: 72px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 36px; }
.h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 44px; color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 32px 24px; }

/* Categorie */
.cat-card { text-decoration: none; display: flex; flex-direction: column; gap: 12px; }
.cat-card img { width: 100%; height: 340px; object-fit: cover; background: var(--sand); }
.cat-card.tall img { height: 400px; }
.cat-name { font-family: var(--serif); font-size: 28px; color: var(--ink); }
.cat-count { font-size: 15px; color: var(--muted); margin-top: -6px; }
.cat-desc { font-size: 15px; line-height: 1.55; color: var(--muted); }

/* Schede prodotto */
.card { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.card > a { text-decoration: none; display: flex; flex-direction: column; gap: 8px; }
.card img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; background: var(--sand); }
.card-cat { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brown); margin-top: 6px; }
.card h3 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.15; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 76px; }
.card-meta { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 6px; }
.price { font-size: 17px; font-weight: 600; color: var(--text); }
.sold { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brown); }

/* Laboratorio */
.lab { background: var(--ink); color: var(--sand); }
.lab-in { display: flex; flex-wrap: wrap; gap: 64px; align-items: center; padding-top: 96px; padding-bottom: 96px; }
.lab video { flex: 1 1 420px; min-width: 0; width: 100%; height: 480px; object-fit: cover; background: var(--green); border: 1px solid #4A5A44; }
.lab-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.lab-text .eyebrow { color: var(--tan); }
.lab-text h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 48px; line-height: 1.08; color: var(--cream); }
.lab-text p { margin: 0; font-size: 17px; line-height: 1.7; color: #D9CBB2; }
.lab-steps { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 12px; }
.lab-steps div { flex: 1 1 140px; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid #4A5A44; padding-top: 14px; }
.lab-steps strong { font-family: var(--serif); font-weight: 500; font-size: 22px; color: var(--cream); }
.lab-steps span { font-size: 14px; color: var(--tan); }

/* Pagine interne */
.page { padding-top: 32px; padding-bottom: 96px; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crumbs a { padding: 10px 0; }
.page-head { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-end; justify-content: space-between; margin: 20px 0 40px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 60px; line-height: 1.02; color: var(--ink); }
.lead { margin: 0; font-size: 17px; line-height: 1.6; color: var(--soft); max-width: 640px; }

/* Prodotto */
.product { display: flex; flex-wrap: wrap; gap: 56px; margin-top: 24px; align-items: flex-start; }
.product-media { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.product-main { display: block; width: auto; height: auto; max-width: 100%; max-height: 82vh; margin: 0 auto; }
.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.thumbs button { padding: 0; border: 2px solid transparent; background: var(--sand); cursor: pointer; }
.thumbs button[aria-pressed="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.product-info { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.product-info h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 48px; line-height: 1.05; color: var(--ink); }
.product-price { font-size: 26px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips span { padding: 8px 12px; background: var(--sand); font-size: 13px; }
.note { margin: 0; font-size: 13px; color: var(--muted); }
.desc { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 6px; }
.desc h2 { margin: 0 0 12px; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brown); font-weight: 600; }
.desc p { margin: 0; font-size: 15px; line-height: 1.7; color: #3A3226; white-space: pre-line; }

/* Informazioni */
.info { display: flex; flex-wrap: wrap; gap: 56px; margin-top: 24px; align-items: flex-start; }
.info-nav { flex: 0 1 240px; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 16px; }
.info-nav a { font-size: 15px; text-decoration: none; padding: 10px 0; }
.info-nav a[aria-current="page"] { font-weight: 600; }
.info-body { flex: 1 1 560px; min-width: 0; max-width: 760px; display: flex; flex-direction: column; gap: 28px; }
.info-body header { display: flex; flex-direction: column; gap: 14px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.info-body h1 { font-size: 56px; }
.info-body h2 { margin: 0 0 10px; font-family: var(--serif); font-weight: 600; font-size: 26px; line-height: 1.2; color: var(--ink); }
.info-body p { margin: 0; font-size: 16px; line-height: 1.7; color: #3A3226; white-space: pre-line; }

/* Vantaggi */
.perks { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.perks-in { display: flex; flex-wrap: wrap; gap: 32px; padding-top: 48px; padding-bottom: 48px; }
.perk { flex: 1 1 240px; display: flex; gap: 16px; align-items: flex-start; }
.perk div { display: flex; flex-direction: column; gap: 4px; }
.perk strong { font-size: 15px; color: var(--ink); }
.perk span { font-size: 14px; color: var(--muted); }

/* Newsletter */
.newsletter { background: var(--sand); }
.newsletter-in { max-width: 760px; margin: 0 auto; padding: 80px 32px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.newsletter form { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; width: 100%; margin-top: 8px; }
.newsletter input { flex: 1 1 280px; min-width: 0; max-width: 380px; min-height: 50px; padding: 0 16px; border: 1px solid #A8977A; background: var(--cream); font-family: inherit; font-size: 15px; color: var(--text); border-radius: 2px; }
.newsletter small { font-size: 12px; color: var(--muted); }
.status { margin: 8px 0 0; padding: 14px 18px; background: var(--green); color: var(--sand); font-size: 15px; }

/* Footer */
.footer { background: var(--ink); color: #D9CBB2; }
.footer-in { display: flex; flex-wrap: wrap; gap: 48px; padding-top: 72px; padding-bottom: 40px; }
.footer-col { flex: 1 1 160px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.footer-col:first-child { flex: 1 1 260px; gap: 16px; }
.footer-col .label { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--tan); margin-bottom: 6px; }
.footer a { color: var(--sand); text-decoration: none; padding: 6px 0; }
.footer a:hover { color: #fff; }
.footer p { margin: 0; line-height: 1.6; max-width: 260px; }
.footer .logo-text { color: var(--sand); }
.footer-logo img { height: 140px; width: auto; }
.legal { border-top: 1px solid #3A4836; padding-top: 20px; padding-bottom: 32px; font-size: 13px; color: var(--tan); line-height: 1.7; }

/* Carrello */
.overlay { position: fixed; inset: 0; background: rgba(20, 24, 18, 0.5); z-index: 40; display: flex; justify-content: flex-end; }
.overlay[hidden] { display: none; }
.overlay-close { flex: 1 1 auto; border: none; background: transparent; cursor: pointer; }
.drawer { flex: 0 0 auto; width: 440px; max-width: 92%; height: 100%; background: var(--cream); display: flex; flex-direction: column; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 12px 16px 28px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 32px; color: var(--ink); }
.icon-btn { width: 48px; height: 48px; border: none; background: transparent; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 8px 28px; }
.line { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid #E4D9C4; }
.line img { flex: 0 0 80px; width: 80px; height: 96px; object-fit: cover; background: var(--sand); }
.line-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.line-top { display: flex; justify-content: space-between; gap: 12px; }
.line-top span:first-child { font-family: var(--serif); font-weight: 600; font-size: 20px; line-height: 1.15; color: var(--ink); }
.line-top span:last-child { font-size: 15px; font-weight: 600; white-space: nowrap; }
.line small { font-size: 13px; color: var(--muted); }
.qty { display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.qty button { width: 44px; height: 44px; border: 1px solid #A8977A; background: transparent; color: var(--ink); font-size: 20px; cursor: pointer; }
.qty button[disabled] { opacity: 0.35; cursor: not-allowed; }
.qty span { min-width: 32px; text-align: center; font-size: 15px; font-weight: 600; }
.qty .remove { margin-left: auto; width: auto; min-height: 44px; padding: 0 6px; border: none; color: var(--brown); font-size: 13px; text-decoration: underline; }
.drawer-foot { border-top: 1px solid var(--line); padding: 18px 28px 28px; display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; justify-content: space-between; font-size: 16px; gap: 12px; }
.drawer-foot label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.drawer-foot select { min-height: 46px; padding: 0 12px; border: 1px solid #A8977A; background: var(--cream); font-family: inherit; font-size: 15px; color: var(--text); border-radius: 2px; }
.error { margin: 0; padding: 12px 14px; background: #F3DDD3; color: #6B2414; font-size: 13px; line-height: 1.5; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 50; background: var(--ink); color: var(--cream); padding: 14px 20px; font-size: 14px; display: flex; gap: 16px; align-items: center; box-shadow: 0 8px 24px rgba(0,0,0,0.18); max-width: 92%; }
.toast[hidden] { display: none; }
.toast button { background: transparent; border: 1px solid var(--cream); color: var(--cream); padding: 8px 12px; cursor: pointer; font-size: 13px; }

/* Telefono */
@media (max-width: 720px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .logo img { height: 44px; }
  .nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; gap: 0; margin: 0 -10px; }
  .nav a { white-space: nowrap; }
  .hero-in { padding-top: 40px; padding-bottom: 56px; gap: 40px; }
  .hero h1 { font-size: 42px; }
  .hero-media { height: 420px; flex-basis: 100%; }
  .hero-card { left: 12px; bottom: -20px; }
  .h1, .info-body h1 { font-size: 42px; }
  .h2 { font-size: 34px; }
  .product-info h1 { font-size: 36px; }
  .lab-in { padding-top: 64px; padding-bottom: 64px; gap: 40px; }
  .lab video { height: 300px; flex-basis: 100%; }
  .lab-text h2 { font-size: 36px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .card h3 { font-size: 18px; min-height: 62px; }
  .card-foot { flex-direction: column; align-items: stretch; }
  .cat-card img, .cat-card.tall img { height: 240px; }
  .product, .info { gap: 32px; }
  .drawer { max-width: 100%; }
}
