/* Terre Bennicelli: foglio di stile unico */

:root {
  --cream: #F7EFE5;
  --card: #FBF6EF;
  --line: #E9DCCB;
  --band: #EFE3D2;
  --ink: #2E2519;
  --ink-2: #3A2E22;
  --muted: #5E4E3D;
  --soft: #6B5A48;
  --terra: #A04E32;
  --terra-dark: #7E3A24;
  --olive: #6B6B3A;
  --footer: #2E2519;
  --footer-text: #EFE3D2;
  --footer-muted: #C8B79F;
  --serif-display: 'Cormorant Garamond', Georgia, serif;
  --serif-body: 'EB Garamond', Georgia, serif;
  --wrap: 1152px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 17px;
  line-height: 1.5;
}

img { display: block; max-width: 100%; }

a { color: var(--terra); }
a:hover { color: var(--terra-dark); }

h1, h2, h3 { font-family: var(--serif-display); font-weight: 500; margin: 0; }
p { margin: 0; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }

/* ---------- Header ---------- */

.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 22px 16px 0;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--ink);
  text-decoration: none;
}
.logo:hover { color: var(--ink); }
.logo-marks { display: flex; align-items: flex-end; justify-content: center; gap: 10px; } /* base dei rami alla riga della scritta */
.logo-marks svg { display: block; width: 52px; height: 20px; } /* rami un po' piu' grandi (46x18 in origine) per stare in proporzione con la scritta */
.logo-since {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 400;
  font-size: 19px;          /* circa 63% del nome (30px), +25% rispetto ai 15px di prima */
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 1px;
  white-space: nowrap;
}
.logo-name {
  font-family: var(--serif-display);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
}
.logo-sub {
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--soft);
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}
.main-nav li + li { border-left: 1px solid #CDBBA4; }
.main-nav a {
  display: block;
  padding: 12px 26px 10px;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
}
.main-nav a:hover { color: var(--terra); }
.main-nav a[aria-current="page"] { border-bottom-color: var(--terra); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 372px; /* +20%: era 310px */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(29, 20, 12, 0.3);
}
.hero-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 24px 36px;
}
.hero h1 {
  font-size: clamp(38px, 4.5vw, 64px);
  line-height: 1.08;
  text-shadow: 0 2px 14px rgba(29, 20, 12, 0.5);
}
.hero h1 .small { font-size: 0.7em; }
.hero p {
  font-size: clamp(18px, 1.8vw, 25px);
  text-shadow: 0 1px 8px rgba(29, 20, 12, 0.55);
}
.hero-curve {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 56px;
  z-index: 1;
}

/* ---------- Section titles ---------- */

.section { padding: 0 0 88px; }
.section.band { background: var(--band); padding: 88px 0; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 24px;
}
.section-title h2 {
  font-size: 25px;
  letter-spacing: 0.14em;
  color: var(--ink-2);
  text-align: center;
}
.section-title svg { flex-shrink: 0; }
.section-title .flip { transform: scaleX(-1); }

/* ---------- Cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  max-width: 1036px;
  margin-inline: auto;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(46, 37, 25, 0.07);
}
.card-img { width: 100%; aspect-ratio: 324 / 172; object-fit: cover; }
.card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 20px 20px;
  text-align: center;
}
.card h3 { font-size: 26px; }
.card h3.caps { letter-spacing: 0.1em; }
.card p { font-size: 16px; color: var(--ink-2); }
.card .meta { font-size: 15px; color: var(--soft); }

.card.is-disabled { opacity: 0.45; filter: grayscale(0.35); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  min-width: 140px;
  margin-top: 12px;
  padding: 9px 22px;
  border: 1px solid var(--terra);
  border-radius: 3px;
  background: transparent;
  color: var(--terra);
  font-family: var(--serif-body);
  font-size: 15px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { color: var(--terra-dark); border-color: var(--terra-dark); }
.btn-fill { background: var(--terra); color: #fff; }
.btn-fill:hover { background: var(--terra-dark); color: #fff; }
.btn-off {
  border-color: #B9A58E;
  color: var(--soft);
  cursor: default;
}
.btn-off:hover { color: var(--soft); border-color: #B9A58E; }

/* ---------- Olio: passaggi ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.step-num {
  font-family: var(--serif-display);
  font-size: 44px;
  font-style: italic;
  line-height: 1;
  color: var(--terra);
}
.step h3 { font-size: 26px; font-weight: 600; }
.step p { font-size: 17px; color: #4E4032; }

/* ---------- Split (testo + foto) ---------- */

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 72px;
  align-items: center;
  padding: 104px 0;
}
.split-text { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.overline { font-size: 14px; letter-spacing: 0.24em; color: var(--terra); }
.split h2 { font-size: 50px; line-height: 1.1; }
.split p { font-size: 19px; line-height: 1.6; color: #4E4032; }
.split-img { width: 100%; aspect-ratio: 54 / 38; object-fit: cover; border-radius: 2px; }

/* ---------- Shop ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 8px 0 36px;
}
.filter {
  height: 44px;
  padding: 0 22px;
  border: 1px solid #CDBBA4;
  border-radius: 22px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 16px;
  cursor: pointer;
}
.filter[aria-pressed="true"] { background: var(--terra); border-color: var(--terra); color: #fff; }

.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 26px;
}
.product .card-img { aspect-ratio: 1 / 1; }
.product .cat { font-size: 12px; letter-spacing: 0.2em; color: var(--terra); }
.product h3 { font-size: 24px; font-weight: 600; }
.product .price { font-size: 19px; flex-grow: 1; }
.product .price-socio {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: var(--soft);
  margin: 0 0 2px;
}
.product .price-socio a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.product .price-socio[hidden] { display: none; }
.product[hidden] { display: none; }
.img-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #D9C8B0;
  color: var(--soft);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.info-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  text-align: center;
}
.info-row > div { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.info-row h3 { font-size: 26px; font-weight: 600; }
.info-row p { font-size: 16px; color: #4E4032; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--footer);
  color: var(--footer-text);
  padding: 56px 0 28px;
}
.site-footer a { color: var(--footer-text); text-decoration: none; }
.site-footer a:hover { color: #E8A987; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 48px;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.footer-col .label { font-size: 13px; letter-spacing: 0.2em; color: var(--footer-muted); }
.footer-brand .logo-name { font-size: 26px; }
.footer-brand .logo-sub { color: var(--footer-muted); font-size: 12px; letter-spacing: 0.3em; }
.footer-brand p { color: var(--footer-muted); margin-top: 6px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid #4A3E30;
  font-size: 14px;
  color: var(--footer-muted);
}
.footer-bottom nav { display: flex; gap: 24px; }

/* ---------- Tablet / telefono ---------- */

@media (max-width: 900px) {
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
  .split { grid-template-columns: 1fr; gap: 28px; padding: 64px 0; }
  .split h2 { font-size: 38px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .site-header { padding-top: 16px; gap: 8px; }
  .logo-name { font-size: 24px; }
  .logo-since { font-size: 15.5px; margin-bottom: 1px; }
  .logo-marks svg { width: 48px; height: 19px; }
  .logo-marks { gap: 8px; margin: 6px 0 4px; } /* il nome resta sotto il selettore IT/EN */
  .logo-sub { font-size: 9px; letter-spacing: 0.26em; }
  .main-nav a { padding: 4px 14px 2px; }
  .hero { height: 360px; } /* +20%: era 300px */
  .hero-curve { height: 30px; }
  .section { padding-bottom: 56px; }
  .section.band { padding: 56px 0; }
  .section-title h2 { font-size: 21px; }
  .cards { grid-template-columns: 1fr; gap: 20px; }
  .card-img { aspect-ratio: 350 / 190; }
  .btn { min-width: 160px; padding: 12px 24px; }
  .info-row { grid-template-columns: 1fr; gap: 28px; }
  .product h3 { font-size: 20px; }
  .product .btn { min-width: 0; width: 100%; }
  .footer-bottom { flex-direction: column; }
}
@media (max-width: 340px) {
  .logo-marks { gap: 5px; } /* telefoni piccoli: i rami restano a sinistra del selettore IT/EN */
}

@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Carrello (Shopify) ---------- */

.site-header { position: relative; }
.cart-toggle {
  position: absolute;
  top: 46px;
  right: 22px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.cart-toggle:hover { color: var(--terra); }
.cart-toggle[hidden] { display: none; }
.cart-count {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--terra);
  color: #fff;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
}
.cart-count[hidden] { display: none; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.product .btn:disabled { color: var(--soft); border-color: #B9A58E; cursor: default; }
.shop-avviso { margin-top: 36px; text-align: center; font-style: italic; color: var(--soft); }

.cart-overlay { position: fixed; inset: 0; background: rgba(46, 37, 25, 0.4); z-index: 90; }
.cart-overlay[hidden] { display: none; }
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 100;
  outline: none;
}
.cart-drawer.is-open { transform: none; }
.cart-drawer.is-busy { opacity: 0.6; pointer-events: none; }
.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.cart-head h2 { font-size: 28px; }
.cart-close { border: 0; background: none; font-size: 32px; line-height: 1; color: var(--ink); cursor: pointer; }
.cart-lines { list-style: none; margin: 0; padding: 0 24px; overflow-y: auto; flex-grow: 1; }
.cart-line { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 60px; height: 60px; object-fit: cover; border-radius: 2px; }
.cart-line-info { display: flex; flex-direction: column; gap: 6px; flex-grow: 1; }
.cart-line-name { font-family: var(--serif-display); font-size: 20px; font-weight: 600; }
.cart-line-price { white-space: nowrap; }
.cart-qty { display: flex; align-items: center; gap: 12px; }
.cart-qty button {
  width: 30px; height: 30px; border: 1px solid #CDBBA4; border-radius: 15px;
  background: var(--card); color: var(--ink); font-size: 16px; cursor: pointer;
}
.cart-remove { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--terra); font-family: var(--serif-body); font-size: 14px; text-decoration: underline; cursor: pointer; }
.cart-empty { padding: 24px; color: var(--soft); }
.cart-empty[hidden], .cart-foot[hidden] { display: none; }
.cart-foot { padding: 20px 24px 28px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.cart-total { display: flex; justify-content: space-between; font-family: var(--serif-display); font-size: 24px; }
.cart-note { font-size: 14px; color: var(--soft); }
.cart-checkout { text-align: center; }

.age-gate { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(46, 37, 25, 0.6); z-index: 110; }
.age-gate[hidden] { display: none; }
.age-box { max-width: 440px; padding: 36px 32px; background: var(--cream); border: 1px solid var(--line); text-align: center; }
.age-box h2 { font-size: 32px; margin-bottom: 12px; }
.age-box p { color: var(--ink-2); }
.age-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0 10px;
  text-align: left;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  cursor: pointer;
}
.age-check input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--terra);
}
.age-note {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--soft);
  text-align: left;
}
.age-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }
.age-actions .btn[disabled] { opacity: 0.45; cursor: not-allowed; }

@media (max-width: 720px) {
  .cart-toggle { top: 36px; right: 8px; }
}

/* ---------- Foto verticali delle bottiglie ---------- */

.card-img.card-img-bottle,
.product .card-img.card-img-bottle { aspect-ratio: 3 / 5; object-fit: contain; object-position: 50% 50%; background: #2D2926; }

/* Abbinamenti + scheda degustazione sulle card olio/vino */
.card-tasting {
  width: 100%;
  margin-top: 10px;
  padding-top: 0;
  text-align: left;
}
.card-pairings {
  padding: 10px 12px;
  background: rgba(46, 37, 25, 0.04);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.card-pairings-label {
  display: block;
  font-family: var(--serif-display);
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 4px;
}
.card-pairings p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-2);
}
.card-scheda {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}
.card-scheda summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding: 8px 28px 8px 0;
  font-family: var(--serif-display);
  font-size: 16px;
  color: var(--ink);
}
.card-scheda summary::-webkit-details-marker { display: none; }
.card-scheda summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 4px;
  font-size: 22px;
  color: var(--terra);
  line-height: 1;
}
.card-scheda[open] summary::after { content: "\2212"; }
.card-scheda-body {
  padding: 0 0 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}
.card-scheda-body h4 {
  margin: 10px 0 4px;
  font-family: var(--serif-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}
.card-scheda-body p { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); text-align: left; }
.card-scheda-body ul { margin: 0 0 8px; padding-left: 1.1em; }
.card-scheda-body li { margin: 0 0 6px; }
.card-scheda-temp { margin-top: 4px; }
.card-body > .btn { margin-top: 12px; }

.cards.cards-2 { grid-template-columns: repeat(2, minmax(0, 360px)); justify-content: center; }

@media (max-width: 720px) {
  .cards.cards-2 { grid-template-columns: minmax(0, 360px); }
}

.cards.cards-5 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  max-width: 1036px;
}
.cards.cards-5 > .card { grid-column: span 2; }
.cards.cards-5 > .card:nth-child(4) { grid-column: 2 / span 2; }
.cards.cards-5 > .card:nth-child(5) { grid-column: 4 / span 2; }

@media (max-width: 720px) {
  .cards.cards-5 { grid-template-columns: 1fr; }
  .cards.cards-5 > .card,
  .cards.cards-5 > .card:nth-child(4),
  .cards.cards-5 > .card:nth-child(5) { grid-column: auto; }
}

/* Numeri di catalogo sulle foto senza didascalia (js/numeri-foto.js, solo con NUMERI_FOTO_VISIBILI) */
.foto-num {
  position: absolute;
  z-index: 2;
  padding: 1px 7px;
  border-radius: 3px;
  background: rgba(29, 20, 12, 0.45);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  opacity: 0.85;
}

@media (max-width: 340px) {
  /* schermi strettissimi: rami piu' piccoli, cosi' 'since 1865' non tocca il selettore IT/EN */
  .logo-marks { gap: 6px; }
  .logo-marks svg { width: 38px; height: 15px; }
}

/* Link a bennicelli.it nel testo (didascalie d'archivio): stessa formattazione del testo intorno */
a.link-bennicelli, a.link-bennicelli:hover, a.link-bennicelli:visited, a.link-bennicelli:active { color: inherit; font: inherit; letter-spacing: inherit; text-decoration: none; cursor: pointer; }
a.link-bennicelli:focus-visible { outline: 1px dotted currentColor; outline-offset: 2px; }

html.eta-bloccata { overflow: hidden; }
