/* ==========================================================================
   Coupon corsi - grafica ispirata al template Nexshop (Codezeel WCM100235)
   Struttura del template, colori presi da config.asp (LoginGradient), font Rubik.
   ========================================================================== */

:root {
    --brand: #3482c0;          /* LoginGradient(0) da config.asp, sovrascritto dalla pagina */
    --brand-dark: #1e5184;     /* LoginGradient(1) */
    /* valori di riserva per browser senza color-mix; sotto vengono sovrascritti */
    --brand-deep: var(--brand-dark);
    --brand-tint: #ffffff;
    --brand-soft: #f0f2f7;
    --dark: #222222;
    --dark-2: #181818;
    --dark-3: #2c2c2c;
    --text: #222222;
    --muted: #777777;
    --muted-2: #999999;
    --line: #e3e6ec;
    --bg: #f5f6f9;
    --bg-2: #f0f2f7;
    --white: #ffffff;
    --danger: #c62828;
    --radius: 6px;
    --radius-lg: 10px;
    --shadow: 0 1px 2px rgba(20, 24, 40, .05), 0 6px 20px rgba(20, 24, 40, .06);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, .25);
    --font: "Rubik", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --wrap: 1320px;
}

@supports (color: color-mix(in srgb, red 50%, blue)) {
    :root {
        --brand-deep: color-mix(in srgb, var(--brand-dark) 78%, black);
        --brand-tint: color-mix(in srgb, var(--brand) 45%, white);
        --brand-soft: color-mix(in srgb, var(--brand) 10%, white);
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dt, dd { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.ic { width: 1.15em; height: 1.15em; vertical-align: -0.2em; fill: none; flex: none; }

/* ---------- Bottoni ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45em;
    padding: 11px 20px; border-radius: var(--radius); border: 1px solid transparent;
    font-weight: 500; font-size: 14px; letter-spacing: .02em; line-height: 1.2;
    text-align: center; white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover { background: var(--brand-dark); color: var(--white); }
.btn-dark { background: var(--dark); color: var(--white); }
.btn-dark:hover { background: var(--brand); color: var(--white); }
.btn-ghost { background: var(--bg-2); color: var(--dark); }
.btn-ghost:hover { background: var(--brand-dark); color: var(--white); }
.btn-lg { padding: 14px 26px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--brand); color: var(--white); }
.icon-btn {
    width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--bg-2);
    display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.icon-btn:hover { background: var(--brand); color: var(--white); }

/* ---------- Barra superiore ---------- */
.topbar { background: var(--brand-deep); color: #bdbdbd; font-size: 13px; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 40px; }
.topbar-msg strong { color: var(--white); }
.topbar-links { display: flex; gap: 22px; white-space: nowrap; min-width: 0; }
.topbar-links a { display: inline-flex; align-items: center; gap: 6px; }
.topbar-links strong { color: var(--white); }
.topbar-links a:hover { color: var(--white); }

/* ---------- Testata ---------- */
.header { background: var(--brand-dark); color: var(--white); }
.header-in { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; min-height: 96px; padding-top: 12px; padding-bottom: 12px; }
.header-in > * { min-width: 0; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand:hover { color: var(--white); }
.brand-box { background: var(--white); border-radius: var(--radius); padding: 6px 10px; display: inline-flex; }
.brand-box img { height: 50px; width: auto; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-txt strong { font-size: 20px; font-weight: 700; letter-spacing: .01em; }
.brand-txt small { font-size: 12px; color: #bdbdbd; letter-spacing: .06em; text-transform: uppercase; }

.search { display: flex; max-width: 720px; width: 100%; margin: 0 auto; background: var(--white); border-radius: var(--radius); overflow: hidden; }
.search input { flex: 1; min-width: 0; border: 0; padding: 0 18px; height: 48px; color: var(--text); background: transparent; }
.search input::placeholder { color: var(--muted-2); }
.search input:focus-visible { outline-offset: -3px; }
.search button {
    border: 0; background: var(--brand); color: var(--white); padding: 0 22px; font-weight: 700; font-size: 13px;
    text-transform: uppercase; letter-spacing: .05em; display: inline-flex; align-items: center; gap: 8px;
}
.search button:hover { background: var(--brand-dark); }

.cart-btn { display: flex; align-items: center; gap: 12px; background: transparent; border: 0; color: var(--white); padding: 4px 0; }
.cart-btn:hover { color: var(--brand-tint); }
.cart-ico { position: relative; display: inline-flex; }
.cart-ico .ic { width: 30px; height: 30px; }
.cart-count {
    position: absolute; top: -8px; right: -10px; min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 10px; background: var(--white); color: var(--brand-dark); font-size: 11px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}
.cart-count.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.35); } }
.cart-txt { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.cart-txt small { font-size: 12px; color: #bdbdbd; }
.cart-txt strong { font-size: 15px; }

/* ---------- Navigazione categorie ---------- */
.catnav { background: var(--white); border-bottom: 1px solid var(--line); }
.catnav-in { display: flex; align-items: stretch; gap: 8px; min-height: 52px; }
.catnav-all {
    display: inline-flex; align-items: center; gap: 10px; padding: 0 22px 0 0; margin-right: 10px;
    border-right: 1px solid var(--line); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .05em;
    white-space: nowrap;
}
.catnav-list { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; }
.catnav-list::-webkit-scrollbar { display: none; }
.catnav-list a {
    display: inline-flex; align-items: center; height: 52px; padding: 0 14px; font-weight: 500; font-size: 13.5px;
    white-space: nowrap; border-bottom: 3px solid transparent; color: var(--text);
}
.catnav-list a:hover { color: var(--dark); border-color: var(--line); }
.catnav-list a.is-active { border-color: var(--brand); color: var(--dark); }

/* ---------- Layout catalogo ---------- */
.view { padding: 24px 0 40px; }
.shop-top { display: grid; grid-template-columns: 270px 1fr; gap: 24px; align-items: stretch; }

.sidebar { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sidebar-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--bg); }
.sidebar-list li + li { border-top: 1px solid var(--line); }
.sidebar-list a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 18px; font-size: 14px; }
.sidebar-list a:hover { background: var(--bg); color: var(--dark); }
.sidebar-list a.is-active { background: var(--brand-dark); color: var(--white); }
.sidebar-list a.is-active .count { background: var(--white); color: var(--brand-dark); }
.sidebar-list .count { font-size: 12px; font-weight: 500; color: var(--muted); background: var(--bg-2); border-radius: 10px; padding: 1px 8px; }
.sidebar-help { display: flex; gap: 12px; padding: 16px 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); background: var(--bg); }
.sidebar-help .ic { width: 28px; height: 28px; color: var(--brand); }
.sidebar-help a { color: var(--brand-dark); font-weight: 500; }

/* Banner */
.hero {
    position: relative; overflow: hidden; border-radius: var(--radius-lg); color: var(--white); min-height: 380px;
    background: radial-gradient(120% 160% at 0% 100%, var(--brand) 0%, var(--brand-dark) 65%);
    display: grid; grid-template-columns: 1.25fr .9fr; gap: 24px; align-items: center; align-content: center; padding: 44px 48px;
}
.hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18;
    background:
        radial-gradient(circle at 20% 90%, #fff 0 4px, transparent 5px) 0 0 / 120px 120px,
        linear-gradient(115deg, transparent 48%, rgba(255,255,255,.25) 50%, transparent 52%);
}
.hero-txt { position: relative; }
.hero-eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-tint); font-weight: 500; margin-bottom: 14px; }
.hero h1 { font-size: clamp(26px, 2.6vw, 38px); font-weight: 500; letter-spacing: -.01em; max-width: 18ch; }
.hero h1 em { font-style: normal; font-weight: 700; color: var(--brand-tint); }
.hero-sub { margin-top: 16px; color: rgba(255,255,255,.82); max-width: 46ch; font-size: 15px; }
.hero-actions { margin-top: 26px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hero .btn-primary { background: var(--white); color: var(--brand-dark); }
.hero .btn-primary:hover { background: var(--brand-tint); color: var(--brand-dark); }
.hero-link { color: var(--white); font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; border-bottom: 1px solid rgba(255,255,255,.4); }
.hero-link:hover { color: var(--brand-tint); border-color: var(--brand-tint); }

/* Il biglietto coupon: elemento firma della pagina */
.ticket { position: relative; display: grid; grid-template-columns: 1fr 1fr; color: var(--dark); filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); transform: rotate(-3deg); }
.ticket-main, .ticket-stub { background: var(--white); padding: 26px 22px; }
.ticket-main { border-radius: 14px 0 0 14px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; position: relative; }
.ticket-stub { border-radius: 0 14px 14px 0; background: var(--brand-soft); border-left: 2px dashed rgba(0,0,0,.2); display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.ticket-main::before, .ticket-main::after {
    content: ""; position: absolute; right: -11px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-dark); z-index: 1;
}
.ticket-main::before { top: -11px; }
.ticket-main::after { bottom: -11px; }
.ticket-label { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--brand); }
.ticket-big { font-size: 74px; font-weight: 700; line-height: .95; letter-spacing: -.04em; margin: 8px 0 6px; color: var(--brand-dark); }
.ticket-big sup { font-size: .42em; vertical-align: top; margin-left: 2px; letter-spacing: 0; }
.ticket-note { font-size: 12px; font-weight: 500; }
.ticket-stub li { display: flex; align-items: baseline; gap: 10px; font-size: 13px; color: var(--muted); }
.ticket-stub li b { font-size: 20px; width: 56px; color: var(--brand); }
.ticket-stub small { font-size: 11px; color: var(--muted-2); line-height: 1.35; }

/* Vantaggi */
.features { margin-top: 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); display: grid; grid-template-columns: repeat(4, 1fr); }
.features li { display: flex; gap: 14px; align-items: center; padding: 20px 22px; }
.features li + li { border-left: 1px solid var(--line); }
.features .ic { width: 38px; height: 38px; color: var(--brand-dark); }
.features strong { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.features span { font-size: 13px; color: var(--muted); }

/* Sezioni per categoria */
.catalog { margin-top: 8px; }
.section { margin-top: 32px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 2px solid var(--brand-dark); }
.section-head h2 { font-size: 22px; font-weight: 700; }
.section-head .count { color: var(--muted); font-size: 13px; font-weight: 500; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

.pcard { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .2s, border-color .2s, transform .2s; position: relative; }
.pcard:hover { box-shadow: var(--shadow); border-color: #d4d8e2; transform: translateY(-2px); }
.pcard-img { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-2); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.pcard:hover .pcard-img img { transform: scale(1.04); }
.pcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pcard h3 { font-size: 14.5px; font-weight: 500; line-height: 1.35; min-height: 2.7em; }
.pcard h3 a:hover { color: var(--brand-dark); }
.pcard-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: auto; }
.price { font-size: 18px; font-weight: 700; }
.price small, .price-line small { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.pcard .btn { width: 100%; justify-content: center; }
.pcard.in-cart .btn-add { background: var(--brand-dark); color: var(--white); }
.pcard.in-cart .btn-add:hover { background: var(--brand); color: var(--white); }
.badge-ext { position: absolute; top: 10px; left: 10px; background: var(--brand-dark); color: var(--white); font-size: 11px; font-weight: 500; padding: 3px 8px; border-radius: 4px; z-index: 1; }
.badge-incart { position: absolute; top: 10px; right: 10px; background: var(--brand); color: var(--white); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px; z-index: 1; display: inline-flex; align-items: center; gap: 4px; }

.empty { padding: 60px 20px; text-align: center; color: var(--muted); background: var(--white); border: 1px dashed var(--line); border-radius: var(--radius); margin-top: 32px; }
.empty strong { display: block; color: var(--dark); font-size: 18px; margin-bottom: 6px; }
.search-info { margin-top: 28px; display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.search-info button { border: 0; background: var(--bg-2); border-radius: 20px; padding: 4px 12px; font-size: 13px; }
.search-info button:hover { background: var(--brand); color: var(--white); }

/* ---------- Pannello carrello ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(15, 15, 15, .55); z-index: 60; opacity: 0; transition: opacity .25s; }
.drawer-backdrop.show { opacity: 1; }
.drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--white); z-index: 70;
    display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
    box-shadow: var(--shadow-lg);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 16px 20px 20px; background: var(--bg); display: grid; gap: 10px; }

.citem { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.citem:last-child { border-bottom: 0; }
.citem img { width: 84px; aspect-ratio: 3/2; object-fit: cover; border-radius: 4px; background: var(--bg-2); }
.citem-title { font-size: 14px; font-weight: 500; line-height: 1.35; }
.citem-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.citem-price { font-weight: 700; }
.citem-price small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--white); }
.qty button { width: 30px; height: 30px; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; }
.qty button:hover { background: var(--brand); color: var(--white); }
.qty button[disabled] { opacity: .3; cursor: default; background: transparent; }
.qty input { width: 40px; height: 30px; border: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; }
.citem-remove { border: 0; background: transparent; color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; }
.citem-remove:hover { color: var(--danger); }
.cart-empty { text-align: center; color: var(--muted); padding: 50px 10px; }
.cart-empty .ic { width: 48px; height: 48px; color: var(--line); display: block; margin: 0 auto 10px; }

.tier { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.tier-bar { flex: 1; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.tier-bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; transition: width .3s; }
.tier b { color: var(--dark); white-space: nowrap; }

.totals { display: grid; gap: 6px; }
.totals > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; }
.totals dt { color: var(--muted); }
.totals-sconto dd { color: var(--brand); font-weight: 500; }
.totals-tot { padding-top: 8px; border-top: 1px solid var(--line); margin-top: 4px; }
.totals-tot dt { color: var(--dark); font-weight: 700; font-size: 15px; }
.totals-tot dt small { color: var(--muted); font-weight: 400; font-size: 11px; }
.totals-tot dd { font-size: 22px; font-weight: 700; }
.totals-note { font-size: 12px; color: var(--muted); }

/* ---------- Checkout ---------- */
.checkout-head { margin-bottom: 22px; }
.checkout-head h1 { font-size: 28px; margin: 10px 0 6px; }
.checkout-head p { color: var(--muted); max-width: 70ch; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; color: var(--muted); }
.back-link:hover { color: var(--dark); }
.checkout { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; }
.summary { position: sticky; top: 20px; display: grid; gap: 16px; }
.summary h2 { font-size: 18px; }
.summary-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.summary-list li span:last-child { font-weight: 700; white-space: nowrap; }
.summary-list small { display: block; color: var(--muted); font-size: 12px; }

.registered-hint { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; font-size: 14px; margin-bottom: 22px; }
.registered-hint .ic { color: var(--brand-dark); width: 22px; height: 22px; }
.registered-hint a { font-weight: 700; color: var(--brand-dark); text-decoration: underline; text-underline-offset: 2px; }

.form-title { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; margin: 26px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.form-title:first-of-type { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.span-2 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.field label { font-size: 13px; font-weight: 500; }
.field label b { color: var(--danger); font-weight: 700; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="password"], .field input[type="search"] {
    height: 46px; border: 1px solid #d5d9e2; border-radius: var(--radius); padding: 0 14px; background: var(--white);
    transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: var(--muted-2); }
.field input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.field.has-error input { border-color: var(--danger); }
.field-msg { font-size: 12px; color: var(--danger); }
.suggest { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 4px; max-height: 240px; overflow-y: auto; }
.suggest li { padding: 10px 14px; font-size: 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.suggest li small { color: var(--muted); }
.suggest li:hover, .suggest li.is-active { background: var(--bg); }

.privacy { margin-top: 26px; padding: 18px 20px; background: var(--bg); border-radius: var(--radius); font-size: 13px; color: var(--muted); display: grid; gap: 10px; }
.privacy h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--dark); }
.privacy a { color: var(--dark); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; color: var(--text); }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.check.has-error span { color: var(--danger); }
.check b { color: var(--danger); }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.form-error { color: var(--danger); font-size: 13px; font-weight: 500; }

/* ---------- Finestre (dialog) ---------- */
.modal { border: 0; padding: 0; border-radius: var(--radius-lg); background: var(--white); color: var(--text); width: min(760px, calc(100% - 32px)); max-height: calc(100vh - 48px); box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(15, 15, 15, .6); }
.modal-login { width: min(440px, calc(100% - 32px)); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--white); z-index: 1; }
.modal-head h2 { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.modal-body { padding: 22px 24px; }
.modal-body.form { display: grid; gap: 14px; }
.login-intro { color: var(--muted); font-size: 14px; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--bg); position: sticky; bottom: 0; }
.price-line .price { font-size: 24px; }
.course-hero { display: grid; grid-template-columns: 240px 1fr; gap: 20px; margin-bottom: 18px; }
.course-hero img { border-radius: var(--radius); aspect-ratio: 3/2; object-fit: cover; width: 100%; background: var(--bg-2); }
.course-hero .cat { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; }
.course-text { font-size: 14.5px; line-height: 1.6; color: #333; }
.course-text h3, .course-text h4 { margin: 18px 0 8px; font-size: 15px; text-transform: uppercase; letter-spacing: .05em; }
.course-text ul, .course-text ol { padding-left: 20px; list-style: disc; margin: 8px 0; }
.course-text p { margin: 0 0 10px; }
.course-text img { max-width: 100%; height: auto; }

/* ---------- Avvisi ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--brand-dark); color: var(--white); padding: 12px 18px; border-radius: var(--radius); font-size: 14px; box-shadow: var(--shadow-lg); z-index: 90; max-width: min(520px, calc(100% - 32px)); display: flex; gap: 10px; align-items: center; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--brand-dark); }
.toast .ic { width: 20px; height: 20px; }

.loading { position: fixed; inset: 0; background: rgba(255,255,255,.7); z-index: 100; display: flex; align-items: center; justify-content: center; }
.loading-box { background: var(--brand-dark); color: var(--white); padding: 14px 22px; border-radius: var(--radius); display: flex; align-items: center; gap: 12px; font-weight: 500; box-shadow: var(--shadow-lg); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: var(--white); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.cookiebar { position: fixed; left: 16px; right: 16px; bottom: 16px; margin: 0 auto; max-width: 720px; background: var(--brand-dark); color: #ddd; padding: 14px 18px; border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; z-index: 50; box-shadow: var(--shadow-lg); }

/* ---------- WhatsApp ---------- */
.topbar-wa a:hover, .wa-link:hover { color: #25d366 !important; }
.sidebar-help .wa-link .ic { width: 1.1em; height: 1.1em; color: #25d366; }
.wa-float {
    position: fixed; right: 18px; bottom: 18px; z-index: 55;
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 12px;
    background: #25d366; color: var(--white); font-weight: 700; font-size: 14px; border-radius: 30px;
    box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: transform .15s, background .15s;
}
.wa-float:hover { background: #1ebe5d; color: var(--white); transform: translateY(-2px); }
.wa-float .ic { width: 26px; height: 26px; }
.drawer.open ~ .wa-float, .cookiebar:not([hidden]) ~ .wa-float { bottom: 90px; }
@media (max-width: 640px) {
    .wa-float { right: 12px; bottom: 12px; padding: 12px; }
    .wa-float span { display: none; }
}

/* ---------- Piede ---------- */
.footer { background: var(--brand-deep); color: #bdbdbd; font-size: 13px; margin-top: 20px; }
.footer-in { display: flex; justify-content: space-between; gap: 20px; padding-top: 26px; padding-bottom: 26px; flex-wrap: wrap; line-height: 1.7; }
.footer strong { color: var(--white); }
.footer a { color: var(--white); }
.footer a:hover { color: var(--brand-tint); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hero { grid-template-columns: 1fr; padding: 34px; }
    .ticket { max-width: 420px; transform: none; }
    .checkout { grid-template-columns: 1fr; }
    .summary { position: static; }
}
@media (max-width: 900px) {
    .topbar-msg { display: none; }
    .topbar-in { justify-content: center; }
    .topbar-links { gap: 14px; font-size: 12px; }
    .header-in { grid-template-columns: 1fr auto; row-gap: 12px; }
    .search { grid-column: 1 / -1; max-width: none; }
    .shop-top { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .features { grid-template-columns: 1fr 1fr; }
    .features li:nth-child(3) { border-left: 0; }
    .features li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
    body { font-size: 14px; }
    .wrap { padding: 0 14px; }
    .brand-txt { display: none; }
    .topbar-links li:nth-child(2) { display: none; }
    .brand-box img { height: 42px; }
    .cart-txt small { display: none; }
    .search button span { display: none; }
    .search button { padding: 0 16px; }
    .catnav-all { padding-right: 12px; margin-right: 4px; }
    .catnav-all span { display: none; }
    .hero { padding: 26px 22px; min-height: 0; }
    .ticket { grid-template-columns: 1fr; }
    .ticket-main { border-radius: 14px 14px 0 0; align-items: center; text-align: center; }
    .ticket-main::before, .ticket-main::after { display: none; }
    .ticket-stub { border-radius: 0 0 14px 14px; border-left: 0; border-top: 2px dashed rgba(0,0,0,.2); }
    .ticket-big { font-size: 60px; }
    .features { grid-template-columns: 1fr; }
    .features li { border-left: 0 !important; padding: 14px 18px; }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .pcard-body { padding: 10px 12px 12px; }
    .pcard h3 { font-size: 13px; }
    .price { font-size: 16px; }
    .section-head h2 { font-size: 18px; }
    .card { padding: 18px 16px; }
    .grid-2 { grid-template-columns: 1fr; }
    .course-hero { grid-template-columns: 1fr; }
    .modal-foot { flex-direction: column; align-items: stretch; }
    .form-actions { flex-direction: column-reverse; align-items: stretch; }
    .form-actions .btn { width: 100%; }
    .cookiebar { flex-direction: column; align-items: stretch; text-align: center; }
    .footer-in { flex-direction: column; text-align: center; }
}
