@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ═══════════════════════════════════════════════════════
   CNASHOP — Safety & Learning Commerce
   Navy istituzionale #0B1E36 · Rosso CNA #E2231A · Superfici slate
   ═══════════════════════════════════════════════════════ */

:root {
    /* Palette del design system */
    --navy:         #0B1E36;
    --navy-deep:    #0A192F;
    --navy-ink:     #071324;
    --blue:         #002B7F;
    --red:          #E2231A;
    --red-dark:     #C71B13;
    --red-light:    #FEF2F2;

    /* Alias storici usati in tutto il sito (primario = navy) */
    --coral:        #0B1E36;
    --coral-dark:   #002B7F;
    --coral-light:  #E3EAF5;
    --coral-xlight: #F1F5F9;
    --amber:        #E2231A;
    --amber-light:  #FEF2F2;
    --slate:        #0E132B;
    --slate-mid:    #1E293B;
    --text:         #0E132B;
    --text-muted:   #64748B;
    --link:         #002B7F;
    --border:       #E2E8F0;
    --border-strong:#CBD5E1;
    --bg:           #F8FAFC;
    --bg-card:      #FFFFFF;
    --white:        #FFFFFF;
    --green:        #059669;
    --green-light:  #ECFDF5;

    --radius-sm:    8px;
    --radius:       12px;
    --radius-lg:    16px;
    --radius-xl:    24px;
    --radius-pill:  999px;

    --shadow-sm:    0 1px 3px 0 rgba(11,30,54,.05), 0 1px 2px -1px rgba(11,30,54,.05);
    --shadow:       0 10px 15px -3px rgba(11,30,54,.08), 0 4px 6px -4px rgba(11,30,54,.04);
    --shadow-lg:    0 20px 40px -12px rgba(11,30,54,.18);
    --shadow-coral: 0 8px 20px rgba(11,30,54,.22);
    --shadow-red:   0 10px 24px rgba(226,35,26,.28);

    --transition:   .2s cubic-bezier(.4,0,.2,1);
}

/* ──────────────────────── Base ──────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5,
.brand, .btn, .main-nav a {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

h1 { font-size: 2.4rem; font-weight: 800; line-height: 1.15; color: var(--slate); }
h2 { font-size: 1.8rem; font-weight: 700; color: var(--slate); }
h3 { font-size: 1.1rem; font-weight: 700; color: var(--slate); }
h4 { font-size: 0.95rem; font-weight: 700; color: var(--slate); }

a { color: var(--link); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--navy); }

:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

img { display: block; max-width: 100%; }

.container {
    width: min(100% - 48px, 1200px);
    margin: 0 auto;
    padding: 0;
}

/* ──────────────────────── Header ──────────────────────── */
.topbar {
    background: var(--navy-ink);
    color: #CBD5E1;
    font-size: 12px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    position: relative;
    z-index: 210;
}
.topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 8px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
}
.topbar-group { display: flex; align-items: center; gap: 22px; }
.topbar a { color: #E2E8F0; display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: #fff; }
.topbar a i { color: #F43F5E; font-size: 12px; }
.topbar a strong { font-weight: 500; }
.topbar-muted { color: #94A3B8; font-size: 11px; font-weight: 300; }
.topbar-live { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; letter-spacing: .01em; }
.topbar-live .dot { width: 8px; height: 8px; border-radius: 50%; background: #34D399; animation: cna-pulse 2s ease-in-out infinite; }
.topbar-sep { padding-left: 16px; border-left: 1px solid rgba(255,255,255,.15); color: #94A3B8; }
@keyframes cna-pulse { 50% { opacity: .35; } }

.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226,232,240,.8);
}
.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    min-height: 80px;
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
}

.brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; color: var(--navy); text-decoration: none; }
.brand-logo {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--border);
    padding: 4px;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition);
    flex-shrink: 0;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.brand:hover .brand-logo { border-color: rgba(226,35,26,.4); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -.02em;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition);
}
.brand:hover .brand-name { color: var(--red); }
.brand-tag {
    font-size: 9px;
    font-weight: 700;
    background: var(--navy);
    color: #fff;
    padding: 3px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.brand-sub { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .14em; margin-top: 3px; }

.header-search { flex: 1; max-width: 520px; position: relative; }
.header-search > i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #94A3B8; font-size: 14px; pointer-events: none; }
.header-search input {
    width: 100%;
    padding: 11px 84px 11px 44px;
    border-radius: var(--radius-pill);
    background: #F1F5F9;
    border: 1px solid transparent;
    font: 400 14px 'Inter', sans-serif;
    color: var(--text);
    box-shadow: inset 0 1px 2px rgba(15,23,42,.05);
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.header-search input::placeholder { color: #94A3B8; }
.header-search input:focus { background: #fff; border-color: var(--border-strong); outline: none; box-shadow: 0 0 0 4px #F1F5F9; }
.header-search:focus-within > i { color: var(--red); }
.header-search kbd {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    font: 600 11px 'Inter', sans-serif;
    color: #94A3B8;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 2px 8px;
}

.main-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.main-nav a,
.nav-dropdown-toggle {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}
.nav-dropdown-toggle { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; cursor: pointer; }
.main-nav a:hover, .main-nav a.active,
.nav-dropdown-toggle:hover, .nav-dropdown-toggle.active { color: var(--navy); background: #F1F5F9; text-decoration: none; }
.main-nav a.nav-highlight { color: var(--red); font-weight: 700; }
.main-nav a.nav-highlight:hover { background: var(--red-light); color: var(--red); }
.nav-dropdown-toggle .caret { font-size: 10px; transition: transform var(--transition); }

.nav-item-dropdown { position: relative; }
.nav-item-dropdown:hover .nav-dropdown-toggle .caret,
.nav-item-dropdown.is-open .nav-dropdown-toggle .caret { transform: rotate(180deg); }
.nav-dropdown-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 6px;
    min-width: 230px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    z-index: 100;
}
.nav-dropdown-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown.is-open .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--slate);
    white-space: nowrap;
}
.nav-dropdown-menu a i { width: 16px; color: #94A3B8; }
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active { background: #F1F5F9; color: var(--navy); text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; padding-left: 16px; border-left: 1px solid var(--border); }

.icon-link {
    position: relative;
    display: grid;
    place-items: center;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: #F1F5F9;
    color: #334155;
    font-size: 17px;
    transition: background var(--transition), color var(--transition);
}
.icon-link:hover { background: #E2E8F0; color: var(--navy); }
.cart-badge {
    position: absolute;
    top: -4px; right: -4px;
    background: var(--red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-pill);
    min-width: 20px; height: 20px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-sm);
}

.btn-account,
.nav-dropdown-toggle.btn-account {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: var(--radius-pill);
    background: var(--navy);
    color: #fff;
    font: 600 13.5px 'Inter', sans-serif;
    border: 0;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition), box-shadow var(--transition);
}
.btn-account i { color: #CBD5E1; }
.btn-account:hover,
.nav-dropdown-toggle.btn-account:hover { background: #0F172A; color: #fff; box-shadow: var(--shadow-sm); }
.account-menu .nav-dropdown-menu { left: auto; right: 0; }
.account-menu-name {
    padding: 8px 12px 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: var(--radius-sm);
    background: #F1F5F9;
    color: #334155;
    font-size: 18px;
    cursor: pointer;
}
.mobile-account-links { display: none; }

.quickbar { background: rgba(255,255,255,.7); border-bottom: 1px solid rgba(226,232,240,.6); }
.quickbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 32px;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    font-size: 12px;
    scrollbar-width: none;
}
.quickbar-inner::-webkit-scrollbar { display: none; }
.quickbar-label { color: #94A3B8; font-weight: 500; flex-shrink: 0; margin-right: 4px; display: inline-flex; gap: 6px; align-items: center; }
.quickbar a {
    flex-shrink: 0;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: #F1F5F9;
    color: #334155;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
}
.quickbar a:hover, .quickbar a.active { background: var(--red); color: #fff; text-decoration: none; }
.quickbar a.quickbar-free { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; font-weight: 600; display: inline-flex; gap: 5px; align-items: center; }
.quickbar a.quickbar-free:hover, .quickbar a.quickbar-free.active { background: #D1FAE5; color: #047857; }

/* ──────────────────────── Buttons ──────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 20px;
    border-radius: 10px;
    background: var(--navy);
    color: #fff;
    border: 1.5px solid transparent;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .01em;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    white-space: nowrap;
    text-decoration: none;
}
.btn:hover { background: var(--blue); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-coral); text-decoration: none; }
.btn:active { transform: translateY(0); background: #081628; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-outline { background: transparent; color: var(--navy); border-color: var(--border-strong); }
.btn-outline:hover { background: #F1F5F9; color: var(--navy); box-shadow: none; }

.btn-ghost { background: #F1F5F9; color: var(--text); border-color: transparent; }
.btn-ghost:hover { background: #E2E8F0; color: var(--slate); box-shadow: none; transform: none; }

.btn-accent,
.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn-accent:hover,
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; box-shadow: var(--shadow-red); }

.btn-danger { background: #DC2626; border-color: #DC2626; }
.btn-danger:hover { background: #B91C1C; border-color: #B91C1C; }

.btn-dark { background: var(--navy); border-color: var(--navy); }
.btn-dark:hover { background: #0F172A; border-color: #0F172A; }

.btn-white { background: #fff; color: #1E293B; border-color: var(--border); }
.btn-white:hover { background: #F8FAFC; color: var(--navy); box-shadow: var(--shadow-sm); }

.btn-soft { background: #F1F5F9; color: #1E293B; }
.btn-soft:hover { background: #E2E8F0; color: var(--navy); box-shadow: none; }

.btn-glass { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.15); font-family: 'Inter', sans-serif; font-weight: 500; }
.btn-glass:hover { background: rgba(255,255,255,.2); color: #fff; box-shadow: none; }

.btn-sm { min-height: 36px; padding: 7px 14px; font-size: 12.5px; }
.btn-lg { padding: 14px 28px; font-size: 15px; border-radius: 12px; }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* ──────────────────────── Hero ──────────────────────── */
.home-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #fff 0%, #F8FAFC 55%, #F1F5F9 100%);
    border-bottom: 1px solid var(--border);
    padding: 56px 0 96px;
}
.home-hero-glow { position: absolute; border-radius: 50%; filter: blur(64px); pointer-events: none; }
.home-hero-glow-red { width: 600px; height: 600px; top: -130px; right: 22%; background: rgba(254,202,202,.4); }
.home-hero-glow-blue { width: 450px; height: 450px; top: 80px; left: -80px; background: rgba(224,242,254,.55); }
.home-hero-inner {
    position: relative;
    max-width: 920px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}
.home-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px 6px 14px;
    border-radius: var(--radius-pill);
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #334155;
}
.home-hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #E11D48; }
.home-hero-edition {
    background: var(--red-light);
    color: var(--red);
    border: 1px solid #FEE2E2;
    border-radius: var(--radius-pill);
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
}
.home-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--navy-deep);
    letter-spacing: -.02em;
    line-height: 1.12;
}
.home-hero h1 .hl {
    color: var(--red);
    text-decoration: underline;
    text-decoration-color: #FECACA;
    text-decoration-thickness: 4px;
    text-underline-offset: 8px;
}
.home-hero-inner > p { font-size: 1.2rem; color: #475569; max-width: 680px; line-height: 1.6; margin-top: -10px; }
.home-search {
    width: 100%;
    max-width: 680px;
    background: #fff;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(15,23,42,.08), 0 2px 4px -2px rgba(15,23,42,.06);
    display: flex;
    align-items: center;
    gap: 8px;
}
.home-search > i { color: #94A3B8; margin-left: 12px; }
.home-search input { flex: 1; min-width: 0; border: 0; outline: 0; font: 400 14px 'Inter', sans-serif; padding: 8px 4px; background: transparent; color: var(--text); }
.home-search input::placeholder { color: #94A3B8; }
.home-search .btn { border-radius: 12px; flex-shrink: 0; font-family: 'Inter', sans-serif; font-weight: 500; }
.home-hero-cta { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.home-hero-cta .btn-red { box-shadow: 0 4px 6px -1px rgba(226,35,26,.25); }
.home-hero-cta .btn-red:hover { transform: translateY(-2px); box-shadow: var(--shadow-red); }
.home-hero-stats {
    width: 100%;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px 48px;
}
.home-hero-stats > div { display: flex; align-items: center; gap: 12px; text-align: left; }
.stat-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.stat-red { background: var(--red-light); color: var(--red); }
.stat-green { background: var(--green-light); color: var(--green); }
.stat-blue { background: #EFF6FF; color: var(--navy); }
.home-hero-stats strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #1E293B; }
.home-hero-stats small { font-size: 12px; color: var(--text-muted); }

/* Punti di forza */
.home-pillars { background: #fff; border-bottom: 1px solid var(--border); padding: 40px 0; }
.home-pillars-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.pillar {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: #F8FAFC;
    border: 1px solid #F1F5F9;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.pillar:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.pillar-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex-shrink: 0; font-size: 18px; box-shadow: var(--shadow-sm); }
.bg-navy { background: var(--navy); }
.bg-red { background: var(--red); }
.bg-green { background: var(--green); }
.pillar h4 { font-size: 14px; color: #0F172A; }
.pillar p { font-size: 12px; color: var(--text-muted); margin-top: 4px; line-height: 1.55; }

/* Esploratore categorie */
.home-explorer { background: #F8FAFC; border-bottom: 1px solid var(--border); padding: 72px 0; }
.segmented {
    display: inline-flex;
    padding: 6px;
    background: rgba(226,232,240,.8);
    border-radius: 16px;
    margin-top: 32px;
    max-width: 100%;
    overflow-x: auto;
    box-shadow: inset 0 1px 2px rgba(15,23,42,.06);
}
.segmented a {
    padding: 8px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    white-space: nowrap;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    transition: background var(--transition), color var(--transition);
}
.segmented a:hover { background: rgba(255,255,255,.55); color: #0F172A; text-decoration: none; }
.segmented a.active { background: #fff; color: var(--navy); font-weight: 600; box-shadow: var(--shadow-sm); }
.segmented a.segmented-free { color: #047857; }
.segmented a.segmented-free:hover { background: rgba(209,250,229,.6); }
.text-red { color: var(--red); }
.text-blue { color: #2563EB; }

.explorer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.explorer-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    color: inherit;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.explorer-card:hover { border-color: rgba(226,35,26,.4); box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.explorer-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.explorer-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 19px;
    background: var(--tl);
    color: var(--t);
    transition: background var(--transition), color var(--transition);
}
.explorer-card:hover .explorer-icon { background: var(--t); color: #fff; }
.tone-red     { --t: #DC2626; --tl: #FEF2F2; }
.tone-amber   { --t: #D97706; --tl: #FFFBEB; }
.tone-rose    { --t: #E11D48; --tl: #FFF1F2; }
.tone-blue    { --t: #0B1E36; --tl: #EFF6FF; }
.tone-indigo  { --t: #4F46E5; --tl: #EEF2FF; }
.tone-purple  { --t: #9333EA; --tl: #FAF5FF; }
.tone-teal    { --t: #0D9488; --tl: #F0FDFA; }
.tone-slate   { --t: #475569; --tl: #F1F5F9; }
.tone-emerald { --t: #059669; --tl: #ECFDF5; }
.tone-orange  { --t: #EA580C; --tl: #FFF7ED; }
.tone-yellow  { --t: #B45309; --tl: #FEFCE8; }
.explorer-count { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-pill); background: #F1F5F9; color: #475569; }
.explorer-card h3 { font-size: 16px; color: #0F172A; transition: color var(--transition); }
.explorer-card:hover h3 { color: var(--red); }
.explorer-card p { font-size: 12px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }

/* Corsi in evidenza */
.home-featured { background: #fff; padding: 80px 0 88px; }
.link-arrow { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; color: var(--red); }
.link-arrow i { transition: transform var(--transition); }
.link-arrow:hover { color: var(--red-dark); text-decoration: none; }
.link-arrow:hover i { transform: translateX(4px); }
.home-featured .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.home-featured-cta { margin-top: 56px; display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.home-featured-cta .btn-lg { border-radius: 16px; padding: 16px 30px; }

/* Imprese */
.home-b2b { background: var(--navy-deep); padding: 64px 0; position: relative; overflow: hidden; }
.home-b2b::before,
.home-b2b::after { content: ""; position: absolute; border-radius: 50%; filter: blur(64px); pointer-events: none; }
.home-b2b::before { width: 384px; height: 384px; right: -96px; bottom: -96px; background: rgba(226,35,26,.2); }
.home-b2b::after { width: 320px; height: 320px; left: -40px; top: 0; background: rgba(59,130,246,.1); }
.home-b2b-card {
    position: relative;
    z-index: 1;
    background: linear-gradient(90deg, rgba(15,23,42,.9), var(--navy-deep));
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 32px;
    padding: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.35);
}
.home-b2b-text { max-width: 680px; }
.home-b2b-tag {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: rgba(226,35,26,.2);
    border: 1px solid rgba(226,35,26,.3);
    color: #FB7185;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.home-b2b h2 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 16px 0; }
.home-b2b p { color: #CBD5E1; font-size: 1.05rem; font-weight: 300; line-height: 1.7; }
.home-b2b ul { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 20px; font-size: 13px; color: #CBD5E1; font-weight: 500; }
.home-b2b li { display: inline-flex; gap: 6px; align-items: center; }
.home-b2b li i { color: #34D399; }
.home-b2b-actions { display: flex; flex-direction: column; gap: 14px; flex-shrink: 0; }
.home-b2b-actions .btn-red:hover { transform: scale(1.02); }
main:has(> .home-b2b) + .site-footer { margin-top: 0; }

/* ──────────────────────── Sections ──────────────────────── */
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }

.section-head { margin-bottom: 40px; }
.section-head.center { text-align: center; max-width: 760px; margin: 0 auto 40px; display: flex; flex-direction: column; align-items: center; }
.section-head.split { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 48px; }
.section-tag {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: #FEE2E2;
    color: var(--red);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.75rem, 3.2vw, 2.25rem); font-weight: 800; color: var(--navy-deep); letter-spacing: -.02em; line-height: 1.2; }
.section-head p { color: var(--text-muted); margin-top: 10px; font-size: 15px; }

.section-title { text-align: center; margin-bottom: 36px; }
.section-title .tag {
    display: inline-block;
    background: #FEE2E2;
    color: var(--red);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    margin-bottom: 12px;
}
.section-title h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin-bottom: 12px; letter-spacing: -.02em; color: var(--navy-deep); }
.section-title p { color: var(--text-muted); font-size: 15.5px; max-width: 500px; margin: 0 auto; }

/* ──────────────────────── Category chips ──────────────────────── */
.categories-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 44px;
}
.category-chip {
    min-height: 42px;
    padding: 9px 20px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    background: var(--white);
    transition: all var(--transition);
}
.category-chip:hover {
    border-color: var(--coral);
    color: var(--coral);
    background: var(--coral-xlight);
    text-decoration: none;
}
.category-chip.active {
    background: var(--coral);
    border-color: var(--coral);
    color: #fff;
    box-shadow: var(--shadow-coral);
}

/* ──────────────────────── Product grid ──────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px 24px;
}
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.product-card > a { display: block; overflow: hidden; }
.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg);
    transition: transform .4s ease;
}
.product-card:hover img { transform: scale(1.04); }

.product-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.product-card .cat-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--coral);
    font-weight: 700;
    letter-spacing: .06em;
    margin-bottom: 8px;
}
.product-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}
.product-card h3 a { color: var(--slate); }
.product-card h3 a:hover { color: var(--coral); }

.product-card .desc {
    font-size: 14px;
    color: var(--text-muted);
    flex: 1;
    margin-bottom: 16px;
    line-height: 1.6;
}
.event-date {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--green, #1f8a4c);
    margin-bottom: 8px;
}
.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.price {
    font-size: 20px;
    font-weight: 800;
    color: var(--slate);
    letter-spacing: -0.3px;
}
.price .old {
    text-decoration: line-through;
    color: var(--text-muted);
    font-weight: 400;
    font-size: 14px;
    margin-right: 4px;
}
.price-coral { color: var(--coral); }

.stock-badge {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
}
.stock-badge.in {
    background: var(--green-light);
    color: #2a9d6a;
}
.stock-badge.out {
    background: #fdecea;
    color: #c0392b;
}

/* Sale ribbon */
.product-card-wrap { position: relative; }
.sale-ribbon {
    position: absolute;
    top: 14px; left: -2px;
    background: var(--coral);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 4px 12px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    z-index: 2;
    box-shadow: 2px 2px 6px rgba(0,0,0,.12);
}

/* ──────────────────────── Forms ──────────────────────── */
.form-box {
    max-width: 460px;
    margin: 64px auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 42px;
    box-shadow: var(--shadow);
}
.form-box h2 {
    margin-bottom: 28px;
    font-size: 1.5rem;
}

.form-group { margin-bottom: 20px; }

label {
    display: block;
    font-weight: 600;
    margin-bottom: 7px;
    font-size: 13px;
    color: var(--slate);
}

input[type=text], input[type=email], input[type=password],
input[type=number], input[type=tel], textarea, select {
    width: 100%;
    min-height: 46px;
    padding: 11px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--coral);
    box-shadow: 0 0 0 3px rgba(0,43,127,.15);
}
textarea { resize: vertical; min-height: 100px; }

/* Search bar */
.search-bar {
    display: flex;
    gap: 10px;
    max-width: 440px;
    margin: 0 auto 40px;
}

.catalog-content { padding-top: 4px; }
.search-bar input {
    flex: 1;
    border-radius: var(--radius-pill);
    background: var(--white);
}

/* ──────────────────────── Alerts ──────────────────────── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}
.alert-error   { background: #fdf0ef; color: #c0392b; border: 1px solid #f5c6c0; }
.alert-success { background: var(--green-light); color: #1e7a4b; border: 1px solid #b9e3c6; }
.alert-info    { background: var(--coral-xlight); color: var(--coral-dark); border: 1px solid var(--border); }

/* ──────────────────────── Tables ──────────────────────── */
table { width: 100%; border-collapse: collapse; background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; }
th, td { padding: 13px 16px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
th {
    background: var(--bg);
    font-weight: 700;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg); }

/* ──────────────────────── Cart ──────────────────────── */
.cart-table img {
    width: 64px; height: 64px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.qty-input {
    width: 68px;
    text-align: center;
    border-radius: var(--radius);
}
.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}
.cart-summary .row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--text-muted);
}
.cart-summary .total {
    font-size: 22px;
    font-weight: 800;
    color: var(--slate);
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin-top: 4px;
}

/* ──────────────────────── Checkout ──────────────────────── */
.checkout-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
    align-items: start;
}

.page-title {
    margin: 24px 0 32px;
    letter-spacing: -.04em;
}

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
    align-items: start;
}

.cart-table-wrap {
    padding: 0;
    overflow-x: auto;
}

/* ──────────────────────── Breadcrumb ──────────────────────── */
.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--coral); }
.breadcrumb::before { content: none; }

/* ──────────────────────── Product detail ──────────────────────── */
.product-detail {
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    gap: clamp(36px, 6vw, 72px);
    align-items: start;
    max-width: 1060px;
    margin: 32px auto 0;
    padding-bottom: 40px;
}
.product-detail-media {
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    background: var(--white);
    padding: clamp(12px, 2vw, 20px);
}
.product-detail-media img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    object-position: center;
    border-radius: calc(var(--radius-xl) - 8px);
}
.product-detail-content,
.product-detail-info { padding-top: 12px; }
.product-detail-content h1 { font-size: clamp(2rem, 4vw, 3.15rem); letter-spacing: -.045em; }
.product-detail-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--slate);
    margin: 18px 0 22px;
    letter-spacing: -0.5px;
}

.product-purchase-card {
    margin-top: 28px;
    padding: 26px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.session-details {
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}
.session-details .session-seats-full { color: #991b1b; font-weight: 600; }
.product-detail-price .old {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-right: 10px;
}

/* ──────────────────────── Footer ──────────────────────── */
.site-footer {
    background: #060E1A;
    color: #94A3B8;
    padding: 64px 0 48px;
    margin-top: 96px;
    border-top: 1px solid #1E293B;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 56px;
    border-bottom: 1px solid rgba(30,41,59,.8);
}
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand .brand-logo { width: 40px; height: 40px; border: 0; }
.footer-brand strong { display: block; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 20px; color: #fff; letter-spacing: -.02em; line-height: 1.1; }
.footer-brand small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: #94A3B8; }
.footer-desc { font-size: 12.5px; line-height: 1.7; max-width: 380px; }
.footer-badge { margin-top: 16px; font-size: 12px; color: #34D399; font-weight: 500; display: flex; gap: 8px; align-items: center; }
.footer-grid h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.footer-grid a { display: block; color: #94A3B8; font-size: 12.5px; margin-bottom: 9px; transition: color var(--transition); }
.footer-grid a:hover { color: #fff; text-decoration: none; }
.footer-icon-link { display: flex !important; align-items: center; gap: 8px; color: #CBD5E1 !important; }
.footer-icon-link i { color: #F43F5E; width: 16px; }
.footer-contact { font-size: 12.5px; line-height: 1.7; margin-bottom: 10px; }
.footer-contact strong { color: #E2E8F0; }
.footer-hours { font-size: 11px; color: #64748B; margin-top: 6px; }

.footer-bottom {
    padding-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #64748B;
}
.footer-secure { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer-chip { display: inline-flex; gap: 6px; align-items: center; padding: 4px 12px; border-radius: 6px; background: #0F172A; border: 1px solid #1E293B; color: #CBD5E1; font-weight: 500; }
.footer-chip i { color: #F43F5E; }

/* ──────────────────────── Badges ──────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.badge-pending    { background: #fff3e0; color: #e65c00; }
.badge-paid,
.badge-completed  { background: var(--green-light); color: #1e7a4b; }
.badge-cancelled,
.badge-refunded   { background: #fdecea; color: #c0392b; }
.badge-processing { background: var(--coral-xlight); color: var(--coral-dark); }

/* ──────────────────────── Admin ──────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }

.admin-sidebar {
    width: 240px;
    background: var(--slate);
    color: #fff;
    padding: 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}
.admin-sidebar-header {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.admin-sidebar .brand {
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 16px;
    font-weight: 800;
    gap: 10px;
}
.admin-sidebar .brand:hover { color: #fff; }
.admin-sidebar .brand img { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; background: #fff; padding: 3px; border: 1px solid rgba(255,255,255,.2); }

.admin-sidebar nav { padding: 12px 10px; flex: 1; }
.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius);
    color: rgba(255,255,255,.6);
    font-size: 13.5px;
    font-weight: 600;
    transition: background var(--transition), color var(--transition);
    margin-bottom: 2px;
}
.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(255,255,255,.08);
    color: #fff;
    text-decoration: none;
}

.admin-content {
    flex: 1;
    padding: clamp(24px, 4vw, 44px);
    background: var(--bg);
    overflow-x: auto;
}
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}
.admin-topbar h1 { font-size: 1.6rem; }

.admin-page-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 24px;
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--coral), var(--amber));
}
.stat-card .value {
    font-size: 28px;
    font-weight: 800;
    color: var(--slate);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}
.stat-card .label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.admin-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}
.admin-card > h3 { margin-bottom: 20px; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; }

.breadcrumb-admin {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* ──────────────────────── Page header ──────────────────────── */
.page-hero {
    background: linear-gradient(180deg, #fff 0%, #F1F5F9 100%);
    border-bottom: 1px solid var(--border);
    padding: 52px 0 44px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    width: 480px; height: 480px;
    top: -240px; right: 10%;
    border-radius: 50%;
    background: rgba(254,202,202,.4);
    filter: blur(64px);
    pointer-events: none;
}
.page-hero h1 { position: relative; color: var(--navy-deep); font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 8px; letter-spacing: -.02em; }
.page-hero p  { position: relative; color: var(--text-muted); font-size: 15.5px; }

/* ──────────────────────── Empty state ──────────────────────── */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
}
.empty-state-icon {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: .5;
}
.empty-state h3 { color: var(--slate); margin-bottom: 10px; }

/* ──────────────────────── Utilities ──────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.mt-auto     { margin-top: auto; }
.mt-4        { margin-top: 1rem; }
.mt-6        { margin-top: 1.5rem; }
.mt-8        { margin-top: 2rem; }
.mb-4        { margin-bottom: 1rem; }
.mb-6        { margin-bottom: 1.5rem; }
.mb-8        { margin-bottom: 2rem; }
.pt-4        { padding-top: 1rem; }
.divider     { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

/* ──────────────────────── Responsive ──────────────────────── */
@media (max-width: 1279px) {
    .nav-toggle { display: inline-flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: calc(100% + 1px);
        left: 16px;
        right: 16px;
        max-height: calc(100vh - 140px);
        overflow-y: auto;
        padding: 14px;
        background: rgba(255,255,255,.98);
        border: 1px solid var(--border);
        border-radius: 0 0 18px 18px;
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
    }
    .main-nav.is-open { display: flex; }
    .main-nav > a,
    .main-nav .nav-dropdown-toggle { width: 100%; justify-content: space-between; padding: 12px 14px; text-align: left; }
    .main-nav .nav-dropdown-menu {
        position: static;
        margin: 4px 0 8px 12px;
        min-width: 0;
        box-shadow: none;
        border: 0;
        border-left: 2px solid var(--coral-light);
        border-radius: 0;
    }
    .main-nav .nav-item-dropdown:hover .nav-dropdown-menu { display: none; }
    .main-nav .nav-item-dropdown.is-open .nav-dropdown-menu { display: flex; }
    .header-actions { margin-left: auto; }
}

/* Con il menu completo visibile la ricerca diventa compatta */
@media (min-width: 1280px) {
    .header-search { min-width: 170px; }
    .header-search input { padding-right: 16px; }
    .header-search kbd { display: none; }
}
@media (min-width: 1440px) {
    .header-inner, .topbar-inner, .quickbar-inner { max-width: 1400px; }
    .header-search kbd { display: block; }
    .header-search input { padding-right: 84px; }
}

@media (max-width: 1120px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .footer-about { grid-column: 1 / -1; }
    .product-detail { gap: 32px; }
    .home-pillars-grid { grid-template-columns: repeat(2, 1fr); }
    .explorer-grid { grid-template-columns: repeat(3, 1fr); }
    .home-featured .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
    .home-b2b-card { flex-direction: column; align-items: flex-start; padding: 44px; }
    .home-b2b-actions { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 1024px) {
    .header-search { display: none; }
    .header-actions { margin-left: auto; }
}

@media (max-width: 768px) {
    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.5rem; }
    .topbar-inner { padding: 8px 16px; justify-content: center; }
    .topbar-muted, .topbar-sep { display: none; }
    .header-inner { padding: 0 16px; min-height: 68px; gap: 10px; }
    .quickbar-inner { padding: 10px 16px; }
    .brand { gap: 10px; }
    .brand-logo { width: 40px; height: 40px; }
    .brand-name { font-size: 18px; }
    .brand-sub { display: none; }
    .header-actions { padding-left: 0; border-left: 0; gap: 6px; }
    .btn-account span:not(.caret) { display: none; }
    .btn-account, .nav-dropdown-toggle.btn-account { padding: 0; width: 42px; height: 42px; justify-content: center; }
    .btn-account .caret { display: none; }
    .mobile-account-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding-top: 12px;
        margin-top: 8px;
        border-top: 1px solid var(--border);
    }
    .mobile-account-links a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 44px;
        padding: 9px 12px;
        border-radius: var(--radius);
        background: #F1F5F9;
        color: var(--navy);
    }
    .home-hero { padding: 40px 0 64px; }
    .home-hero-inner > p { font-size: 1.05rem; }
    .home-hero-stats { justify-content: flex-start; gap: 18px; }
    .home-explorer, .home-featured { padding: 56px 0; }
    .home-b2b { padding: 40px 0; }
    .home-b2b-card { padding: 32px 24px; border-radius: 24px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .product-detail { grid-template-columns: 1fr; }
    .product-detail-media { max-width: 520px; }
    .checkout-grid  { grid-template-columns: 1fr; }
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
    .admin-layout   { flex-direction: column; }
    .admin-sidebar  { width: 100%; }
    .section  { padding: 52px 0; }
    .form-box { padding: 28px 20px; margin: 32px auto; }
    .site-footer { margin-top: 72px; padding-top: 52px; }
}

@media (max-width: 640px) {
    .home-pillars-grid { grid-template-columns: 1fr; }
    .home-featured .product-grid { grid-template-columns: 1fr; }
    .explorer-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .explorer-card { padding: 16px; }
    .home-search { flex-direction: column; align-items: stretch; }
    .home-search > i { display: none; }
    .home-search input { padding: 10px 12px; }
    .home-hero-cta { display: grid; width: 100%; }
    .home-b2b-actions { flex-direction: column; width: 100%; }
    .home-featured-cta .btn-lg { width: 100%; white-space: normal; }
}

@media (max-width: 480px) {
    .container  { width: min(100% - 32px, 1200px); }
    .brand-text { display: none; }
    .btn-lg     { padding: 13px 22px; }
    .product-grid { grid-template-columns: 1fr; }
    .product-card img { height: 220px; }
    .page-hero  { padding: 40px 0 36px; }
    .page-hero h1 { font-size: 1.7rem; }
    .product-detail { margin-top: 20px; gap: 26px; }
    .product-detail-content h1 { font-size: 2rem; }
    .product-purchase-card { padding: 20px; }
    .search-bar { flex-direction: column; }
    .search-bar .btn { width: 100%; }
    .categories-row { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding: 2px 0 10px; scroll-snap-type: x proximity; }
    .category-chip { flex: 0 0 auto; scroll-snap-align: start; }
    .cart-table { min-width: 720px; }
    .cart-table-wrap { margin: 0 -4px; }
    .admin-content { padding: 20px 16px; }
    .admin-page-actions { margin-bottom: 18px; }
    .admin-page-actions .btn { width: 100%; }
    .explorer-card h3 { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ──────────────── Preventivi affiliati ──────────────── */
.aq-badge { vertical-align: middle; font-size: 11px; }
.aq-inviato   { background: var(--coral-xlight); color: var(--coral-dark); }
.aq-visto     { background: var(--amber-light); color: #b25a0c; }
.aq-pagato    { background: var(--green-light); color: #1e7a4b; }
.aq-annullato,
.aq-scaduto   { background: #f1f2f5; color: var(--text-muted); }

.aff-page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.aff-page-head h1 { margin-bottom: 4px; }
.aff-page-head p { color: var(--text-muted); margin: 0; }
.aff-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.aff-tabs a { padding: 10px 16px; font-weight: 600; font-size: 14px; color: var(--text-muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.aff-tabs a:hover { color: var(--coral); }
.aff-tabs a.active { color: var(--coral); border-bottom-color: var(--coral); }
.aff-page .stats-row { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.aff-page .stat-pill { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; flex: 1; min-width: 140px; text-align: center; }
.aff-page .stat-pill .val { font-size: 22px; font-weight: 800; color: var(--coral); }
.aff-page .stat-pill .lbl { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.aff-page .aff-link-box { font-family: monospace; font-size: 13px; background: var(--bg); border: 1px dashed var(--border); padding: 10px 12px; border-radius: var(--radius-sm); word-break: break-all; margin-bottom: 12px; }

/* Composizione preventivo */
.qb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.qb-section-title { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin: 0 0 16px; }
.qb-section-title span { width: 28px; height: 28px; border-radius: 50%; background: var(--coral); color: #fff; display: inline-grid; place-items: center; font-size: 13px; }
.qb-summary .qb-section-title:not(:first-child) { margin-top: 24px; }
.qb-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.qb-product { background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color var(--transition), box-shadow var(--transition); }
.qb-product.selected { border-color: var(--coral); box-shadow: var(--shadow-coral); }
.qb-product img { width: 100%; height: 120px; object-fit: cover; }
.qb-product-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.qb-product h4 { font-size: 14px; line-height: 1.35; margin: 0; flex: 1; }
.qb-price { font-weight: 800; color: var(--coral); }
.qb-session { width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; }
.qb-qty { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-pill); overflow: hidden; align-self: flex-start; }
.qb-qty button { width: 34px; height: 34px; border: 0; background: var(--bg); font-size: 18px; cursor: pointer; color: var(--coral); }
.qb-qty button:hover { background: var(--coral-xlight); }
.qb-qty input { width: 48px; height: 34px; border: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.qb-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qb-summary { position: sticky; top: 90px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); }
.qb-summary .form-group { margin-bottom: 14px; }
.qb-summary .form-group small { display: block; color: var(--text-muted); font-size: 12px; margin-top: 4px; font-weight: 400; }
.qb-summary input[type=range] { width: 100%; accent-color: var(--amber); }
.qb-totals { background: var(--bg); border-radius: var(--radius); padding: 14px 16px; margin: 18px 0; }
.qb-totals .row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.qb-totals .row.discount { color: var(--green); font-weight: 600; }
.qb-totals .row.total { font-size: 18px; font-weight: 800; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }
.qb-timeline { list-style: none; padding: 0; margin: 0; }
.qb-timeline li { padding: 8px 0; color: var(--text-muted); font-size: 14px; display: flex; gap: 10px; align-items: center; }
.qb-timeline li.done { color: var(--text); }
.qb-timeline li.done i { color: var(--green); }

/* Pagina pubblica della proposta */
.pq-hero { position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: 56px 48px; color: #fff;
    background: radial-gradient(circle at 85% 20%, rgba(226,35,26,.35), transparent 40%),
                radial-gradient(circle at 10% 110%, rgba(255,255,255,.12), transparent 45%),
                linear-gradient(135deg, var(--coral-dark) 0%, var(--coral) 55%, #1E3A8A 100%);
    display: flex; justify-content: space-between; align-items: center; gap: 32px; }
.pq-hero::after { content: ""; position: absolute; width: 380px; height: 380px; right: -120px; bottom: -200px; border-radius: 50%; border: 60px solid rgba(255,255,255,.06); }
.pq-hero-inner { position: relative; z-index: 1; max-width: 640px; }
.pq-eyebrow { display: inline-flex; gap: 8px; align-items: center; background: rgba(255,255,255,.14); padding: 6px 14px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.pq-hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.15; margin: 18px 0 12px; }
.pq-hero p { color: rgba(255,255,255,.85); font-size: 1.05rem; margin: 0; }
.pq-countdown { display: inline-flex; gap: 8px; align-items: center; margin-top: 20px; background: #fff; color: var(--coral-dark); font-weight: 700; padding: 8px 16px; border-radius: var(--radius-pill); font-size: 14px; }
.pq-discount-badge { position: relative; z-index: 1; flex-shrink: 0; width: 160px; height: 160px; border-radius: 50%; background: var(--amber); display: grid; place-content: center; text-align: center; box-shadow: 0 16px 40px rgba(226,35,26,.4); transform: rotate(-8deg); animation: pq-pop .6s cubic-bezier(.34,1.56,.64,1) both; }
.pq-discount-badge span { font-size: 44px; font-weight: 900; line-height: 1; }
.pq-discount-badge small { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
@keyframes pq-pop { from { transform: rotate(-8deg) scale(.4); opacity: 0; } to { transform: rotate(-8deg) scale(1); opacity: 1; } }
.pq-state { margin: 20px 0 0; padding: 16px 20px; border-radius: var(--radius); background: #f1f2f5; color: var(--text); font-weight: 600; display: flex; gap: 10px; align-items: center; }
.pq-state-ok { background: var(--green-light); color: #1e7a4b; }
.pq-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; margin-top: 32px; align-items: start; }
.pq-message { margin: 0 0 28px; display: flex; gap: 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.pq-avatar { flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%; background: var(--coral-light); color: var(--coral); font-weight: 800; display: grid; place-items: center; font-size: 18px; }
.pq-message blockquote { margin: 0 0 8px; font-size: 1.02rem; line-height: 1.6; color: var(--text); font-style: italic; }
.pq-message figcaption { font-weight: 700; color: var(--text-muted); font-size: 14px; }
.pq-message figcaption::before { content: "— "; }
.pq-section-title { font-size: 1.25rem; margin: 0 0 16px; }
.pq-items { display: flex; flex-direction: column; gap: 14px; }
.pq-item { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 20px; align-items: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; transition: transform var(--transition), box-shadow var(--transition); }
.pq-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pq-item img { width: 150px; height: 100px; object-fit: cover; border-radius: var(--radius); }
.pq-item h3 { font-size: 1rem; margin: 0 0 6px; line-height: 1.35; }
.pq-item h3 a { color: var(--slate); }
.pq-item h3 a:hover { color: var(--coral); }
.pq-item p { font-size: 13px; color: var(--text-muted); margin: 6px 0 0; line-height: 1.5; }
.pq-item-meta { font-size: 13px; font-weight: 600; color: var(--green); }
.pq-qty { display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 12px; font-weight: 700; background: var(--coral-xlight); color: var(--coral); padding: 4px 10px; border-radius: var(--radius-pill); }
.pq-item-price { text-align: right; padding-right: 8px; }
.pq-item-price s { display: block; color: var(--text-muted); font-size: 13px; }
.pq-item-price strong { font-size: 1.2rem; color: var(--slate); }
.pq-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.pq-trust div { background: var(--coral-xlight); border-radius: var(--radius); padding: 16px; display: grid; gap: 2px; }
.pq-trust i { color: var(--coral); font-size: 20px; margin-bottom: 6px; }
.pq-trust strong { font-size: 14px; }
.pq-trust span { font-size: 12px; color: var(--text-muted); }
.pq-summary { position: sticky; top: 90px; }
.pq-summary-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-lg); }
.pq-summary-card h3 { margin: 0 0 14px; }
.pq-summary-card .row { display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0; color: var(--text-muted); }
.pq-summary-card .pq-green { color: var(--green); font-weight: 700; }
.pq-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--border); margin-top: 10px; padding-top: 14px; }
.pq-total span { font-weight: 700; }
.pq-total strong { font-size: 2rem; color: var(--slate); letter-spacing: -.02em; }
.pq-saving { margin: 10px 0 18px; background: var(--green-light); color: #1e7a4b; font-weight: 700; font-size: 14px; padding: 8px 12px; border-radius: var(--radius-sm); text-align: center; }
.pq-cta { margin-top: 8px; box-shadow: 0 10px 24px rgba(226,35,26,.3); }
.pq-note { font-size: 12px; color: var(--text-muted); margin: 12px 0 0; text-align: center; }
.pq-auth { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--border); }
.pq-auth h4 { margin: 0 0 14px; font-size: 15px; }
.pq-auth .form-group { margin-bottom: 12px; }
.pq-auth input[disabled] { background: var(--bg); color: var(--text-muted); }
.pq-auth-note { margin: 16px 0 12px; font-size: 14px; background: var(--amber-light); padding: 12px; border-radius: var(--radius-sm); }

@media (max-width: 960px) {
    .qb-layout, .pq-layout { grid-template-columns: 1fr; }
    .qb-summary, .pq-summary { position: static; }
}
@media (max-width: 640px) {
    .pq-hero { padding: 36px 24px; flex-direction: column; align-items: flex-start; }
    .pq-discount-badge { width: 120px; height: 120px; position: absolute; top: 16px; right: 16px; }
    .pq-discount-badge span { font-size: 32px; }
    .pq-hero-inner { padding-top: 90px; }
    .pq-item { grid-template-columns: 90px minmax(0, 1fr); }
    .pq-item img { width: 90px; height: 70px; }
    .pq-item-price { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; align-items: baseline; }
    .pq-trust { grid-template-columns: 1fr; }
}

/* Filtri e solleciti preventivi */
.aq-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.aq-filters a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--bg-card); color: var(--text); font-size: 13px; font-weight: 600; }
.aq-filters a span { background: var(--bg); border-radius: var(--radius-pill); padding: 1px 8px; font-size: 12px; color: var(--text-muted); }
.aq-filters a:hover { border-color: var(--coral); }
.aq-filters a.active { background: var(--coral); border-color: var(--coral); color: #fff; }
.aq-filters a.active span { background: rgba(255,255,255,.2); color: #fff; }
.aq-filters a.attention:not(.active) { border-color: var(--amber); }
.aq-filters a.attention span { background: var(--amber); color: #fff; }
.aq-filter-hint { font-size: 13px; color: var(--text-muted); margin: 0 0 14px; }
.aq-row-attention td:first-child { box-shadow: inset 4px 0 0 var(--amber); }
.aq-actions { white-space: nowrap; }
.aq-actions form { display: inline; }
.aq-actions .btn[disabled] { opacity: .45; cursor: not-allowed; }
