/* Bismart Europe - ordine online. Mobile-first, nessuna dipendenza esterna. */
@font-face {
    font-family: 'Nunito';
    src: url('../fonts/nunito.woff2') format('woff2');
    font-weight: 200 1000;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #0993fd;
    --primary-dark: #0677ce;
    --primary-soft: #e8f4ff;
    --ink: #252433;
    --text: #343940;
    --muted: #777e90;
    --line: #e6e8ec;
    --bg: #f5f7fa;
    --card: #ffffff;
    --danger: #e91a2f;
    --danger-soft: #fdecee;
    --ok: #17a05d;
    --ok-soft: #e7f7ef;
    --warn: #b36b00;
    --warn-soft: #fff4e0;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(37, 36, 51, .06), 0 8px 24px rgba(37, 36, 51, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    padding-bottom: 96px; /* spazio per la barra azioni su mobile */
}
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0; }
p { margin: 0; }
a { color: var(--primary-dark); }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- topbar e hero ---------- */
.topbar { background: var(--ink); color: #fff; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.topbar img { height: 26px; width: auto; display: block; }
.topbar a.help { color: #fff; text-decoration: none; font-weight: 700; font-size: .875rem; display: inline-flex; align-items: center; gap: 6px; opacity: .92; }
.topbar a.help:hover { opacity: 1; }
.hero { background: linear-gradient(180deg, var(--ink) 0%, #2f2e45 100%); color: #fff; padding: 8px 0 72px; }
.hero h1 { color: #fff; font-size: 1.6rem; font-weight: 800; }
.hero p { color: #c9cce0; margin-top: 6px; font-size: .95rem; }
.hero .invite { display: inline-block; margin-top: 10px; background: rgba(255,255,255,.12); padding: 4px 12px; border-radius: 999px; font-size: .85rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding: 0; list-style: none; }
.chips li { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.1); border-radius: 999px; padding: 4px 12px; font-size: .8rem; font-weight: 700; }
.chips svg { width: 14px; height: 14px; color: #5ac4ff; }

.seasonal { background: var(--danger); color: #fff; text-align: center; font-weight: 800; padding: 8px 12px; font-size: .9rem; letter-spacing: .02em; }

/* ---------- layout ---------- */
.layout { display: grid; gap: 16px; margin-top: -56px; position: relative; }
@media (min-width: 992px) {
    .layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 24px; }
    .hero h1 { font-size: 2.1rem; }
    body { padding-bottom: 0; }
}
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 16px; }
@media (min-width: 640px) { .card { padding: 28px; } }

/* ---------- stepper ---------- */
.stepper { padding: 0; margin: 0 0 20px; list-style: none; display: none; counter-reset: s; }
.stepper li { flex: 1; position: relative; text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); }
.stepper li::before {
    counter-increment: s; content: counter(s);
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; margin: 0 auto 6px; border-radius: 50%;
    background: var(--line); color: var(--muted); font-size: .85rem; position: relative; z-index: 1;
}
.stepper li::after { content: ''; position: absolute; top: 14px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 2px; background: var(--line); }
.stepper li:last-child::after { display: none; }
.step-btn { background: none; border: 0; padding: 2px 4px; margin: 0; font: inherit; color: inherit; cursor: default; border-radius: 6px; }
.step-btn:not(:disabled) { cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.step-btn:not(:disabled):hover { color: var(--primary-dark); text-decoration-color: currentColor; }
.step-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.stepper li.done:has(.step-btn:not(:disabled)) { cursor: pointer; }
.stepper li.done { color: var(--ink); }
.stepper li.done::before { content: '\2713'; background: var(--primary); color: #fff; }
.stepper li.done::after { background: var(--primary); }
.stepper li.current { color: var(--ink); }
.stepper li.current::before { background: var(--ink); color: #fff; box-shadow: 0 0 0 4px var(--primary-soft); }
@media (max-width: 991px) { .compact .hero p, .compact .hero .chips, .compact .hero .invite { display: none; } .compact .hero { padding-bottom: 64px; } }
@media (min-width: 640px) { .stepper { display: flex; } .progress-mobile { display: none; } }
.progress-mobile { margin-bottom: 18px; }
.progress-mobile .meta { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.progress-mobile .meta strong { color: var(--ink); }
.progress-mobile .bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress-mobile .bar i { display: block; height: 100%; background: var(--primary); width: 0; transition: width .3s ease; border-radius: 99px; }

/* ---------- pannelli ---------- */
.panel h2 { font-size: 1.35rem; font-weight: 800; }
.panel .lead { color: var(--muted); margin: 4px 0 20px; font-size: .95rem; }
.panel:focus { outline: none; }

/* ---------- offerte ---------- */
.offers { display: grid; gap: 12px; }
.offer { position: relative; display: block; cursor: pointer; }
.offer input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.offer .box { display: block; border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; transition: border-color .15s, box-shadow .15s, background .15s; background: #fff; }
.offer:hover .box { border-color: #c9d6e6; }
.offer input:checked + .box { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(9,147,253,.12); }
.offer input:focus-visible + .box { outline: 3px solid var(--primary); outline-offset: 2px; }
.offer .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.offer .name { font-weight: 800; font-size: 1.05rem; color: var(--ink); }
.offer .price { text-align: right; white-space: nowrap; }
.offer .price b { font-size: 1.5rem; color: var(--ink); font-weight: 800; }
.offer .price small { color: var(--muted); font-weight: 700; }
.offer .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #c4cbd6; flex: 0 0 auto; margin-top: 2px; display: flex; align-items: center; justify-content: center; background: #fff; }
.offer input:checked + .box .tick { background: var(--primary); border-color: var(--primary); }
.offer input:checked + .box .tick::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.offer .title-row { display: flex; gap: 10px; align-items: flex-start; }
.badge { display: inline-block; font-size: .72rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); margin-top: 6px; }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.features { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 4px; font-size: .88rem; color: var(--text); }
.features li { display: flex; gap: 8px; align-items: flex-start; }
.features svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 3px; color: var(--ok); }
.offer .more { position: relative; z-index: 2; margin-top: 8px; font-size: .85rem; }
.features.extra { margin-top: 4px; }
.offer-note { margin-top: 10px; font-size: .82rem; color: var(--danger); font-weight: 700; }
.promo-box { margin-top: 10px; border: 1px dashed #f3b6bd; background: var(--danger-soft); border-radius: 10px; padding: 12px 14px; font-size: .82rem; }
.promo-box ul { margin: 6px 0 0; padding-left: 18px; }
.promo-box small { display: block; margin-top: 8px; color: var(--muted); }

/* ---------- form ---------- */
.grid2 { display: grid; gap: 14px; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 1fr 1fr 1fr; } .span2 { grid-column: span 2; } .grid-addr { grid-template-columns: 5fr 5fr 2fr; } }
.grid3, .grid-addr { display: grid; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.grid2 .field, .grid3 .field, .grid-addr .field { margin-bottom: 0; }
.grid2, .grid3, .grid-addr { margin-bottom: 14px; }
.field label { font-weight: 700; font-size: .875rem; color: var(--ink); }
.field input, .field select {
    width: 100%; height: 50px; padding: 0 14px; font: inherit; color: var(--ink);
    border: 1.5px solid #d3d8e0; border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none; appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23777e90' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(9,147,253,.18); }
.field.invalid input, .field.invalid select { border-color: var(--danger); background: #fffafa; }
.field .hint { font-size: .78rem; color: var(--muted); }
.field .err { font-size: .8rem; color: var(--danger); font-weight: 700; display: none; }
.field.invalid .err { display: block; }
.prefix { display: flex; }
.prefix span { display: flex; align-items: center; padding: 0 12px; background: #f0f2f5; border: 1.5px solid #d3d8e0; border-right: 0; border-radius: 10px 0 0 10px; color: var(--muted); font-weight: 700; }
.prefix input { border-radius: 0 10px 10px 0; }
.uc { text-transform: uppercase; }

/* ---------- otp ---------- */
.otp-wrap { max-width: 360px; }
.otp-input { text-align: center; font-size: 1.8rem !important; letter-spacing: .5em; font-weight: 800; height: 62px !important; padding-left: .5em !important; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--primary-dark); cursor: pointer; text-decoration: underline; }
.linkbtn:disabled { color: var(--muted); text-decoration: none; cursor: default; }

/* ---------- pagamento ---------- */
.pay { display: grid; gap: 10px; margin: 14px 0 18px; }
.pay label { display: flex; gap: 12px; align-items: center; border: 2px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; position: relative; background: #fff; }
.pay input { position: absolute; opacity: 0; }
.pay label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.pay label:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }
.pay svg { width: 26px; height: 26px; color: var(--ink); flex: 0 0 26px; }
.pay b { display: block; color: var(--ink); }
.pay small { color: var(--muted); }
.coupon-toggle { margin: 4px 0 10px; }
.coupon-row { display: flex; gap: 8px; margin-bottom: 14px; }
.coupon-row input { flex: 1; height: 46px; padding: 0 14px; font: inherit; border: 1.5px solid #d3d8e0; border-radius: 10px; text-transform: uppercase; }
.coupon-row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(9,147,253,.18); }
.secure { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .82rem; margin-top: 10px; }
.secure svg { width: 16px; height: 16px; color: var(--ok); }

/* ---------- riepilogo ---------- */
.summary { display: none; }
@media (min-width: 992px) { .summary { display: block; position: sticky; top: 16px; } }
.summary h3 { font-size: 1rem; font-weight: 800; margin-bottom: 12px; }
.summary .plan { font-weight: 800; color: var(--ink); }
.summary .plan small { display: block; color: var(--muted); font-weight: 700; font-size: .85rem; }
.lines { margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); list-style: none; display: grid; gap: 8px; font-size: .92rem; }
.lines li { display: flex; justify-content: space-between; gap: 8px; }
.lines li.discount { color: var(--ok); font-weight: 700; }
.lines li.total { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; font-size: 1.15rem; font-weight: 800; color: var(--ink); }
.summary .note { margin-top: 12px; font-size: .8rem; color: var(--muted); }
.summary .trust { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: .82rem; color: var(--muted); }
.summary .trust div { display: flex; gap: 8px; align-items: center; }
.summary .trust svg { width: 16px; height: 16px; color: var(--ok); flex: 0 0 16px; }

.lines li.line-note { display: block; margin-top: -4px; font-size: .78rem; line-height: 1.35; color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 6px 10px; }
.summary-inline { background: var(--bg); border-radius: 12px; padding: 14px 16px 16px; margin-bottom: 18px; }
.summary-inline .plan { font-weight: 800; color: var(--ink); }
.summary-inline .plan small { display: block; color: var(--muted); font-weight: 700; font-size: .82rem; }
.summary-inline .lines { margin-top: 10px; padding-top: 10px; }
@media (min-width: 992px) { .summary-inline { display: none; } }
.offer-info { margin-top: 10px; font-size: .85rem; background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 8px 10px; }
.infobox { display: flex; gap: 12px; align-items: flex-start; background: var(--primary-soft); border: 1px solid #c7e3fb; border-radius: 12px; padding: 14px 16px; margin: 0 0 18px; color: #064a80; }
.infobox svg { width: 26px; height: 26px; flex: 0 0 26px; }
.infobox b { display: block; color: #043a66; }
.infobox p { font-size: .9rem; margin-top: 2px; }
.refund { display: flex; gap: 12px; align-items: flex-start; background: var(--ok-soft); border: 1px solid #bfe8d3; border-radius: 12px; padding: 14px 16px; margin-top: 18px; color: #0c6c3e; }
.refund svg { width: 26px; height: 26px; flex: 0 0 26px; }
.refund b { display: block; color: #0a5732; }
.refund p { font-size: .88rem; margin-top: 2px; color: #0c6c3e; }
.refund a { color: #0a5732; }

/* ---------- bottoni e barra azioni ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 52px; padding: 0 26px; border-radius: 12px; border: 0; cursor: pointer;
    font: inherit; font-weight: 800; font-size: 1rem; text-decoration: none;
    background: var(--primary); color: #fff; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--primary-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid #cfd5de; }
.btn.ghost:hover { background: #f0f2f5; }
.btn.light { background: var(--primary-soft); color: var(--primary-dark); }
.btn.sm { height: 42px; padding: 0 16px; font-size: .9rem; }
.actionbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(37,36,51,.08);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.actionbar .inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.actionbar .tot { white-space: nowrap; font-size: .75rem; color: var(--muted); font-weight: 700; line-height: 1.15; margin-right: auto; }
.actionbar .tot strong { display: block; font-size: 1.15rem; color: var(--ink); }
.actionbar .btn { flex: 1 1 auto; }
.actionbar .btn.ghost { flex: 0 0 auto; padding: 0 18px; }
@media (min-width: 992px) {
    .actionbar { position: static; box-shadow: none; border: 0; background: none; padding: 20px 0 0; }
    .actionbar .tot { display: none; }
    .actionbar .inner { justify-content: space-between; max-width: none; }
    .actionbar .btn { flex: 0 0 auto; min-width: 220px; }
    .actionbar .btn.ghost { min-width: 0; }
    .actionbar #btn-next { margin-left: auto; }
}

/* ---------- alert, bonifico ---------- */
.alert { border-radius: 10px; padding: 12px 14px; font-size: .9rem; margin-bottom: 18px; background: var(--primary-soft); color: #064a80; }
.alert.ok { background: var(--ok-soft); color: #0c6c3e; }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.err { background: var(--danger-soft); color: #9a1020; }
.copyrow { display: flex; gap: 8px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.copyrow small { display: block; color: var(--muted); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.copyrow code { font: inherit; font-weight: 800; color: var(--ink); word-break: break-all; }
.copyrow button { flex: 0 0 auto; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(37,36,51,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal .dlg { background: #fff; border-radius: 16px; max-width: 420px; width: 100%; padding: 26px 22px 22px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal h3 { font-size: 1.2rem; margin-bottom: 8px; }
.modal p { color: var(--text); font-size: .95rem; margin-bottom: 18px; }
.modal .ico { width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800; }
.modal .ico.error { background: var(--danger-soft); color: var(--danger); }
.modal .ico.success { background: var(--ok-soft); color: var(--ok); }
.modal .ico.warning { background: var(--warn-soft); color: var(--warn); }
.spinner { width: 42px; height: 42px; border: 4px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } * { transition: none !important; } }

/* ---------- footer, consenso ---------- */
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 32px 16px 24px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; margin-bottom: 10px; }
.foot a { color: var(--muted); }
.consent { background: #14131f; color: #fff; padding: 10px 16px; font-size: .85rem; }
.consent .inner { max-width: 1080px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.consent a { color: #8fd1ff; }
.consent .btns { display: flex; gap: 8px; }
.consent .btn { height: 40px; padding: 0 18px; font-size: .875rem; }
.consent .btn.ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.consent .btn.ghost:hover { background: rgba(255,255,255,.1); }

/* ---------- pagine esito ---------- */
.result { text-align: center; max-width: 560px; margin: -48px auto 0; position: relative; }
.result .icon { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; }
.result .icon svg { width: 36px; height: 36px; }
.result .icon.ok { background: var(--ok-soft); color: var(--ok); }
.result .icon.ko { background: var(--danger-soft); color: var(--danger); }
.result h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.result p { color: var(--text); margin-bottom: 14px; }
.result .steps { text-align: left; background: var(--bg); border-radius: 12px; padding: 14px 18px 14px 36px; margin: 18px 0; font-size: .92rem; }
.result .steps li { margin: 6px 0; }
.result .btns { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

/* ---------- campagna Black Friday (etichette = nero/bianco; resto = var(--primary) del tema) ----------
   Niente barra separata sopra l'hero (già scuro): il messaggio vive dentro l'hero stesso, come una pillola
   sullo stile di .invite già esistente, così non si impila un altro blocco scuro sopra un blocco scuro. */
.bf-pill { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 5px 16px 5px 5px; margin-bottom: 14px; font-size: .85rem; }
.bf-pill > b { background: #000; color: #fff; font-weight: 800; font-size: .7rem; letter-spacing: .03em; padding: 5px 11px; border-radius: 999px; }
.bf-pill > span { color: #fff; font-weight: 600; }
.bf-pill .bf-cd { color: #9fd6ff; font-weight: 700; }
.bf-pill .bf-cd b { color: #fff; font-weight: 800; }
.bf-pill .bf-cd.cd-expired { color: #cfcfcf; }

/* corner tag on the Black Friday offer card, not squeezed into the title row */
.offer.offer-bf .box { position: relative; border-color: #0b0b0b; overflow: hidden; padding-top: 38px; }
.bf-tag { position: absolute; top: 0; right: 0; background: #000; color: #fff; font-weight: 800; font-size: .66rem; letter-spacing: .03em; text-transform: uppercase; padding: 6px 14px; border-radius: 0 0 0 12px; }
.bf-cd-chip { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; font-weight: 700; background: var(--primary-soft); color: var(--primary-dark); border-radius: 999px; padding: 5px 12px; margin: 8px 0 2px; }
.bf-cd-chip b { color: var(--primary-dark); }
.bf-cd-chip.cd-expired { background: var(--line); color: var(--text); }
@media (max-width: 640px) { .bf-pill { font-size: .78rem; } }
@media (min-width: 560px) { .result .btns { flex-direction: row; justify-content: center; } }
