/* Raccontano, collana relazioni. Un solo foglio per tutte le pagine. */
:root {
  --carta: #F3E6D2;
  --carta-chiara: #FBF2E6;
  --inchiostro: #1E1616;
  --testo: #3A2F2B;
  --grigio: #75665E;
  --bordo: #E5D3BA;
  --rosso: #A3181B;
  --rosso-scuro: #7F1215;
  --rosso-tenue: #F6E3DC;
  --ombra: 0 10px 30px rgba(60, 30, 20, .10);
  --serif-titoli: 'Cormorant Garamond', Georgia, serif;
  --serif-testo: 'DM Sans', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background:
    url(img/grana.webp) 0 0 / 280px 280px repeat,
    url(img/sfondo.webp) top center / 100% auto repeat-y,
    var(--carta);
  color: var(--testo);
  font-family: var(--serif-testo);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif-titoli); color: var(--inchiostro); line-height: 1.1; font-weight: 600; letter-spacing: -.005em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 242, 230, .94);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bordo);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo img { height: 40px; width: 40px; }
.logo span { font-family: var(--serif-titoli); font-weight: 600; font-size: 27px; color: var(--inchiostro); line-height: 1; }
.nav { display: flex; gap: 28px; }
.nav a { text-decoration: none; font-family: var(--serif-titoli); font-size: 16px; color: var(--inchiostro); }
.nav a:hover { color: var(--rosso); }
.back-link { text-decoration: none; font-size: 15px; color: var(--grigio); min-width: 90px; }
.back-link:hover { color: var(--rosso); }
.header-spacer { min-width: 90px; }
@media (max-width: 640px) {
  .nav { gap: 16px; }
  .nav a { font-size: 15px; }
  .nav .nav-hide { display: none; }
  .logo img { height: 34px; width: 34px; }
  .logo span { font-size: 24px; }
  .back-link, .header-spacer { min-width: 70px; font-size: 14px; }
}

/* Bottoni */
.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; border: 0; cursor: pointer; text-decoration: none; text-align: center;
  background: var(--rosso); color: #fff; border-radius: 999px;
  font-family: var(--serif-testo); font-weight: 600; font-size: 16px; line-height: 1.2; letter-spacing: .01em;
  padding: 14px 32px; box-shadow: 0 6px 16px rgba(163, 24, 27, .22);
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--rosso-scuro); }
.btn:active { transform: translateY(1px); }
.btn .btn-prezzo { font-weight: 400; font-size: 13px; opacity: .9; }
.btn-ghost { background: transparent; color: var(--rosso); border: 2px solid var(--rosso); box-shadow: none; }
.btn-ghost:hover { background: var(--rosso-tenue); }
.btn-block { width: 100%; }

/* Hero */
.hero { text-align: center; padding: 46px 0 6px; }
.hero-logo { width: 280px; height: auto; margin: 0 auto; filter: drop-shadow(0 8px 18px rgba(90, 50, 30, .12)); }
.hero-nome { font-family: var(--serif-titoli); font-weight: 600; font-size: clamp(54px, 8vw, 74px); color: var(--inchiostro); line-height: 1; margin: 20px 0 0; letter-spacing: .02em; }
.fregio { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 16px auto 0; color: var(--rosso); }
.fregio::before, .fregio::after { content: ''; width: 46px; height: 1px; background: currentColor; opacity: .45; }
.fregio i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Sezioni */
section { padding: 44px 0; }
.section-head { text-align: center; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(32px, 5vw, 42px); }
.section-head h2::after { content: ''; display: block; width: 36px; height: 2px; background: var(--rosso); margin: 12px auto 0; border-radius: 2px; }
.section-head p { color: var(--grigio); margin-top: 8px; }
#libri { padding-top: 30px; }
.kicker { display: inline-block; font-family: var(--serif-titoli); font-style: italic; color: var(--rosso); font-size: 16px; margin-bottom: 6px; }

/* Lista libri: card orizzontali colorate, libro appoggiato a sinistra */
.books { display: grid; grid-template-columns: 1fr; gap: 18px; max-width: 640px; margin: 0 auto; }
.book-card {
  position: relative; overflow: hidden; isolation: isolate;
  background: url(img/grana.webp) 0 0 / 280px 280px, var(--tinta, var(--carta-chiara));
  border: 1px solid var(--tinta-bordo, var(--bordo)); border-radius: 20px; padding: 22px 18px 20px 16px;
  box-shadow: 0 2px 4px rgba(60, 30, 20, .07), 0 10px 22px -10px rgba(60, 30, 20, .3);
  text-decoration: none; transition: transform .2s, box-shadow .2s;
  display: grid; grid-template-columns: 116px 1fr; column-gap: 18px; align-items: center;
}
.book-card:hover { transform: translateY(-3px); }
.book-card > :not(.deco) { position: relative; z-index: 1; }
.book-card .cover { grid-row: 1 / span 6; align-self: center; padding: 4px 6px 10px 2px; }
.book-card .cover img.alto { display: block; width: 118%; max-width: none; height: auto; margin: -6px 0 -10px -8%; }
.book-card .step { font-family: var(--serif-testo); color: var(--rosso); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.book-card h3 { font-size: 23px; margin-top: 3px; }
.book-card .sub { font-size: 14px; color: var(--grigio); line-height: 1.5; margin-top: 6px; }
.book-card .price { font-family: var(--serif-testo); font-weight: 600; color: var(--inchiostro); margin-top: 10px; font-size: 16px; }
.book-card .btn { justify-self: start; margin-top: 10px; padding: 9px 24px; font-size: 14px; }
@media (min-width: 700px) {
  .book-card { grid-template-columns: 150px 1fr; column-gap: 26px; padding: 26px 26px 24px 22px; }
}

/* Il libro come oggetto: copertina, piega del dorso, spessore delle pagine e ombra */
.libro3d { position: relative; display: block; width: 100%; transform: rotate(-2deg);
  filter: drop-shadow(0 1px 1px rgba(40, 20, 10, .25)) drop-shadow(5px 9px 9px rgba(50, 25, 15, .22)) drop-shadow(10px 18px 22px rgba(50, 25, 15, .16)); }
.libro3d::before, .libro3d::after { content: ''; position: absolute; border-radius: 0 2px 2px 0; }
.libro3d::before { top: 2px; bottom: -3px; right: -4px; width: 5px;
  background: repeating-linear-gradient(90deg, #FFFDF8 0 1px, #E3D8C6 1px 2px); }
.libro3d::after { left: 3px; right: -4px; bottom: -4px; height: 5px; border-radius: 0 0 2px 2px;
  background: repeating-linear-gradient(180deg, #FFFDF8 0 1px, #E3D8C6 1px 2px); }
.libro3d img { position: relative; z-index: 1; width: 100%; aspect-ratio: 1664 / 2352; object-fit: cover; border-radius: 1px 3px 3px 1px; }
.libro3d .l3-luce { position: absolute; inset: 0; z-index: 2; border-radius: 1px 3px 3px 1px; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.22) 0, rgba(255,255,255,.28) 1.6%, rgba(0,0,0,.12) 3.2%, rgba(255,255,255,.06) 5%, transparent 9%),
    linear-gradient(118deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 38%, rgba(0,0,0,0) 70%, rgba(0,0,0,.06) 100%); }
.libro3d.piccolo, .libro3d.mini { filter: drop-shadow(0 1px 1px rgba(40, 20, 10, .25)) drop-shadow(3px 6px 6px rgba(50, 25, 15, .22)); }
.libro3d.piccolo::before, .libro3d.mini::before { width: 3px; right: -3px; }
.libro3d.piccolo::after, .libro3d.mini::after { height: 3px; bottom: -3px; right: -3px; }

/* Collana: card chiara con mensola, disegni e prezzi */
.bundle-card {
  position: relative; overflow: hidden; isolation: isolate; max-width: 640px; margin: 0 auto; text-align: center;
  background: url(img/grana.webp) 0 0 / 280px 280px, linear-gradient(170deg, #FFFCF6 0%, #FBF1E3 100%);
  border: 1.5px solid #D8B98C; border-radius: 22px; padding: 44px 20px 24px;
  box-shadow: 0 0 0 5px rgba(251, 242, 230, .9), 0 0 0 6px rgba(216, 185, 140, .55), 0 22px 44px -22px rgba(60, 30, 20, .4);
}
.bundle-card > :not(.bdeco) { position: relative; z-index: 1; }
.bundle-ribbon { position: absolute !important; top: 0; left: 50%; transform: translateX(-50%); background: var(--rosso); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; padding: 6px 16px 7px; border-radius: 0 0 10px 10px; white-space: nowrap; }
.mensola { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; align-items: end; max-width: 380px; margin: 0 auto;
  padding: 0 4px 12px; background: linear-gradient(transparent calc(100% - 7px), rgba(150, 110, 70, .22) calc(100% - 7px), rgba(150, 110, 70, .08) 100%); border-radius: 0 0 4px 4px; }
.bundle-card h2 { font-size: clamp(32px, 6vw, 40px); margin-top: 22px; }
.bundle-desc { color: var(--grigio); font-size: 15px; margin: 8px auto 0; max-width: 430px; }
.bundle-prezzi { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 18px; }
.bundle-prezzi .was { display: flex; flex-direction: column; align-items: flex-end; color: var(--grigio); line-height: 1.2; }
.bundle-prezzi .was small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.bundle-prezzi .was s { font-size: 17px; }
.bundle-prezzi .now { font-family: var(--serif-titoli); font-weight: 700; font-size: 44px; color: var(--rosso); line-height: 1; }
.bundle-risparmio { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--rosso); background: var(--rosso-tenue); padding: 4px 12px; border-radius: 999px; }
.bundle-card .btn { margin-top: 16px; max-width: 380px; }
.bundle-link { display: inline-block; margin-top: 12px; font-size: 14px; color: var(--grigio); }
.bdeco { position: absolute; z-index: 0; pointer-events: none; opacity: .75; height: auto; }
.bdeco-1 { width: 66px; top: 18px; left: 10px; transform: rotate(-12deg); }
.bdeco-2 { width: 46px; top: 14px; right: 14px; transform: rotate(10deg); }
.bdeco-3 { width: 62px; bottom: 74px; left: 8px; transform: rotate(-8deg); opacity: .6; }
.bdeco-4 { width: 50px; bottom: 80px; right: 8px; transform: rotate(14deg); opacity: .6; }

/* Recensioni */
.rec-invito { position: relative; max-width: 560px; margin: 0 auto; text-align: center; padding: 26px 22px 24px;
  background: url(img/grana.webp) 0 0 / 280px 280px, var(--carta-chiara); border: 1px solid var(--bordo); border-radius: 20px; }
.rec-invito p { color: var(--grigio); font-size: 15px; position: relative; }
.rec-invito .rec-cta { font-family: var(--serif-titoli); font-style: italic; font-size: 23px; color: var(--inchiostro); margin-top: 14px; line-height: 1.25; }
.rec-canali { display: flex; gap: 10px; justify-content: center; margin-top: 16px; position: relative; }
.rec-canali .btn { padding: 10px 22px; font-size: 14px; }
.rec-deco { position: absolute; pointer-events: none; opacity: .7; height: auto; }
.rec-invito .rec-deco-1 { width: 36px; top: -8px; left: -6px; transform: rotate(-14deg); }
.rec-invito .rec-deco-2 { width: 34px; bottom: 14px; right: 16px; }
.rec-lista { display: grid; gap: 14px; max-width: 640px; margin: 0 auto; }
.rec { position: relative; background: var(--carta-chiara); border: 1px solid var(--bordo); border-radius: 18px; padding: 20px; }
.rec blockquote { font-family: var(--serif-titoli); font-style: italic; font-size: 21px; line-height: 1.35; color: var(--inchiostro); }
.rec figcaption { margin-top: 10px; font-size: 13px; color: var(--grigio); }
.rec .rec-deco-1 { width: 40px; top: 12px; right: 12px; }

/* Newsletter */
.news-card { position: relative; overflow: hidden; isolation: isolate; max-width: 560px; margin: 0 auto; text-align: center; padding: 24px 20px 22px;
  background: url(img/grana.webp) 0 0 / 280px 280px, #F6E7E2; border: 1px solid #E9CFC6; border-radius: 22px; }
.news-card > :not(.ndeco) { position: relative; z-index: 1; }
.news-libro { margin-top: 32px; }
.news-card h2 { font-size: 30px; }
.news-card > p { color: var(--grigio); font-size: 14.5px; margin-top: 6px; line-height: 1.55; }
.ndeco { position: absolute; z-index: 0; pointer-events: none; opacity: .7; height: auto; }
.ndeco-1 { width: 40px; top: 16px; right: 16px; transform: rotate(10deg); }
.ndeco-2 { width: 30px; top: 12px; left: 18px; transform: rotate(-24deg); }
.news-form { display: grid; gap: 10px; margin-top: 16px; text-align: left; }
.news-form input[type=email] { width: 100%; padding: 14px 16px; border: 1.5px solid #E2C9C0; border-radius: 12px; font: inherit; font-size: 16px; background: #fff; color: var(--inchiostro); outline: none; }
.news-form input[type=email]:focus { border-color: var(--rosso); }
.news-ok { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--grigio); cursor: pointer; }
.news-ok input { margin-top: 2px; width: 17px; height: 17px; flex-shrink: 0; accent-color: var(--rosso); }
.news-ok a { color: var(--rosso); }
.news-msg { font-size: 14px; text-align: center; min-height: 1px; }
.news-msg.ok { color: #2F6B3A; } .news-msg.err { color: var(--rosso); }

/* Footer */
.site-footer { background: url(img/grana.webp) 0 0 / 280px 280px, var(--carta-chiara); border-top: 1px solid var(--bordo); color: var(--grigio); padding: 40px 0 48px; margin-top: 40px; font-size: 14px; line-height: 1.6; text-align: center; }
.site-footer .wrap { display: grid; gap: 14px; justify-items: center; max-width: 720px; }
.site-footer a { color: var(--inchiostro); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif-titoli); font-weight: 600; font-size: 27px; color: var(--inchiostro); }
.footer-brand img { width: 44px; height: 44px; }
.footer-legale { font-size: 12.5px; opacity: .85; }

/* Pagina libro */
.product { max-width: 760px; margin: 0 auto; padding: 0 0 40px; }
.palco { position: relative; overflow: hidden; isolation: isolate; display: grid; place-items: center; padding: 34px 20px 58px;
  background: url(img/grana.webp) 0 0 / 280px 280px, var(--tinta, #F6E7E2); border-bottom: 1px solid var(--tinta-bordo, var(--bordo)); }
.palco .libro3d.grande { width: min(200px, 52vw); position: relative; z-index: 1; transform: rotate(-2.5deg);
  filter: drop-shadow(0 1px 1px rgba(40, 20, 10, .25)) drop-shadow(8px 14px 12px rgba(50, 25, 15, .22)) drop-shadow(16px 28px 30px rgba(50, 25, 15, .18)); }
.palco .libro3d.grande::before { width: 7px; right: -6px; } .palco .libro3d.grande::after { height: 7px; bottom: -6px; right: -6px; }
.palco-foto { border-bottom: 1px solid var(--bordo); }
.palco-foto img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.pdeco { position: absolute; z-index: 0; pointer-events: none; opacity: .75; height: auto; }
.pdeco-1 { width: 70px; top: 22px; left: 8%; transform: rotate(-10deg); }
.pdeco-2 { width: 84px; bottom: 50px; right: 7%; transform: rotate(8deg); }
.pdeco-3 { width: 54px; top: 30px; right: 10%; transform: rotate(12deg); }
.pdeco-4 { width: 56px; bottom: 54px; left: 9%; transform: rotate(-6deg); }
.palco-collana { --tinta: #FBF1E3; }
.palco-collana .mensola { width: min(420px, 100%); position: relative; z-index: 1; }
.palco-collana { padding: 74px 18px 82px; }
.palco-collana .pdeco-1 { width: 50px; top: 14px; left: 7%; }
.palco-collana .pdeco-2 { width: 44px; top: 16px; right: 8%; bottom: auto; }
.palco-collana .pdeco-3 { width: 40px; bottom: 34px; right: 12%; top: auto; }
.palco-collana .pdeco-4 { width: 44px; bottom: 32px; left: 10%; }
@media (min-width: 800px) { .palco { padding: 48px 20px 80px; border-radius: 0 0 28px 28px; max-width: 1000px; margin: 0 auto; } }
.product-body { background: url(img/grana.webp) 0 0 / 280px 280px, var(--carta-chiara); border-radius: 22px 22px 0 0; margin-top: -26px; z-index: 2; position: relative; padding: 28px 22px 10px; }
@media (min-width: 800px) { .product-body { border-radius: 22px; margin-top: -40px; padding: 36px 40px 20px; box-shadow: var(--ombra); } }
.product-tag { display: inline-block; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--rosso); background: var(--rosso-tenue); padding: 4px 12px; border-radius: 999px; }
.product-title { font-size: clamp(38px, 7vw, 52px); margin-top: 12px; }
.product-subtitle { font-family: var(--serif-titoli); font-style: italic; font-weight: 500; font-size: 21px; color: var(--grigio); margin-top: 8px; line-height: 1.35; }
.product-hook { margin: 22px 0 6px; padding-left: 16px; border-left: 3px solid var(--rosso); font-family: var(--serif-titoli); font-weight: 600; font-size: 24px; color: var(--inchiostro); line-height: 1.4; }
.product h2 { font-size: 30px; margin: 30px 0 10px; }
.product-text p + p { margin-top: 14px; }
.product-format { margin-top: 18px; font-size: 15px; color: var(--grigio); }
.parts { list-style: none; display: grid; gap: 10px; }
.parts li { background: var(--carta); border-radius: 0 12px 12px 0; border-left: 3px solid var(--rosso); padding: 14px 16px; }
.parts .part-n { font-family: var(--serif-titoli); font-style: italic; font-weight: 600; color: var(--rosso); font-size: 16px; }
.parts strong { display: block; font-family: var(--serif-titoli); font-weight: 700; color: var(--inchiostro); font-size: 21px; line-height: 1.25; }
.parts span { display: block; font-size: 15px; color: var(--grigio); margin-top: 4px; line-height: 1.5; }
.trust { list-style: none; display: grid; gap: 10px; margin: 24px 0 4px; padding: 18px 20px; background: var(--carta); border-radius: 14px; }
.trust li { display: flex; gap: 12px; align-items: center; font-size: 15px; }
.trust li::before { content: '✓'; flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--rosso-tenue); color: var(--rosso); font-weight: 700; font-size: 14px; }
.buy-inline { text-align: center; margin: 26px 0 8px; }
.buy-inline .btn { min-width: 260px; }


.others { margin-top: 34px; }
.others-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.others-row a { text-decoration: none; }
.others-row .libro3d + span { display: block; font-family: var(--serif-titoli); font-weight: 600; font-size: 16px; line-height: 1.2; color: var(--inchiostro); margin-top: 12px; }

/* Barra d'acquisto fissa (pagine libro) */
.checkout-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(251, 242, 230, .97); border-top: 1px solid var(--bordo);
  box-shadow: 0 -6px 20px rgba(60, 30, 20, .08);
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.checkout-bar .inner { max-width: 760px; margin: 0 auto; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.checkout-price { font-family: var(--serif-testo); font-weight: 600; font-size: 22px; color: var(--inchiostro); line-height: 1.1; }
.prezzo-vecchio { font-weight: 400; color: var(--grigio); margin-left: 8px; font-size: .78em; }
.checkout-label { font-size: 13px; color: var(--grigio); display: block; }
.checkout-bar .btn { padding: 13px 28px; white-space: nowrap; }

/* Pagine legali */
.legal { max-width: 760px; margin: 30px auto; background: var(--carta-chiara); border-radius: 18px; padding: 32px 26px; box-shadow: var(--ombra); }
.legal h1 { font-size: 30px; }
.legal h2 { font-size: 20px; margin: 26px 0 8px; }
.legal p, .legal li { font-size: 16px; }
.legal ul { padding-left: 20px; margin: 8px 0; }
.legal .updated { color: var(--grigio); font-size: 14px; margin-top: 6px; }
.legal .highlight { background: var(--rosso-tenue); border-radius: 10px; padding: 14px 16px; margin: 10px 0; font-size: 15px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0; }
.legal th, .legal td { border: 1px solid var(--bordo); padding: 8px; text-align: left; vertical-align: top; }
.legal a { color: var(--rosso); }

/* Finestre (upsell e pagamento) */
.overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(30, 18, 16, .55);
  display: none; align-items: flex-end; justify-content: center;
}
.overlay.active { display: flex; }
@media (min-width: 640px) { .overlay { align-items: center; padding: 20px; } }
.sheet {
  background: var(--carta-chiara); width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto;
  border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.2);
  animation: sale .25s ease-out;
}
@media (min-width: 640px) { .sheet { border-radius: 22px; } }
@keyframes sale { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

.upsell-body { padding: 24px 22px 20px; }
.upsell-kicker { font-family: var(--serif-titoli); font-style: italic; color: var(--rosso); font-size: 15px; }
.upsell-body h3 { font-size: 25px; margin-top: 2px; }
.upsell-row { display: grid; grid-template-columns: 96px 1fr; gap: 16px; margin-top: 16px; align-items: center; }
.upsell-row img { width: 96px; aspect-ratio: 1664 / 2352; object-fit: cover; border-radius: 3px; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.upsell-row strong { font-family: var(--serif-titoli); font-size: 19px; color: var(--inchiostro); line-height: 1.25; display: block; }
.upsell-row .upsell-sub { font-size: 14px; color: var(--grigio); line-height: 1.45; margin-top: 4px; }
.upsell-reason { margin-top: 16px; font-size: 16px; }
.upsell-price { margin-top: 14px; display: flex; align-items: baseline; gap: 10px; }
.upsell-price .now { white-space: nowrap; font-family: var(--serif-titoli); font-size: 28px; font-weight: 700; color: var(--rosso); }
.upsell-price .was { white-space: nowrap; color: var(--grigio); text-decoration: line-through; font-size: 16px; }
.upsell-price .note { font-size: 14px; color: var(--grigio); }
.upsell-body .btn { width: 100%; margin-top: 16px; }
.upsell-skip { display: block; width: 100%; margin-top: 10px; background: none; border: 0; padding: 10px; font-family: var(--serif-testo); font-size: 15px; color: var(--grigio); text-decoration: underline; cursor: pointer; }

.pay-header { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--bordo); position: sticky; top: 0; background: var(--carta-chiara); z-index: 2; }
.pay-header h3 { font-size: 20px; flex: 1; }
.pay-header .amount { font-family: var(--serif-titoli); font-weight: 700; font-size: 20px; color: var(--rosso); }
.pay-close { background: var(--carta); border: 0; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 15px; color: var(--testo); }
.pay-body { padding: 18px 20px 24px; }
.pay-summary { display: grid; gap: 8px; margin-bottom: 16px; }
.pay-summary .row { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; font-size: 15px; }
.pay-summary img { width: 38px; aspect-ratio: 1664 / 2352; object-fit: cover; border-radius: 2px; }
.pay-summary .row strong { font-family: var(--serif-titoli); color: var(--inchiostro); font-size: 16px; line-height: 1.25; display: block; }
.pay-summary .row small { color: var(--grigio); font-size: 13px; }
.pay-summary .row .p { font-family: var(--serif-titoli); font-weight: 700; color: var(--inchiostro); white-space: nowrap; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--grigio); letter-spacing: .03em; margin-bottom: 6px; }
.in-wrap { position: relative; margin-bottom: 14px; }
.in-wrap input { width: 100%; padding: 14px; border: 1.5px solid var(--bordo); border-radius: 10px; font-size: 16px; font-family: system-ui, -apple-system, sans-serif; color: var(--inchiostro); background: #fff; outline: none; }
.in-wrap input:focus { border-color: var(--rosso); }
.in-wrap .in-err-mark { display: none; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; background: var(--rosso); color: #fff; font-weight: 700; font-size: 14px; text-align: center; line-height: 22px; }
.in-wrap.show-err input { border-color: var(--rosso); background: #fff7f5; }
.in-wrap.show-err .in-err-mark { display: block; animation: scuoti .35s; }
.pay-element { min-height: 60px; margin-bottom: 14px; }
.consent-block { display: grid; gap: 10px; margin: 4px 0 16px; padding: 10px; border-radius: 10px; border: 1.5px solid transparent; }
.consent-block.invalid { border-color: var(--rosso); background: #fff7f5; animation: scuoti .35s; }
.consent-block label { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; line-height: 1.5; cursor: pointer; font-family: system-ui, -apple-system, sans-serif; }
.consent-block input { margin-top: 2px; width: 17px; height: 17px; flex-shrink: 0; accent-color: var(--rosso); }
.consent-block a { color: var(--rosso); }
.consent-note { font-size: 12px; color: var(--grigio); line-height: 1.45; font-family: system-ui, -apple-system, sans-serif; }
@keyframes scuoti { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.in-wrap.show-err .in-err-mark { transform: translateY(-50%); }
.pay-btn { width: 100%; position: relative; }
.pay-btn .spinner { display: none; width: 20px; height: 20px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: gira .8s linear infinite; }
.pay-btn.loading .spinner { display: block; }
.pay-btn.loading .btn-text { display: none; }
.pay-btn:disabled { opacity: .75; cursor: default; }
@keyframes gira { to { transform: rotate(360deg); } }
.pay-error { display: none; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #fff0ee; color: var(--rosso-scuro); font-size: 14px; font-family: system-ui, -apple-system, sans-serif; }
.pay-secure { text-align: center; margin-top: 12px; font-size: 13px; color: var(--grigio); font-family: system-ui, -apple-system, sans-serif; }
.pay-success { display: none; padding: 30px 22px 30px; text-align: center; }
.pay-success.active { display: block; }
.pay-success .icon { font-size: 44px; }
.pay-success h3 { font-size: 26px; margin-top: 8px; }
.pay-success p { margin-top: 10px; font-size: 16px; }
.dl-btn { display: block; margin: 12px auto 0; max-width: 360px; padding: 13px 18px; border: 2px solid var(--rosso); border-radius: 12px; background: var(--rosso-tenue); color: var(--rosso); font-weight: 700; text-decoration: none; font-family: var(--serif-titoli); }

/* Comparsa morbida */
.rv .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.rv .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
body:has(.checkout-bar) .site-footer { padding-bottom: 120px; }
/* Pagina libro: la card del testo arriva fino al fondo pagina, senza striscia in mezzo */
body:has(.product) .site-footer { margin-top: 0; }
.product { padding-bottom: 0; }
.product-body { padding-bottom: 32px; }
