/* Carattere del marchio, ospitato sul sito (nessuna connessione a servizi esterni) */
@font-face {
  font-family: 'Dancing Script';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/dancing-script-700.woff2') format('woff2');
}

:root {
  --bg: #fffdf7;
  --text: #1f1a12;
  --muted: #6b5d45;
  --brand: #e2a400;
  --brand-ink: #7a5200;
  --accent: #ffe28a;
  --card: #ffffff;
  --ring: rgba(226, 164, 0, 0.22);
}

* {
  box-sizing: border-box;
}

/* BODY PER LE VARIE PAGINE */

body.site-body,
body.shop-body,
body.admin-body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

/* Layout base */

.container {
  max-width: 1200px;
  margin-inline: auto;
  padding: 20px;
}

/* HEADER COMUNE */

.shop-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 253, 247, 0.92);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.shop-header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
}

.brand-icon {
  font-size: 20px;
}

.brand-logo {
  height: 40px;        /* puoi portarlo a 28–30 se lo vuoi leggermente più grande */
  width: auto;
  display: block;
}

.brand-text {
  font-family: "Dancing Script", cursive;
  font-weight: 700;
  font-size: 1.9rem;   /* puoi ridurre/aumentare */
  line-height: 1;
  display: inline-block;
  margin-left: 6px;
}

.shop-title {
  margin: 0;
  font-size: 20px;
  flex: 1;
}

.back-link {
  font-size: 14px;
  text-decoration: none;
  color: var(--muted);
}

/* NAV PRINCIPALE (HOME) */

.main-nav {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 18px;
}

.main-nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.main-nav a:hover {
  background: rgba(0, 0, 0, 0.03);
}

.main-nav-current {
  color: var(--text);
  padding: 6px 10px;
  white-space: nowrap;
  font-weight: 600;
}

.main-nav a.is-active {
  color: var(--brand-ink);
  position: relative;
}

.main-nav a.is-active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 10px;
  right: 10px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand);
}

.btn-small {
  font-size: 13px;
  padding-inline: 12px;
}

/* HERO HOME + SLIDESHOW */

.hero-section {
  padding: 40px 0 30px;
  background:
    radial-gradient(circle at top left, rgba(255, 226, 138, 0.3), transparent 55%),
    radial-gradient(circle at bottom right, rgba(226, 164, 0, 0.15), transparent 55%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.05fr);
  gap: 28px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-kicker {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.hero-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
}

.hero-lead {
  margin: 0;
  font-size: 18px;
  color: var(--muted);
  max-width: 42rem;
}

.hero-cta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Badges sotto il testo hero */

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 253, 247, 0.9);
}

/* Slideshow */

.hero-slideshow {
  max-width: 480px;
  margin-left: auto;
}

@media (max-width: 900px) {
  .hero-slideshow {
    max-width: none;
    width: 100%;
  }
}

.slideshow-frame {
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 3;
  background: #000;
}

.slideshow-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.35s ease;
}

.slideshow-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.9);
  font-size: 11px;
  color: var(--brand-ink);
}

.slideshow-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

/* SEZIONI GENERICHE HOME */

.section-block {
  padding: 32px 0 26px;
}

.section-alt {
  background: rgba(255, 253, 247, 0.7);
}

.section-header {
  margin-bottom: 16px;
}

.section-title {
  margin: 0 0 6px;
  font-size: 21px;
}

.section-subtitle {
  margin: 0 0 16px;
  font-size: 18px;
  color: var(--muted);
}

.small {
  font-size: 15px;
}

.muted {
  color: var(--muted);
}

/* Layout colonne (home) */

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .two-column {
    grid-template-columns: 1fr;
  }
}

.three-column {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 900px) {
  .three-column {
    grid-template-columns: 1fr;
  }
}

/* Card generica */

.card {
  background: var(--card);
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 12px -10px var(--ring);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -20px var(--ring);
}

/* Elementi specifici home */

.about-card {
  height: 100%;
}

.timeline {
  list-style: none;
  padding-left: 0;
  margin: 0 0 10px;
}

.timeline li {
  margin-bottom: 4px;
}

.map-placeholder {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 226, 138, 0.3), rgba(226, 164, 0, 0.1));
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
}

/* FOOTER HOME */

.footer-block {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 18px 0 24px;
  margin-top: 16px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 700px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Layout SHOP */

.shop-layout {
  display: grid;
  grid-template-columns: 2fr 1.4fr;
  gap: 24px;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }
}

/* Prodotti (comune a home e shop) */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.product.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-title {
  margin: 0 0 4px;
}

/* Thumb prodotto */

.thumb {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    rgba(255, 226, 138, 0.9),
    rgba(226, 164, 0, 0.7)
  );
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 8px;
  overflow: hidden;
}

.thumb-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-ink);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

/* leggera animazione sulle immagini dei prodotti */
.product.card:hover .thumb img {
  transform: scale(1.03);
}

.badge-mini {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.9);
  border: 1px solid rgba(226, 164, 0, 0.5);
  font-size: 11px;
  color: var(--brand-ink);
  font-weight: 600;
}

.stock {
  font-size: 12px;
}

/* Bottoni */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--card);
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -12px var(--ring);
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn.primary {
  background: linear-gradient(180deg, #ffe28a, #e2a400);
  border-color: rgba(164, 120, 0, 0.8);
  color: #1a1200;
  font-weight: 600;
}

/* Carrello (shop) */

.shop-cart {
  background: var(--card);
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 10px 30px -22px var(--ring);
}

.cart-list {
  list-style: none;
  padding-left: 0;
  margin: 0 0 8px;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
  font-size: 14px;
}

.cart-name {
  flex: 1;
}

.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cart-qty button {
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #f9f4e6;
  cursor: pointer;
  font-size: 12px;
}

.cart-qty span {
  min-width: 16px;
  text-align: center;
}

.cart-line-total {
  font-variant-numeric: tabular-nums;
}

.cart-total {
  margin-top: 6px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Checkout form (shop + contatti home) */

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.checkout-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}

.checkout-form input,
.checkout-form textarea {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font: inherit;
}

.checkout-form textarea {
  resize: vertical;
}

.checkout-fieldset {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 6px 8px 8px;
  margin: 4px 0;
}

.checkout-fieldset legend {
  font-size: 13px;
  padding: 0 4px;
}

.inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 10px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.checkbox-row input[type="checkbox"] {
  margin-top: 3px;
}

.divider {
  margin: 12px 0;
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* --- ADMIN --- */

.admin-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 16px;
}

.admin-section {
  margin-bottom: 8px;
}

.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

/* Tabella */

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th,
.table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-align: left;
}

.table thead th {
  background: rgba(255, 253, 247, 0.9);
  position: sticky;
  top: 0;
  z-index: 1;
}

.table tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.01);
}

.table-actions {
  white-space: nowrap;
}

.btn-xs {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
}

/* Form prodotti admin */

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 900px) {
  .admin-form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.admin-form input {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font: inherit;
}

.admin-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-details {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 253, 247, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.order-details h3 {
  margin: 0 0 4px;
}

.order-address,
.order-message {
  margin: 4px 0 6px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  white-space: pre-wrap;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
}

/* --- SHOP HERO / INTRO --- */

.shop-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  margin-bottom: 16px;
  align-items: center;
}

.shop-hero-text {
  flex: 2 1 260px;
}

.shop-hero-pill {
  flex: 1 1 220px;
  background: rgba(255, 253, 247, 0.9);
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 8px 22px -18px var(--ring);
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 226, 138, 0.2);
  border: 1px solid rgba(226, 164, 0, 0.4);
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-ink);
}

/* --- LAYOUT SHOP (aggiorna se serve) --- */

.shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1.4fr);
  gap: 24px;
  margin-top: 12px;
}

@media (max-width: 900px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }
}

/* --- CARRELLO COLLASSABILE --- */

.shop-cart {
  background: var(--card);
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 10px 30px -22px var(--ring);
  position: sticky;
  top: 90px;
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cart-header .section-title {
  margin-bottom: 2px;
}

.cart-body {
  margin-top: 10px;
}

.shop-cart.collapsed .cart-body {
  display: none;
}

.cart-toggle {
  white-space: nowrap;
}

/* mobile: cart più tipo "drawer" visivo */
@media (max-width: 900px) {
  .shop-cart {
    position: static;
    order: 2;
  }
}

.cart-floating {
  position: fixed;
  right: 1.5rem;
  top: 1.5rem;
  z-index: 9999;
}

.cart-fab {
  border-radius: 999px;
  padding: 10px 14px;
  border: 1px solid rgba(0,0,0,0.1);
  background: var(--card);
  box-shadow: 0 12px 30px -18px var(--ring);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
}

.cart-fab-count {
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.08);
}

.cart-fab-count.has-items {
  background: var(--brand);
  color: #1a1200;
  font-weight: 600;
}

.cart-panel {
  position: absolute;
  right: 0;
  top: 3.2rem; 
  width: 320px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 18px 40px -22px var(--ring);
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  pointer-events: none;
}

@media (max-width: 600px) {
  .cart-floating {
    top: 4.5rem;   /* abbassalo un po’ sotto l'header */
  }
}

/* mostra pannello al passaggio del mouse (desktop) */
.cart-floating:hover .cart-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* e anche quando c'è la classe .open (mobile / click) */
.cart-floating.open .cart-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 600px) {
  .cart-panel {
    width: min(360px, 100vw - 24px);
  }
}

/* Griglia apiari: card uguali, ben allineate */
.apiary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.apiary-grid .card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.apiary-grid .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -20px var(--ring);
}

/* Tutte le immagini dentro .thumb si adattano in modo pulito */
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

/* Effetto morbido sulla panoramica */
.panorama-thumb {
  overflow: hidden;
  position: relative;
}

/* Immagini slider (hero + panoramica apiari) */
.hero-slideshow .slideshow-frame,
.panorama-thumb {
  overflow: hidden;
  border-radius: 10px;
}

.hero-slideshow img,
#apiaryPanoramaImg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  opacity: 1;
  transform: scale(1.01);
  transition:
    opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Hover molto leggero sulla panoramica */
.panorama-thumb:hover #apiaryPanoramaImg {
  transform: scale(1.03);
}

/* Evidenziazione card attiva legata alla panoramica */
.apiary-card.active {
  border: 2px solid var(--brand);
  box-shadow:
    0 0 0 4px rgba(226, 164, 0, 0.15),
    0 10px 25px -10px rgba(0,0,0,0.10);
  transition: border 0.3s ease, box-shadow 0.4s ease;
}

/* --- Apiari: pannelli espandibili (La mia apicoltura) --- */

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-ink);
}
.section-eyebrow::before,
.section-eyebrow::after {
  content: '';
  width: 22px;
  height: 1px;
  background: rgba(226, 164, 0, .55);
}

.ap-panels {
  display: flex;
  gap: 16px;
  height: clamp(420px, 52vw, 540px);
  margin: 28px 0 18px;
}

.ap-panel {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  border-radius: 24px;
  overflow: hidden;
  cursor: pointer;
  isolation: isolate;
  background: #2a2216;
  box-shadow: 0 18px 40px -24px rgba(60, 40, 0, .55);
  transition:
    flex-grow .7s cubic-bezier(.22, .61, .36, 1),
    box-shadow .4s ease;
  outline: none;
}
.ap-panel.is-active {
  flex-grow: 2.3;
  box-shadow: 0 28px 60px -28px rgba(60, 40, 0, .6);
}
.ap-panel:focus-visible {
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--brand);
}

.ap-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transform: scale(1.08);
  filter: saturate(.75) brightness(.8);
  transition: filter .7s ease, transform 1.2s cubic-bezier(.22, .61, .36, 1);
}
/* foto del pannello aperto: ferma e nitida (nessuno zoom continuo, che la faceva vibrare) */
.ap-panel.is-active .ap-img {
  filter: none;
  transform: none;
}

/* velatura scura in basso */
.ap-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.ap-panel::before {
  background: linear-gradient(to top,
    rgba(20, 14, 4, .88) 0%,
    rgba(20, 14, 4, .45) 38%,
    rgba(20, 14, 4, .05) 70%);
}

.ap-chip {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--text);
  background: rgba(255, 253, 247, .85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
}

.ap-index {
  position: absolute;
  top: 12px;
  right: 20px;
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 253, 247, .0);
  -webkit-text-stroke: 1.5px rgba(255, 253, 247, .7);
  font-variant-numeric: tabular-nums;
}

.ap-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 28px 26px;
  color: #fffdf7;
}

.ap-kicker {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}

.ap-title {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.1;
  font-weight: 800;
  text-wrap: balance;
}

/* il dettaglio si apre in altezza (0fr -> 1fr) */
.ap-more {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .6s cubic-bezier(.22, .61, .36, 1), opacity .4s ease;
}
.ap-more > div { overflow: hidden; }
.ap-panel.is-active .ap-more {
  grid-template-rows: 1fr;
  opacity: 1;
  transition-delay: .15s;
}

.ap-desc {
  margin: 10px 0 14px;
  max-width: 52ch;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255, 253, 247, .88);
}

.ap-feats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ap-feats li {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: #fffdf7;
  background: rgba(255, 253, 247, .12);
  border: 1px solid rgba(255, 226, 138, .35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease;
}
.ap-panel.is-active .ap-feats li {
  opacity: 1;
  transform: none;
}
.ap-panel.is-active .ap-feats li:nth-child(1) { transition-delay: .35s; }
.ap-panel.is-active .ap-feats li:nth-child(2) { transition-delay: .45s; }
.ap-panel.is-active .ap-feats li:nth-child(3) { transition-delay: .55s; }

/* invito "scopri" sul pannello chiuso */
.ap-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  transition: opacity .3s ease;
}
.ap-hint::after {
  content: '→';
  transition: transform .25s ease;
}
.ap-panel:hover .ap-hint::after { transform: translateX(4px); }
.ap-panel.is-active .ap-hint {
  display: none;
}

/* indicatori sotto i pannelli */
.ap-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.ap-dots button {
  width: 28px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(226, 164, 0, .25);
  transition: width .35s ease, background .35s ease;
}
.ap-dots button.is-active {
  width: 48px;
  background: var(--brand);
}

@media (max-width: 760px) {
  .ap-panels {
    flex-direction: column;
    height: 640px;
    gap: 12px;
  }
  .ap-panel { border-radius: 20px; }
  .ap-panel.is-active { flex-grow: 3; }
  .ap-content { padding: 18px 20px; }
  .ap-desc { font-size: 15px; margin: 8px 0 12px; }
  .ap-index { font-size: 34px; top: 12px; right: 16px; }
  .ap-chip { top: 14px; left: 14px; }
}

/* ---- Rivelazione allo scroll (generica) ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.22, .61, .36, 1);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .ap-panel,
  .ap-img,
  .ap-more,
  .ap-feats li,
  [data-reveal] { transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---- TIMELINE MILESTONES (Come nasce OrMiele) ---- */

.m-rail {
  overflow: visible;
}

.m-track {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-top: 68px; /* spazio per l'ape sopra i pallini */
  outline: none;
  user-select: none;
  overflow: visible;
}

.m-dot {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
  transition: opacity .2s;
}

.m-dot:hover { opacity: .85; }

.m-year {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.3;
  transition: color .2s;
}

.m-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  opacity: .7;
  line-height: 1.3;
  white-space: nowrap;
}

/* Pallino sotto anno + etichetta */
.m-dot::after {
  content: '';
  display: block;
  margin-top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid rgba(226, 164, 0, .5);
  transition: background .2s, transform .25s, border-color .2s, box-shadow .2s;
}

.m-dot.is-active .m-year {
  color: var(--brand-ink);
  font-weight: 700;
}

.m-dot.is-active .m-label {
  opacity: 1;
  color: var(--text);
}

.m-dot.is-active::after {
  background: var(--brand);
  border-color: var(--brand);
  transform: scale(1.35);
  box-shadow: 0 0 0 4px rgba(226, 164, 0, .18);
}

/* Linea orizzontale al livello dei pallini
   padding-top(68) + anno(~17px) + gap(3) + etichetta(~14px) + gap(3) + margin(6) + raggio(5) = ~116px */
.m-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 116px;
  height: 2px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(226, 164, 0, .3) 8%,
    rgba(226, 164, 0, .3) 92%,
    transparent
  );
  border-radius: 999px;
  pointer-events: none;
}

/* Indicatore ape: 24px wide (usato dal JS per centrare sopra il dot attivo) */
.m-indicator {
  position: absolute;
  top: 6px;
  left: 0;
  width: 24px;
  height: 60px;
  overflow: visible;
  pointer-events: none;
  transition: transform .38s cubic-bezier(.25, .8, .25, 1);
}

.m-indicator::after {
  content: '';
  position: absolute;
  top: 0;
  left: 12px; /* centro del blocco 24px */
  transform: translateX(-50%);
  width: 62px;
  height: 54px;
  background: url('/images/ape_pointer_dx.png') center / contain no-repeat;
}

/* Scheda descrittiva sotto la timeline */
.m-card {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, .06);
  min-height: 64px;
}

.m-title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

@media (max-width: 640px) {
  .m-year  { font-size: 12px; }
  .m-label { font-size: 10px; }
  .m-indicator::after { width: 50px; height: 44px; }
  .m-title { font-size: 15px; }
}

/* ---- PRODUCT SPOTLIGHT (home: vetrina prodotti) ---- */

.p-spotlight {
  position: relative;
  margin-top: 20px;
}

.p-rail {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 18px 8px 36px;
  align-items: stretch;
}
.p-rail::-webkit-scrollbar { display: none; }
/* centrate quando entrano tutte, scorrevoli quando non entrano */
.p-rail > .p-card:first-child { margin-left: auto; }
.p-rail > .p-card:last-child  { margin-right: auto; }

.p-card {
  --rx: 0deg;
  --ry: 0deg;
  --gx: 50%;
  --gy: 0%;
  position: relative;
  flex: 0 0 min(340px, 80vw);
  scroll-snap-align: center;
  text-decoration: none;
  color: inherit;
  border-radius: 22px;
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(140deg, rgba(0,0,0,.07), rgba(0,0,0,.07)) border-box;
  box-shadow: 0 10px 30px -18px rgba(60, 40, 0, .35);
  display: flex;
  flex-direction: column;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: flat;
  isolation: isolate;
  transition: transform .5s cubic-bezier(.22, .61, .36, 1), box-shadow .4s ease;
}
.p-card.is-tilting { transition: transform .08s linear, box-shadow .4s ease; }

/* bordo dorato che si accende al passaggio */
.p-card:hover,
.p-card:focus-visible {
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(140deg, #ffe28a, #e2a400 45%, #7a5200) border-box;
  box-shadow: 0 30px 60px -28px rgba(122, 82, 0, .55);
  outline: none;
}

/* riflesso lucido che segue il cursore */
.p-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, .22), transparent 55%);
  transition: opacity .3s ease;
}
.p-card:hover .p-glare { opacity: 1; }

.p-media {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1 / 1;
  margin: 10px 10px 0;
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 253, 247, .9), transparent 60%),
    linear-gradient(160deg, #ffe28a, #e2a400);
  flex-shrink: 0;
}
.p-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* niente ingrandimento a riposo: anche l'1% ricampiona la foto e la rende meno nitida */
  transition: transform .7s cubic-bezier(.22, .61, .36, 1);
}
.p-card:hover .p-media img { transform: scale(1.08); }

.p-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  z-index: 1;
  background: rgba(255, 253, 247, .95);
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-ink);
  box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .25);
}

.p-price {
  position: absolute;
  z-index: 1;
  right: 12px;
  bottom: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--text);
  color: #fffdf7;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .45);
}

.p-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.p-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  text-wrap: balance;
}

.p-desc {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* card create dai prodotti dello shop */
.p-noimg { display: grid; place-items: center; width: 100%; height: 100%; font-size: 64px; background: linear-gradient(160deg, #fff3c4, #ffe28a); }
.p-card.is-soldout .p-media img { filter: grayscale(.35); }
.p-skeleton { min-height: 460px; pointer-events: none; background: linear-gradient(100deg, rgba(255,255,255,.5) 30%, rgba(255,243,196,.8) 50%, rgba(255,255,255,.5) 70%) 0 0 / 200% 100%; animation: p-shimmer 1.4s linear infinite; }
@keyframes p-shimmer { to { background-position: -200% 0; } }
.p-fallback { align-items: center; justify-content: center; gap: 14px; min-height: 260px; padding: 24px; text-align: center; }
.p-fallback .p-noimg { width: 96px; height: 96px; border-radius: 50%; font-size: 44px; }

.p-cta {
  position: relative;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 10px 18px;
  border-radius: 999px;
  overflow: hidden;
  isolation: isolate;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-ink);
  background: rgba(226, 164, 0, .12);
  transition: color .35s ease;
}
.p-body .p-cta { margin-top: 14px; }
/* riempimento "miele" che sale da sinistra */
.p-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s cubic-bezier(.22, .61, .36, 1);
}
.p-cta span { transition: transform .35s ease; }
.p-card:hover .p-cta,
.p-card:focus-visible .p-cta { color: var(--text); }
.p-card:hover .p-cta::before,
.p-card:focus-visible .p-cta::before { transform: scaleX(1); }
.p-card:hover .p-cta span,
.p-card:focus-visible .p-cta span { transform: translateX(4px); }

/* entrata a cascata */
.p-rail[data-stagger] .p-card {
  opacity: 0;
  translate: 0 36px;
  transition:
    opacity .7s ease,
    translate .7s cubic-bezier(.22, .61, .36, 1),
    transform .5s cubic-bezier(.22, .61, .36, 1),
    box-shadow .4s ease;
}
.p-rail[data-stagger].is-in .p-card { opacity: 1; translate: 0 0; }
.p-rail[data-stagger].is-in .p-card:nth-child(2) { transition-delay: .12s, .12s, 0s, 0s; }
.p-rail[data-stagger].is-in .p-card:nth-child(3) { transition-delay: .24s, .24s, 0s, 0s; }
.p-rail[data-stagger].is-in .p-card:nth-child(4) { transition-delay: .36s, .36s, 0s, 0s; }
.p-rail[data-stagger].is-in .p-card.is-tilting { transition: transform .08s linear, box-shadow .4s ease; }

/* frecce: visibili solo se la vetrina scorre */
.p-nav {
  position: absolute;
  top: 42%;
  z-index: 4;
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  color: var(--text);
  background: rgba(255, 253, 247, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .3);
  transition: transform .2s ease, background .2s ease, opacity .2s ease;
}
.p-nav:hover { transform: scale(1.08); background: var(--accent); }
.p-nav:disabled { opacity: .35; cursor: default; transform: none; background: rgba(255, 253, 247, .92); }
.p-spotlight.is-scrollable .p-nav { display: flex; }
.p-prev { left: -6px; }
.p-next { right: -6px; }

.p-dots {
  display: none;
  justify-content: center;
  gap: 8px;
  margin-top: -12px;
}
.p-spotlight.is-scrollable .p-dots { display: flex; }
.p-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(226, 164, 0, .3);
  transition: width .35s ease, background .35s ease;
}
.p-dots button.is-active { width: 26px; background: var(--brand); }

@media (max-width: 640px) {
  .p-rail { gap: 16px; padding-inline: 4px; }
  .p-prev { left: 2px; }
  .p-next { right: 2px; }
  .p-nav { width: 36px; height: 36px; font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .p-card,
  .p-rail[data-stagger] .p-card { transition: none !important; transform: none !important; opacity: 1 !important; translate: none !important; }
  .p-media img, .p-cta::before { transition: none; }
}

/* ---- SHOP REDESIGN ---- */

/* Header shop: carrello a destra */
.shop-body .main-nav { flex: 1; }
.cart-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px !important;
  border-radius: 999px;
  color: var(--text) !important;
  font-size: 15px;
  font-weight: 600;
  background: var(--card);
  border: 1px solid rgba(0, 0, 0, .08);
  box-shadow: 0 6px 16px -12px rgba(0, 0, 0, .35);
  transition: background .2s ease, border-color .2s ease;
}
.cart-btn:hover { background: var(--accent) !important; }
.cart-btn.has-items { border-color: rgba(226, 164, 0, .6); }
.cart-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, .06);
  color: var(--muted);
  transition: background .25s ease, color .25s ease;
}
.cart-btn.has-items .cart-count { background: var(--brand); color: var(--text); }
.is-bump { animation: cart-bump .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes cart-bump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}
@media (max-width: 700px) {
  .hide-mobile { display: none !important; }
}

/* Hero */
.shop-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fffdf7;
  text-align: center;
}
.shop-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 55% at 50% 50%, rgba(31, 26, 18, .45), transparent 75%),
    linear-gradient(180deg, rgba(31, 26, 18, .35) 0%, rgba(31, 26, 18, .55) 60%, rgba(122, 82, 0, .75) 100%),
    url('/images/ormiele-panorama-web.jpg') center 40% / cover no-repeat;
}
.shop-hero-inner {
  padding: clamp(64px, 11vw, 120px) 20px clamp(96px, 12vw, 132px);
  max-width: 760px;
}
.shop-hero-eyebrow { color: var(--accent); }
.shop-hero-eyebrow::before,
.shop-hero-eyebrow::after { background: rgba(255, 226, 138, .7); }
.shop-hero-title {
  margin: 14px 0 12px;
  font-size: clamp(32px, 5.4vw, 56px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.02em;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .25);
}
.shop-hero-lead {
  margin: 0 auto 26px;
  max-width: 52ch;
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.5;
  color: rgba(255, 253, 247, .9);
}
.shop-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(180deg, #ffe28a, #e2a400);
  box-shadow: 0 16px 34px -14px rgba(226, 164, 0, .8);
  transition: transform .2s ease, box-shadow .2s ease;
}
.shop-hero-cta:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -14px rgba(226, 164, 0, .9); }
.shop-hero-cta span { display: inline-block; animation: nudge-down 1.6s ease-in-out infinite; }
@keyframes nudge-down { 50% { transform: translateY(3px); } }

/* Come funziona: 3 passi sovrapposti all hero */
.shop-steps {
  list-style: none;
  margin: -58px auto 0;
  padding: 10px;
  max-width: 1000px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  position: relative;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 24px 50px -30px rgba(60, 40, 0, .45);
}
.shop-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  transition: background .25s ease;
}
.shop-step:hover { background: rgba(255, 226, 138, .25); }
.shop-step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-weight: 800;
  font-size: 17px;
  color: var(--brand-ink);
  background: linear-gradient(160deg, #fff3c4, #ffe28a);
  border: 1px solid rgba(226, 164, 0, .35);
}
.shop-step div { display: flex; flex-direction: column; gap: 2px; }
.shop-step strong { font-size: 15px; }
.shop-step span:not(.shop-step-num) { font-size: 13px; color: var(--muted); line-height: 1.35; }
@media (max-width: 760px) {
  .shop-steps { grid-template-columns: 1fr; margin-top: -48px; gap: 0; }
  .shop-step { padding: 10px 12px; }
}

/* Sezioni shop */
.shop-section { padding: 56px 0 8px; }
.shop-section-title { margin-top: 6px; font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
.shop-products-msg { text-align: center; }

/* Griglia prodotti */
.shop-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
  justify-content: center;
  gap: 28px;
  margin: 24px auto 0;
}

/* Skeleton durante il caricamento */
.shop-skeleton {
  height: 520px;
  border-radius: 22px;
  background: linear-gradient(100deg, rgba(0,0,0,.04) 30%, rgba(255,226,138,.35) 50%, rgba(0,0,0,.04) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -300% 0; } }

/* Card prodotto */
.shop-product-card {
  --rx: 0deg;
  --ry: 0deg;
  --gx: 50%;
  --gy: 0%;
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(140deg, rgba(0,0,0,.07), rgba(0,0,0,.07)) border-box;
  box-shadow: 0 12px 32px -20px rgba(60, 40, 0, .4);
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: flat;
  isolation: isolate;
  transition: transform .5s cubic-bezier(.22, .61, .36, 1), box-shadow .4s ease;
  opacity: 0;
  translate: 0 30px;
}
.shop-products-grid.is-in .shop-product-card {
  opacity: 1;
  translate: 0 0;
  transition:
    opacity .7s ease calc(var(--i) * .1s),
    translate .7s cubic-bezier(.22, .61, .36, 1) calc(var(--i) * .1s),
    transform .5s cubic-bezier(.22, .61, .36, 1),
    box-shadow .4s ease;
}
.shop-products-grid.is-in .shop-product-card.is-tilting {
  transition: transform .08s linear, box-shadow .4s ease;
}
.shop-product-card:hover {
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(140deg, #ffe28a, #e2a400 45%, #7a5200) border-box;
  box-shadow: 0 30px 60px -28px rgba(122, 82, 0, .55);
}
.shop-product-glare {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, .22), transparent 55%);
  transition: opacity .3s ease;
}
.shop-product-card:hover .shop-product-glare { opacity: 1; }
.shop-product-card.is-soldout { filter: grayscale(.7); }

.shop-product-media {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1 / 1;
  margin: 10px 10px 0;
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 253, 247, .95), transparent 60%),
    linear-gradient(160deg, #ffe28a, #e2a400);
}
.shop-product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .7s cubic-bezier(.22, .61, .36, 1);
}
.shop-product-card:hover .shop-product-media img { transform: scale(1.08); }

.shop-product-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.jar-illustration {
  width: 46%;
  height: auto;
  filter: drop-shadow(0 18px 20px rgba(122, 82, 0, .35));
  transition: transform .6s cubic-bezier(.22, .61, .36, 1);
}
.shop-product-card:hover .jar-illustration { transform: translateY(-6px) rotate(-4deg) scale(1.04); }

.shop-product-tag,
.shop-product-low {
  position: absolute;
  top: 12px;
  z-index: 1;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.shop-product-tag { left: 12px; background: rgba(255, 253, 247, .95); color: var(--brand-ink); }
.shop-product-low {
  right: 12px;
  background: rgba(160, 48, 48, .9);
  color: #fff;
  animation: pulse-low 2s ease-in-out infinite;
}
@keyframes pulse-low { 50% { box-shadow: 0 0 0 6px rgba(160, 48, 48, .15); } }

.shop-product-price {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fffdf7;
  background: var(--text);
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .45);
}

.shop-product-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.shop-product-name {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}
.shop-product-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.shop-product-stock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.shop-product-stock::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.shop-product-stock.is-ok  { color: #3f7d3a; }
.shop-product-stock.is-low { color: #c0392b; }
.shop-product-stock.is-out { color: var(--muted); }

/* scelta del formato (250 g / 500 g) */
.size-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 4px; }
.size-opt {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid rgba(226, 164, 0, .35); background: #fffdf7;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--text);
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .15s ease;
}
.size-opt:hover { border-color: var(--brand); transform: translateY(-1px); }
.size-opt.is-active { background: var(--text); border-color: var(--text); color: #fffdf7; }
.size-opt.is-out span { text-decoration: line-through; opacity: .6; }
.size-opt small { font-size: 11px; font-weight: 600; opacity: .75; }
.size-opt:focus-visible { outline: 3px solid rgba(226, 164, 0, .5); outline-offset: 2px; }
.size-single { margin: 0; font-size: 14px; font-weight: 700; color: var(--brand-ink); }

.shop-product-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(226, 164, 0, .1);
  border: 1px solid rgba(226, 164, 0, .25);
}
.qty-stepper button {
  width: 38px;
  height: 44px;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-ink);
  border-radius: 999px;
  transition: background .15s ease;
}
.qty-stepper button:hover:not(:disabled) { background: rgba(226, 164, 0, .2); }
.qty-stepper button:disabled { opacity: .4; cursor: default; }
.qty-value { min-width: 20px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

.shop-product-btn {
  position: relative;
  flex: 1;
  overflow: hidden;
  isolation: isolate;
  height: 46px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  background: linear-gradient(180deg, #ffe28a, #e2a400);
  box-shadow: 0 10px 20px -12px rgba(226, 164, 0, .9);
  transition: transform .15s ease, box-shadow .2s ease, background .3s ease, color .3s ease;
}
/* colata di miele al passaggio */
.shop-product-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #e2a400, #b87c00);
  transform: translateY(101%);
  transition: transform .4s cubic-bezier(.22, .61, .36, 1);
}
.shop-product-btn:hover:not(:disabled)::before { transform: none; }
.shop-product-btn:hover:not(:disabled) { color: #fffdf7; }
.shop-product-btn:active:not(:disabled) { transform: scale(.97); }
.shop-product-btn.is-added,
.shop-product-btn.is-added:hover { background: #3f7d3a; color: #fff; }
.shop-product-btn.is-added::before { transform: translateY(101%) !important; }
.shop-product-btn:disabled {
  cursor: default;
  background: rgba(0, 0, 0, .06);
  color: var(--muted);
  box-shadow: none;
}

.fly-ghost {
  position: fixed;
  z-index: 100;
  border-radius: 50%;
  object-fit: cover;
  overflow: hidden;
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  background: #ffe28a;
}

/* Pannello carrello laterale */
html.cart-open { overflow: hidden; }
.cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(31, 26, 18, .45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .3s ease;
}
.cart-backdrop.is-open { opacity: 1; }
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 71;
  width: min(460px, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  box-shadow: -24px 0 60px -24px rgba(0, 0, 0, .45);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.22, .61, .36, 1);
}
.cart-drawer.is-open { transform: none; }
.cart-drawer[hidden], .cart-backdrop[hidden] { display: none; }
@media (max-width: 520px) { .cart-drawer { width: 100vw; } }

.cd-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 18px 20px 14px;
  background: var(--card);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.cd-titles { flex: 1; min-width: 0; }
.cd-head h2 { margin: 2px 0 8px; font-size: 21px; font-weight: 800; }
.cd-steps { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cd-steps li {
  flex: 1;
  padding-top: 7px;
  border-top: 3px solid rgba(0, 0, 0, .08);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  transition: border-color .3s ease, color .3s ease;
}
.cd-steps li.is-active { border-top-color: var(--brand); color: var(--brand-ink); }
.cd-close, .cd-back {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  cursor: pointer;
  font-size: 17px;
  color: var(--text);
  transition: background .15s ease;
}
.cd-close:hover, .cd-back:hover { background: var(--accent); }

.cd-body {
  position: relative;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 20px 20px;
}
.cd-step { display: none; }
.cd-step.is-active { display: block; animation: step-in .35s cubic-bezier(.22, .61, .36, 1); }
#checkoutPanel.is-active { animation-name: step-in-right; }
@keyframes step-in { from { opacity: 0; transform: translateX(-16px); } }
@keyframes step-in-right { from { opacity: 0; transform: translateX(16px); } }

.cd-foot {
  padding: 14px 20px calc(16px + env(safe-area-inset-bottom));
  background: var(--card);
  border-top: 1px solid rgba(0, 0, 0, .06);
  box-shadow: 0 -12px 30px -24px rgba(0, 0, 0, .35);
}
.cd-foot .btn-checkout { margin-top: 12px; }
.cd-foot .btn-checkout[hidden], .cd-back[hidden] { display: none; }
.cart-drawer .ship-options { grid-template-columns: 1fr 1fr; }
.cart-drawer .ship-option-box { padding: 12px; }
.cd-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); text-align: center; }

/* Carrello vuoto */
.cart-empty-msg {
  text-align: center;
  padding: 48px 8px 8px;
  color: var(--muted);
}
.cart-empty-jar { display: inline-block; animation: float-jar 3.5s ease-in-out infinite; }
@keyframes float-jar { 50% { transform: translateY(-6px) rotate(-3deg); } }
.cart-empty-msg p { margin: 8px 0 12px; font-size: 14px; line-height: 1.5; }
.cart-empty-msg strong { color: var(--text); }
.cart-empty-link { padding: 10px 18px; border: 0; border-radius: 999px; background: var(--accent); cursor: pointer; font-size: 14px; font-weight: 700; color: var(--brand-ink); }
.cart-empty-link:hover { background: var(--brand); color: var(--text); }

/* Righe carrello */
.cart-drawer .cart-list { margin: 0 0 8px; }
.cart-drawer .cart-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  grid-template-areas:
    "thumb info info remove"
    "thumb qty  total total";
  align-items: center;
  gap: 4px 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.cart-drawer .cart-item.is-new { animation: item-in .5s cubic-bezier(.22, .61, .36, 1); }
@keyframes item-in {
  from { opacity: 0; transform: translateX(16px); background: rgba(255, 226, 138, .5); }
}
.cart-thumb {
  grid-area: thumb;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(160deg, #fff3c4, #ffe28a);
  display: grid;
  place-items: center;
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-thumb .jar-illustration { width: 70%; filter: none; }
.cart-thumb-ph { font-size: 22px; }
.cart-info { grid-area: info; display: flex; flex-direction: column; min-width: 0; }
.cart-drawer .cart-name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-unit { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--muted); }
.cart-size { padding: 1px 8px; border-radius: 999px; background: var(--text); color: #fffdf7; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.shop-product-card.is-highlight { box-shadow: 0 0 0 3px var(--brand), 0 24px 50px -24px rgba(122, 82, 0, .55); transition: box-shadow .4s ease; }
.cart-drawer .cart-qty {
  grid-area: qty;
  justify-self: start;
  gap: 2px;
  border-radius: 999px;
  background: rgba(226, 164, 0, .1);
}
.cart-drawer .cart-qty button {
  width: 28px;
  height: 28px;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: none;
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-ink);
}
.cart-drawer .cart-qty button:hover { background: rgba(226, 164, 0, .25); }
.cart-drawer .cart-qty span { min-width: 20px; font-weight: 700; font-size: 14px; }
.cart-drawer .cart-line-total { grid-area: total; justify-self: end; font-weight: 700; font-size: 15px; }
.cart-remove {
  grid-area: remove;
  justify-self: end;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
  transition: background .15s ease, color .15s ease;
}
.cart-remove:hover { background: rgba(160, 48, 48, .1); color: #a03030; }

.cart-drawer .cart-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  border: 0;
  text-align: left;
}
.cart-drawer .cart-total:empty { display: none; }
.cart-total-label { font-weight: 700; font-size: 16px; }
.cart-total-label small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.cart-total-amount { font-size: 26px; font-weight: 800; color: var(--brand-ink); }

/* Form checkout */
.cd-form { margin: 8px 0 0; display: flex; flex-direction: column; gap: 14px; }
.checkout-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .checkout-form-row { grid-template-columns: 1fr; } }

.cd-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text); }
.cd-form label > span,
.ship-options legend { font-weight: 700; font-size: 13px; color: var(--muted); }

.cd-form input[type="text"],
.cd-form input[type="email"],
.cd-form input[type="tel"],
.cd-form textarea {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .12);
  font: inherit;
  font-size: 15px;
  background: var(--bg);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.cd-form input:focus,
.cd-form textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(226, 164, 0, .15);
}

/* Scelta consegna a tessere */
.ship-options { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ship-options legend { padding: 0; margin-bottom: 6px; }
.ship-option { position: relative; cursor: pointer; }
.ship-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ship-option-box {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
  border-radius: 14px;
  border: 1.5px solid rgba(0, 0, 0, .1);
  background: var(--bg);
  color: var(--muted);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.ship-option-box svg { margin-bottom: 6px; color: var(--brand-ink); }
.ship-option-box strong { font-size: 14px; color: var(--text); }
.ship-option-box small { font-size: 12px; }
.ship-option:hover .ship-option-box { border-color: rgba(226, 164, 0, .6); }
.ship-option input:checked + .ship-option-box {
  border-color: var(--brand);
  background: rgba(255, 226, 138, .3);
  box-shadow: 0 0 0 4px rgba(226, 164, 0, .15);
}
.ship-option input:focus-visible + .ship-option-box { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 420px) { .ship-options { grid-template-columns: 1fr; } }

/* indirizzo che si apre con animazione */
.address-group {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: -14px;
  transition: grid-template-rows .4s ease, opacity .3s ease, margin-top .4s ease;
}
.address-group > div { overflow: hidden; }
.address-group.is-open { grid-template-rows: 1fr; opacity: 1; margin-top: 0; }

/* spunta "Pago al ritiro" */
.cd-form label.pay-pickup { flex-direction: row; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid rgba(226, 164, 0, .35); background: #fffdf7; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.pay-pickup input { flex-shrink: 0; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand-ink); cursor: pointer; }
.pay-pickup-box { display: flex; flex-direction: column; gap: 2px; }
.pay-pickup-box strong { font-size: 14px; color: var(--text); }
.pay-pickup-box small { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.cd-form label.pay-pickup:has(input:checked) { border-color: var(--brand); background: #fff6d8; }

.checkout-checkbox {
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 10px !important;
  font-size: 13px !important;
  color: var(--muted) !important;
}
.checkout-checkbox input[type="checkbox"] {
  margin-top: 1px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--brand);
}
.checkout-checkbox span { font-weight: 400 !important; font-size: 13px !important; }

.btn-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 20px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  background: linear-gradient(180deg, #ffe28a, #e2a400);
  box-shadow: 0 16px 30px -14px rgba(226, 164, 0, .9);
  transition: transform .15s ease, box-shadow .2s ease;
}
.btn-checkout span:last-child { transition: transform .25s ease; }
.btn-checkout:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 20px 36px -14px rgba(226, 164, 0, 1); }
.btn-checkout:hover:not(:disabled) span:last-child { transform: translateX(5px); }
.btn-checkout:disabled { opacity: .55; cursor: default; }
.btn-checkout.is-loading span:last-child {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  font-size: 0;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.form-msg { margin: 0; color: #a03030; }
.form-msg:empty { display: none; }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Toast */
.shop-toast {
  position: fixed;
  top: 84px;
  left: 50%;
  z-index: 80;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--card);
  border-left: 4px solid var(--brand);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .35);
  transform: translate(-50%, -20px);
  opacity: 0;
  pointer-events: none;
  transition: transform .35s cubic-bezier(.22, .61, .36, 1), opacity .3s ease;
}
.shop-toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

html:has(.shop-body) { scroll-behavior: smooth; scroll-padding-top: 90px; }

@media (prefers-reduced-motion: reduce) {
  html:has(.shop-body) { scroll-behavior: auto; }
  .shop-hero-bg,
  .shop-hero-cta span,
  .cart-empty-jar,
  .shop-product-low,
  .shop-skeleton { animation: none; }
  .shop-product-card { opacity: 1; translate: none; transition: none !important; }
  .address-group,
  .shop-toast { transition: none; }
}

/* ---- PAGINA INFORMATIVA PRIVACY ---- */
.legal { max-width: 1100px; margin: 0 auto; padding: 0 20px 56px; }
.legal-hero { padding: 48px 0 28px; border-bottom: 1px solid rgba(0, 0, 0, .07); margin-bottom: 32px; }
.legal-hero h1 { margin: 8px 0 12px; font-size: clamp(30px, 4.5vw, 44px); font-weight: 800; letter-spacing: -.02em; }
.legal-lead { margin: 0; max-width: 62ch; font-size: 18px; line-height: 1.55; color: var(--muted); }
.legal-meta { margin: 14px 0 0; font-size: 13px; font-weight: 600; color: var(--brand-ink); }
.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.legal-toc { position: sticky; top: 96px; padding: 18px 20px; border-radius: 18px; background: var(--card); box-shadow: 0 12px 30px -22px rgba(60, 40, 0, .4); }
.legal-toc-title { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-ink); }
.legal-toc ol { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.4; }
.legal-toc li { margin: 6px 0; color: var(--muted); }
.legal-toc a { color: var(--text); text-decoration: none; }
.legal-toc a:hover { color: var(--brand-ink); text-decoration: underline; }
.legal-content { max-width: 72ch; font-size: 16px; line-height: 1.65; }
.legal-content section { padding-bottom: 12px; scroll-margin-top: 96px; }
.legal-content h2 { display: flex; align-items: center; gap: 12px; margin: 28px 0 10px; font-size: 21px; font-weight: 800; line-height: 1.25; }
.legal-content section:first-child h2 { margin-top: 0; }
.legal-content h2 span { flex-shrink: 0; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(160deg, #fff3c4, var(--accent)); border: 1px solid rgba(226, 164, 0, .35); font-size: 15px; color: var(--brand-ink); }
.legal-content p { margin: 0 0 12px; }
.legal-content ul { margin: 0 0 12px; padding-left: 22px; }
.legal-content li { margin: 6px 0; }
.legal-content li::marker { color: var(--brand); }
.legal-content a { color: var(--brand-ink); }
.legal-card { margin: 4px 0 14px; padding: 16px 20px; border-radius: 16px; background: var(--card); border-left: 4px solid var(--brand); font-style: normal; box-shadow: 0 10px 26px -22px rgba(60, 40, 0, .4); }
.legal .todo { padding: 1px 6px; border-radius: 6px; background: #fde8e8; color: #a03030; font-weight: 700; }
.legal-back { margin-top: 32px; }
.legal-back .btn { text-decoration: none; padding: 12px 20px; }
@media (max-width: 860px) {
  .legal-layout { grid-template-columns: 1fr; gap: 24px; }
  .legal-toc { position: static; }
  .legal-hero { padding-top: 32px; }
}

/* link nella spunta privacy e nel footer */
.checkout-checkbox a { color: var(--brand-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.footer-links { display: inline-flex; gap: 16px; }
.legal-short { max-width: 780px; }
.legal-short .legal-content { max-width: none; }
.legal-small { font-size: 14px; color: var(--muted); }

/* ---- CONTATTI (home) ---- */
.contact-section { background: rgba(255, 253, 247, 0.7); }
.contact-wrap {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr);
  margin: 28px auto 12px;
  max-width: 1040px;
  border-radius: 22px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(0, 0, 0, .06);
  box-shadow: 0 10px 30px -20px rgba(60, 40, 0, .3);
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 36px 32px;
  justify-content: center;
  color: var(--text);
  background: var(--bg);
  border-right: 1px solid rgba(0, 0, 0, .06);
}
.contact-info-title { margin: 0 0 6px; font-size: 24px; font-weight: 800; }
.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .06);
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
a.contact-row:hover { border-color: rgba(226, 164, 0, .45); transform: translateX(3px); }
.contact-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff6d8;
  border: 1px solid rgba(226, 164, 0, .25);
}
.contact-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--brand-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-text { display: flex; flex-direction: column; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.contact-text small { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-ink); }
.contact-shop {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 226, 138, .35);
  border: 1px solid rgba(226, 164, 0, .25);
  transition: transform .25s ease, background .25s ease;
}
.contact-shop span { font-size: 13px; color: var(--muted); }
.contact-shop strong { color: var(--brand-ink); }
.contact-shop:hover { transform: translateY(-2px); background: rgba(255, 226, 138, .55); }

.contact-form { display: flex; flex-direction: column; gap: 16px; padding: 36px 32px; }
.contact-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* campi con etichetta che "galleggia" */
.cf-field { position: relative; display: block; }
.cf-field input,
.cf-field textarea {
  width: 100%;
  padding: 22px 16px 8px;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 14px;
  background: var(--bg);
  font: inherit;
  font-size: 16px;
  color: var(--text);
  resize: vertical;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.cf-field textarea { min-height: 140px; }
.cf-field span {
  position: absolute;
  left: 17px;
  top: 16px;
  font-size: 16px;
  color: var(--muted);
  pointer-events: none;
  transform-origin: left top;
  transition: transform .2s ease, color .2s ease;
}
.cf-field input:focus,
.cf-field textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(226, 164, 0, .15);
}
.cf-field input:focus + span,
.cf-field input:not(:placeholder-shown) + span,
.cf-field textarea:focus + span,
.cf-field textarea:not(:placeholder-shown) + span {
  transform: translateY(-9px) scale(.75);
  color: var(--brand-ink);
  font-weight: 700;
}

.cf-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-topics label { cursor: pointer; }
.cf-topics input { position: absolute; opacity: 0; pointer-events: none; }
.cf-topics span {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(0, 0, 0, .1);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: all .2s ease;
}
.cf-topics label:hover span { border-color: rgba(226, 164, 0, .6); }
.cf-topics input:checked + span { background: var(--text); border-color: var(--text); color: #fffdf7; }
.cf-topics input:focus-visible + span { outline: 3px solid rgba(226, 164, 0, .5); outline-offset: 2px; }

.cf-error { margin: 0; color: #a03030; font-weight: 600; font-size: 14px; }
.cf-error:empty { display: none; }
.cf-submit {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  background: linear-gradient(180deg, #ffe28a, var(--brand));
  box-shadow: 0 8px 18px -12px rgba(226, 164, 0, .7);
  transition: transform .2s ease, box-shadow .2s ease;
}
.cf-submit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
.cf-submit:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -12px rgba(226, 164, 0, .8); }
.cf-submit:hover svg { transform: translateX(4px); }
.cf-note { margin: 0; font-size: 13px; color: var(--muted); }
.cf-note a { color: var(--brand-ink); font-weight: 600; }
.cf-submit:disabled { opacity: .7; cursor: wait; transform: none; }
.contact-form[hidden] { display: none; }
.contact-sent { align-items: center; justify-content: center; text-align: center; min-height: 320px; outline: none; }
.contact-sent h3 { margin: 4px 0 0; font-size: 22px; }
.contact-sent p { margin: 0; color: var(--muted); }
.cs-check svg { width: 64px; height: 64px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cs-check circle { stroke: var(--brand); stroke-width: 3; fill: rgba(226, 164, 0, .08); }
.cs-check path { stroke: var(--brand-ink); stroke-width: 3.5; stroke-dasharray: 40; stroke-dashoffset: 40; animation: cs-draw .5s .15s ease forwards; }
@keyframes cs-draw { to { stroke-dashoffset: 0; } }
.cf-again { margin-top: 6px; border: 0; background: none; font: inherit; font-weight: 700; color: var(--brand-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 820px) {
  .contact-wrap { grid-template-columns: 1fr; border-radius: 22px; }
  .contact-info { border-right: 0; border-bottom: 1px solid rgba(0, 0, 0, .06); }
  .contact-info, .contact-form { padding: 26px 20px; }
  .contact-shop { margin-top: 8px; }
}
@media (max-width: 520px) {
  .contact-form-row { grid-template-columns: 1fr; }
  .cf-submit { align-self: stretch; justify-content: center; }
}

/* ---- GALLERIA HERO (home) ---- */
.hero-gallery {
  position: relative;
  width: 100%;
  max-width: 470px;
  margin-left: auto;
  padding: 0 0 0 18px;
}
@media (max-width: 900px) { .hero-gallery { max-width: 560px; margin: 8px auto 0; padding: 0 10px; } }

/* due "fogli" dietro la foto, per dare profondità */
.hg-stack span {
  position: absolute;
  inset: 0 0 76px 18px;
  border-radius: 26px;
  transition: transform .6s cubic-bezier(.22, .61, .36, 1);
}
.hg-stack span:first-child { background: linear-gradient(160deg, #fff3c4, #ffe28a); transform: rotate(-5deg) translate(-10px, 8px); }
.hg-stack span:last-child  { background: rgba(226, 164, 0, .28); transform: rotate(3.5deg) translate(8px, 6px); }
.hero-gallery:hover .hg-stack span:first-child { transform: rotate(-7deg) translate(-16px, 10px); }
.hero-gallery:hover .hg-stack span:last-child  { transform: rotate(5deg) translate(12px, 8px); }
@media (max-width: 900px) { .hg-stack span { inset: 0 10px 76px 10px; } }

.hg-frame {
  position: relative;
  aspect-ratio: 1 / 1.08;
  border-radius: 26px;
  overflow: hidden;
  background: #2a2216;
  box-shadow: 0 30px 60px -30px rgba(60, 40, 0, .6);
  isolation: isolate;
}
@media (max-width: 900px) { .hg-frame { aspect-ratio: 4 / 3.4; } }

.hg-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity .9s ease, transform 1.4s cubic-bezier(.22, .61, .36, 1);
  z-index: 0;
}
.hg-slide.is-active { opacity: 1; transform: scale(1); z-index: 1; }

.hg-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(20, 14, 4, .35), transparent 22%),
    linear-gradient(to top, rgba(20, 14, 4, .7), transparent 45%);
}

/* barre di avanzamento in stile "storie" */
.hg-progress { position: absolute; z-index: 3; top: 14px; left: 16px; right: 16px; display: flex; gap: 6px; }
.hg-progress span { flex: 1; height: 3px; border-radius: 3px; overflow: hidden; background: rgba(255, 253, 247, .35); }
.hg-progress i { display: block; height: 100%; background: #fffdf7; transform: scaleX(0); transform-origin: left; }
.hg-progress span.is-done i { transform: scaleX(1); }
.hg-progress span.is-active i { animation: hg-fill 6s linear forwards; }
.hero-gallery.is-paused .hg-progress span.is-active i { animation-play-state: paused; }
@keyframes hg-fill { to { transform: scaleX(1); } }

.hg-caption {
  position: absolute;
  z-index: 3;
  left: 20px;
  right: 20px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  color: #fffdf7;
}
.hg-count { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--accent); font-variant-numeric: tabular-nums; }
.hg-caption strong { font-size: 22px; font-weight: 800; line-height: 1.2; }
.hg-sub { font-size: 14px; color: rgba(255, 253, 247, .85); }
.hg-caption strong, .hg-sub { animation: hg-text .6s ease; }
@keyframes hg-text { from { opacity: 0; transform: translateY(6px); } }

.hg-nav {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(255, 253, 247, .85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .4);
  opacity: 0;
  transform: translateY(-50%) scale(.9);
  transition: opacity .25s ease, transform .25s ease, background .2s ease;
}
.hg-nav svg { width: 18px; height: 18px; fill: none; stroke: var(--text); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hg-prev { left: 12px; }
.hg-next { right: 12px; }
.hero-gallery:hover .hg-nav,
.hg-nav:focus-visible { opacity: 1; transform: translateY(-50%) scale(1); }
.hg-nav:hover { background: var(--accent); }
@media (hover: none) { .hg-nav { opacity: 1; transform: translateY(-50%) scale(.9); } }

.hg-thumbs { position: relative; display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.hg-thumb {
  width: 64px;
  height: 52px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #eee;
  opacity: .55;
  transition: opacity .25s ease, border-color .25s ease, transform .25s ease;
}
.hg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hg-thumb:hover { opacity: .85; transform: translateY(-2px); }
.hg-thumb.is-active { opacity: 1; border-color: var(--brand); box-shadow: 0 6px 16px -8px rgba(226, 164, 0, .9); }
.hg-thumb:focus-visible { outline: 3px solid rgba(226, 164, 0, .5); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .hg-slide, .hg-stack span, .hg-nav, .hg-thumb { transition: none; }
  .hg-caption strong, .hg-sub { animation: none; }
}

.hero-shop-link { color: var(--brand-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.hero-shop-link:hover { color: var(--text); }

.cd-form .optional { font-style: normal; font-weight: 500; color: var(--muted); opacity: .8; }

/* ---- PAGINA DI RINGRAZIAMENTO ---- */
.thanks { min-height: calc(100vh - 220px); display: grid; place-items: center; padding: 48px 16px; }
.thanks-card {
  width: min(560px, 100%);
  padding: 40px 32px 32px;
  border-radius: 24px;
  text-align: center;
  background: var(--card);
  border: 1px solid rgba(0, 0, 0, .06);
  box-shadow: 0 20px 50px -30px rgba(60, 40, 0, .45);
}
.thanks-check { width: 76px; height: 76px; margin: 0 auto 18px; }
.thanks-check svg { width: 100%; height: 100%; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.thanks-check circle { fill: #fff6d8; stroke: var(--brand); stroke-width: 2.5; }
.thanks-check path { stroke: var(--brand-ink); stroke-width: 3.5; stroke-dasharray: 40; stroke-dashoffset: 40; animation: thanks-draw .6s .25s ease forwards; }
@keyframes thanks-draw { to { stroke-dashoffset: 0; } }
.thanks-card h1 { margin: 0 0 6px; font-size: clamp(26px, 4vw, 32px); font-weight: 800; }
.thanks-order { margin: 0 0 14px; color: var(--muted); }
.thanks-order strong { color: var(--brand-ink); }
.thanks-lead { margin: 0 auto 18px; max-width: 42ch; font-size: 17px; line-height: 1.55; }
.thanks-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 0 24px;
  padding: 14px 16px;
  border-radius: 14px;
  text-align: left;
  background: #fff6d8;
  border: 1px solid rgba(226, 164, 0, .25);
}
.thanks-note svg { flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; fill: none; stroke: var(--brand-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.thanks-note p { margin: 0; font-size: 15px; line-height: 1.5; }
.thanks-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 20px; }
.thanks-btn {
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(180deg, #ffe28a, var(--brand));
  box-shadow: 0 8px 18px -12px rgba(226, 164, 0, .7);
}
.thanks-link { color: var(--brand-ink); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .thanks-check path { animation: none; stroke-dashoffset: 0; } }

/* indirizzo di spedizione su più campi */
.address-fields { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.address-fields .af-street, .address-fields .af-extra { grid-column: 1 / -1; }
.af-note { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

/* ---- SELETTORE LINGUA (header) ---- */
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--muted);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b5d45' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 9px center / 10px 7px;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 999px;
  padding: 6px 26px 6px 11px;
  cursor: pointer;
  flex-shrink: 0;
}
.lang-select:hover { background-color: rgba(0, 0, 0, .03); }
.lang-select:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); border-color: var(--brand); }
.thanks-body .main-nav { margin-left: auto; }
@media (max-width: 700px) {
  .site-body .main-nav { margin-left: auto; gap: 10px; }
}

/* Pagina di ringraziamento: pagamento immediato con TWINT */
.thanks-pay {
  margin: 4px auto 22px;
  padding: 18px 18px 14px;
  max-width: 420px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  box-shadow: 0 14px 30px -24px rgba(60, 40, 0, .45);
}
.thanks-pay-title { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.thanks-pay-title strong { color: var(--brand-ink); white-space: nowrap; }
.thanks-pay-btn { display: inline-block; border-radius: 6px; line-height: 0; transition: transform .15s ease, box-shadow .15s ease; }
.thanks-pay-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .5); }
.thanks-pay-btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.thanks-pay-btn img { display: block; width: 227px; height: 50px; }
.thanks-pay-note { margin: 10px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
