/* ===== NEGOZIO — usa le variabili e i font di main.css ===== */

.shop-main { padding-top: 72px; min-height: 60vh; }
.shop-page section { padding: 0; }   /* main.css dà 96px a ogni <section>: qui gestiamo noi gli spazi */

.shop-preview-bar {
  background: var(--gold); color: var(--ink); font-size: .85rem; text-align: center;
  padding: 8px 16px; margin-top: 72px;
}
.shop-preview-bar + .shop-main { padding-top: 0; }
.shop-preview-bar a { text-decoration: underline; font-weight: 500; }

/* intestazione pagina */
.shop-head { background: var(--sand); padding: 40px 0 32px !important; }
.shop-title { font-size: clamp(2rem, 4.5vw, 3.2rem); margin: 6px 0 8px; }
.shop-intro { max-width: 620px; color: var(--ink3); margin-bottom: 0; }
.shop-crumbs { font-size: .82rem; color: var(--ink3); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.shop-crumbs a:hover { color: var(--sea); }
.shop-crumbs .current { color: var(--ink2); }

.shop-body { padding: 28px 0 80px !important; }

/* categorie */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 100px;
  background: var(--white); border: 1.5px solid rgba(26,24,20,.12); font-size: .9rem; font-weight: 500;
  transition: border-color .15s, background .15s;
}
.chip small { color: var(--ink3); font-weight: 400; }
.chip:hover { border-color: var(--sea); }
.chip.active { background: var(--sea); border-color: var(--sea); color: var(--white); }
.chip.active small { color: rgba(255,255,255,.75); }
.chip-sub { font-size: .82rem; padding: 6px 13px; background: var(--sea3); border-color: transparent; }

/* filtri */
.shop-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.sf-search { flex: 1 1 260px; }
.sf-search input, .sf-more select {
  width: 100%; padding: 11px 16px; border-radius: 100px; border: 1.5px solid rgba(26,24,20,.15);
  background: var(--white); font: inherit; font-size: .92rem; color: var(--ink);
}
.sf-search input:focus, .sf-more select:focus { outline: none; border-color: var(--sea); }
.sf-more { gap: 10px; align-items: center; flex-wrap: wrap; flex: 1 1 100%; }
.sf-more.collapse:not(.show) { display: none; }
@media (min-width: 768px) { .sf-more.collapse { display: flex !important; flex: 0 1 auto; } }
.sf-more select { width: auto; padding-right: 36px; }
.sf-check { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; cursor: pointer; }
.sf-reset { font-size: .88rem; color: var(--coral); text-decoration: underline; }
.btn-filters {
  padding: 11px 18px; border-radius: 100px; border: 1.5px solid rgba(26,24,20,.15); background: var(--white); font: inherit; font-size: .92rem;
}
.shop-count { color: var(--ink3); font-size: .85rem; margin: 6px 0 18px; }

/* griglia prodotti */
.pgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 768px) { .pgrid { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
@media (min-width: 1100px) { .pgrid { grid-template-columns: repeat(4, 1fr); } }

.pcard {
  display: flex; flex-direction: column; background: var(--white); border-radius: 18px; overflow: hidden;
  box-shadow: 0 2px 14px rgba(26,24,20,.06); transition: transform .25s, box-shadow .25s;
}
.pcard:hover { transform: translateY(-5px); box-shadow: 0 14px 40px rgba(26,24,20,.12); }
.pcard-img { position: relative; aspect-ratio: 1; background: var(--sand2); overflow: hidden; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.pcard:hover .pcard-img img { transform: scale(1.04); }
.pcard.is-soldout .pcard-img img { opacity: .55; }
.pcard-noimg { display: grid; place-items: center; width: 100%; height: 100%; color: var(--ink3); font-size: .85rem; }
.pcard-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pbadge { display: inline-block; font-size: .72rem; font-weight: 500; padding: 3px 10px; border-radius: 100px; letter-spacing: .03em; }
.pbadge[hidden] { display: none; }
.pbadge-sale { background: var(--coral); color: var(--white); }
.pbadge-new { background: var(--sea); color: var(--white); }
.pbadge-out { background: var(--ink); color: var(--white); }
.pcard-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.pcard-brand { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sea); font-weight: 500; }
.pcard-name { font-family: var(--font-body); font-weight: 500; font-size: 1rem; line-height: 1.3; margin: 0; }
.pcard-price { margin-top: auto; padding-top: 8px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pcard-price strong { font-size: 1.1rem; }
.pcard-price s, .buy-price s { color: var(--ink3); font-size: .9rem; }
.pcard-from { color: var(--ink3); font-size: .8rem; }

/* aggiunta rapida al carrello dall'elenco */
.pcard-wrap { position: relative; display: flex; flex-direction: column; transition: transform .25s; }
.pcard-wrap > .pcard { flex: 1; }
.pcard-wrap:hover { transform: translateY(-5px); }
.pcard-wrap > .pcard:hover { transform: none; }
.pcard-wrap:hover > .pcard { box-shadow: 0 14px 40px rgba(26,24,20,.12); }
.has-quick .pcard-price { padding-right: 52px; min-height: 52px; align-items: center; align-content: center; }
.has-quick .pcard-body { padding-bottom: 10px; }
.pcard-add { position: absolute; right: 10px; bottom: 12px; z-index: 2; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: var(--sea); color: var(--white); cursor: pointer; transition: background .2s, transform .15s; }
.pcard-add:hover, .pcard-add:focus-visible { background: var(--sea2); color: var(--white); }
.pcard-add:active { transform: scale(.92); }
.pcard-add:disabled { opacity: .55; cursor: wait; }
.pcard-choose { width: auto; min-width: 44px; padding: 0 12px; border-radius: 100px; font-size: .8rem; font-weight: 500; text-decoration: none; }
.has-quick:has(.pcard-choose) .pcard-price { padding-right: 76px; }

.shop-pager { display: flex; justify-content: center; align-items: center; gap: 24px; margin-top: 40px; font-size: .92rem; }
.shop-pager a { color: var(--sea); font-weight: 500; }
.shop-pager a:hover { text-decoration: underline; }
.shop-empty { text-align: center; padding: 60px 0; }
.shop-empty p { margin: 8px 0 20px; color: var(--ink3); }

/* scheda prodotto */
.pdp { padding-top: 22px !important; }
.pdp .shop-crumbs { margin-bottom: 18px; }
.gallery-main { background: var(--white); border-radius: 20px; overflow: hidden; aspect-ratio: 1; display: grid; place-items: center; box-shadow: 0 2px 14px rgba(26,24,20,.06); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
.gthumb { flex: 0 0 72px; height: 72px; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: var(--white); cursor: pointer; scroll-snap-align: start; opacity: .7; transition: opacity .15s, border-color .15s; }
.gthumb.active, .gthumb:hover { opacity: 1; border-color: var(--sea); }
.gthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (min-width: 992px) { .buybox { position: sticky; top: 96px; } }
.buy-brand { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sea); font-weight: 500; }
.buy-title { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin: 4px 0 10px; }
.buy-short { color: var(--ink2); margin-bottom: 14px; }
.buy-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.buy-price strong { font-size: 1.9rem; font-weight: 700; }
.buy-vat { font-size: .78rem; color: var(--ink3); margin-bottom: 18px; }

.buy-variants { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.buy-variants legend { font-size: .85rem; font-weight: 500; margin-bottom: 8px; float: none; width: 100%; }
.vpill { cursor: pointer; }
.vpill input { position: absolute; opacity: 0; pointer-events: none; }
.vpill span { display: inline-block; padding: 9px 18px; border-radius: 100px; border: 1.5px solid rgba(26,24,20,.2); background: var(--white); font-size: .92rem; transition: border-color .15s, background .15s; }
.vpill input:checked + span { border-color: var(--sea); background: var(--sea3); color: var(--sea); font-weight: 500; }
.vpill input:focus-visible + span { outline: 2px solid var(--sea); outline-offset: 2px; }
.vpill.is-out span { opacity: .45; text-decoration: line-through; cursor: not-allowed; }

.buy-stock { font-size: .85rem; color: var(--coral); min-height: 1.3em; margin-bottom: 10px; }
.buy-actions { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid rgba(26,24,20,.2); border-radius: 100px; background: var(--white); }
.qty button { width: 44px; height: 50px; border: 0; background: transparent; font-size: 1.3rem; cursor: pointer; border-radius: 100px; }
.qty button:hover { color: var(--sea); }
.qty input { width: 44px; text-align: center; border: 0; background: transparent; font: inherit; font-weight: 500; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.btn-add { flex: 1 1 200px; justify-content: center; padding: 15px 28px; font-size: 1rem; }
.btn-add[disabled] { opacity: .6; cursor: wait; }
.buy-soldout { padding: 14px 18px; border-radius: 14px; background: var(--sand2); color: var(--ink2); }
.btn-wa-ask { display: block; margin-top: 14px; font-size: .9rem; color: var(--sea); text-decoration: underline; text-align: center; }
.buy-perks { list-style: none; margin: 22px 0 0; padding: 18px 0 0; border-top: 1px solid rgba(26,24,20,.1); font-size: .88rem; color: var(--ink2); display: grid; gap: 8px; }
.buy-perks li { padding-left: 22px; position: relative; }
.buy-perks li::before { content: "✓"; position: absolute; left: 0; color: var(--sea); font-weight: 700; }

.pdp-desc { max-width: 760px; margin-top: 52px; }
.pdp-desc h2, .pdp-related h2 { font-size: 1.5rem; margin-bottom: 14px; }
.pdp-desc div { color: var(--ink2); }
.pdp-related { margin-top: 64px; }

/* avviso temporaneo */
.shop-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 99990;
  background: var(--ink); color: var(--white); padding: 12px 22px; border-radius: 100px; font-size: .92rem; transition: all .25s; max-width: 92vw; text-align: center; }
.shop-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* blocco "in evidenza" nella home */
.home-shop { background: var(--cream); padding: 80px 0 !important; }
.home-shop .pgrid { margin-top: 28px; }

/* ===== CARRELLO, CASSA, ORDINE ===== */
.cart-fab { position: fixed; right: 18px; bottom: 18px; z-index: 1040; width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: var(--sea); color: var(--white); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(26,24,20,.28); cursor: pointer; transition: transform .15s; }
.cart-fab:hover { transform: translateY(-2px); background: var(--sea2); }
.cart-fab-badge { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 100px; background: var(--coral);
  color: var(--white); font-size: .75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.cart-fab-badge[hidden] { display: none; }

.cart-drawer { width: min(420px, 100vw); }
.cart-drawer .offcanvas-title { font-family: 'Playfair Display', serif; font-size: 1.4rem; }
.cart-drawer-foot { border-top: 1px solid rgba(26,24,20,.1); padding: 16px 20px 20px; background: var(--sand); }
.cart-drawer-foot:empty { display: none; }

.cart-empty { text-align: center; padding: 48px 0; }
.cart-empty p { color: var(--ink3); }

.ship-meter { margin-bottom: 16px; }
.ship-meter-text { font-size: .85rem; margin-bottom: 6px; color: var(--ink2); }
.ship-meter-bar { height: 6px; border-radius: 100px; background: var(--sand2); overflow: hidden; }
.ship-meter-bar span { display: block; height: 100%; background: var(--sea); border-radius: 100px; transition: width .3s; }

.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-line { display: grid; grid-template-columns: 88px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid rgba(26,24,20,.08); }
.cart-lines.in-drawer .cart-line { grid-template-columns: 72px 1fr auto; gap: 12px; }
.cart-line-img { display: block; width: 100%; aspect-ratio: 1; border-radius: 12px; background: var(--sand2); overflow: hidden; }
.cart-line-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-line-name { font-weight: 500; display: block; line-height: 1.3; }
.cart-line-name:hover { color: var(--sea); }
.cart-line-var, .cart-line-unit { font-size: .85rem; color: var(--ink3); }
.cart-line-unit s { margin-left: 4px; }
.cart-line-total { font-weight: 600; white-space: nowrap; }
.cart-line-actions { display: flex; align-items: center; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.cart-line-actions form { margin: 0; }
.cart-qty-form select { padding: 6px 28px 6px 12px; border-radius: 100px; border: 1.5px solid rgba(26,24,20,.2); background: var(--white); font: inherit; font-size: .9rem; }
.qty-sm button { width: 34px; height: 34px; font-size: 1.1rem; }
.qty-sm button:disabled { opacity: .35; cursor: not-allowed; }
.qty-n { min-width: 26px; text-align: center; font-weight: 500; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: .85rem; color: var(--coral); text-decoration: underline; cursor: pointer; }

.cart-summary { background: var(--sand); border-radius: 20px; padding: 24px; }
.cart-summary h2 { font-size: 1.3rem; margin-bottom: 16px; }
.sticky-sum { position: sticky; top: 92px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.sum-row.muted { color: var(--ink3); font-size: .9rem; }
.sum-row.total { border-top: 1px solid rgba(26,24,20,.15); margin-top: 8px; padding-top: 14px; font-size: 1.15rem; }
.sum-vat { font-size: .78rem; color: var(--ink3); margin-bottom: 16px; }
.sum-lines { list-style: none; margin: 0 0 12px; padding: 0 0 12px; border-bottom: 1px solid rgba(26,24,20,.12); font-size: .9rem; }
.sum-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.sum-lines small { color: var(--ink3); }
.ship-hint { font-size: .85rem; color: var(--ink2); margin: 10px 0 16px; }
.ship-hint.ok { color: var(--sea); font-weight: 500; }
.cart-continue { display: block; text-align: center; margin-top: 14px; font-size: .88rem; color: var(--sea); text-decoration: underline; }

/* cassa */
.co-box { border: 0; background: var(--white); border-radius: 20px; padding: 24px; margin: 0 0 20px; box-shadow: 0 0 0 1px rgba(26,24,20,.08); }
.co-box legend { float: none; width: auto; font-family: 'Playfair Display', serif; font-size: 1.25rem; font-weight: 700; padding: 0; margin-bottom: 16px; }
.co-box label, .co-box .field-help { font-size: .85rem; }
.co-box label { display: block; font-weight: 500; margin-bottom: 5px; }
.co-in { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid rgba(26,24,20,.18); background: var(--white); font: inherit; color: var(--ink); }
.co-in:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 3px var(--sea3); }
.co-in.is-bad { border-color: var(--coral); }
.field-err { color: var(--coral); font-size: .82rem; margin-top: 4px; }
.field-help { color: var(--ink3); margin-top: 4px; }
.opt { color: var(--ink3); font-weight: 400; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
[hidden] { display: none !important; }

.rate-list { display: grid; gap: 10px; }
.rate { display: flex !important; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px solid rgba(26,24,20,.15); border-radius: 14px; cursor: pointer; margin: 0 !important; font-weight: 400 !important; font-size: .95rem !important; }
.rate:has(input:checked) { border-color: var(--sea); background: var(--sea3); }
.rate input { accent-color: var(--sea); width: 18px; height: 18px; }
.rate-main { flex: 1; display: flex; flex-direction: column; }
.rate-main small { color: var(--ink3); }
.rate-price { font-weight: 600; }

.co-check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; cursor: pointer; margin-bottom: 8px !important; }
.co-check input { margin-top: 4px; accent-color: var(--sea); width: 17px; height: 17px; flex-shrink: 0; }
.co-check a { text-decoration: underline; color: var(--sea); }
.co-consents { padding: 0 4px; }
.co-secure { font-size: .8rem; color: var(--ink3); margin: 12px 0 0; }

@media (max-width: 575px) {
  .cart-line { grid-template-columns: 72px 1fr; }
  .cart-line-total { grid-column: 2; }
  .co-box { padding: 18px; }
}

/* pulsante Satispay (rosso del marchio) */
.btn-satispay { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 12px; padding: 13px 20px; border: 0; border-radius: 100px;
  background: #F94C43; color: #fff; font: inherit; font-size: 1rem; cursor: pointer; transition: filter .15s; }
.btn-satispay:hover { filter: brightness(.93); }
.btn-satispay[disabled] { opacity: .6; cursor: wait; }
.btn-satispay strong { font-weight: 700; letter-spacing: .01em; }

/* Codice sconto e promozioni (Fase 8) */
.promo-row { color: #1d7a46; font-weight: 600; }
.promo-note { font-size: .88rem; color: #1d7a46; margin: 4px 0 8px; }
.promo-box { margin: 14px 0 16px; padding-top: 14px; border-top: 1px dashed rgba(26,24,20,.2); }
.promo-form { display: flex; gap: 8px; }
.promo-form .co-in { flex: 1; min-width: 0; text-transform: uppercase; }
.promo-form .co-in::placeholder { text-transform: none; }
.promo-applied { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #e8f5ed; color: #1d7a46; border-radius: 10px; padding: 8px 12px; font-size: .92rem; }
.promo-applied form { display: contents; }
