/**
 * Retroaoutopark - site
 * @package retroaoutopark
 * @file site.css
 * @version 1.0.0
 * @date 2026-10-10
 *
 * Copyright (c) 2026 massimo.gerardi@gmail.com - Tutti i diritti riservati
 * La copia non autorizzata di questo file, tramite qualsiasi mezzo,
 * e' severamente vietata.
 */
@font-face {
    font-family: 'Playfair Display';
    src: url('../fonts/PlayfairDisplay.ttf') format('truetype');
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('../fonts/Lato-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('../fonts/Lato-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* RetroAutoPark - grafica originale, estesa solo alle nuove funzioni. */
:root {
    --primary-color: #1a1a1a;
    --accent-color: #bfa37c;
    --bg-light: #f8f9fa;
    --text-body: #4a4a4a;
    --border-color: #e5e5e5;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Lato', sans-serif;
    --font-body: var(--font-sans);
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-body);
    background-color: #fff;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
    font-family: var(--font-serif);
    color: var(--primary-color);
}

.nav-tabs-custom {
    border-bottom: 1px solid var(--border-color);
    background: #fff;
}

.nav-tabs-custom .nav-link {
    border: none;
    color: var(--text-body);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1rem 1.5rem;
    border-radius: 0;
    border-bottom: 2px solid transparent;
}

.nav-tabs-custom .nav-link:hover {
    color: var(--primary-color);
}

.nav-tabs-custom .nav-link.active {
    color: var(--primary-color);
    background: #fff;
    border-bottom: 2px solid var(--accent-color);
}

.car-card {
    border: 1px solid var(--border-color);
    background: #fff;
    transition: 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.car-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
    border-color: var(--accent-color);
}

.car-img-wrap {
    height: 240px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.car-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.6s;
}

.car-card:hover .car-img-wrap img {
    transform: scale(1.05);
}

.car-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.3rem 0.8rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--primary-color);
}

.car-details {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
}

.car-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--primary-color);
    line-height: 1.2;
}

.car-meta {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.car-price {
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-top: auto;
    padding-top: 1rem;
}

.btn-view {
    display: block;
    width: 100%;
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 0.8rem;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    font-weight: 700;
    margin-top: 1rem;
    border: none;
}

.btn-view:hover {
    background: var(--accent-color);
    color: #fff;
}

.footer-luxury {
    background: #0a0a0a;
    color: #fff;
    padding: 2rem 0 1.5rem;
    margin-top: 5rem;
}

.footer-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.footer-link {
    display: block;
    color: #999;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}

.footer-link:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

@media (max-width: 768px) {
    .car-img-wrap {
        height: 220px;
    }
}

/* Navigazione originale da top.php: nessuna duplicazione CSS nel PHP. */
.top-header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.search-bar {
    position: relative;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    z-index: 2;
    pointer-events: none;
}

.search-bar input.form-control {
    border-radius: 0;
    border: 1px solid #e5e5e5;
    padding: 0.55rem 1rem 0.55rem 2.5rem;
    background-color: #f8f9fa;
    font-size: 0.88rem;
    height: auto;
    line-height: 1.4;
}

.search-bar input.form-control:focus {
    box-shadow: none;
    border-color: #bfa37c;
    background-color: #fff;
}

.nav-link-custom {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #1a1a1a;
    font-weight: 600;
    padding: 0.5rem 0.5rem;
    white-space: nowrap;
}

.nav-link-custom:hover {
    color: #bfa37c;
}

.btn-login {
    border: 1px solid #1a1a1a;
    color: #1a1a1a;
    border-radius: 0;
    padding: 0.45rem 1.2rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    font-weight: 700;
    transition: 0.3s;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.btn-login:hover {
    background: #1a1a1a;
    color: #fff;
}

/* Fix per mobile: impedisce scroll orizzontale su schermi molto stretti */
@media (max-width: 575.98px) {
    .top-header .container>div {
        gap: 0.5rem;
    }

    .btn-login {
        padding: 0.45rem 0.8rem;
    }
}

/* SOLO pagine nuove e funzioni: bianco, nero morbido e champagne del sito originale. */
html {
    scroll-padding-top: 82px;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--accent-color);
}

.lucide-icon {
    width: 17px;
    height: 17px;
    vertical-align: -3px;
    display: inline-block;
    object-fit: contain;
}

.btn .lucide-icon {
    margin-left: 0.35rem;
}

.top-header .lucide-icon {
    width: 16px;
    height: 16px;
}

.main-listings {
    background: #fff;
    min-height: 45vh;
}

.catalog-results {
    font-size: 0.77rem;
    color: #888;
}

.car-img-wrap {
    height: 250px;
}

.car-photo {
    display: block;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.car-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.car-card:hover .car-photo img {
    transform: scale(1.045);
}

.car-card .car-details {
    gap: 0;
}

.car-card .car-meta {
    text-transform: none;
    line-height: 1.6;
    letter-spacing: 0.01em;
    min-height: 3em;
}

.car-card .car-title a:hover {
    color: var(--accent-color) !important;
}

.car-card .car-price {
    margin: 0;
}

.car-card .btn-view {
    border: 0;
    font-family: var(--font-body);
}

.photo-label {
    position: absolute;
    left: 14px;
    bottom: 14px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.95);
    font-size: 0.7rem;
    letter-spacing: 0.07em;
    color: #111;
    font-weight: 700;
}

.sold-ribbon {
    position: absolute;
    z-index: 2;
    top: 20px;
    right: -37px;
    width: 170px;
    transform: rotate(38deg);
    background: #1a1a1a;
    color: #fff;
    padding: 9px 0;
    text-align: center;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    font-weight: 700;
}

.sold-ribbon-large {
    right: -37px;
    top: 24px;
}

.sold-text,
.sold-callout {
    font-size: 0.8rem;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.photo-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f4f4;
    color: #777;
    font-size: 0.8rem;
}

.page-banner {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 34px 0;
}

.page-banner h1 {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    margin: 0 0 6px;
}

.page-banner p {
    max-width: 720px;
    margin: 0;
    color: #777;
    font-size: 0.9rem;
}

.page-banner .eyebrow {
    color: var(--accent-color);
}

.eyebrow {
    font-family: var(--font-body);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    font-weight: 700;
    color: var(--accent-color);
}

.section-pad {
    padding: 42px 0 65px;
}

.form-paper,
.manager-paper {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 27px;
}

.form-paper h2 {
    font-size: 1.2rem;
}

.form-label {
    font-weight: 700;
    font-size: 0.78rem;
    color: #444;
}

.form-control,
.form-select {
    border-radius: 0;
    border: 1px solid var(--border-color);
    padding: 0.62rem 0.8rem;
    color: #333;
    background-color: #fff;
}

.form-control:focus,
.form-select:focus {
    box-shadow: none;
    border-color: var(--accent-color);
}

.btn-gold {
    background: var(--primary-color);
    color: #fff;
    border-radius: 0;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.75rem 1.35rem;
}

.btn-gold:hover {
    background: var(--accent-color);
    color: white;
}

.btn-outline-gold {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 0;
    padding: 0.7rem 1.1rem;
    font-size: 0.8rem;
}

.btn-outline-gold:hover {
    background: var(--primary-color);
    color: white;
}

.underlined-link {
    border-bottom: 1px solid var(--accent-color);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.8rem;
}

.underlined-link:hover {
    color: var(--accent-color);
}

.empty-state {
    border: 1px solid var(--border-color);
    padding: 30px;
    text-align: center;
    color: #777;
}

.detail-cover {
    overflow: hidden;
    height: 480px;
    background: #f6f6f6;
    position: relative;
}

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

.detail-thumb {
    width: 100%;
    height: 115px;
    object-fit: cover;
}

.detail-side {
    border: 1px solid var(--border-color);
    padding: 28px;
}

.detail-side h1 {
    font-size: 2rem;
    margin: 15px 0;
}

.detail-price {
    font: 700 1.45rem var(--font-body);
    color: var(--accent-color);
    margin: 18px 0;
}

.detail-facts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 16px 0 24px;
}

.detail-facts dt,
.detail-facts dd {
    margin: 0;
    padding: 8px 0;
    font-size: 0.83rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-facts dt {
    color: #888;
    font-weight: 400;
}

.detail-facts dd {
    color: #222;
    font-weight: 700;
}

.detail-description {
    color: #555;
    line-height: 1.8;
}

.detail-description h2 {
    font-size: 1.45rem;
}

.compact-form-section {
    padding-bottom: 18px;
    border-bottom: 1px solid #eee;
    margin: 22px 0;
}

.compact-form-section h2 {
    margin: 0;
    font-size: 1.3rem;
}

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.upload-preview img {
    width: 85px;
    height: 70px;
    object-fit: cover;
}

.manager-body {
    background: #f8f9fa;
}

.manager-head {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
}

.manager-head .brand {
    font-family: var(--font-serif);
    font-weight: 700;
}

.manager-login {
    max-width: 470px;
    margin: 70px auto;
    padding: 38px;
    background: white;
    border: 1px solid var(--border-color);
}

.manager-main {
    min-height: 65vh;
    padding: 35px 0;
}

.manager-paper {
    padding: 25px;
}

.manager-paper .table th {
    font-size: 0.75rem;
    color: #888;
}

.manager-paper .table td {
    font-size: 0.86rem;
}

.status-chip {
    background: #f1f1f1;
    padding: 5px 9px;
    font-size: 0.75rem;
}

.status-sold {
    background: #1a1a1a;
    color: #fff;
}

.photo-admin {
    height: 145px;
    object-fit: cover;
}

.aside-note {
    border: 1px solid var(--border-color);
    padding: 24px;
    color: #777;
}

.aside-note h3 {
    font-size: 1.2rem;
}

.footer-luxury {
    margin-top: 55px;
}

.footer-link {
    text-decoration: none;
}

.footer-luxury .lucide-icon {
    filter: invert(1);
}

#btn-top {
    position: fixed;
    bottom: 18px;
    right: 18px;
    z-index: 25;
    background: #1a1a1a;
    color: #fff;
    border: 0;
    padding: 9px 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

#btn-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1052;
    background: #1a1a1a;
    color: #fff;
    padding: 18px 0;
    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-banner h6 {
    color: #fff;
}

.cookie-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1051;
    display: none;
}

.cookie-overlay.show {
    display: block;
}

@media (max-width: 767.98px) {
    .top-header {
        padding: 10px 0;
    }

    .top-header .form-search {
        min-width: 0;
    }

    .top-header .btn-login {
        padding: 0.46rem 0.52rem;
    }

    .listing-heading {
        font-size: 1.45rem;
    }

    .car-photo {
        height: 235px;
    }

    .detail-cover {
        height: 285px;
    }

    .page-banner {
        padding: 26px 0;
    }

    .section-pad {
        padding: 30px 0 42px;
    }

    .catalog-tabs {
        gap: 1rem;
    }

    .catalog-tabs a {
        font-size: 0.69rem;
    }
}

/* Pagine informative e fotografie: solo bordi sobri in stile originale. */
.editorial-photo {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.cream-bg {
    background: #fbfaf8;
}

.value-card {
    border: 1px solid var(--border-color);
    padding: 25px;
    height: 100%;
    background: #fff;
}

.value-card>span {
    font: 700 0.72rem var(--font-body);
    color: var(--accent-color);
    letter-spacing: 0.15em;
}

.value-card h3 {
    font-size: 1.3rem;
    margin: 14px 0;
}

.value-card p {
    color: #777;
    font-size: 0.9rem;
}

.legal-text {
    max-width: 850px;
    line-height: 1.8;
}

/* Accorgimenti funzionali senza modificare la grafica originale. */
.retro-top-inner {
    gap: 0.75rem;
}

.top-header .retro-brand-logo {
    width: 100px;
    height: auto;
    max-width: none;
    object-fit: contain;
}

.retro-brand-text {
    font-size: 1.4rem;
    letter-spacing: 0.04em;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1;
}

.top-header .retro-search-form {
    max-width: 550px;
    min-width: 0;
}

.top-header .search-bar {
    max-width: none;
}

.top-header .search-bar .lucide-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.55;
}

.top-header .nav-link-custom {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.top-header .btn-login {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.top-header .btn-login .lucide-icon {
    width: 14px;
    height: 14px;
}

.retro-top-separator {
    height: 20px;
}

.retro-catalogue {
    background: #fff;
}

.retro-filter-menu {
    min-width: 230px;
    border: 1px solid #e5e5e5;
    border-radius: 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.07);
}

.retro-filter-menu .form-control {
    min-width: 96px;
}

.retro-filter-button::after {
    display: none;
}

.retro-reset-link {
    color: #666;
    text-decoration: underline;
}

.retro-collection-label {
    color: var(--accent-color);
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    font-weight: 700;
}

.retro-collection-caption {
    font-size: 0.95rem;
}

.retro-collection-rule {
    width: 60px;
    height: 2px;
    background: var(--accent-color);
    margin: 1.5rem auto;
}

@media (max-width: 767.98px) {
    .top-header .retro-brand-text {
        font-size: 1.05rem;
    }

    .top-header .retro-brand-logo {
        width: 96px;
    }

    .top-header .retro-top-inner {
        gap: 0.4rem;
    }
}

@media (max-width: 490px) {
    .top-header .retro-brand-text {
        display: block;
    }

    .top-header .retro-brand-logo {
        width: 100px;
    }
}

/* Catalogo compatto: fotografia e titolo aprono la scheda, stellina separata. */
.retro-catalogue .car-img-wrap {
    height: auto;
    aspect-ratio: 16 / 10;
    background: #f8f9fa;
}

.retro-catalogue .car-img-wrap > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.retro-catalogue .car-details {
    padding: 14px 16px;
    text-align: left;
    justify-content: flex-start;
}

.retro-catalogue .car-title {
    font-size: 1.18rem;
    line-height: 1.35;
    margin: 0 0 8px;
}

.retro-catalogue .car-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.retro-catalogue .car-location {
    font-size: .75rem;
    color: #666;
    margin: 0 0 5px;
}

.retro-catalogue .car-meta {
    min-height: 0;
    font-size: .82rem;
    margin-bottom: 12px;
    color: #555;
}

.car-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.retro-catalogue .car-price {
    padding: 0;
    font-size: 1.05rem;
}

.car-image {
    position: relative;
}

.retro-catalogue .car-image .unavailable-banner {
    max-width: calc(100% - 66px);
}

.wishlist-button {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #fff;
    cursor: pointer;
}

.wishlist-button .lucide-icon {
    width: 24px;
    height: 24px;
    fill: none;
    filter: drop-shadow(0 1px 2px #000);
}

.wishlist-button[aria-pressed="true"] .lucide-icon {
    fill: currentColor;
}

.wishlist-button:focus-visible, .wishlist-link:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

.catalogue-tools {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.wishlist-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #222;
    font-size: .85rem;
}

/* Dimensioni del testo del marchio e della ricerca. */

.top-header .retro-brand-text {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
    line-height: 1;
}

.top-header .retro-search-form {
    max-width: 550px;
}

.top-header .search-bar .lucide-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    z-index: 2;
    pointer-events: none;
    opacity: 0.55;
}

/* Account pubblico: solo icona, anche su desktop. */
.top-header .btn-login {
    background: transparent;
    border: 0;
    padding: 0.6rem;
    text-decoration: none;
}

.top-header .btn-login .lucide-icon {
    width: 24px;
    height: 24px;
}

.top-header .btn-login:hover {
    background: #eee;
}

.top-header .btn-login:focus-visible {
    outline: 2px solid #1a1a1a;
    outline-offset: 2px;
}

.qcaptcha-card {
    cursor: pointer;
    color: #111;
    background: #fff;
    max-width: 340px;
    min-width: 230px;
    font-size: 0.8rem;
}

#userLoginModal .qcaptcha-card,
.detail-contact .qcaptcha-card {
    width: 100%;
    max-width: none;
    min-width: 0;
}

.qcaptcha-card .lucide-icon {
    width: 22px;
    height: 22px;
    margin: 0;
}

.qcaptcha-card:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}

.qcaptcha-label,
.qcaptcha-brand {
    font-weight: 600;
}

.unavailable-banner {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    max-width: calc(100% - 20px);
    padding: 5px 9px;
    background: rgba(20, 20, 20, 0.9);
    color: #fff;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 600;
    border-radius: 2px;
}

/* Due azioni stabili nell’header, senza selettori di categoria. */
.top-header .header-action,
.top-header .btn-login.header-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #222;
    border-radius: 0;
    background: #fff;
    color: #222;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
}

.top-header .header-action .lucide-icon,
.top-header .btn-login.header-action .lucide-icon {
    width: 20px;
    height: 20px;
}

.top-header .header-action:hover {
    background: #eee;
}

.sell-page {
    background: #faf9f7;
    font-family: var(--font-body);
}

.sell-section {
    min-width: 0;
    padding: 18px 20px;
    margin: 0 0 16px;
    border: 1px solid #e4e0d9;
    background: #fff;
}

.sell-page .page-banner {
    padding: 24px 0;
}

.sell-page .page-banner h1 {
    font-family: var(--font-serif);
    font-size: 1.9rem;
    font-weight: 400;
    margin: 0 0 8px;
}

.sell-page .page-banner p {
    margin: 0;
}

.sell-page>.section-pad {
    padding-top: 24px;
}

.sell-section .sell-section-title {
    margin: 0 0 14px;
    font-family: var(--font-body);
    font-size: 1.12rem;
    line-height: 1.4;
    font-weight: 400;
}

.sell-section-title span {
    margin-right: 6px;
    color: #666;
}

.sell-section .form-label {
    margin-bottom: 6px;
}

.sell-section .form-text:last-child {
    margin-bottom: 0;
}

.sell-guide h2 {
    font-family: var(--font-body);
    font-size: 1.12rem;
    line-height: 1.4;
    font-weight: 400;
    margin-bottom: 14px;
}

.sell-section .form-control,
.sell-section .form-select {
    min-height: 46px;
}

.sell-section .form-label {
    font-size: 0.95rem;
    font-weight: 400;
}

.sell-section .form-control,
.sell-section .form-select,
.sell-section .btn {
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 0;
}

.sell-section .btn {
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sell-guide {
    position: sticky;
    top: 24px;
    padding: 20px;
    background: #f0ece5;
}

.sell-guide li {
    margin-bottom: 12px;
}

.sell-guide ul {
    padding-left: 18px;
}

@media (max-width: 575.98px) {
    .sell-section {
        padding: 16px;
    }

    .top-header .header-action,
    .top-header .btn-login.header-action {
        height: 36px;
        padding: 0 8px;
    }

    .top-header .navbar-brand {
        flex-direction: row;
        align-items: center !important;
        gap: 4px !important;
        margin-right: 0;
    }

    .top-header .retro-brand-logo {
        width: 70px;
        height: auto;
        max-height: 36px;
        object-fit: contain;
    }

    .top-header .retro-brand-text {
        display: block;
        font-size: 0.95rem;
        letter-spacing: 0;
    }

    .top-header .header-action > span {
        display: none;
    }

    .top-header .header-action,
    .top-header .btn-login.header-action {
        width: 36px;
        justify-content: center;
    }

    .retro-top-inner {
        flex-wrap: wrap !important;
        gap: 8px;
    }

    .retro-top-inner .retro-search-form {
        order: 3;
        flex-basis: 100%;
        margin: 0 !important;
    }
}

/* Tipografia condivisa da catalogo, schede, moduli, modal e manager. */
button,
input,
select,
textarea,
.btn,
.form-control,
.form-select,
.modal {
    font-family: var(--font-body);
}

.form-control,
.form-select {
    font-size: 1rem;
    line-height: 1.5;
}

.form-label,
.form-check-label {
    line-height: 1.5;
}

.detail-description {
    font-size: 1.05rem;
    line-height: 1.75;
}

.modal-title,
.manager-main h1,
.manager-main h2 {
    font-family: var(--font-serif);
    font-weight: 400;
}

.manager-nav .btn {
    font-size: 0.85rem;
    border-radius: 0;
}

.manager-prewrap {
    white-space: pre-wrap;
}

.manager-code {
    font-family: monospace;
}

.manager-log {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    max-height: 500px;
    overflow: auto;
    background: #fff;
    padding: 20px;
}

.manager-main .manager-paper {
    overflow-wrap: anywhere;
}

/* Password: icona integrata e discreta, comune a sito e manager. */
.password-field {
    position: relative;
    display: block;
}

.password-field>.form-control {
    width: 100%;
    padding-right: 44px;
}

.password-field>.password-toggle {
    position: absolute;
    inset: 0 0 0 auto;
    width: 42px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.password-toggle .lucide-icon {
    width: 17px;
    height: 17px;
    margin: 0;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.password-toggle:hover .lucide-icon,
.password-toggle:focus-visible .lucide-icon {
    opacity: 0.9;
}

.password-toggle:focus-visible {
    outline: 1px solid #8b7355;
    outline-offset: -6px;
}

.service-unavailable {
    padding: 60px;
    font-family: var(--font-sans);
}

/* Consensi: caselle nere, squadrate e coerenti con Qcaptcha. */
.form-check-input[type='checkbox'] {
    border-radius: 0;
    border-color: #111;
    accent-color: #111;
}

.form-check-input[type='checkbox']:checked,
.form-check-input[type='checkbox']:indeterminate {
    background-color: #111;
    border-color: #111;
}

.form-check-input[type='checkbox']:focus {
    border-color: #111;
    box-shadow: 0 0 0 0.2rem rgb(17 17 17 / 15%);
}

/* Footer a fondo finestra con poco contenuto, nel flusso sulle pagine lunghe. */
html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

body>main {
    flex: 1 0 auto;
}

body>header,
body>footer {
    flex-shrink: 0;
}

body>footer {
    margin-top: auto;
}

/* Evidenzia soltanto la pagina attiva nella navigazione. */
a[aria-current='page'],
.nav-link.active {
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: currentColor;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

.bg-dark a[aria-current='page'],
.bg-black a[aria-current='page'],
.footer-luxury a[aria-current='page'] {
    color: #fff;
}

.footer-luxury a[aria-current='page'] {
    color: #fff !important;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: #fff;
}

/* Stesso indicatore attivo su header, footer e pulsanti di navigazione. */
.top-header a[aria-current='page'] {
    color: #191919;
    font-weight: 700;
    text-decoration: underline !important;
    text-decoration-color: #191919;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

.catalog-toolbar .btn {
    min-height: 34px;
    font-family: var(--font-sans);
}

.catalog-toolbar .lucide-icon {
    width: 16px;
    height: 16px;
}

.catalog-toolbar .dropdown-item[aria-current='page'] {
    color: #191919;
    background: #f3f1ed;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.catalog-filter-fields input {
    min-width: 0;
}

.catalog-filter-fields .d-flex>div {
    flex: 1;
    min-width: 0;
}

.catalog-explore a[aria-current='page'] {
    color: #fff;
    background: #262626;
    border-color: #262626;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.catalog-toolbar>button {
    flex-shrink: 0;
}

@media (max-width: 575px) {
    .catalog-toolbar {
        align-items: flex-start !important;
    }

    .catalog-explore {
        gap: 6px !important;
    }
}

/* I pulsanti attivi si distinguono dal fondo, senza sottolineatura. */
a.btn[aria-current='page'],
.top-header a.header-action[aria-current='page'],
.catalog-explore a[aria-current='page'] {
    text-decoration: none !important;
}

.top-header .header-action.filters-applied {
    background: #262626;
    color: #fff;
    border-color: #262626;
}

.top-header .header-action.filters-applied .lucide-icon {
    filter: invert(1);
}

.header-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.header-filter-row .btn {
    height: 34px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.header-filter-row input.form-control {
    height: 34px;
    padding: 5px 9px;
    font-size: 14px;
}

.header-filter-row .filter-brand {
    flex: 1 0 130px;
    width: 150px;
}

.header-filter-row .filter-price {
    flex: 0 0 110px;
    width: 110px;
}

.header-filter-row nav,
.header-filter-row .btn {
    flex-shrink: 0;
}

.catalog-explore .btn-check:checked+.btn {
    background: #262626;
    border-color: #262626;
    color: #fff;
    font-weight: 700;
}

.catalog-explore .btn-check:focus-visible+.btn {
    outline: 2px solid #777;
    outline-offset: 2px;
}

/* Il pannello si apre con Filtri; su mobile i campi restano tutti visibili
   senza scorrimento laterale. Le categorie mantengono lo stile dei pulsanti. */
@media (max-width: 991.98px) {
    .header-filter-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow-x: visible;
        align-items: stretch;
    }

    .header-filter-row .catalog-explore {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-column: 1 / -1;
    }

    .header-filter-row .filter-brand,
    .header-filter-row label[for='filterAvailable'] {
        grid-column: 1 / -1;
    }

    .header-filter-row input.form-control,
    .header-filter-row .btn {
        width: 100%;
        min-width: 0;
        height: 40px;
    }

    .header-filter-row .btn {
        justify-content: center;
    }
}

/* Titolo della collezione in evidenza, descrizione discreta e compatta. */
.retro-original-title .retro-collection-label {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.04em;
}

.retro-original-title .retro-collection-caption {
    font-size: 0.8rem;
    line-height: 1.4;
    margin-top: 4px;
}

.retro-original-title .retro-collection-rule {
    width: 60px;
    height: 1px;
    margin: 10px auto 0;
}

/* Le fotografie dei ricambi mostrano il componente intero, senza ritagli. */
.retro-catalogue .part-card .car-img-wrap > img,
.part-card .car-img-wrap > img,
.detail-cover.part-cover > img {
    object-fit: contain;
    background: #fff;
    padding: 12px;
}

/* Paginazione del catalogo: pulsanti uniformi, pagina corrente nera. */
#catalogPagination .btn {
    min-width: 38px;
    height: 38px;
    padding: 6px 12px;
    border-radius: 0;
    text-decoration: none;
}
#catalogPagination [aria-current="page"] {
    opacity: 1;
}


/* Griglia mobile: il gruppo azioni non passa sotto il marchio. */
@media (max-width: 575.98px) {
    .top-header .retro-top-inner {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 6px;
    }

    .top-header .navbar-brand {
        min-width: 0;
    }

    .top-header .retro-brand-logo {
        width: clamp(56px, 18vw, 70px);
        flex-shrink: 0;
    }

    .top-header .retro-brand-text {
        font-size: clamp(12px, 3.9vw, 15.2px);
        text-decoration: none;
    }

    .top-header .retro-search-form {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        max-width: none;
    }

    .top-header .header-action,
    .top-header .btn-login.header-action {
        width: clamp(30px, 8.5vw, 36px);
        padding: 0 5px;
    }
}

/* Link informativi affiancati su desktop. */
@media (min-width: 992px) {
    .footer-info-links {
        display: grid;
        grid-template-columns: max-content max-content;
        column-gap: 20px;
        row-gap: 8px;
    }

    .footer-info-links .footer-link {
        margin-bottom: 0;
    }
}

/* Gruppo compatto per le due colonne dei link. */
.footer-useful-links {
    width: 100%;
    max-width: 280px;
}


/* Evita il trascinamento laterale della pagina sui dispositivi mobili.
   Le tabelle con scroll interno conservano il proprio contenitore. */
@media (max-width: 991.98px) {
    html,
    body {
        overflow-x: clip;
    }

    main,
    .top-header .retro-top-inner > *,
    .header-filter-row > * {
        min-width: 0;
    }

    .qcaptcha-card {
        min-width: 0;
        max-width: 100%;
    }

    .footer-luxury a,
    .detail-page p {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 575.98px) {
    .top-header .retro-top-inner > .d-flex {
        gap: 4px !important;
    }

    .top-header .retro-brand-logo {
        flex-shrink: 1;
        min-width: 40px;
    }
}

/* Sottolineatura discreta del nome del sito, anche su mobile. */
.top-header .retro-brand-text {
    text-decoration-line: underline;
    text-decoration-thickness: 0.5px;
    text-decoration-color: rgba(26, 26, 26, 0.55);
    text-underline-offset: 4px;
}

/* Il marchio ha una sola riga sottile, senza quella del link attivo. */
.top-header a.navbar-brand,
.top-header a.navbar-brand[aria-current='page'] {
    text-decoration: none !important;
}

.footer-luxury .footer-title.retro-brand-text {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: none;
    text-decoration: underline;
    text-decoration-thickness: 0.5px;
    text-decoration-color: rgba(255, 255, 255, 0.55);
    text-underline-offset: 4px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: -12px;
    margin-bottom: 0;
}

.footer-brand-logo {
    width: 64px;
    height: auto;
    flex-shrink: 0;
}

.footer-brand .footer-title {
    margin-bottom: 0;
    white-space: normal;
}

/* Logo bianco sul footer scuro; sottolineatura leggera su entrambi i marchi. */
.footer-brand-logo {
    filter: brightness(0) invert(1);
}

.top-header .retro-brand-text,
.footer-luxury .footer-title.retro-brand-text {
    text-decoration-thickness: 0.4px;
    text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
}

/* Ricerca e filtri condividono la seconda riga del top mobile. */
.retro-search-form .search-bar { min-width: 0; }
.retro-search-form > .header-action { flex-shrink: 0; }
@media (max-width: 575.98px) {
    .retro-search-form > .header-action { width: 36px; }
}

.account-page .btn,
#userLoginModal .btn {
    border-radius: 0;
}

/* I tre titoli del footer condividono la stessa altezza sul desktop. */
@media (min-width: 992px) {
    .footer-luxury .footer-useful-links > h6,
    .footer-luxury .row > .col-lg-4 > h6 {
        display: flex;
        align-items: center;
        height: 64px;
        margin-top: -12px;
        margin-bottom: 0 !important;
    }
}

/* Dettagli a destra: una caratteristica per riga, valore allineato a destra. */
.detail-facts > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    padding: 10px 12px;
}

.detail-facts > div:nth-child(odd) {
    background: #f5f4f1;
}

.detail-facts dt, .detail-facts dd {
    border: 0;
    padding: 0;
    overflow-wrap: anywhere;
}

.detail-facts dd {
    text-align: right;
}

.detail-facts dt .lucide-icon {
    width: 15px;
    height: 15px;
    margin-right: 4px;
}

/* Area personale e inserimento guidato: stessi colori e pulsanti del sito. */
.seller-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}
.seller-navigation a {
    padding: 10px 14px;
    border: 1px solid #333;
    color: #222;
    text-decoration: none;
    font-family: var(--font-sans);
}
.seller-navigation a[aria-current="page"] {
    background: #222;
    color: #fff;
}
.seller-stat {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid var(--border-color);
    color: #222;
    text-decoration: none;
}
.seller-stat strong { font-size: 2rem; }
.sell-step { border: 1px solid var(--border-color); margin-bottom: 12px; background: #fff; }
.sell-step > summary { padding: 16px 20px; font-family: var(--font-serif); font-size: 1.15rem; cursor: pointer; }
.sell-step[open] > summary { border-bottom: 1px solid var(--border-color); }
.sell-step-content { padding: 20px; }
.sell-optional { padding: 12px 0; border-top: 1px solid var(--border-color); }
.sell-optional > summary { cursor: pointer; font-weight: 600; }

/* Tab compatti, contorno sottile e selezione più marcata senza cambiare altezza. */
.account-page { padding-top: 10px !important; }
.sell-page > .container:first-child { padding-top: 10px !important; }
.retro-catalogue:has(.seller-navigation) > .container { padding-top: 10px !important; }
.seller-navigation {
    gap: 8px;
    margin: 0 0 18px;
    padding-bottom: 12px;
}
.seller-navigation a, .seller-navigation .seller-logout button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid #b7b3ad;
    border-radius: 0;
    background: transparent;
    color: #222;
    font: inherit;
    text-decoration: none;
}
.seller-navigation a[aria-current="page"] {
    background: transparent;
    color: #111;
    border-color: #222;
    box-shadow: inset 0 0 0 1px #222;
    font-weight: 700;
}
.seller-navigation a:hover, .seller-navigation .seller-logout button:hover {
    border-color: #222;
}
.seller-logout { margin: 0 0 0 auto; }
#accountMessages { margin: 16px auto; max-width: 1320px; padding: 0 12px; }

/* Il modulo annuncio appartiene alla stessa area personale, senza banner laterali. */
.account-page.sell-page { background: #faf9f7; }
.account-listing-heading { margin: 0 0 18px; padding: 0; }
.account-listing-heading > .container, .account-listing-form > .container { padding: 0; }
.account-listing-heading p { color: #666; margin-bottom: 0; font-size: .9rem; }
.sell-step > summary[aria-disabled="true"] { color: #777; cursor: not-allowed; }
.sell-step [aria-invalid="true"] { border-color: #a42b2b; }

/* Campi dimensionati secondo il contenuto, con spazi contenuti su desktop. */
.account-page .sell-step-content { padding: 16px; }
.account-page .sell-step-content .row { --bs-gutter-x: 16px; --bs-gutter-y: 12px; }
.account-page .sell-step-content .form-label { font-size: .85rem; margin-bottom: 4px; }
.account-page .sell-step-content .form-control,
.account-page .sell-step-content .form-select { min-height: 40px; padding: 7px 10px; }
.account-page .sell-step-content > .form-select { max-width: 360px; }
.account-page .sell-step > summary { padding: 12px 16px; }
.account-page .sell-step-content .form-text { margin-top: 4px; font-size: .78rem; }

/* Tutte le sezioni personali condividono il fondo che delimita l'area. */
main.account-page {
    background: #faf9f7;
    border: 1px solid #e3dfd8;
    margin-top: 10px;
    margin-bottom: 24px;
    padding: 16px 20px 24px !important;
}
.account-page .form-paper, .account-page .seller-stat, .account-page .sell-step {
    background: #fff;
}

/* Dimensioni legate al dato in tutti i form del contenuto, anche fuori dall'account.
   I limiti restano fluidi: nessun campo supera la sua colonna su mobile. */
main form input.form-control:not([type]),
main form input.form-control[type="text"] { max-width: 32rem; }
main form input.form-control[type="number"],
main form input.form-control[type="date"],
main form input.form-control[type="time"] { max-width: 13rem; }
main form input.form-control[type="tel"] { max-width: 20rem; }
main form input.form-control[type="email"] { max-width: 32rem; }
main form input.form-control[type="password"] { max-width: 26rem; }
main form input.form-control[type="file"] { max-width: 36rem; }
main form select.form-select { max-width: 28rem; }
main form .password-field,
main form .manager-login-password { width: 100%; max-width: 26rem; }
main form .password-field input { max-width: none !important; }
main form input[name="year"],
main form input[name="year_from"],
main form input[name="year_to"],
main form input[name="gears"],
main form input[name="quantity"] { max-width: 9rem; }
main form input[name="title"],
main form input[name="dimensions"],
main form input[name="documents"],
main form input[name="shipping_notes"],
main form input[name="included_items"] { max-width: 52rem; }
main form textarea.form-control { max-width: 64rem; }
.account-page .form-paper { padding: 20px; }
@media (max-width: 575px) {
    main.account-page { padding: 12px !important; }
    .account-page .form-paper { padding: 14px; }
}

/* Contorni leggibili su fondo bianco e avorio, senza ispessire i campi. */
body .form-control,
body .form-select {
    border: 1px solid #85817b;
}
body .form-control:hover,
body .form-select:hover {
    border-color: #55514c;
}
body .form-control:focus,
body .form-select:focus {
    border-color: #222;
    box-shadow: 0 0 0 1px #222;
}

/* Conferma e avanzamento sempre a destra, senza allargare il pulsante. */
.form-confirm {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
}

/* Telefono: selettore integrato nello stesso campo del numero. */
.phone-control { display: flex; width: 100%; max-width: 24rem; border: 1px solid #85817b; background: #fff; }
.phone-control:focus-within { border-color: #222; box-shadow: 0 0 0 1px #222; }
.phone-control .phone-prefix { width: 112px; flex: 0 0 112px; border: 0; border-right: 1px solid #d6d2cb; border-radius: 0; background: transparent; color: #222; padding: 8px; font: inherit; }
body .phone-control input.form-control { flex: 1; min-width: 0; width: 0; max-width: none; border: 0; box-shadow: none; }
.phone-control .phone-prefix:focus { outline: none; }
.phone-control:has(.is-invalid) { border-color: #a42b2b; }

/* Checkbox nativi e titoli delle informative, anche dentro il modal. */
input[type="checkbox"] { accent-color: #111; }
.legal-text h1, .legal-text h2 { font-size: 1.3rem; line-height: 1.4; }
.legal-text h3 { font-size: 1.1rem; line-height: 1.4; }

/* Conferme positive discrete, coerenti con i toni chiari del sito. */
.alert-success {
    --bs-alert-color: #455047;
    --bs-alert-bg: #f3f5f1;
    --bs-alert-border-color: #dce2d8;
    color: #455047;
    background-color: #f3f5f1;
    border-color: #dce2d8;
}
