/* Phonetastico — listino.css
   Pagine listino brand (riparazioni-*.html): selettore modello, preventivo, barra mobile.
   Richiede common.css. */

/* ---------- Listino (pagine brand) ---------- */
.brand-switch { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: 0 calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
.brand-switch::-webkit-scrollbar { display: none; }
.brand-switch a { flex: none; padding: 8px 16px; border-radius: var(--r-pill); font-size: 14px; color: var(--ink-2); background: var(--bg-soft); transition: background-color .2s, color .2s; }
.brand-switch a[aria-current="page"] { background: var(--ink); color: #fff; font-weight: 600; }

.pricing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(24px, 4vw, 56px); align-items: start; }
.picker__search { position: relative; margin-bottom: 18px; }
.picker__search svg { position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.picker__search input {
  width: 100%; height: 52px; padding: 0 44px 0 46px;
  border-radius: var(--r-md); border: 0; outline: 0;
  background: var(--bg-soft); font-size: 17px;
  transition: box-shadow .2s, background-color .2s;
}
.picker__search input::placeholder { color: var(--faint); }
.picker__search input:focus { background: #fff; box-shadow: 0 0 0 1.5px var(--ink), var(--sh-1); }
.picker__clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; display: none; place-items: center; color: var(--muted); }
.picker__search.has-value .picker__clear { display: grid; }
.picker__series { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 26px; padding-bottom: 2px; }
.picker__series::-webkit-scrollbar { display: none; }
.picker__series button { flex: none; padding: 8px 14px; border-radius: var(--r-pill); font-size: 14px; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-strong); transition: background-color .2s, color .2s, box-shadow .2s; }
.picker__series button[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.series { margin-bottom: 28px; }
.series[hidden] { display: none; }
.series__title { font-size: 13px; font-weight: 650; color: var(--muted); letter-spacing: .01em; text-transform: uppercase; margin-bottom: 12px; }
.models { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.model-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 52px; padding: 12px 16px; border-radius: var(--r-sm);
  background: var(--bg-soft); text-align: left; font-size: 15px; font-weight: 500; letter-spacing: -0.012em;
  transition: background-color .2s, color .2s, transform .35s var(--spring), box-shadow .2s;
}
.model-btn:active { transform: scale(.97); }
.model-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.model-btn small { font-size: 12px; color: var(--muted); font-weight: 450; white-space: nowrap; }
.model-btn[aria-pressed="true"] small { color: rgba(255,255,255,.6); }
.model-btn[hidden] { display: none; }
.picker__empty { display: none; padding: 32px; border-radius: var(--r-lg); background: var(--bg-soft); text-align: center; color: var(--muted); }
.picker__empty.is-visible { display: block; }
.picker__empty p + p { margin-top: 10px; }

.quote { position: sticky; top: calc(var(--nav-h) + 20px); }
.quote__card { border-radius: var(--r-xl); background: #fff; box-shadow: var(--sh-3), inset 0 0 0 1px var(--line); overflow: hidden; }
.quote__head { padding: 28px 28px 20px; }
.quote__brand { font-size: 13px; font-weight: 600; color: var(--accent-ink); }
.quote__model { margin-top: 4px; font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -0.032em; }
.quote__hint { margin-top: 8px; font-size: 14px; color: var(--muted); }
.quote__list { border-top: 1px solid var(--line); max-height: min(58vh, 620px); overflow-y: auto; overscroll-behavior: contain; }
.quote__item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 28px; text-align: left; border-bottom: 1px solid var(--line); transition: background-color .15s; font-size: 15px; }
.quote__item:last-child { border-bottom: 0; }
.quote__item[aria-pressed="true"] { background: var(--accent-soft); }
.quote__svc { flex: 1; }
.quote__price { font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; }
.quote__price.na { color: var(--faint); font-weight: 450; font-size: 13px; }
.quote__check { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-strong); display: grid; place-items: center; flex: none; transition: background-color .2s, box-shadow .2s; color: #fff; }
.quote__check svg { width: 12px; height: 12px; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .35s var(--spring); }
.quote__item[aria-pressed="true"] .quote__check { background: var(--accent); box-shadow: none; }
.quote__item[aria-pressed="true"] .quote__check svg { opacity: 1; transform: none; }
.quote__foot { padding: 18px 28px 24px; border-top: 1px solid var(--line); background: var(--bg-softer); }
.quote__total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; font-size: 15px; color: var(--muted); }
.quote__total strong { font-size: 26px; color: var(--ink); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.quote__note { margin-top: 12px; font-size: 12px; color: var(--faint); text-align: center; }
.quote__empty { padding: 40px 28px 44px; text-align: center; color: var(--muted); }
.quote__empty svg { width: 56px; height: 56px; margin: 0 auto 16px; color: var(--line-strong); }

/* Tabelle statiche (no-JS / SEO) */
.price-tables { display: none; }
.no-js .price-tables { display: block; }
.no-js .pricing { display: none; }
.price-tables article { margin-bottom: 32px; }
.price-tables h2 { font-size: 22px; margin-bottom: 8px; }
.price-tables table { width: 100%; border-collapse: collapse; font-size: 15px; }
.price-tables td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.price-tables td:last-child { text-align: right; font-weight: 600; }

@media (max-width: 900px) {
  .pricing { grid-template-columns: minmax(0, 1fr); }
  .quote { position: static; }
  .quote__list { max-height: none; }
  .models { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile bottom bar quando c'è una selezione */
.quote-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 90;
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 20px; border-radius: var(--r-pill);
  background: rgba(29,29,31,.86); color: #fff;
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--sh-3);
  transform: translateY(140%); transition: transform .5s var(--spring);
}
.quote-bar.is-visible { transform: none; }
.quote-bar__txt { font-size: 14px; line-height: 1.25; min-width: 0; }
.quote-bar__txt strong { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.quote-bar__txt span { color: rgba(255,255,255,.65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
@media (max-width: 900px) { .quote-bar { display: flex; } }

/* ---------- CTA band ---------- */
.cta-band { border-radius: var(--r-xl); background: var(--navy); color: #fff; padding: clamp(40px, 7vw, 88px) clamp(24px, 6vw, 80px); position: relative; overflow: hidden; text-align: center; }
.cta-band .lead { color: rgba(255,255,255,.7); max-width: 560px; margin: 16px auto 0; }
.cta-band .actions { margin-top: 32px; justify-content: center; }
.cta-band__ring { position: absolute; width: 520px; height: 520px; border-radius: 50%; border: 44px solid rgba(255,255,255,.04); right: -180px; top: -220px; pointer-events: none; }
.cta-band__ring--2 { width: 300px; height: 300px; border-width: 28px; left: -120px; right: auto; top: auto; bottom: -160px; border-color: rgba(224,53,43,.18); }

.picker__series { -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent); padding-right: 40px; }
.quote__total { min-height: 32px; }

@media (hover: hover) and (pointer: fine) {
  .brand-switch a:not([aria-current="page"]):hover { background: #ebebef; color: var(--ink); }
  .picker__clear:hover { background: rgba(0,0,0,.06); }
  .picker__series button:not([aria-pressed="true"]):hover { box-shadow: inset 0 0 0 1px var(--ink); }
  .model-btn:not([aria-pressed="true"]):hover { background: #ebebef; }
  .quote__item:not([aria-pressed="true"]):hover { background: var(--bg-softer); }
}
