/* Solo sul nostro dominio: modulo dell'ordine nel carrello. */
.p3-order { margin-top: 1.5rem; }
.p3-order fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }
.p3-order legend { font-weight: 700; margin-bottom: .5rem; padding: 0; }
.p3-order__grid { display: grid; gap: .75rem; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.p3-order__grid > label { grid-column: span 6; display: grid; gap: .25rem; font-size: .9rem; }
.p3-order__grid > label.p3-order--half { grid-column: span 3; }
.p3-order__grid > label.p3-order--third { grid-column: span 2; }
.p3-order__grid input, .p3-order__grid textarea { width: 100%; box-sizing: border-box; }
.p3-order__check { display: flex; gap: .5rem; align-items: flex-start; margin: .75rem 0; font-size: .9rem; }
.p3-order__check input { margin-top: .2rem; }
.p3-order__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.p3-order__done { text-align: center; }
.p3-order__code { font-size: 1.6rem; font-weight: 800; letter-spacing: .04em; margin: .25rem 0 1rem; }
@media (max-width: 560px) {
  .p3-order__grid > label.p3-order--half, .p3-order__grid > label.p3-order--third { grid-column: span 6; }
}

/* ---------- regali pronti (regali.html) ---------- */
.p3-xmas-strip { display: block; text-align: center; padding: .55rem 1rem; background: #B3261E; color: #fff; font-weight: 700; text-decoration: none; font-size: .95rem; }
.p3-xmas-strip:hover, .p3-xmas-strip:focus-visible { background: #8E1D17; }
.p3-gifts { padding: 2rem 0 3rem; }
.p3-gifts__lead { max-width: 40rem; margin: .25rem 0 1.5rem; }
.p3-gifts__grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.p3-gifts__card { background: #fff; border: 1px solid rgba(23, 32, 29, .1); border-radius: 18px; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; text-align: left; }
.p3-gifts__card canvas { width: 100%; height: auto; border-radius: 12px; background: #F4EFE8; display: block; }
.p3-gifts__card h2 { font-size: 1.05rem; margin: .25rem 0 0; }
.p3-gifts__card p { margin: 0; font-size: .9rem; opacity: .8; flex: 1; }
.p3-gifts__card strong { font-size: 1.15rem; }
.p3-gift { width: min(980px, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); overflow: auto; }
.p3-gift__cols { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
.p3-gift__view { position: relative; height: 360px; border-radius: 16px; overflow: hidden; background: #EFE9E1; }
.p3-gift__view canvas { display: block; width: 100%; height: 100%; }
.p3-gift__tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.p3-gift__tabs button { border: 1px solid rgba(23, 32, 29, .2); background: #fff; border-radius: 999px; padding: .25rem .7rem; font: inherit; font-size: .85rem; cursor: pointer; }
.p3-gift__tabs button[aria-selected="true"] { background: #17201D; color: #fff; border-color: #17201D; }
.p3-gift__form { display: grid; gap: .8rem; }
.p3-gift__field { display: grid; gap: .25rem; font-size: .9rem; }
.p3-gift__names { display: grid; gap: .5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.p3-gift__qty input { max-width: 6rem; }
.p3-gift__set { border: 0; padding: 0; margin: 0; }
.p3-gift__set legend { font-size: .9rem; padding: 0; margin-bottom: .35rem; }
.p3-gift__choices, .p3-gift__swatches { display: flex; flex-wrap: wrap; gap: .45rem; }
.p3-gift__choices label, .p3-gift__swatches label { cursor: pointer; }
.p3-gift__choices input, .p3-gift__swatches input { position: absolute; opacity: 0; pointer-events: none; }
.p3-gift__choices span { display: inline-block; border: 1px solid rgba(23, 32, 29, .2); border-radius: 999px; padding: .3rem .8rem; font-size: .88rem; background: #fff; }
.p3-gift__choices input:checked + span { background: #17201D; color: #fff; border-color: #17201D; }
.p3-gift__swatches span { display: block; width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(23, 32, 29, .18); }
.p3-gift__swatches input:checked + span { outline: 3px solid #17201D; outline-offset: 2px; }
.p3-gift__choices input:focus-visible + span, .p3-gift__swatches input:focus-visible + span { outline: 3px solid #D4371D; outline-offset: 2px; }
.p3-gift__price { font-size: 1.4rem; font-weight: 800; margin: 0; }
@media (max-width: 760px) {
  .p3-gift__cols { grid-template-columns: minmax(0, 1fr); }
  .p3-gift__view { height: 280px; }
}

/* ---------- aspetto natalizio (solo sul nostro dominio) ---------- */
body.p3-body { --p3-bg: #FBF6EF; --p3-cta: #B3261E; --p3-brand: #B3261E; --p3-xmas-green: #1F4D3A; background: #FBF6EF !important; }
.p3-aurora { display: none !important; }                                   /* via lo sfondo viola in movimento: fondo chiaro e calmo */
body:has(.p3-aurora) .p3-section--tint, .p3-section--tint { background: #F3ECE2; }
body:has(.p3-aurora) #usi { background: #FBF6EF; }
.p3-xmas-strip { background: var(--p3-xmas-green, #1F4D3A); }
.p3-xmas-strip:hover, .p3-xmas-strip:focus-visible { background: #163829; }

/* apertura: la foto ha lo spazio vuoto a sinistra (computer) o in alto (telefono), il testo sta li' */
body.p3-body .p3-hero--image { align-items: center; padding: 0; min-height: min(80svh, 700px); }
body.p3-body .p3-hero--image .p3-hero__bg img { object-position: 8% 50%; }
body.p3-body .p3-hero--image .p3-hero__bg::after { background: linear-gradient(90deg, rgba(251, 246, 239, .96) 0%, rgba(251, 246, 239, .9) 30%, rgba(251, 246, 239, 0) 52%); }
body.p3-body .p3-hero--image > .p3-container { align-self: center; }
body.p3-body .p3-hero--image .p3-hero__grid { display: grid; text-align: left; justify-items: start; gap: .9rem; }
body.p3-body .p3-hero--image .p3-hero__grid > * { margin-left: 0; margin-right: 0; width: min(100%, 24rem); max-width: 42vw; }
body.p3-body .p3-hero--image .p3-h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); }
body.p3-body .p3-hero--image .p3-hero__grid > .p3-lead { margin: 0; text-wrap: pretty; }
body.p3-body .p3-hero--image .p3-hero__cta { display: grid; justify-items: start; text-align: left; gap: .5rem; }
@media (min-width: 1200px) { body.p3-body .p3-hero--image .p3-hero__bg img { object-position: 50% 50%; } }
@media (max-width: 767px) {
  body.p3-body .p3-hero--image { align-items: start; min-height: 92svh; padding: 1.5rem 0 0; }
  body.p3-body .p3-hero--image > .p3-container { align-self: start; }
  body.p3-body .p3-hero--image .p3-hero__bg img { object-position: 50% 100%; }
  body.p3-body .p3-hero--image .p3-hero__bg::after { background: linear-gradient(180deg, rgba(251, 246, 239, .97) 0%, rgba(251, 246, 239, .88) 36%, rgba(251, 246, 239, 0) 56%); }
  body.p3-body .p3-hero--image .p3-hero__grid { text-align: center; justify-items: center; }
  body.p3-body .p3-hero--image .p3-hero__grid > * { width: auto; max-width: 100%; }
  body.p3-body .p3-hero--image .p3-hero__grid > .p3-lead { margin: 0 auto; }
  body.p3-body .p3-hero--image .p3-hero__cta { justify-items: center; text-align: center; }
}

/* regali in prima pagina */
.p3-xmas-home { position: relative; padding: 2rem 0 3.5rem; background: transparent; }
.p3-xmas-home__lead { max-width: 38rem; margin: .25rem 0 1.5rem; }
.p3-xmas-home__grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.p3-xmas-home__grid a { display: grid; gap: .15rem; text-decoration: none; color: inherit; background: #fff; border-radius: 18px; padding: .6rem .6rem .9rem; border: 1px solid rgba(23, 32, 29, .08); transition: transform .2s ease, box-shadow .2s ease; }
.p3-xmas-home__grid a:hover, .p3-xmas-home__grid a:focus-visible { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(23, 32, 29, .12); }
.p3-xmas-home__grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; margin-bottom: .45rem; }
.p3-xmas-home__grid strong { padding: 0 .3rem; font-size: 1rem; }
.p3-xmas-home__grid span { padding: 0 .3rem; color: var(--p3-cta); font-weight: 700; }
.p3-xmas-home__band { margin-top: 2rem; display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; background: #fff; border-radius: 22px; padding: 1rem; border: 1px solid rgba(23, 32, 29, .08); }
.p3-xmas-home__band img { width: 100%; height: 100%; max-height: 340px; object-fit: cover; border-radius: 14px; display: block; }
.p3-xmas-home__band p { margin: .4rem 0; }
.p3-xmas-home__ship { font-weight: 700; color: var(--p3-xmas-green, #1F4D3A); }
.p3-xmas-home__note { font-size: .88rem; opacity: .8; margin-top: 1.25rem; }
.p3-gifts__card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; display: block; }
@media (max-width: 760px) {
  .p3-xmas-home__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .p3-xmas-home__band { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .p3-xmas-home__grid a { transition: none; } }

/* decorazioni che si muovono con lo scorrimento (assets/poply-xmas.js). Non ricevono clic e stanno ai bordi. */
/* Il livello sta DIETRO al contenuto (titoli, testi e schede gli passano sopra): si vede negli spazi vuoti, non copre mai una scritta. */
.p3-xmas-layer { position: absolute; top: 0; left: 0; width: 100%; pointer-events: none; overflow: hidden; z-index: 0; }
body.p3-body > main, body.p3-body > .p3-xmas-strip { position: relative; z-index: 1; }
body.p3-body .p3-section--tint, body.p3-body:has(.p3-aurora) .p3-section--tint { background: rgba(243, 236, 226, .55); }
body.p3-body:has(.p3-aurora) #usi, body.p3-body .p3-footer { background: rgba(255, 253, 250, .82); }
.p3-xmas-deco { position: absolute; width: var(--s, 84px); height: var(--s, 84px); background: url("poply-xmas-decori.png") no-repeat; background-size: 196% 196%; will-change: transform; filter: drop-shadow(0 10px 14px rgba(23, 32, 29, .22)); }
.p3-xmas-deco--star { background-position: 2% 3%; }
.p3-xmas-deco--snow { background-position: 98% 3%; }
.p3-xmas-deco--tree { background-position: 56% 98%; }
.p3-xmas-branch { position: absolute; width: clamp(130px, 20vw, 290px); aspect-ratio: 1; background: url("poply-xmas-ramo.png") no-repeat center / contain; will-change: transform; filter: drop-shadow(0 12px 16px rgba(23, 32, 29, .2)); }
.p3-xmas-branch--right { transform-origin: center; }
@media (max-width: 700px) { .p3-xmas-branch { width: 104px; opacity: .92; } }

/* ---------- il polpo: chat delle idee in basso a destra (assets/poply-polpo.js) ---------- */
.p3-polpo__launch { position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); z-index: 60; display: inline-flex; align-items: center; gap: .5rem; border: 0; cursor: pointer; background: #fff; color: #17201D; font: inherit; font-weight: 700; font-size: .92rem; padding: .5rem .95rem .5rem .55rem; border-radius: 999px; box-shadow: 0 10px 28px rgba(23, 32, 29, .22), 0 0 0 1px rgba(23, 32, 29, .06); transition: transform .2s ease; }
.p3-polpo__launch:hover, .p3-polpo__launch:focus-visible { transform: translateY(-2px); }
.p3-polpo__launch img { width: 34px; height: 37px; display: block; }
.p3-polpo__launch.is-open span { display: none; }
.p3-polpo__launch.is-open { padding: .5rem; }
.p3-polpo { position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: calc(max(14px, env(safe-area-inset-bottom)) + 62px); z-index: 60; width: min(390px, calc(100vw - 28px)); max-height: min(680px, calc(100dvh - 96px)); display: flex; flex-direction: column; background: #FFFDFA; border-radius: 20px; box-shadow: 0 24px 60px rgba(23, 32, 29, .3), 0 0 0 1px rgba(23, 32, 29, .08); overflow: hidden; }
.p3-polpo[hidden] { display: none; }
.p3-polpo__head { display: flex; align-items: center; gap: .5rem; padding: .7rem .8rem; background: var(--p3-xmas-green, #1F4D3A); color: #fff; }
.p3-polpo__head img { background: #fff; border-radius: 50%; padding: 3px; width: 30px; height: 30px; }
.p3-polpo__head span { font-size: .82rem; opacity: .85; flex: 1; }
.p3-polpo__close { border: 0; background: transparent; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 .3rem; border-radius: 8px; }
.p3-polpo__stage { position: relative; height: 210px; background: #EFE9E1; flex: none; }
.p3-polpo__stage[hidden], .p3-polpo__variants[hidden] { display: none; }
.p3-polpo__canvas { position: absolute; inset: 0; }
.p3-polpo__canvas canvas { display: block; width: 100%; height: 100%; }
.p3-polpo__nostage { margin: 0; padding: 1.2rem; font-size: .9rem; }
.p3-polpo__variants { display: flex; gap: .35rem; padding: .5rem .7rem 0; overflow-x: auto; flex: none; }
.p3-polpo__variants button { flex: none; border: 1px solid rgba(23, 32, 29, .2); background: #fff; border-radius: 999px; padding: .25rem .7rem; font: inherit; font-size: .8rem; cursor: pointer; white-space: nowrap; }
.p3-polpo__variants button[aria-checked="true"] { background: #17201D; color: #fff; border-color: #17201D; }
.p3-polpo__log { flex: 1; min-height: 120px; overflow-y: auto; padding: .8rem; display: flex; flex-direction: column; gap: .5rem; overscroll-behavior: contain; }
.p3-polpo__msg { max-width: 88%; padding: .55rem .75rem; border-radius: 14px; font-size: .92rem; line-height: 1.4; overflow-wrap: anywhere; }
.p3-polpo__msg--bot { align-self: flex-start; background: #F1EADF; border-bottom-left-radius: 4px; }
.p3-polpo__msg--user { align-self: flex-end; background: var(--p3-xmas-green, #1F4D3A); color: #fff; border-bottom-right-radius: 4px; }
.p3-polpo__msg p { margin: 0 0 .5rem; }
.p3-polpo__actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }
.p3-polpo__quote { display: grid; gap: .45rem; }
.p3-polpo__quote .p3-input { width: 100%; box-sizing: border-box; }
.p3-polpo__consent { display: flex; gap: .4rem; align-items: flex-start; font-size: .8rem; }
.p3-polpo__trap { position: absolute; left: -9999px; width: 1px; height: 1px; }
.p3-polpo__form { display: flex; gap: .5rem; align-items: flex-end; padding: .6rem .7rem .7rem; border-top: 1px solid rgba(23, 32, 29, .1); background: #fff; flex: none; }
.p3-polpo__input { flex: 1; resize: none; border: 1px solid rgba(23, 32, 29, .2); border-radius: 12px; padding: .5rem .65rem; font: inherit; font-size: 1rem; min-height: 44px; }
.p3-polpo__input:focus-visible, .p3-polpo__launch:focus-visible, .p3-polpo__close:focus-visible { outline: 3px solid #D4371D; outline-offset: 2px; }
@media (max-width: 520px) {
  .p3-polpo { right: 8px; left: 8px; width: auto; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 58px); max-height: calc(100dvh - 78px); }
  .p3-polpo__stage { height: 170px; }
  .p3-polpo__launch span { display: none; }
  .p3-polpo__launch { padding: .5rem; }
}
@media (prefers-reduced-motion: reduce) { .p3-polpo__launch { transition: none; } }

/* la foto d'apertura sfuma nel fondo della pagina: nessun taglio netto tra apertura e catalogo */
body.p3-body .p3-hero--image { overflow: visible; margin-bottom: -1px; }
body.p3-body .p3-hero--image .p3-hero__bg { overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 62%, rgba(0, 0, 0, .55) 82%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, #000 62%, rgba(0, 0, 0, .55) 82%, transparent 100%); }
body.p3-body .p3-hero--image { background: transparent; padding-bottom: clamp(48px, 9vh, 110px); }

/* pagine di testo (privacy, condizioni, resi) */
.p3-legal { padding: 2rem 0 3rem; }
.p3-legal .p3-container { max-width: 46rem; }
.p3-legal h2 { font-size: 1.15rem; margin: 1.6rem 0 .4rem; }
.p3-legal p, .p3-legal li { line-height: 1.6; }
.p3-legal__todo { background: #FFF4CC; border: 1px solid #F0DC8A; border-radius: 8px; padding: .1rem .4rem; font-weight: 700; }
.p3-legal__draft { background: #FFF4CC; border: 1px solid #F0DC8A; border-radius: 12px; padding: .8rem 1rem; }

/* numero di pezzi di un set */
.p3-gift__count { display: flex; align-items: center; gap: .6rem; font-size: .92rem; }
.p3-gift__count span { flex: 1; }
.p3-gift__count strong { min-width: 1.6rem; text-align: center; font-size: 1.15rem; }
.p3-gift__step { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(23, 32, 29, .25); background: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.p3-gift__step:disabled { opacity: .35; cursor: default; }
.p3-gift__step:focus-visible { outline: 3px solid #D4371D; outline-offset: 2px; }

.p3-xmas-home__all { text-align: center; margin: 1.4rem 0 0; }

.p3-polpo__why { margin: .5rem 0 0; padding-left: 1.1rem; font-size: .88rem; display: grid; gap: .25rem; }

/* recensioni in home */
.p3-reviews { padding: 3rem 0; }
.p3-reviews__list { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.p3-reviews__item { display: flex; gap: .8rem; align-items: flex-start; background: #fff; border: 1px solid rgba(23, 32, 29, .08); border-radius: 16px; padding: .9rem; }
.p3-reviews__item img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; flex: none; }
.p3-reviews__item p { margin: 0 0 .25rem; }
.p3-reviews__stars { color: #E0A21B; letter-spacing: .08em; font-size: 1.05rem; }
.p3-reviews__stars span { color: rgba(23, 32, 29, .18); }
.p3-reviews__text { font-size: .95rem; }
.p3-reviews__who { font-size: .85rem; opacity: .8; }
/* pagina «lascia una recensione» */
.p3-review { padding: 2.5rem 0 4rem; }
.p3-review .p3-container { max-width: 620px; }
.p3-review__form { display: grid; gap: 1.1rem; margin-top: 1.2rem; }
/* le stelle sono scritte da 5 a 1 e mostrate al contrario: cosi' «questa e quelle dopo» colora da sinistra fino a quella scelta */
.p3-review__stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: .2rem; }
.p3-review__q { margin: 0 0 -.6rem; font-weight: 600; }
.p3-review__stars input { position: absolute; opacity: 0; }
.p3-review__stars label { font-size: 2.6rem; line-height: 1; color: rgba(23, 32, 29, .2); cursor: pointer; min-width: 44px; text-align: center; }
.p3-review__stars label:has(input:checked), .p3-review__stars label:has(input:checked) ~ label, .p3-review__stars label:hover, .p3-review__stars label:hover ~ label { color: #E0A21B; }
.p3-review__stars label:has(input:focus-visible) { outline: 3px solid #D4371D; outline-offset: 2px; border-radius: 8px; }
.p3-review__field { display: grid; gap: .35rem; font-weight: 600; }
.p3-review__field textarea, .p3-review__field input { font-weight: 400; }
.p3-review__preview { width: 140px; border-radius: 12px; }
.p3-review__check { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; }
.p3-review__check input { margin-top: .2rem; width: 20px; height: 20px; flex: none; }
.p3-review__error { color: #A3160F; margin: 0; min-height: 1.2em; }
.p3-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.p3-cart__missing { background: #E9F5EE; border: 1px solid #B9DCC8; color: #14532D; border-radius: 12px; padding: .7rem .9rem; margin: .8rem 0 0; font-size: .95rem; }
.p3-cart__missing a { color: inherit; font-weight: 700; }
