/* Pagine progetti di realcar.club: stesso stile della home (landing.css). */

@font-face {
    font-family: "Oswald";
    src: url("../fonts/Oswald-Bold.ttf?v=20261204-1") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "Anton";
    src: url("../fonts/Anton-Regular.ttf?v=20261204-1") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

:root {
    --page-bg: #0d0d0e;
    --surface: #171719;
    --surface-light: #202023;
    --surface-hover: #29292d;
    --border: #343438;
    --border-light: #48484e;
    --text: #f7f7f7;
    --body-copy: #e2e2e5;
    --muted: #a9a9b0;
    --brand: #ff0038;
    --brand-dark: #cf002e;
    --brand-hover: #ff5275;
    --success: #00e68a;
    --warning: #ffc53d;
    --surface-rgb: 23, 23, 25;
    --brand-rgb: 255, 0, 56;
    --paypal: #ffc439;
    --paypal-text: #111111;
    --font-body: "Oswald", Arial, sans-serif;
    --font-body-weight: 700;
    --font-brand: "Anton", Impact, sans-serif;
    --font-brand-weight: 400;
    --radius-small: 12px;
    --radius-medium: 18px;
    --radius-large: 26px;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
    --transition: 180ms ease;
    --shell: min(100% - 2rem, 1100px);
}

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

html {
    min-width: 320px;
    color-scheme: dark;
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 50% -12%, rgba(var(--brand-rgb), 0.12), transparent 31rem),
        var(--page-bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: var(--font-body-weight);
    line-height: 1.55;
    letter-spacing: 0.012em;
}

a {
    color: inherit;
}

a,
button {
    -webkit-tap-highlight-color: transparent;
}

button {
    font: inherit;
}

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

p {
    margin: 0 0 1rem;
    color: var(--body-copy);
    font-weight: 400;
}

.shell {
    width: var(--shell);
    margin: 0 auto;
}

:focus-visible {
    outline: 3px solid var(--text);
    outline-offset: 4px;
}

[hidden] {
    display: none !important;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ---------- barra in alto ---------- */

.site-bar {
    position: sticky;
    z-index: 20;
    top: 0;
    border-bottom: 1px solid var(--border);
    background: rgba(13, 13, 14, 0.88);
    backdrop-filter: blur(10px);
}

.site-bar .shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 3.6rem;
}

.site-logo {
    color: var(--brand);
    font-family: var(--font-brand);
    font-size: 1.45rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    gap: 1.1rem;
    font-size: 0.95rem;
}

.site-nav a {
    color: var(--muted);
    text-decoration: none;
    transition: color var(--transition);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    color: var(--text);
}

/* ---------- titoli e sezioni ---------- */

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.6rem;
    color: var(--brand);
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.kicker .dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 0 rgba(var(--brand-rgb), 0.6);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    70% { box-shadow: 0 0 0 0.6rem rgba(var(--brand-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--brand-rgb), 0); }
}

.section {
    padding: 3.5rem 0 0;
}

.section-title {
    margin: 0 0 0.4rem;
    font-family: var(--font-brand);
    font-size: clamp(1.9rem, 4.5vw, 2.8rem);
    font-weight: var(--font-brand-weight);
    line-height: 1.05;
    letter-spacing: 0.015em;
    text-transform: uppercase;
}

.section-lead {
    max-width: 46rem;
    margin-bottom: 1.6rem;
    color: var(--muted);
}

.card {
    padding: 1.3rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
    background: rgba(var(--surface-rgb), 0.92);
    box-shadow: var(--shadow);
}

/* ---------- pulsanti ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3.1rem;
    padding: 0.7rem 1.4rem;
    border: 0;
    border-radius: 999px;
    font-size: 1.02rem;
    letter-spacing: 0.03em;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform var(--transition), filter var(--transition), background var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #ffffff;
}

.btn-ghost {
    border: 1px solid var(--border-light);
    background: var(--surface);
    color: var(--text);
}

.btn-paypal {
    background: var(--paypal);
    color: var(--paypal-text);
}

.btn[aria-disabled="true"] {
    background: var(--surface-light);
    color: var(--muted);
    cursor: not-allowed;
    transform: none;
    filter: none;
}

/* ---------- hero del progetto ---------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: 3.2rem 0 2.6rem;
    border-bottom: 1px solid var(--border);
}

.hero::before,
.hero::after {
    position: absolute;
    z-index: -1;
    right: -6rem;
    width: 34rem;
    height: 3.2rem;
    content: "";
    transform: rotate(-24deg);
}

.hero::before {
    top: 5rem;
    background: var(--brand);
    opacity: 0.85;
}

.hero::after {
    top: 9.2rem;
    background: #ffffff;
    opacity: 0.08;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: center;
    gap: 2rem;
}

.hero-title {
    margin: 0;
    font-family: var(--font-brand);
    font-size: clamp(3.2rem, 11vw, 7rem);
    font-weight: var(--font-brand-weight);
    line-height: 0.92;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.hero-title span {
    display: block;
    color: var(--brand);
}

.hero-sub {
    max-width: 36rem;
    margin: 1.2rem 0 1.6rem;
    color: var(--body-copy);
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    font-weight: 400;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.race-plate {
    position: relative;
    display: grid;
    aspect-ratio: 1 / 1;
    max-width: 22rem;
    margin-left: auto;
    padding: 1.4rem;
    border: 0.45rem solid #ffffff;
    border-radius: 50%;
    background: #f4f1ea;
    color: #111111;
    box-shadow: var(--shadow);
    place-items: center;
    text-align: center;
    transform: rotate(-6deg);
}

.race-plate small {
    display: block;
    font-size: clamp(0.8rem, 2.4vw, 1rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.race-plate strong {
    display: block;
    margin: 0.2rem 0;
    color: var(--brand);
    font-family: var(--font-brand);
    font-size: clamp(3.4rem, 12vw, 6.4rem);
    font-weight: 400;
    line-height: 0.95;
}

/* ---------- scheda auto ---------- */

.spec-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.spec {
    padding: 1rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
    background: var(--surface);
}

.spec dt {
    margin-bottom: 0.2rem;
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.spec dd {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.3;
}

.story {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1.2rem;
    margin-top: 1.2rem;
}

.story h3,
.card h3 {
    margin: 0 0 0.6rem;
    font-size: 1.3rem;
}

.quote {
    margin: 0;
    padding: 1.3rem 1.4rem;
    border-left: 0.35rem solid var(--brand);
    border-radius: 0 var(--radius-medium) var(--radius-medium) 0;
    background: var(--surface);
    color: var(--text);
    font-size: 1.15rem;
}

.quote cite {
    display: block;
    margin-top: 0.6rem;
    color: var(--muted);
    font-size: 0.9rem;
    font-style: normal;
}

/* ---------- avanzamento ---------- */

.progress-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}

.progress-head strong {
    font-family: var(--font-brand);
    font-size: 2.4rem;
    font-weight: 400;
    line-height: 1;
}

.bar {
    height: 0.85rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--surface-light);
}

.bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand-dark), var(--brand));
}

.phases {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin: 1.3rem 0 0;
    padding: 0;
    list-style: none;
}

.phase {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface);
}

.phase-icon {
    display: grid;
    flex: 0 0 1.9rem;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    font-size: 0.95rem;
    place-items: center;
}

.phase.done .phase-icon {
    background: rgba(0, 230, 138, 0.15);
    color: var(--success);
}

.phase.doing .phase-icon {
    background: rgba(255, 197, 61, 0.15);
    color: var(--warning);
}

.phase.todo .phase-icon {
    background: var(--surface-light);
    color: var(--muted);
}

.phase strong {
    display: block;
    line-height: 1.3;
}

.phase small {
    display: block;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 400;
    line-height: 1.4;
}

.phase .tag {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    background: var(--surface-light);
    color: var(--muted);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    vertical-align: middle;
}

/* ---------- episodi ---------- */

.episodes {
    display: grid;
    gap: 1.2rem;
}

.episode {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 1.4rem;
    align-items: start;
}

.yt {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    padding: 0;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-medium);
    background: #000000;
    color: #ffffff;
    cursor: pointer;
}

.yt img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 260ms ease;
}

.yt:hover img {
    transform: scale(1.02);
}

.yt::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent 55%);
    content: "";
}

.yt .play {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    display: grid;
    width: 4.4rem;
    height: 4.4rem;
    padding-left: 0.25rem;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.46);
    font-size: 1.5rem;
    place-items: center;
    transform: translate(-50%, -50%);
}

.yt iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.ep-number {
    color: var(--brand);
    font-family: var(--font-brand);
    font-size: 1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ep-title {
    margin: 0.15rem 0 0.25rem;
    font-size: clamp(1.3rem, 2.6vw, 1.6rem);
    line-height: 1.2;
}

.ep-period {
    margin-bottom: 0.8rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.chapters {
    margin-top: 0.6rem;
}

.chapters summary {
    color: var(--muted);
    font-size: 0.92rem;
    cursor: pointer;
}

.chapters ol {
    margin: 0.6rem 0 0;
    padding: 0;
    list-style: none;
}

.chapters li {
    padding: 0.2rem 0;
    font-size: 0.95rem;
    font-weight: 400;
}

.chapters a {
    color: var(--text);
    text-decoration: none;
}

.chapters a:hover {
    color: var(--brand-hover);
}

.chapters time {
    display: inline-block;
    min-width: 3.2rem;
    color: var(--brand);
    font-variant-numeric: tabular-nums;
}

.episode-next {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-style: dashed;
    background: transparent;
    box-shadow: none;
}

.episode-next p {
    margin: 0;
}

/* ---------- diario ---------- */

.diary {
    position: relative;
    margin: 0;
    padding: 0 0 0 1.6rem;
    list-style: none;
}

.diary::before {
    position: absolute;
    top: 0.4rem;
    bottom: 0.4rem;
    left: 0.42rem;
    width: 2px;
    background: var(--border-light);
    content: "";
}

.diary > li {
    position: relative;
    padding: 0 0 1.4rem;
}

.diary > li::before {
    position: absolute;
    top: 0.45rem;
    left: -1.6rem;
    width: 0.95rem;
    height: 0.95rem;
    border: 3px solid var(--page-bg);
    border-radius: 50%;
    background: var(--brand);
    content: "";
}

.diary h3 {
    margin: 0;
    font-size: 1.2rem;
}

.diary .when {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.diary ul {
    margin: 0.45rem 0 0;
    padding-left: 1.1rem;
    color: var(--body-copy);
    font-weight: 400;
}

.diary ul li {
    margin-bottom: 0.25rem;
}

.diary-more {
    margin-top: 0.4rem;
}

/* ---------- chicche ---------- */

.chicche {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.chicca {
    padding: 1.1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
    background: var(--surface);
}

.chicca b {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--brand);
    font-family: var(--font-brand);
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.chicca p {
    margin: 0;
    font-size: 0.97rem;
}

/* ---------- lista della spesa ---------- */

.shopping {
    width: 100%;
    border-collapse: collapse;
}

.shopping th,
.shopping td {
    padding: 0.7rem 0.4rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.shopping th {
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.shopping td {
    font-weight: 400;
}

.shopping td:first-child {
    font-weight: 700;
}

.shopping .num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.shopping tfoot td {
    border-bottom: 0;
    font-weight: 700;
}

.pill {
    display: inline-block;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.pill.da-comprare {
    background: rgba(var(--brand-rgb), 0.15);
    color: var(--brand-hover);
}

.pill.preso {
    background: rgba(0, 230, 138, 0.14);
    color: var(--success);
}

.pill.regalato {
    background: rgba(255, 197, 61, 0.14);
    color: var(--warning);
}

.empty-note {
    color: var(--muted);
    font-weight: 400;
}

/* ---------- donazioni ---------- */

.support {
    position: relative;
    overflow: hidden;
    padding: clamp(1.4rem, 4vw, 2.6rem);
    border: 1px solid rgba(var(--brand-rgb), 0.45);
    border-radius: var(--radius-large);
    background:
        radial-gradient(circle at 100% 0%, rgba(var(--brand-rgb), 0.22), transparent 26rem),
        var(--surface);
    box-shadow: var(--shadow);
}

.support-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 2rem;
}

.amounts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    margin: 1rem 0;
}

.amounts a,
.amounts span {
    display: grid;
    min-height: 3.2rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-small);
    background: var(--surface-light);
    color: var(--text);
    font-size: 1.15rem;
    text-decoration: none;
    place-items: center;
    transition: border-color var(--transition), background var(--transition);
}

.amounts a:hover {
    border-color: var(--paypal);
    background: var(--surface-hover);
}

.amounts span {
    color: var(--muted);
}

.campaign {
    margin-bottom: 1.2rem;
    padding: 1.1rem;
    border: 1px solid var(--paypal);
    border-radius: var(--radius-medium);
    background: rgba(255, 196, 57, 0.07);
}

.campaign h3 {
    margin: 0 0 0.3rem;
}

.fine-print {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 400;
}

.thanks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.6rem 0 0;
    padding: 0;
    list-style: none;
}

.thanks li {
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-light);
    font-size: 0.92rem;
}

.thanks li small {
    color: var(--muted);
    font-weight: 400;
}

/* ---------- partner ---------- */

.partners {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.partner {
    padding: 1.1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
    background: var(--surface);
}

.partner strong {
    display: block;
    font-size: 1.15rem;
}

.partner span {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 400;
}

/* ---------- elenco progetti ---------- */

.page-head {
    padding: 3rem 0 1rem;
}

.page-title {
    margin: 0;
    font-family: var(--font-brand);
    font-size: clamp(3rem, 10vw, 5.6rem);
    font-weight: 400;
    line-height: 0.95;
    text-transform: uppercase;
}

.page-title span {
    color: var(--brand);
}

.projects {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.4rem;
}

.project {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--text);
    text-decoration: none;
    transition: transform var(--transition), border-color var(--transition);
}

a.project:hover {
    border-color: var(--border-light);
    transform: translateY(-3px);
}

.project-cover {
    position: relative;
    display: grid;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--surface-light);
    place-items: center;
}

.project-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-cover .placeholder {
    color: var(--border-light);
    font-family: var(--font-brand);
    font-size: clamp(2.6rem, 7vw, 3.6rem);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.project-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.1rem 1.2rem 1.3rem;
}

.project-body h2 {
    margin: 0;
    font-family: var(--font-brand);
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1.05;
    text-transform: uppercase;
}

.project-body p {
    margin: 0;
    font-size: 0.98rem;
}

.status {
    align-self: flex-start;
    padding: 0.15rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status.live {
    background: rgba(var(--brand-rgb), 0.16);
    color: var(--brand-hover);
}

.status.soon {
    background: var(--surface-light);
    color: var(--muted);
}

.project .go {
    margin-top: auto;
    padding-top: 0.6rem;
    color: var(--brand-hover);
}

/* ---------- footer ---------- */

.site-footer {
    margin-top: 4rem;
    padding: 2rem 0 1.6rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
}

.site-footer .shell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-footer a {
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--text);
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
    .spec-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .episode,
    .story,
    .support-grid {
        grid-template-columns: 1fr;
    }

    .chicche,
    .partners,
    .projects {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    :root {
        --shell: min(100% - 2rem, 1100px);
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .race-plate {
        max-width: 13rem;
        margin: 0 auto;
    }

    .hero::before,
    .hero::after {
        width: 22rem;
    }

    .phases,
    .chicche,
    .partners,
    .projects {
        grid-template-columns: 1fr;
    }

    .amounts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-nav {
        gap: 0.8rem;
        font-size: 0.88rem;
    }

    .shopping thead {
        display: none;
    }

    .shopping tr {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 0.2rem 0.6rem;
        padding: 0.7rem 0;
        border-bottom: 1px solid var(--border);
    }

    .shopping td {
        padding: 0;
        border: 0;
    }

    .shopping td.note {
        grid-column: 1 / -1;
        color: var(--muted);
        font-size: 0.9rem;
    }

    .shopping tfoot tr {
        border-bottom: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- ricambi numerati (lista della spesa) ---------- */

.items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin: 1.2rem 0 0;
    padding: 0;
    list-style: none;
}

.item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface);
}

.item.closed {
    opacity: 0.62;
}

.item-n {
    display: grid;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.6rem;
    background: var(--brand);
    color: #ffffff;
    font-family: var(--font-brand);
    font-size: 1.15rem;
    place-items: center;
}

.item.closed .item-n {
    background: var(--surface-light);
    color: var(--muted);
}

.item-body strong {
    display: block;
    line-height: 1.25;
}

.item-body small {
    display: block;
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 400;
    line-height: 1.35;
}

.item-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
    text-align: right;
}

.item-price {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.item-gift {
    color: var(--paypal);
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
}

.item-gift:hover {
    text-decoration: underline;
}

.pill.da-voi {
    background: rgba(0, 230, 138, 0.14);
    color: var(--success);
}

@media (max-width: 900px) {
    .items {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .item-side {
        grid-column: 2;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
    }
}
