/* ==========================================================
   Bar Pasticceria Miki — dal 1986
   ========================================================== */

:root {
  --cream: #f7f1e8;
  --cream-dark: #efe5d6;
  --ink: #2b1f1a;
  --brown: #5a3a2a;
  --accent: #a8743f;      /* oro caramello */
  --accent-dark: #8a5c2e;
  --accent-text: #7f5324; /* oro scuro: solo per il testo, legge AA su crema, bianco e rosa */
  --rose: #e8cfc4;
  --white: #ffffff;
  --muted: #6b5b51;
  --line-strong: #c8b39a; /* bordi di campi e filtri */
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --max: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Tipografia ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; color: var(--brown); }
h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: 1.6rem; font-weight: 600; }
h1, h2 { text-wrap: balance; }

.eyebrow {
  display: inline-block;
  font-size: .75rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--accent-text);
  font-weight: 600;
  margin-bottom: 14px;
}

.lead { font-size: 1.1rem; color: var(--muted); max-width: 620px; }

.divider {
  width: 60px; height: 2px; background: var(--accent);
  margin: 22px 0;
}
.center { text-align: center; }
.center .divider, .center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-block;
  padding: 14px 34px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  border: 1px solid var(--brown);
  color: var(--brown);
  transition: all .3s ease;
  cursor: pointer;
  background: transparent;
  font-family: var(--sans);
}
.btn:hover { background: var(--brown); color: var(--cream); }
.btn--light { border-color: var(--white); color: var(--white); }
.btn--light:hover { background: var(--white); color: var(--brown); }
.btn--solid { background: var(--brown); color: var(--cream); }
.btn--solid:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

/* ---------- Barra superiore ---------- */
.topbar {
  background: var(--brown);
  color: var(--cream);
  font-size: .75rem;
  letter-spacing: .12em;
  text-align: center;
  padding: 8px 16px;
  text-transform: uppercase;
}
.topbar a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.topbar a:hover { color: var(--rose); }
.notice--small a { color: var(--brown); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Header / Logo / Nav ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 241, 232, .96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--cream-dark);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 92px;
}

.logo { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.logo__top {
  font-family: var(--sans);
  font-size: .62rem; letter-spacing: .38em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 4px;
}
.logo__name {
  font-family: var(--serif);
  font-size: 2.3rem; font-style: italic; font-weight: 600;
  color: var(--brown);
}
.logo__since {
  font-family: var(--serif);
  font-size: .82rem; font-style: italic; color: var(--accent-text);
  margin-top: 2px; letter-spacing: .08em;
}
.logo__since::before, .logo__since::after { content: "—"; margin: 0 6px; opacity: .6; }

.nav ul { list-style: none; display: flex; gap: 28px; }
.nav a {
  font-size: .78rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
  position: relative; padding: 6px 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--accent);
  transition: width .3s ease;
}
.nav a:hover::after, .nav a.active::after { width: 100%; }
.nav a.active { color: var(--accent-dark); }
.nav ul { align-items: center; }
.nav__sep { width: 1px; height: 26px; background: var(--accent); opacity: .5; margin: 0 -14px; }
.nav a.nav-cta {
  background: var(--brown); color: var(--cream);
  padding: 11px 20px; transition: background .25s ease;
}
.nav a.nav-cta::after { display: none; }
.nav a.nav-cta:hover, .nav a.nav-cta.active { background: var(--accent-dark); color: var(--white); }
@media (max-width: 1280px) {
  .nav ul { gap: 20px; }
  .nav__sep { margin: 0 -8px; }
  .nav a.nav-cta { padding: 10px 16px; }
}

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 8px; width: 24px; height: 2px;
  background: var(--brown); transition: transform .3s ease, opacity .3s ease;
}
.nav-toggle span { top: 19px; }
.nav-toggle span::before { top: -7px; left: 0; }
.nav-toggle span::after { top: 7px; left: 0; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: var(--white);
  background: var(--brown) center/cover no-repeat;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 50% 55%, rgba(43,31,26,.55), transparent 100%),
    linear-gradient(180deg, rgba(43,31,26,.4) 0%, rgba(43,31,26,.65) 100%);
}
.hero__content { position: relative; max-width: 780px; padding: 60px 24px; }
.hero h1 { color: var(--white); margin-bottom: 18px; }
.hero h1 em { font-style: italic; color: #f3e4d6; }
.hero p { font-size: 1.15rem; opacity: .92; margin-bottom: 36px; }
.hero .eyebrow { color: var(--cream); }
.hero h1, .hero p { text-shadow: 0 1px 2px rgba(43,31,26,.35); }

.page-hero { min-height: 48vh; }

/* ---------- Sezioni ---------- */
.section { padding: clamp(64px, 8vw, 110px) 0; }
.section--white { background: var(--white); }
.section--rose { background: var(--rose); }
.section--dark { background: var(--brown); color: var(--cream); }
.section--dark h2, .section--dark h3 { color: var(--cream); }

.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
}
.split--reverse .split__media { order: 2; }
.split__media { position: relative; }
.split__media img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  background: var(--cream-dark);
}
.split__media .frame {
  position: absolute; inset: 24px -24px -24px 24px;
  border: 1px solid var(--accent); z-index: -1;
}
.split__text p { margin-bottom: 18px; color: var(--muted); }
.split__text .btn { margin-top: 14px; }

/* ---------- Card griglia (home) ---------- */
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  margin-top: 60px;
}
.card { position: relative; overflow: hidden; display: block; background: var(--brown); }
.card img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover;
  transition: transform .8s ease, opacity .4s ease;
}
.card:hover img { transform: scale(1.06); opacity: .85; }
.card__label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 30px 24px;
  background: linear-gradient(0deg, rgba(43,31,26,.85), transparent);
  color: var(--white);
}
.card__label h3 { color: var(--white); font-size: 1.7rem; }
.card__label span { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; opacity: .85; }

/* ---------- Citazione ---------- */
.quote {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.4;
  max-width: 860px; margin: 0 auto; color: var(--brown);
}
.quote-author {
  margin-top: 24px; font-size: .78rem; letter-spacing: .25em;
  text-transform: uppercase; color: var(--accent-text);
}

/* ---------- Feature (icone) ---------- */
.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px; margin-top: 60px;
  text-align: center;
}
.feature__icon {
  width: 70px; height: 70px; margin: 0 auto 22px;
  border: 1px solid var(--accent); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.feature__icon svg { width: 30px; height: 30px; }
.feature h3 { margin-bottom: 10px; }
.feature p { color: var(--muted); font-size: .95rem; }

/* ---------- Prodotti ---------- */
.filters {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin: 40px 0 60px; padding: 12px 0;
  position: sticky; top: 92px; z-index: 5; background: var(--cream);
}
.filter {
  background: transparent; border: 1px solid var(--line-strong);
  padding: 13px 22px; font-family: var(--sans);
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  cursor: pointer; color: var(--ink); transition: all .25s ease;
}
.filter:hover { border-color: var(--accent); }
.filter.active { background: var(--brown); border-color: var(--brown); color: var(--cream); }

.products {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px 32px;
}
.product { background: var(--white); transition: transform .35s ease, box-shadow .35s ease; }
.product:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(90,58,42,.12); }
.product__img { overflow: hidden; position: relative; background: var(--cream-dark); }
.product__img img { width: 100%; aspect-ratio: 1/1; object-fit: cover; transition: transform .8s ease; }
.product:hover .product__img img { transform: scale(1.05); }
.product__tag {
  position: absolute; top: 16px; left: 16px;
  background: var(--cream); color: var(--brown);
  font-size: .65rem; letter-spacing: .2em; text-transform: uppercase;
  padding: 6px 12px; font-weight: 600;
}
.product__body { padding: 28px 28px 32px; }
.product__body h3 { margin-bottom: 10px; }
.product__body p { color: var(--muted); font-size: .93rem; margin-bottom: 18px; }
.product__meta {
  font-size: .72rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--accent-dark); border-top: 1px solid var(--cream-dark); padding-top: 16px;
}
.product.hidden { display: none; }

/* ---------- Foto dei prodotti a tutto schermo (solo pagina Prodotti, js/lightbox.js) ---------- */
.product__img[role="button"] { cursor: zoom-in; }
.product__img[role="button"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* invito ad aprire: lente in basso a destra */
.product__img[role="button"]::after {
  content: ""; position: absolute; right: 12px; bottom: 12px; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(43,31,26,.55) center / 18px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4.5 4.5M11 8.5v5M8.5 11h5'/%3E%3C/svg%3E");
  opacity: .85; transition: opacity .25s ease, transform .25s ease; pointer-events: none;
}
@media (hover: hover) {
  .product__img[role="button"]::after { opacity: 0; transform: scale(.8); }
  .product:hover .product__img[role="button"]::after,
  .product__img[role="button"]:focus-visible::after { opacity: 1; transform: none; }
}
/* mentre la foto è aperta, nella scheda resta il vuoto da cui è partita */
.product__img.is-lifted img, .product__img.is-lifted::after, .product__img.is-lifted .product__tag { visibility: hidden; }

.lightbox { position: fixed; inset: 0; z-index: 200; touch-action: none; -webkit-user-select: none; user-select: none; }
.lightbox[hidden] { display: none; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(28,19,15,.93); }
.lightbox__frame {
  position: fixed; margin: 0; overflow: hidden; background: var(--brown);
  box-shadow: 0 30px 80px rgba(0,0,0,.45); will-change: left, top, width, height, transform;
}
.lightbox__frame img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; }
.lightbox__caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 20px calc(18px + env(safe-area-inset-bottom));
  text-align: center; color: var(--cream); pointer-events: none;
}
.lightbox__caption strong { display: block; font-family: var(--serif); font-size: 1.7rem; font-weight: 600; line-height: 1.2; }
.lightbox__caption span { display: block; margin-top: 4px; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--rose); }
.lightbox__caption small { display: block; margin-top: 6px; font-size: .75rem; color: rgba(247,241,232,.6); font-variant-numeric: tabular-nums; }
.lightbox button {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(247,241,232,.35);
  background: rgba(43,31,26,.5); color: var(--cream); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .2s ease, border-color .2s ease;
}
.lightbox button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.lightbox button:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }
.lightbox button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__close { top: calc(8px + env(safe-area-inset-top)); right: 12px; }
.lightbox__nav { top: 50%; margin-top: -24px; }
.lightbox__nav--prev { left: 14px; }
.lightbox__nav--next { right: 14px; }

/* ---------- Banner CTA ---------- */
.cta {
  position: relative; padding: 120px 0; text-align: center; color: var(--white);
  background: var(--brown) center/cover no-repeat;
}
.cta::before { content: ""; position: absolute; inset: 0; background: rgba(43,31,26,.62); }
.cta .container { position: relative; }
.cta h2 { color: var(--white); margin-bottom: 16px; }
.cta p { opacity: .9; margin-bottom: 34px; }

/* ---------- Novità (novita.html) ---------- */
.news { max-width: 940px; margin: 0 auto; display: grid; gap: 36px; }
.news-item { background: var(--white); display: grid; grid-template-columns: 1fr; scroll-margin-top: 120px; }
.news-item--photo { grid-template-columns: 340px 1fr; }
.news-item__img { background: var(--cream-dark); min-width: 0; }
.news-item__img img { width: 100%; height: 100%; aspect-ratio: 1/1; object-fit: cover; }
.news-item__body { padding: 40px 44px; min-width: 0; align-self: center; }
.news-item__date {
  display: block; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent-text); font-weight: 600; margin-bottom: 12px;
}
.news-item h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.2; margin-bottom: 14px; }
.news-item p { color: var(--muted); margin-bottom: 14px; }
.news-item p:last-child { margin-bottom: 0; }
.news-item__link {
  display: inline-block; margin-top: 6px; font-size: .75rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 600; color: var(--brown); border-bottom: 1px solid var(--accent); padding-bottom: 3px;
}
.news-item__link:hover { color: var(--accent-dark); }
@media (max-width: 760px) {
  .news { gap: 24px; }
  .news-item--photo { grid-template-columns: 1fr; }
  .news-item__img img { height: auto; aspect-ratio: 4/3; }
  .news-item__body { padding: 26px 22px 30px; }
}

/* ---------- Timeline (storia) ---------- */
.timeline { position: relative; max-width: 900px; margin: 70px auto 0; }
.timeline::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 1px; background: var(--accent); transform: translateX(-50%);
}
.tl-item {
  position: relative; width: 50%; padding: 0 50px 60px;
}
.tl-item:nth-child(odd) { left: 0; text-align: right; }
.tl-item:nth-child(even) { left: 50%; }
.tl-item::before {
  content: ""; position: absolute; top: 10px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--cream); border: 2px solid var(--accent);
}
.tl-item:nth-child(odd)::before { right: -8px; }
.tl-item:nth-child(even)::before { left: -7px; }
.tl-year {
  font-family: var(--serif); font-size: 2.6rem; font-style: italic;
  color: var(--accent-text); line-height: 1;
}
.tl-item h3 { margin: 8px 0 10px; }
.tl-item p { color: var(--muted); }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center;
}
.stat__num { font-family: var(--serif); font-size: 3.6rem; color: var(--rose); line-height: 1; }
.stat__label { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; margin-top: 10px; opacity: .85; }

/* ---------- Ordina online ---------- */
.notice {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--rose); color: var(--brown);
  padding: 20px 24px; margin-bottom: 50px;
}
.notice svg { flex: none; width: 24px; height: 24px; margin-top: 2px; }
.notice strong { display: block; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.notice p { font-size: .93rem; }
.notice--small { margin: 18px 0 0; padding: 16px 18px; gap: 12px; }
.notice--small svg { width: 20px; height: 20px; }
.notice--small p { font-size: .85rem; }

.order { display: grid; grid-template-columns: 1fr 380px; gap: 50px; align-items: start; }
.order__list { display: grid; gap: 20px; min-width: 0; }
.item {
  display: grid; grid-template-columns: 130px 1fr auto; gap: 24px; align-items: center;
  background: var(--white); padding: 18px;
}
.item img { width: 130px; height: 130px; object-fit: cover; background: var(--cream-dark); }
.item__body { min-width: 0; }
.item h3 { font-size: 1.55rem; margin-bottom: 4px; }
.item p { color: var(--muted); font-size: .9rem; margin-bottom: 8px; }
.item p.item__info { font-size: .82rem; font-style: italic; color: var(--brown); margin-top: -4px; }
.item__price {font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-dark); font-weight: 600; }

.variants { display: grid; gap: 8px; margin: 10px 0 4px; }
.variant {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-size: .9rem; color: var(--ink);
}
.variant input { accent-color: var(--brown); width: 16px; height: 16px; }
.variant span { color: var(--accent-dark); font-weight: 600; margin-left: auto; padding-left: 12px; white-space: nowrap; }

.stepper { display: flex; align-items: center; border: 1px solid var(--line-strong); background: var(--cream); }
.stepper button {
  width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  font-size: 1.2rem; color: var(--brown); font-family: var(--sans);
}
.stepper button:hover { background: var(--cream-dark); }
.stepper button:disabled { color: var(--muted); opacity: .45; cursor: not-allowed; background: transparent; }
.stepper button:focus-visible, .btn:focus-visible, .filter:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stepper output {
  min-width: 70px; text-align: center; font-size: .9rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.summary { background: var(--white); padding: 34px 30px; position: sticky; top: 120px; }
.summary h2 { font-size: 2rem; margin-bottom: 18px; }
.summary__empty { color: var(--muted); font-size: .93rem; padding: 14px 0 20px; border-bottom: 1px solid var(--cream-dark); }
.summary__lines { list-style: none; }
.summary__lines li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--cream-dark); font-size: .9rem;
  font-variant-numeric: tabular-nums;
}
.summary__lines small { display: block; color: var(--muted); font-size: .8rem; }
.summary__total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 18px 0 24px; font-variant-numeric: tabular-nums;
}
.summary__total span:first-child { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; }
.summary__total span:last-child { font-family: var(--serif); font-size: 2rem; color: var(--brown); }
.summary__cta { display: grid; gap: 10px; margin-top: 22px; }
.summary__cta .btn { text-align: center; padding-left: 20px; padding-right: 20px; }
.summary__cta .btn--solid { background: var(--brown); color: var(--cream); }
.summary__cta .btn--solid:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.summary__cta-row { display: flex; gap: 10px; }
.summary__cta-row .btn { flex: 1; }
/* Pulsante WhatsApp: solo icona, nel verde del servizio così si riconosce subito */
.btn-wa {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 48px; min-height: 48px; background: #25d366; color: var(--white);
  border: 1px solid #25d366; transition: background .25s ease, border-color .25s ease;
}
.btn-wa:hover { background: #1ebe5b; border-color: #1ebe5b; color: var(--white); }
.btn-wa:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-wa svg { width: 24px; height: 24px; }
.field__hint {font-size: .8rem; color: var(--muted); margin: -4px 0 16px; }
.field input:disabled, .field select:disabled {opacity: .55; cursor: not-allowed; }
.pieces { background: var(--cream); padding: 4px 22px 18px; margin-top: 4px; }
.pieces__total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding-top: 14px; font-variant-numeric: tabular-nums;
}
.pieces__total span:first-child { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; white-space: nowrap; }
.pieces__total span:last-child { font-family: var(--serif); font-size: 1.5rem; color: var(--brown); text-align: right; line-height: 1.2; }
.pieces__total small { display: block; font-family: var(--sans); font-size: .78rem; color: var(--muted); }

/* Barra fissa con il totale: visibile solo su schermi stretti, dove il riepilogo finisce in fondo */
.summary-bar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: var(--white); box-shadow: 0 -8px 24px rgba(43,31,26,.14);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  align-items: center; justify-content: space-between; gap: 14px;
}
.summary-bar__label { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.summary-bar__total { font-family: var(--serif); font-size: 1.6rem; color: var(--brown); line-height: 1.1; font-variant-numeric: tabular-nums; }
.summary-bar__pieces { font-size: .78rem; color: var(--muted); }
.summary-bar .btn { padding: 12px 18px; white-space: nowrap; }
.summary-bar__actions { display: flex; gap: 8px; align-items: stretch; }
.summary-bar__actions .btn-wa { width: 46px; min-height: 0; }
.summary__note { font-size: .8rem; color: var(--muted); margin-top: 14px; }

/* ---------- Listino prezzi ---------- */
.price-intro { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin-top: 26px; font-size: .85rem; color: var(--muted); }
.price-intro strong { color: var(--brown); }
.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 60px; align-items: start; }
.price-card { background: var(--white); padding: 40px 38px; min-width: 0; }
.price-card h2 { font-size: 2.1rem; font-style: italic; display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.price-card h2::after { content: ""; flex: 1; height: 1px; background: var(--accent); opacity: .5; }
.price-card h3 { font-family: var(--sans); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-dark); font-weight: 600; margin: 26px 0 8px; }
.price-list { list-style: none; }
.price-list li { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; font-size: .95rem; }
.price-list .dots { flex: 1; min-width: 14px; border-bottom: 2px dotted var(--cream-dark); transform: translateY(-4px); }
.price-list .val { font-weight: 600; color: var(--brown); white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-list .val small { font-weight: 400; color: var(--muted); font-size: .78rem; margin-left: 2px; }
.price-list .val em { font-weight: 400; color: var(--muted); }
.price-card .note-line { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--brown); margin-top: 14px; }


/* ---------- Contatti ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 70px; }
.info-block { margin-bottom: 38px; }
.info-block h3 { font-size: 1.4rem; margin-bottom: 8px; }
.info-block p, .info-block a { color: var(--muted); }
.info-block a:hover { color: var(--accent-dark); }

.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: 10px 0; border-bottom: 1px solid var(--cream-dark); color: var(--muted); }
.hours td:last-child { text-align: right; color: var(--ink); }

.form { background: var(--white); padding: 50px; }
.form h2 { font-size: 2.2rem; margin-bottom: 8px; }
.form > p { color: var(--muted); margin-bottom: 30px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { margin-bottom: 22px; }
.field label {
  display: block; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase;
  margin-bottom: 8px; color: var(--brown); font-weight: 600;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; font-family: var(--sans); font-size: .95rem;
  border: 1px solid var(--line-strong); background: var(--white); color: var(--ink);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent-dark); outline-offset: 1px; border-color: var(--accent-dark);
}
.field textarea { min-height: 140px; resize: vertical; }
.form-success {
  display: none; margin-top: 20px; padding: 16px 20px;
  background: var(--rose); color: var(--brown); font-size: .95rem;
}
.form-success.show { display: block; }
.form-error__code { display: block; margin-top: 8px; font-size: .72rem; opacity: .7; }
.form-error__code:empty { display: none; }
.form-error {
  display: none; margin-top: 20px; padding: 16px 20px;
  background: #f6e1dc; color: #7a2e1d; font-size: .95rem; border-left: 3px solid #a8432b;
}
.form-error.show { display: block; }
.form-error a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.form .btn:disabled { opacity: .6; cursor: wait; }
/* campo trappola per i programmi automatici: fuori dallo schermo, non nascosto con display:none */
.field--trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.map { width: 100%; height: 420px; border: 0; display: block; filter: sepia(.25) saturate(.85); }
/* Mappa di Google: si carica solo dopo il consenso ai cookie (js/consenso.js); prima si vede questo riquadro */
.map-consent {
  position: relative; min-height: 420px; display: flex; align-items: center; justify-content: center;
  text-align: center; color: var(--cream); background: var(--brown) url("../img/il-locale.jpg") center / cover no-repeat;
}
.map-consent[hidden] { display: none; }
.map-consent::before { content: ""; position: absolute; inset: 0; background: rgba(43,31,26,.78); }
.map-consent__inner { position: relative; max-width: 600px; padding: 50px 24px; }
.map-consent svg { width: 40px; height: 40px; color: var(--rose); }
.map-consent__addr { font-family: var(--serif); font-size: 1.7rem; margin: 10px 0 24px; line-height: 1.25; }
.map-consent__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.map-consent__note { margin-top: 22px; font-size: .82rem; color: rgba(247,241,232,.75); }
.map-consent__note a { text-decoration: underline; text-underline-offset: 3px; }

/* Banner dei cookie: Accetta e Rifiuta hanno lo stesso peso, come chiede il Garante */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 150; max-width: 560px;
  background: var(--white); color: var(--ink); padding: 22px 24px 20px;
  box-shadow: 0 18px 50px rgba(43,31,26,.25); border-top: 3px solid var(--brown);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner:focus { outline: none; }
.cookie-banner p.cookie-banner__title { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; color: var(--brown); margin-bottom: 6px; padding-right: 30px; }
.cookie-banner p { font-size: .9rem; }
.cookie-banner a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.cookie-banner__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.cookie-banner__actions .btn { padding: 13px 16px; text-align: center; }
.cookie-banner__close {
  position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: 0; background: none;
  color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.cookie-banner__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.cookie-banner__close:hover { color: var(--brown); }
.has-summary-bar .cookie-banner { bottom: 104px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--accent); }
.footer__bottom a { text-decoration: underline; text-underline-offset: 3px; }

/* Casella del consenso nel modulo */
.field--check { display: flex; gap: 12px; align-items: flex-start; }
.field--check input { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 3px; accent-color: var(--brown); }
.field--check label { font-size: .85rem; letter-spacing: 0; text-transform: none; font-weight: 400; color: var(--muted); margin: 0; }
.field--check a { color: var(--brown); text-decoration: underline; text-underline-offset: 3px; }

/* Pagina privacy */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 1.8rem; margin: 44px 0 12px; }
.prose p, .prose li { color: var(--ink); margin-bottom: 12px; }
.prose ul { padding-left: 22px; margin-bottom: 12px; }
.prose a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.prose .notice { margin-bottom: 36px; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(247,241,232,.75); padding: 80px 0 30px; font-size: .92rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 50px; }
/* Le tre righe del logo restano centrate fra loro, il blocco si allinea a sinistra della colonna */
.footer .logo { display: inline-flex; }
.footer .logo__name { color: var(--cream); }
.footer .logo__top { color: rgba(247,241,232,.6); }
.footer h4 {
  font-size: .72rem; letter-spacing: .25em; text-transform: uppercase;
  color: var(--cream); margin-bottom: 20px; font-weight: 600;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: 10px; }
.footer a:hover { color: var(--accent); }
.footer__about { margin-top: 18px; max-width: 300px; }
.social { display: flex; gap: 12px; margin-top: 20px; }
.social a {
  width: 38px; height: 38px; border: 1px solid rgba(247,241,232,.3); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; transition: all .25s ease;
}
.social a:hover { border-color: var(--accent); background: var(--accent); color: var(--white); }
.social svg { width: 16px; height: 16px; }
.footer__bottom {
  border-top: 1px solid rgba(247,241,232,.12); margin-top: 60px; padding-top: 26px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: .78rem; letter-spacing: .05em;
}

/* ---------- Animazioni in entrata ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s ease, transform .9s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .split, .contact-grid { grid-template-columns: 1fr; gap: 50px; }
  .split--reverse .split__media { order: 0; }
  .cards, .products { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr; gap: 40px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .order { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  .summary { position: static; }
  .summary-bar { display: flex; }
  .has-summary-bar { padding-bottom: 96px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1040px) {
  /* Logo al centro, pulsante del menu a destra */
  .header__inner { display: grid; grid-template-columns: 1fr auto 1fr; }
  .header__inner .logo { grid-column: 2; }
  .nav-toggle { display: block; grid-column: 3; justify-self: end; width: 44px; height: 44px; }
  .nav-toggle span { top: 21px; left: 10px; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--cream-dark);
    max-height: 0; overflow: hidden; visibility: hidden;
    transition: max-height .4s ease, visibility 0s linear .4s;
  }
  .nav-open .nav { max-height: 520px; visibility: visible; transition: max-height .4s ease; }
  .nav ul { flex-direction: column; gap: 0; padding: 10px 24px 24px; }
  .nav li { border-bottom: 1px solid var(--cream-dark); }
  .nav a { display: block; padding: 16px 0; }
  .nav a::after { display: none; }
  .nav ul { align-items: stretch; }
  .nav li.nav__sep { width: auto; height: 1px; margin: 10px 0 16px; border: 0; }
  .nav li:has(.nav-cta) { border-bottom: 0; }
  .nav a.nav-cta { text-align: center; padding: 14px 20px; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 56px 0; }
  .cards, .features { margin-top: 36px; }
  .cards { grid-template-columns: 1fr; gap: 20px; }
  .card img { aspect-ratio: 4 / 3; }
  /* Header compatto: barra in alto su una riga, logo più piccolo */
  .topbar { font-size: .68rem; letter-spacing: .06em; padding: 6px 12px; }
  .topbar__extra { display: none; }
  .header__inner { min-height: 72px; }
  /* Prodotti: due colonne e filtri scorrevoli */
  .products { grid-template-columns: 1fr 1fr; gap: 20px 12px; }
  .product__body { padding: 14px 12px 16px; }
  .product__body h3 { font-size: 1.15rem; margin-bottom: 6px; }
  .product__body p { display: none; }
  .product__meta { font-size: .64rem; padding-top: 10px; }
  .product__tag { top: 8px; left: 8px; font-size: .58rem; padding: 4px 8px; }
  .filters {
    top: 72px; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; gap: 8px;
    margin: 24px -16px 36px; padding: 10px 16px; scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: 0 0 auto; scroll-snap-align: start; }
  /* su telefono si scorre col dito: le frecce scendono accanto alla didascalia */
  .lightbox__nav { top: auto; bottom: calc(22px + env(safe-area-inset-bottom)); margin-top: 0; width: 44px; height: 44px; }
  .lightbox__caption { padding-left: 68px; padding-right: 68px; }
  .lightbox__caption strong { font-size: 1.35rem; }
  .form { padding: 30px 22px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .item { grid-template-columns: 90px 1fr; gap: 16px; }
  .item img { width: 90px; height: 90px; }
  .item .stepper { grid-column: 1 / -1; justify-content: space-between; }
  .summary { padding: 28px 20px; }
  .price-card { padding: 30px 20px; }
  .footer__grid { grid-template-columns: 1fr; gap: 36px; }
  .split__media .frame { inset: 14px -10px -14px 10px; }
  .logo__name { font-size: 1.8rem; }
  .timeline::before { left: 8px; }
  .tl-item, .tl-item:nth-child(even) { width: 100%; left: 0; padding: 0 0 50px 40px; text-align: left; }
  .tl-item:nth-child(odd) { text-align: left; }
  .tl-item:nth-child(odd)::before, .tl-item:nth-child(even)::before { left: 1px; right: auto; }
}

[hidden] { display: none !important; }
