/* ==========================================================================
   AstaCerta — Scheda Veicolo Base (Design Bento Cockpit)
   Supporta modalità Dark Cockpit (default) e Stile Chiaro tramite toggle .theme-light
   ========================================================================== */

@font-face {
    font-family: 'Digital';
    src: url('/public/fonts/digital-7.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --brand-navy: #07152b;
    --brand-blue: #153050;
    --brand-cyan: #0284c7;
    --brand-gold: #d4b24e;
    --brand-gold-dark: #b89335;
    --accent-color: #d4b24e; /* Giallo Oro Ufficiale Brand Astacerta */
    --brand-green: #10b981;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --border-subtle: #e2e8f0;
    --border-light: #edf2f7;
    --text-main: #0f172a;
    --text-muted: #64748b;
}

/* Eliminazione barra bianca body e footer in dark mode */
body.ac-detail-active,
body.ac-detail-v2-active {
    background-color: #080e18 !important;
}
body.ac-detail-active footer.bg-dark,
body.ac-detail-v2-active footer.bg-dark {
    margin-top: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
body.ac-detail-active.theme-light,
body.ac-detail-v2-active.theme-light,
body.ac-detail-active:has(.theme-light),
body.ac-detail-v2-active:has(.theme-light) {
    background-color: #f8fafc !important;
}
body.ac-detail-active.theme-light footer.bg-dark,
body.ac-detail-v2-active.theme-light footer.bg-dark {
    border-top: 1px solid #cbd5e1;
}

/* CONTENITORE GENERALE SCHEDA */
.ac-detail-wrapper {
    width: 100%;
    background: #080e18;
    min-height: 80vh;
    padding: 24px 12px 60px;
    display: flex;
    justify-content: center;
    transition: background-color 0.3s ease;
}
.ac-detail-wrapper.theme-dark,
.ac-detail-wrapper:has(.theme-dark),
body.theme-dark .ac-detail-wrapper {
    background: #080e18 !important;
}
.ac-detail-wrapper.theme-light,
.ac-detail-wrapper:has(.theme-light),
body.theme-light .ac-detail-wrapper {
    background: #f8fafc !important;
}

/* V2: attenua il fondo dark usando la stessa sfumatura navy/blue del banner
   breakout del catalogo. La V3 mantiene il proprio cockpit invariato. */
.ac-detail-wrapper:not(.auction-v3-wrapper).theme-dark {
    background: linear-gradient(135deg, #0b192c 0%, #153050 55%, #1d4ed8 100%) !important;
}

/* Distanziamento elegante dalla navbar in pagina SSR su Desktop e Tablet */
body.ac-detail-active .ac-detail-wrapper,
body.ac-detail-v2-active .ac-detail-wrapper {
    margin-top: 24px;
}
@media (min-width: 992px) {
    body.ac-detail-active .ac-detail-wrapper,
    body.ac-detail-v2-active .ac-detail-wrapper {
        margin-top: 32px;
    }
}
@media (max-width: 768px) {
    body.ac-detail-active,
    body.ac-detail-v2-active {
        padding-top: 96px !important;
    }
    body.ac-detail-active .ac-detail-wrapper,
    body.ac-detail-v2-active .ac-detail-wrapper {
        margin-top: 14px !important;
    }
}
/* Nel modale l'overlay copre lo schermo intero e non c'è navbar: nessun margin-top */
.auction-modal-overlay .ac-detail-wrapper {
    margin-top: 0 !important;
}

.ac-detail-container {
    width: 100%;
    max-width: 1140px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
    background: #0b1322;
    color: #f1f5f9;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   TEMA DARK (DEFAULT)
   ========================================================================== */
.ac-detail-container.theme-dark {
    background: #0b1322;
    color: #f1f5f9;
}
.ac-detail-container.theme-dark .ac-detail-header {
    background: var(--primary-blue, #153050);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ac-detail-container.theme-dark .ac-detail-title { color: #ffffff; }
.ac-detail-container.theme-dark .ac-detail-meta-pill { color: #94a3b8; }
.ac-detail-container.theme-dark .ac-detail-meta-badge-id {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}
.ac-detail-container.theme-dark .ac-detail-views-tag {
    background: rgba(14, 165, 233, 0.22);
    color: #ffffff !important;
    border: 1px solid rgba(56, 189, 248, 0.45);
}
.ac-detail-container.theme-dark .ac-detail-views-tag .material-icons-outlined {
    color: #ffffff !important;
}
.ac-detail-container.theme-dark .ac-detail-body-container { background: #080e18; }
.ac-detail-container.theme-dark .ac-detail-gallery-card,
.ac-detail-container.theme-dark .ac-detail-cockpit-hero-card,
.ac-detail-container.theme-dark .ac-detail-countdown-hero-card,
.ac-detail-container.theme-dark .ac-detail-specs-bento-card,
.ac-detail-container.theme-dark .ac-detail-pricing-hero-card,
.ac-detail-container.theme-dark .ac-detail-desc-card,
.ac-detail-container.theme-dark .ac-detail-docs-card,
.ac-detail-container.theme-dark .ac-detail-action-participate-card {
    background: #0f1a2e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.35);
}
.ac-detail-container.theme-dark .ac-detail-section-headline { color: #ffffff; }
.ac-detail-container.theme-dark .ac-detail-spec-tile {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.07);
}
.ac-detail-container.theme-dark .ac-detail-spec-tile-icon-box {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8 !important;
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: none;
}
.ac-detail-container.theme-dark .ac-detail-spec-tile-icon-box .material-icons-outlined {
    color: #38bdf8 !important;
}
.ac-detail-container.theme-dark .ac-detail-spec-tile-label { color: #94a3b8; }
.ac-detail-container.theme-dark .ac-detail-spec-tile-value { color: #f8fafc !important; }
.ac-detail-container.theme-dark .ac-detail-countdown-tile {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.ac-detail-container.theme-dark .ac-detail-tile-number {
    color: #f59e0b !important;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5) !important;
}
.ac-detail-container.theme-dark .ac-detail-tile-label { color: #94a3b8; }
.ac-detail-container.theme-dark .ac-detail-hero-price-section {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}
.ac-detail-container.theme-dark .ac-detail-price-main,
.ac-detail-container.theme-light .ac-detail-price-main,
.ac-detail-price-main {
    color: #c01a1a !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 900 !important;
    text-shadow: none !important;
}
.ac-detail-container.theme-dark .ac-detail-price-with-taxes {
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
}
.ac-detail-container.theme-dark .ac-detail-price-with-taxes strong,
.ac-detail-container.theme-dark .ac-detail-bottom-cta-taxes strong {
    color: var(--accent-color) !important;
}
.ac-detail-container.theme-dark .ac-detail-desc-title-subtitle { color: #ffffff; }
.ac-detail-container.theme-dark .ac-detail-desc-text { color: #cbd5e1; }
.ac-detail-container.theme-dark .ac-detail-desc-fade-overlay {
    background: linear-gradient(to bottom, rgba(15,26,46,0), #0f1a2e);
}
.ac-detail-container.theme-dark .ac-detail-doc-item-link {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.28);
    color: #f1f5f9;
}
.ac-detail-container.theme-dark .ac-detail-doc-item-link:hover {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ffffff;
}
.ac-detail-container.theme-dark .ac-detail-gallery-thumbnails-strip {
    background: #0f1a2e;
    border-top-color: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   TEMA LIGHT (COMMUTABILE DA TOGGLE)
   ========================================================================== */
.ac-detail-container.theme-light {
    background: #ffffff;
    color: var(--text-main);
}
.ac-detail-container.theme-light .ac-detail-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-subtle);
}
.ac-detail-container.theme-light .ac-detail-title { color: var(--brand-navy); }
.ac-detail-container.theme-light .ac-detail-meta-pill { color: var(--text-muted); }
.ac-detail-container.theme-light .ac-detail-meta-badge-id {
    background: #f1f5f9;
    color: #475569;
}
.ac-detail-container.theme-light .ac-detail-views-tag {
    background: #e0f2fe;
    color: #0369a1 !important;
    border: 1px solid #bae6fd;
}
.ac-detail-container.theme-light .ac-detail-views-tag .material-icons-outlined {
    color: #0369a1 !important;
}
.ac-detail-container.theme-light .ac-detail-gallery-card,
.ac-detail-container.theme-light .ac-detail-cockpit-hero-card,
.ac-detail-container.theme-light .ac-detail-countdown-hero-card,
.ac-detail-container.theme-light .ac-detail-specs-bento-card,
.ac-detail-container.theme-light .ac-detail-pricing-hero-card,
.ac-detail-container.theme-light .ac-detail-desc-card,
.ac-detail-container.theme-light .ac-detail-docs-card,
.ac-detail-container.theme-light .ac-detail-action-participate-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.ac-detail-container.theme-light .ac-detail-section-headline { color: var(--brand-navy); }
.ac-detail-container.theme-light .ac-detail-spec-tile {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.ac-detail-container.theme-light .ac-detail-spec-tile-icon-box {
    background: rgba(2, 132, 199, 0.08);
    color: #0284c7 !important;
    border: 1px solid rgba(2, 132, 199, 0.18);
    box-shadow: none;
}
.ac-detail-container.theme-light .ac-detail-spec-tile-icon-box .material-icons-outlined {
    color: #0284c7 !important;
}
.ac-detail-container.theme-light .ac-detail-spec-tile-label { color: #64748b; }
.ac-detail-container.theme-light .ac-detail-spec-tile-value { color: #071d36 !important; }
.ac-detail-container.theme-light .ac-detail-countdown-tile {
    background: #ffffff;
    border: 1px solid #cbd5e1;
}
.ac-detail-container.theme-light .ac-detail-tile-number {
    color: #071d36 !important;
    text-shadow: none;
}
.ac-detail-container.theme-light .ac-detail-tile-label { color: #64748b; }
.ac-detail-container.theme-light .ac-detail-hero-price-section {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.ac-detail-container.theme-light .ac-detail-price-caption { color: var(--text-muted); }
.ac-detail-container.theme-light .ac-detail-price-main {
    color: #c01a1a !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 900 !important;
    text-shadow: none !important;
}
.ac-detail-container.theme-light .ac-detail-price-with-taxes {
    border-top: 1px dashed var(--border-subtle);
    color: var(--text-muted);
}
.ac-detail-container.theme-light .ac-detail-price-with-taxes strong,
.ac-detail-container.theme-light .ac-detail-bottom-cta-taxes strong {
    color: #0a58ca !important;
}
.ac-detail-container.theme-light .ac-detail-desc-title-subtitle { color: var(--brand-navy); }
.ac-detail-container.theme-light .ac-detail-desc-text { color: #334155; }
.ac-detail-container.theme-light .ac-detail-desc-fade-overlay {
    background: linear-gradient(to bottom, rgba(255,255,255,0), #ffffff);
}
.ac-detail-container.theme-light .ac-detail-doc-item-link {
    background: #f8fafc;
    border-color: var(--border-subtle);
    color: var(--text-main);
}
.ac-detail-container.theme-light .ac-detail-doc-item-link:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}
.ac-detail-container.theme-light .ac-detail-gallery-thumbnails-strip {
    background: #ffffff;
    border-top-color: var(--border-subtle);
}
.ac-detail-container.theme-light .ac-detail-gallery-nav-arrow,
.theme-light .ac-detail-gallery-nav-arrow {
    background: rgba(255, 255, 255, 0.75) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    color: #0f172a !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}
.ac-detail-container.theme-light .ac-detail-gallery-nav-arrow:hover,
.theme-light .ac-detail-gallery-nav-arrow:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #0f172a !important;
    transform: translateY(-50%) scale(1.08) !important;
}

/* Adattamento del componente affiliazioni centralizzato della V1 */
.ac-detail-affiliate-slot:empty { display: none; }
.ac-detail-affiliate-slot .affiliate-banner-slot { margin-top: 0 !important; }
.ac-detail-container.theme-dark .ac-detail-affiliate-slot .affiliate-native-card {
    background: #0f1a2e;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.32);
}
.ac-detail-container.theme-dark .ac-detail-affiliate-slot .affiliate-title { color: #ffffff; }
.ac-detail-container.theme-dark .ac-detail-affiliate-slot .affiliate-desc { color: #94a3b8; }
.ac-detail-container.theme-dark .ac-detail-affiliate-slot .btn-affiliate-cta {
    background: transparent;
    color: #93c5fd;
    border-color: #60a5fa;
}
.ac-detail-container.theme-dark .ac-detail-affiliate-slot .btn-affiliate-cta:hover,
.ac-detail-container.theme-dark .ac-detail-affiliate-slot .btn-affiliate-cta:focus-visible {
    background: #0d6efd;
    color: #ffffff;
}

/* ==========================================================================
   HEADER SCHEDA V2
   ========================================================================== */
.ac-detail-header {
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
/* Nel modale l'header rimane fisso/sticky in cima durante lo scroll con la X e il titolo */
.auction-modal-overlay .ac-detail-wrapper,
.auction-modal-overlay .ac-detail-container {
    overflow: visible !important;
}
.auction-modal-overlay .ac-detail-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.ac-detail-container.theme-dark .ac-detail-header {
    background: var(--primary-blue, #153050) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}
.ac-detail-container.theme-light .ac-detail-header {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
@media (max-width: 768px) {
    .auction-modal-overlay .ac-detail-header {
        border-radius: 0 !important;
        padding: 16px 14px 12px !important;
    }
    #acThemeText,
    #v2ThemeText {
        display: none !important;
    }
    .ac-detail-btn-theme-toggle {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .ac-detail-btn-modal-close {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
    }
}
.ac-detail-header-info { flex: 1; min-width: 0; }
.ac-detail-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap !important;
    gap: 8px;
    flex-shrink: 0;
    width: auto !important;
}
/* Pulsante X di chiusura integrato nell'header del modale */
.ac-detail-btn-modal-close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.ac-detail-btn-modal-close:hover {
    background: rgba(239, 68, 68, 0.95);
    border-color: #ef4444;
    color: #ffffff;
    transform: scale(1.06);
}
.ac-detail-container.theme-light .ac-detail-btn-modal-close {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}
.ac-detail-container.theme-light .ac-detail-btn-modal-close:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}

/* FOOTER ACTION BAR CONDIVISA TRA LE SCHEDE SSR V2/V3 */
.ac-detail-footer-action-bar,
.v2-footer-action-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: inherit;
}
.ac-detail-container.theme-light .ac-detail-footer-action-bar,
.auction-v2-container.theme-light .v2-footer-action-bar {
    border-top-color: var(--border-subtle);
}
.ac-detail-btn-back-catalog,
.v2-btn-back-catalog {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 9999px;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none !important;
    transition: all 0.2s ease;
    user-select: none;
}
.ac-detail-container.theme-dark .ac-detail-btn-back-catalog,
.auction-v2-container.theme-dark .v2-btn-back-catalog {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
}
.ac-detail-container.theme-dark .ac-detail-btn-back-catalog:hover,
.auction-v2-container.theme-dark .v2-btn-back-catalog:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    color: #ffffff;
    transform: translateY(-1px);
}
.ac-detail-container.theme-dark .ac-detail-btn-back-catalog .material-icons-outlined,
.auction-v2-container.theme-dark .v2-btn-back-catalog .material-icons-outlined {
    color: #38bdf8;
    font-size: 18px;
}
.ac-detail-container.theme-light .ac-detail-btn-back-catalog,
.auction-v2-container.theme-light .v2-btn-back-catalog {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
.ac-detail-container.theme-light .ac-detail-btn-back-catalog:hover,
.auction-v2-container.theme-light .v2-btn-back-catalog:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateY(-1px);
}
.ac-detail-container.theme-light .ac-detail-btn-back-catalog .material-icons-outlined,
.auction-v2-container.theme-light .v2-btn-back-catalog .material-icons-outlined {
    color: #0284c7;
    font-size: 18px;
}

.ac-detail-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
}
.ac-detail-meta-row {
    display: flex;
    align-items: center;
    gap: 8px 12px;
    font-size: 14px;
    flex-wrap: wrap;
}
.ac-detail-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    line-height: 1.4;
}
.ac-detail-meta-pill .material-icons-outlined { font-size: 18px; color: var(--brand-cyan); }
.ac-detail-meta-badge-id {
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 13px;
}
.ac-detail-views-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}
.ac-detail-views-icon {
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ac-detail-views-tag svg.views-icon-svg {
    display: inline-block;
    vertical-align: -1px;
}
.ac-detail-gallery-views-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    gap: 5px;
    padding: 5px 9px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.ac-detail-gallery-views-overlay .ac-detail-views-icon {
    width: 17px;
    height: 17px;
    font-size: 18px;
}
.ac-detail-container.theme-dark .ac-detail-gallery-views-overlay,
.ac-detail-container.theme-light .ac-detail-gallery-views-overlay {
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff !important;
}
.ac-detail-container.theme-dark .ac-detail-gallery-views-overlay .material-icons-outlined,
.ac-detail-container.theme-light .ac-detail-gallery-views-overlay .material-icons-outlined,
.ac-detail-container.theme-dark .ac-detail-gallery-views-overlay svg,
.ac-detail-container.theme-light .ac-detail-gallery-views-overlay svg {
    color: #ffffff !important;
}

/* PULSANTE TOGGLE THEME DARK / LIGHT */
.ac-detail-btn-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f1f5f9;
    padding: 7px 13px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    flex-shrink: 0;
}
.ac-detail-btn-theme-toggle .material-icons-outlined {
    font-size: 16px;
}
.ac-detail-btn-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}
.ac-detail-btn-theme-toggle:focus-visible {
    outline: 3px solid rgba(245, 158, 11, 0.55);
    outline-offset: 2px;
}
.ac-detail-container.theme-light .ac-detail-btn-theme-toggle {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #1e293b;
}
.ac-detail-container.theme-light .ac-detail-btn-theme-toggle:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #0f172a;
}

/* ==========================================================================
   CORPO BENTO GRID
   ========================================================================== */
.ac-detail-body-container {
    padding: 20px;
}

.ac-detail-bento-master-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.ac-detail-bento-col-left,
.ac-detail-bento-col-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0 !important;
}
.ac-detail-section-headline {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 1. GALLERY FOTOGRAFICA */
.ac-detail-gallery-card {
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    width: 100%;
    min-width: 0 !important;
}
.ac-detail-gallery-main-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: 480px;
    background: #070c14;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
}
.ac-detail-gallery-main-frame img.ac-detail-gallery-main-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    z-index: 1;
    will-change: transform;
    filter: contrast(1.045) brightness(1.03) saturate(1.08) !important;
}
.ac-detail-gallery-badge-status {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 4;
}
/* Stato e visualizzazioni condividono la medesima altezza in ogni renderer
   (V2, V3 GET e modali): cambia soltanto la larghezza determinata dal testo. */
.ac-detail-gallery-badge-status,
.ac-detail-gallery-views-overlay {
    box-sizing: border-box;
    min-height: 30px;
}
.ac-detail-gallery-badge-status.status-open {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}
.ac-detail-gallery-badge-status.status-closed {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}
.ac-detail-gallery-badge-status.status-paused {
    background: rgba(168, 85, 247, 0.18);
    border-color: rgba(168, 85, 247, 0.4);
    color: #c084fc;
}
.ac-detail-gallery-badge-status.status-pending {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}
.ac-detail-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}
.status-open .ac-detail-pulse-dot { background: #10b981; box-shadow: 0 0 8px #10b981; }
.status-closed .ac-detail-pulse-dot { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.status-paused .ac-detail-pulse-dot { background: #a855f7; box-shadow: 0 0 8px #a855f7; }
.status-pending .ac-detail-pulse-dot { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.ac-detail-gallery-fullscreen-btn {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 4;
    transition: all 0.2s ease;
}
.ac-detail-gallery-fullscreen-btn:hover { background: rgba(15, 23, 42, 0.95); }
.ac-detail-gallery-fullscreen-btn .material-icons-outlined { font-size: 15px; }
.ac-detail-gallery-badge-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(6px);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 4;
}
.ac-detail-gallery-badge-counter .material-icons-outlined { font-size: 14px; }
.ac-detail-gallery-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all 0.2s ease;
}
.ac-detail-gallery-nav-arrow:hover {
    background: rgba(15, 23, 42, 0.85);
    transform: translateY(-50%) scale(1.08);
}
.ac-detail-gallery-nav-arrow.prev,
.ac-detail-gallery-nav-arrow.ac-detail-gallery-arrow-prev { left: 12px; }
.ac-detail-gallery-nav-arrow.next,
.ac-detail-gallery-nav-arrow.ac-detail-gallery-arrow-next { right: 12px; }
.ac-detail-gallery-thumbnails-strip,
.ac-detail-gallery-thumbs-strip,
#acThumbsStrip {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    gap: 8px !important;
    padding: 10px 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-top: 1px solid var(--border-subtle) !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
}
.ac-detail-thumb-item {
    width: 62px !important;
    height: 44px !important;
    min-width: 62px !important;
    max-width: 62px !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    border: 2px solid transparent !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    transition: all 0.2s !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    background: transparent !important;
}
.ac-detail-thumb-item.active { border-color: var(--brand-gold) !important; transform: scale(1.03) !important; }
.ac-detail-thumb-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    filter: contrast(1.045) brightness(1.03) saturate(1.08) !important;
}

/* 2. CARD COCKPIT HERO (COUNTDOWN, PREZZO E PARTECIPA ASTA) */
.ac-detail-cockpit-hero-card,
.ac-detail-countdown-hero-card {
    border-radius: 18px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}
.ac-detail-hero-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 2px;
}
.ac-detail-hero-top-row--spaced { margin-bottom: 8px; }
.ac-detail-urgency-badge {
    font-size: 11.5px;
    font-weight: 800;
    padding: 5px 11px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid rgba(239, 68, 68, 0.38);
    color: #f87171;
}
.ac-detail-urgency-badge .material-icons-outlined { color: #ef4444; font-size: 14px; }
.ac-detail-container.theme-dark .ac-detail-urgency-badge { color: #ffffff; }
.ac-detail-container.theme-light .ac-detail-urgency-badge {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}
.ac-detail-container.theme-light .ac-detail-urgency-badge .material-icons-outlined { color: #b91c1c; }

.ac-detail-countdown-tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.ac-detail-countdown-tile {
    border-radius: 12px;
    padding: 8px 4px 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}
.ac-detail-tile-number {
    font-family: 'Digital', 'Courier New', monospace !important;
    font-size: 32px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: 2px !important;
    font-variant-numeric: tabular-nums;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}
.ac-detail-tile-label {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ac-detail-hero-price-section {
    border-radius: 14px;
    padding: 14px 16px;
    margin-top: 12px;
}
.ac-detail-price-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2px;
}
.ac-detail-price-caption { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.ac-detail-price-min-tag { font-size: 11.5px; color: #94a3b8; font-weight: 600; }
.ac-detail-price-main {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.ac-detail-price-main small {
    font-size: 0.65em;
    font-weight: 800;
    vertical-align: baseline;
    color: inherit;
}
.ac-detail-price-with-taxes {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    margin-top: 8px;
    font-size: 12.5px;
}

/* Pulsante Partecipa nel Cockpit */
.ac-detail-cockpit-action-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 2px;
}
.ac-detail-btn-participate-action {
    display: block;
    width: 100%;
    background: var(--accent-color);
    color: #071d36 !important;
    text-decoration: none;
    text-align: center;
    font-size: 15.5px;
    font-weight: 900;
    letter-spacing: 0.01em;
    padding: 13px 20px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(212, 178, 78, 0.35);
    transition: all 0.2s ease;
    user-select: none;
}
.ac-detail-btn-participate-action:hover {
    background: #e2c05e;
    color: #051426 !important;
    transform: translateY(-2px);
    box-shadow: 0 9px 24px rgba(212, 178, 78, 0.5);
}
.ac-detail-cockpit-security-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    line-height: 1.3;
}
.ac-detail-cockpit-security-row .material-icons-outlined {
    font-size: 14px;
    color: #10b981;
}

/* 3. BENTO GRID SPECIFICHE TECNICHE */
.ac-detail-specs-bento-card {
    border-radius: 18px;
    padding: 20px;
}
.ac-detail-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.ac-detail-spec-tile {
    border-radius: 12px;
    padding: 9px 11px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border-subtle);
    min-width: 0 !important;
    overflow: hidden !important;
}
.ac-detail-spec-tile-icon-box {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ac-detail-spec-tile-icon-box .material-icons-outlined { font-size: 18px; }
.ac-detail-spec-tile-content {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    overflow: hidden !important;
}
.ac-detail-spec-tile-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-detail-spec-tile-value {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    word-break: break-word;
    min-width: 0 !important;
}

/* TARGA ITALIANA REALISTICA FLUIDA */
.ac-detail-it-plate-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
}
.ac-detail-it-plate-svg {
    width: 100% !important;
    max-width: 112px !important;
    height: auto !important;
    aspect-ratio: 240 / 50 !important;
    display: block !important;
    border-radius: 4px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25) !important;
    transition: transform 0.15s ease !important;
}
.ac-detail-it-plate-svg:hover { transform: scale(1.02); }

/* 4. PERIZIA & DESCRIZIONE ASTA */
.ac-detail-desc-card {
    border-radius: 18px;
    padding: 20px;
}
.ac-detail-desc-header-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 12px !important;
    gap: 8px !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
}
.ac-detail-desc-header-row .ac-detail-section-headline {
    margin-bottom: 0 !important;
    white-space: nowrap !important;
    font-size: 13.5px !important;
}
.ac-detail-modal-desc-actions,
.ac-detail-container.theme-dark .ac-detail-modal-desc-actions,
.ac-detail-container.theme-dark .modal-desc-actions {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 9999px !important;
    padding: 2px 6px !important;
    box-shadow: none !important;
    flex-shrink: 0 !important;
}
.ac-detail-container.theme-light .ac-detail-modal-desc-actions,
.ac-detail-container.theme-light .modal-desc-actions {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
.ac-detail-btn-card-action {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    user-select: none;
    transition: transform 0.14s ease, background-color 0.15s ease, color 0.15s ease;
}
.ac-detail-btn-card-action:active { transform: scale(0.86) !important; }
.ac-detail-btn-preferito,
.ac-detail-modal-desc-actions .btn-preferito,
.modal-desc-actions .btn-preferito {
    color: #ef4444 !important;
}
.ac-detail-btn-preferito:hover,
.ac-detail-modal-desc-actions .btn-preferito:hover,
.modal-desc-actions .btn-preferito:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #dc2626 !important;
}
.ac-detail-btn-preferito.is-saved,
.ac-detail-modal-desc-actions .btn-preferito.is-saved,
.modal-desc-actions .btn-preferito.is-saved {
    background: rgba(239, 68, 68, 0.2) !important;
}
.ac-detail-btn-avviso,
.ac-detail-modal-desc-actions .btn-avviso,
.modal-desc-actions .btn-avviso {
    color: #f59e0b !important;
}
.ac-detail-btn-avviso:hover,
.ac-detail-modal-desc-actions .btn-avviso:hover,
.modal-desc-actions .btn-avviso:hover {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #d97706 !important;
}
.ac-detail-btn-condividi,
.ac-detail-modal-desc-actions .btn-condividi,
.modal-desc-actions .btn-condividi {
    color: #0d6efd !important;
}
.ac-detail-btn-condividi:hover,
.ac-detail-modal-desc-actions .btn-condividi:hover,
.modal-desc-actions .btn-condividi:hover {
    background: rgba(13, 110, 253, 0.15) !important;
    color: #0284c7 !important;
}

.ac-detail-desc-title-subtitle {
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.35;
}
.ac-detail-desc-text-wrapper {
    position: relative;
    max-height: 78px;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.ac-detail-desc-text-wrapper.expanded { max-height: 2500px; }
.ac-detail-desc-text {
    font-size: 12.5px;
    line-height: 1.55;
    margin-bottom: 0;
}
.ac-detail-desc-fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 36px;
    pointer-events: none;
    transition: opacity 0.3s;
}
.ac-detail-desc-text-wrapper.expanded .ac-detail-desc-fade-overlay { opacity: 0; }
.ac-detail-btn-expand-desc {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 1px solid rgba(2, 132, 199, 0.3);
    color: var(--brand-cyan);
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    margin-top: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.ac-detail-btn-expand-desc:hover {
    background: rgba(2, 132, 199, 0.08);
    border-color: var(--brand-cyan);
}
.ac-detail-btn-expand-desc .material-icons-outlined { font-size: 16px; }

/* 2. DOCUMENTI UFFICIALI & 3. BANNER AFFILIAZIONE (FLUSSO CONTINUO) */
.ac-detail-bento-block-docs,
.ac-detail-bento-block-affiliate {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}
.ac-detail-docs-card {
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    padding: 20px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    min-width: 0;
}
.ac-detail-docs-card .ac-detail-docs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.ac-detail-doc-item-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    border: 1px solid var(--border-subtle);
    transition: all 0.15s;
    gap: 8px;
    min-width: 0;
}
.ac-detail-doc-left-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.ac-detail-pdf-tag {
    background: #ef4444;
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}
.ac-detail-doc-texts {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.ac-detail-doc-filename {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    word-break: normal;
    overflow-wrap: anywhere;
}
.ac-detail-doc-sublabel {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.ac-detail-doc-download-icon {
    font-size: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.ac-detail-docs-empty-text {
    font-size: 12.5px;
    color: #94a3b8;
    margin: 0;
}
.ac-detail-docs-count {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}
.ac-detail-section-headline-icon {
    color: var(--text-muted);
    font-size: 18px;
}
.ac-detail-spec-value-muted {
    color: #94a3b8;
    font-weight: 600;
}

/* 4. BLOCCO AZIONE PARTECIPA ALL'ASTA (IN FONDO ALLA COLONNA DESTRA) */
.ac-detail-action-participate-card {
    border-radius: 18px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.ac-detail-specs-pricing-block {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ac-detail-container.theme-light .ac-detail-specs-pricing-block {
    border-top: 1px solid var(--border-subtle);
}

.ac-detail-verified-badge-top {
    font-size: 11.5px;
    font-weight: 700;
    color: #10b981;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.ac-detail-verified-badge-top .material-icons-outlined {
    font-size: 15px;
    color: #10b981;
}

/* 7. BLOCCO CTA PARTECIPA ALL'ASTA (IN FONDO ALLA SCHEDA) */
.ac-detail-bottom-cta-container {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #07152b 0%, #153050 100%);
    border-radius: 20px;
    padding: 24px;
    color: #ffffff;
    box-shadow: 0 14px 34px -4px rgba(7, 21, 43, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    margin-top: 4px;
}
.ac-detail-bottom-cta-pricing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.ac-detail-bottom-cta-label {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.ac-detail-bottom-cta-amount {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 34px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
}
.ac-detail-bottom-cta-amount small { font-size: 0.65em; font-weight: 800; color: inherit; }
.ac-detail-bottom-cta-taxes { font-size: 13px; color: #cbd5e1; }
.ac-detail-btn-participate-giant {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 520px;
    min-height: 58px;
    background: #f59e0b;
    color: #071d36 !important;
    text-decoration: none;
    text-align: center;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0.01em;
    padding: 16px 28px;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.34);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.ac-detail-btn-participate-giant:hover {
    background: #e88900;
    color: #051426 !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.48);
}
.ac-detail-btn-participate-giant:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.55);
}
.ac-detail-btn-participate-giant:active {
    background: #d97706;
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.ac-detail-btn-participate-giant .material-icons-outlined {
    color: #071d36 !important;
    font-size: 23px;
    flex-shrink: 0;
}
.ac-detail-btn-participate-giant:hover .material-icons-outlined {
    color: #051426 !important;
}
.ac-detail-btn-participate-giant span:not(.material-icons-outlined) {
    min-width: 0;
    overflow-wrap: anywhere;
}
.ac-detail-bottom-security-guarantee {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: #94a3b8;
}
.ac-detail-bottom-security-guarantee .material-icons-outlined { font-size: 16px; color: #10b981; }

/* ==========================================================================
   MODALE LIGHTBOX FULLSCREEN (CLICK SULLA FOTO)
   ========================================================================== */
.ac-detail-lightbox-overlay {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    inset: 0 !important;
    width: 100% !important;
    width: 100vw !important;
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100% !important;
    max-height: 100dvh !important;
    background: rgba(4, 8, 16, 0.96) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    z-index: 100000 !important;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overscroll-behavior: contain !important;
    touch-action: none;
}
.ac-detail-lightbox-overlay.open { display: flex; }
.ac-detail-lightbox-topbar {
    position: absolute;
    top: 16px;
    top: max(16px, env(safe-area-inset-top, 16px));
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    color: #ffffff;
    z-index: 10;
}
.ac-detail-lightbox-counter { font-size: 14px; font-weight: 700; letter-spacing: 0.05em; }
.ac-detail-lightbox-close-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.ac-detail-lightbox-close-btn:hover { background: rgba(255, 255, 255, 0.25); }
.ac-detail-lightbox-image-container {
    width: 100vw;
    max-width: 100vw;
    height: calc(100% - 140px);
    height: calc(100dvh - 140px);
    max-height: calc(100% - 140px);
    max-height: calc(100dvh - 140px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ac-detail-lightbox-img {
    max-width: 90vw;
    max-height: calc(100% - 150px);
    max-height: calc(100dvh - 150px);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    object-fit: contain;
    filter: contrast(1.045) brightness(1.03) saturate(1.08) !important;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    will-change: transform, opacity;
}
/* In galleria principale il clone copre il frame al 100% */
.ac-detail-gallery-main-frame .ac-slide-incoming {
    pointer-events: none !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    z-index: 2 !important;
}
/* Nel lightbox il clone mantiene la STESSA identica dimensione e max-height/width
   dell'immagine a riposo: zero salti di grandezza durante il movimento */
.ac-detail-lightbox-image-container .ac-slide-incoming {
    pointer-events: none !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin: auto !important;
    max-width: 90vw !important;
    max-height: calc(100% - 150px) !important;
    max-height: calc(100dvh - 150px) !important;
    object-fit: contain !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8) !important;
    z-index: 2 !important;
}

/* Striscia miniature inferiore nel lightbox a tutto schermo (stile Coches.net) */
.ac-detail-lightbox-thumbs-wrap {
    position: absolute;
    bottom: 16px;
    bottom: max(16px, calc(14px + env(safe-area-inset-bottom, 0px)));
    left: 0;
    right: 0;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    z-index: 100005;
    pointer-events: auto;
    box-sizing: border-box;
    touch-action: pan-x !important;
}
.ac-detail-lightbox-thumbs-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x !important;
    padding: 4px 6px;
    max-width: 100%;
    align-items: center;
}
.ac-detail-lightbox-thumbs-strip::-webkit-scrollbar {
    height: 4px;
}
.ac-detail-lightbox-thumbs-strip::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
}
.ac-detail-lightbox-thumbs-strip .ac-detail-thumb-item {
    flex: 0 0 64px;
    width: 64px;
    height: 44px;
    border-radius: 7px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.85);
    opacity: 0.55;
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.ac-detail-lightbox-thumbs-strip .ac-detail-thumb-item:hover {
    opacity: 0.9;
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}
.ac-detail-lightbox-thumbs-strip .ac-detail-thumb-item.active {
    opacity: 1;
    border-color: #0284c7;
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.7);
    transform: scale(1.06);
}
.ac-detail-lightbox-thumbs-strip .ac-detail-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ac-detail-lightbox-arrow {
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 52px !important;
    height: 52px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.16) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    color: #ffffff !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 100010 !important;
    transition: all 0.2s ease !important;
}
.ac-detail-lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-50%) scale(1.08) !important;
}
.ac-detail-lightbox-arrow.prev { left: 32px !important; }
.ac-detail-lightbox-arrow.next { right: 32px !important; }

@media (max-width: 768px) {
    .ac-detail-lightbox-arrow {
        width: 44px !important;
        height: 44px !important;
    }
    .ac-detail-lightbox-arrow.prev { left: 10px !important; }
    .ac-detail-lightbox-arrow.next { right: 10px !important; }
    .ac-detail-lightbox-topbar {
        top: 12px !important;
        top: max(12px, env(safe-area-inset-top, 12px)) !important;
        padding: 0 16px !important;
    }
    .ac-detail-lightbox-image-container {
        height: calc(100% - 150px) !important;
        height: calc(100dvh - 150px) !important;
        max-height: calc(100% - 150px) !important;
        max-height: calc(100dvh - 150px) !important;
    }
    .ac-detail-lightbox-img,
    .ac-detail-lightbox-image-container .ac-slide-incoming {
        max-height: calc(100% - 160px) !important;
        max-height: calc(100dvh - 160px) !important;
    }
    .ac-detail-lightbox-thumbs-wrap {
        bottom: 28px !important;
        bottom: max(28px, calc(20px + env(safe-area-inset-bottom, 0px))) !important;
        padding: 0 12px !important;
    }
    .ac-detail-lightbox-thumbs-strip {
        gap: 6px !important;
        padding: 4px 2px !important;
    }
    .ac-detail-lightbox-thumbs-strip .ac-detail-thumb-item {
        flex: 0 0 54px !important;
        width: 54px !important;
        height: 38px !important;
        border-radius: 6px !important;
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 900px) {
    .ac-detail-bento-master-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
    .ac-detail-bento-col-left,
    .ac-detail-bento-col-right {
        display: contents !important;
    }
    /* Ordine mobile: Foto → Countdown → Dettagli → AdSense → Descrizione → Documenti
       → carVertical → banner casuale accessori → Partecipa */
    .ac-detail-bento-block-gallery   { order: 1 !important; width: 100% !important; min-width: 0 !important; }
    .ac-detail-pricing-hero-card     { order: 2 !important; width: 100% !important; min-width: 0 !important; }
    .ac-detail-specs-bento-card:not(.ac-detail-pricing-hero-card) { order: 3 !important; width: 100% !important; min-width: 0 !important; }
    .ac-detail-bento-block-adsense,
    .ac-detail-adsense-slot-wrapper {
        order: 4 !important;
        width: 100% !important;
        min-width: 0 !important;
    }
    .ac-detail-bento-block-desc      { order: 5 !important; width: 100% !important; min-width: 0 !important; }
    .ac-detail-bento-block-docs      { order: 6 !important; width: 100% !important; min-width: 0 !important; }
    .ac-clean-carvertical-detail     { order: 7 !important; width: 100% !important; min-width: 0 !important; }
    .ac-detail-bento-block-affiliate { order: 8 !important; width: 100% !important; min-width: 0 !important; }
    .ac-detail-action-participate-card { order: 9 !important; width: 100% !important; min-width: 0 !important; }
}

@media (max-width: 600px) {
    .ac-detail-wrapper { padding: 12px 6px 40px; overflow-x: hidden; }
    .ac-detail-container { border-radius: 18px; }
    
    /* In light mode SSR da mobile: testata e sfondo sfumati continui (#f8fafc), senza doppio box bianco */
    body.ac-detail-active.theme-light .ac-detail-container,
    body.ac-detail-v2-active.theme-light .ac-detail-container,
    .ac-detail-wrapper.theme-light:not(.auction-modal-overlay *) .ac-detail-container {
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
    }
    body.ac-detail-active.theme-light .ac-detail-header,
    body.ac-detail-v2-active.theme-light .ac-detail-header,
    .ac-detail-wrapper.theme-light:not(.auction-modal-overlay *) .ac-detail-header {
        background: transparent !important;
        border-bottom: 1px solid rgba(148, 163, 184, 0.28) !important;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1) !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
        padding-bottom: 6px !important;
    }
    body.ac-detail-active.theme-dark .ac-detail-header,
    body.ac-detail-v2-active.theme-dark .ac-detail-header {
        border-bottom: 1px solid rgba(255, 255, 255, 0.16) !important;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(56, 189, 248, 0.1) !important;
    }
    .auction-modal-overlay.auction-modal-overlay--v3.theme-light .ac-detail-header {
        border-bottom: 1px solid rgba(148, 163, 184, 0.28) !important;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1) !important;
    }
    .auction-modal-overlay.auction-modal-overlay--v3.theme-dark .ac-detail-header {
        border-bottom: 1px solid rgba(255, 255, 255, 0.16) !important;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(56, 189, 248, 0.1) !important;
    }
    /* V2 light: mantieni lo stesso respiro esterno e la stessa separazione
       visiva del dark mode, evitando il contenitore trasparente a filo pagina. */
    .ac-detail-wrapper.theme-light:not(.auction-v3-wrapper) .ac-detail-container {
        background: #ffffff !important;
        border: 1px solid var(--border-subtle) !important;
        box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(148, 163, 184, 0.12) !important;
    }
    .ac-detail-wrapper.theme-light:not(.auction-v3-wrapper) .ac-detail-body-container {
        background: #f8fafc !important;
        padding: 10px !important;
    }
    body.ac-detail-active.theme-light .ac-detail-body-container,
    body.ac-detail-v2-active.theme-light .ac-detail-body-container,
    .ac-detail-wrapper.theme-light:not(.auction-modal-overlay *) .ac-detail-body-container {
        background: transparent !important;
        padding: 4px 0 0 !important;
    }

    .ac-detail-header {
        width: 100%;
        padding: 16px 16px 14px !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 12px !important;
    }
    .ac-detail-header-info {
        flex: 1;
        min-width: 0;
    }
    .ac-detail-title {
        max-width: 100%;
        font-size: 20px !important;
        font-weight: 800 !important;
        white-space: normal;
        overflow-wrap: anywhere;
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 2 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        margin-top: 2px !important;
        margin-bottom: 8px !important;
        line-height: 1.3 !important;
    }
    .ac-detail-meta-row {
        width: 100%;
        min-width: 0;
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 6px 10px !important;
    }
    .ac-detail-meta-pill {
        flex: 0 0 100% !important;
        max-width: 100%;
        min-width: 0;
        white-space: normal;
        overflow-wrap: anywhere;
        margin-bottom: 2px !important;
    }
    .ac-detail-meta-badge-id,
    .ac-detail-views-tag {
        display: inline-flex !important;
        align-items: center !important;
        max-width: 100%;
        min-width: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .ac-detail-header-actions {
        width: auto !important;
        max-width: none;
        min-width: 0;
        justify-content: flex-end;
        flex-wrap: nowrap !important;
        flex-shrink: 0;
    }
    .ac-detail-btn-theme-toggle {
        max-width: 100%;
        min-width: 0;
        white-space: nowrap;
    }
    .ac-detail-desc-header-row { flex-wrap: wrap !important; }
    .ac-detail-desc-header-row .ac-detail-section-headline { white-space: normal !important; }
    .ac-detail-body-container { padding: 10px; }
    .ac-detail-countdown-tiles-grid { gap: 4px; }
    .ac-detail-countdown-tile { min-width: 0; padding-inline: 2px; }
    .ac-detail-tile-label {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .ac-detail-specs-grid {
        gap: 8px !important;
    }
    .ac-detail-spec-tile {
        padding: 10px 11px !important;
        gap: 9px !important;
        min-height: 54px !important;
        border-radius: 12px !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
    .ac-detail-spec-tile-icon-box {
        width: 34px !important;
        height: 34px !important;
        border-radius: 9px !important;
        flex-shrink: 0 !important;
    }
    .ac-detail-spec-tile-icon-box .material-icons-outlined { font-size: 18px !important; }
    .ac-detail-spec-tile-content {
        flex: 1 1 0% !important;
        min-width: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
    }
    .ac-detail-spec-tile-label {
        font-size: 9.5px !important;
        font-weight: 700 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        letter-spacing: 0.04em !important;
        margin-bottom: 2px !important;
    }
    .ac-detail-spec-tile-value {
        font-size: 13px !important;
        font-weight: 800 !important;
        line-height: 1.25 !important;
        white-space: normal !important;
        word-break: break-word !important;
    }
    .ac-detail-it-plate-wrapper {
        max-width: 100% !important;
        min-width: 0 !important;
    }
    .ac-detail-it-plate-svg {
        max-width: 95px !important;
        width: 100% !important;
        height: auto !important;
    }
    .ac-detail-price-main { font-size: 28px; }
    .ac-detail-bottom-cta-amount { font-size: 28px; }
    .ac-detail-btn-participate-giant { font-size: 16px; padding: 14px 20px; }
    .ac-detail-security-tribunale-part { display: none !important; }
    .ac-detail-specs-bento-card,
    .ac-detail-pricing-hero-card,
    .ac-detail-desc-card,
    .ac-detail-docs-card,
    .ac-detail-action-participate-card {
        border-radius: 14px !important;
        padding: 14px !important;
    }
}

@media (max-width: 280px) {
    .ac-detail-header { padding: 12px; }
    .ac-detail-header-actions { align-items: stretch; }
    .ac-detail-btn-theme-toggle {
        flex: 1 1 100%;
        justify-content: center;
    }
    .ac-detail-tile-number {
        font-size: 18px;
        letter-spacing: 1px;
    }
    .ac-detail-tile-label { font-size: 8px; }
}

@media (max-width: 320px) {
    .ac-detail-gallery-badge-status {
        left: 8px;
        padding: 4px 7px;
        font-size: 10.5px;
    }
    .ac-detail-gallery-views-overlay {
        right: 8px;
        padding: 4px 7px;
        font-size: 13px;
    }
    .ac-detail-gallery-views-overlay .ac-detail-views-icon { font-size: 16px; }
}

/* V3 SSR/GET mobile: il guscio esterno sparisce, mentre le card interne
   mantengono il proprio margine, bordo e ombreggiatura. */
@media (max-width: 600px) {
    body.ac-detail-active .ac-detail-wrapper {
        padding: 12px 10px 40px !important;
    }
    /* Su mobile la V3 non deve avere un secondo guscio attorno a tutti i
       blocchi: restano visibili solo le card interne. */
    body.ac-detail-active .ac-detail-wrapper .ac-detail-container {
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
    }
    body.ac-detail-active .ac-detail-wrapper .ac-detail-header {
        border-radius: 18px 18px 0 0 !important;
    }
    /* La precedente eccezione light riduceva il padding della sola GET V3,
       facendo avanzare foto e blocchi rispetto al dark. La geometria resta
       ora identica e cambia esclusivamente la palette. */
    body.ac-detail-active .ac-detail-wrapper.theme-light .ac-detail-header {
        padding: 16px 16px 14px !important;
    }
    body.ac-detail-active .ac-detail-wrapper.auction-v3-wrapper.theme-light .ac-detail-body-container,
    body.ac-detail-active .ac-detail-wrapper .ac-detail-body-container {
        padding: 0 !important;
        margin: 0 !important;
    }
    /* La prima card deve aderire direttamente alla testata: il distacco
       residuo era dato dai margini del body/grid nella scheda GET mobile. */
    body.ac-detail-active .ac-detail-wrapper .ac-detail-header,
    body.ac-detail-active .ac-detail-wrapper .ac-detail-bento-master-grid,
    body.ac-detail-active .ac-detail-wrapper .ac-detail-bento-block-gallery,
    body.ac-detail-active .ac-detail-wrapper .ac-detail-gallery-card {
        margin: 0 !important;
    }
    body.ac-detail-active .ac-detail-wrapper.theme-light .ac-detail-body-container {
        background: #f8fafc !important;
    }
    body.ac-detail-active .ac-detail-wrapper .ac-detail-gallery-card,
    body.ac-detail-active .ac-detail-wrapper .ac-detail-gallery-main-frame {
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
    }
}

/* ==========================================================================
   AC-036: PATTERN "MINIMALISTA LEGGERO" PER PARTNER CARVERTICAL
   ========================================================================== */
.ac-clean-affiliate-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 20px 22px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 10px 30px -5px rgba(15, 34, 56, 0.05), 0 0 1px 1px rgba(15, 34, 56, 0.04);
    margin-top: 14px;
    position: relative;
    box-sizing: border-box;
    width: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ac-clean-affiliate-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px -4px rgba(15, 34, 56, 0.08), 0 0 1px 1px rgba(15, 34, 56, 0.05);
}

.ac-clean-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.ac-clean-partner-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #153050;
    background: #e8f1fd;
    border: 1px solid #bfdbfe;
    border-radius: 9999px;
    padding: 4px 10px;
}

.ac-clean-partner-icon {
    font-size: 16px;
    line-height: 1;
    color: #0d6efd;
}

.ac-detail-cv-logo {
    height: 15px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    vertical-align: middle;
    display: inline-block;
    margin: 0;
}

.ac-clean-plate-tag {
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
    color: #0d6efd;
    font-weight: 800;
}

.ac-clean-coupon-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 9999px;
    padding: 4px 10px;
}

.ac-clean-coupon-chip .material-icons-outlined {
    font-size: 14px;
    line-height: 1;
}

.ac-clean-body {
    margin-bottom: 14px;
}

.ac-clean-title {
    font-family: 'Outfit', -apple-system, sans-serif;
    font-size: 15.5px;
    font-weight: 700;
    color: #0f2238;
    line-height: 1.35;
    margin: 0 0 6px 0;
}

.ac-clean-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.45;
    margin: 0;
}

.ac-clean-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-clean-primary {
    background: #0d6efd;
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    padding: 9px 18px;
    font-family: 'Outfit', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn-clean-primary:hover {
    background: #0b5ed7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
    color: #ffffff !important;
}

.btn-clean-cta-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1;
    white-space: nowrap;
}

.btn-clean-cv-logo {
    height: 13.5px;
    width: auto;
    max-width: 76px;
    object-fit: contain;
    vertical-align: middle;
    display: inline-block;
    filter: brightness(0) invert(1);
    margin: 0;
}

.btn-clean-primary .material-icons-outlined {
    font-size: 15px;
    line-height: 1;
}

.ac-clean-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.ac-clean-trust-pill .material-icons-outlined {
    font-size: 14px;
    line-height: 1;
    color: #10b981;
}

/* Codice Telaio (VIN) */
.ac-spec-vin-code {
    font-family: 'Plus Jakarta Sans', monospace, sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #0f172a;
    word-break: break-all;
}
.ac-detail-container.theme-dark .ac-spec-vin-code,
.ac-detail-wrapper:not(.theme-light) .ac-spec-vin-code,
body.dark-mode .ac-spec-vin-code {
    color: #e2e8f0;
}

/* Breakout a tutta larghezza dentro la griglia specifiche */
.ac-clean-carvertical-breakout,
.ac-detail-specs-grid > .ac-clean-affiliate-card {
    grid-column: 1 / -1;
    margin: 8px 0 10px 0;
    border-radius: 16px;
    padding: 16px 18px;
}

/* Stile Chiaro (Light Theme) per Box carVertical */
.ac-detail-wrapper.theme-light .ac-clean-affiliate-card,
.ac-detail-container.theme-light .ac-clean-affiliate-card,
.auction-modal-overlay.theme-light .ac-clean-affiliate-card {
    background: #f0f7ff;
    border-color: #bfdbfe;
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.05);
}

/* Supporto Dark Mode Universale (Bento Cockpit default) */
body.dark-mode .ac-clean-affiliate-card,
body.theme-dark .ac-clean-affiliate-card,
.theme-dark .ac-clean-affiliate-card,
.ac-detail-wrapper:not(.theme-light) .ac-clean-affiliate-card,
.ac-detail-container:not(.theme-light) .ac-clean-affiliate-card,
.auction-modal-overlay:not(.theme-light) .ac-clean-affiliate-card {
    background: #132238;
    border-color: rgba(13, 110, 253, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

body.dark-mode .ac-clean-partner-badge,
body.theme-dark .ac-clean-partner-badge,
.theme-dark .ac-clean-partner-badge,
.ac-detail-wrapper:not(.theme-light) .ac-clean-partner-badge,
.ac-detail-container:not(.theme-light) .ac-clean-partner-badge,
.auction-modal-overlay:not(.theme-light) .ac-clean-partner-badge {
    background: rgba(13, 110, 253, 0.18);
    color: #93c5fd;
    border-color: rgba(13, 110, 253, 0.35);
}

body.dark-mode .ac-clean-coupon-chip,
body.theme-dark .ac-clean-coupon-chip,
.theme-dark .ac-clean-coupon-chip,
.ac-detail-wrapper:not(.theme-light) .ac-clean-coupon-chip,
.ac-detail-container:not(.theme-light) .ac-clean-coupon-chip,
.auction-modal-overlay:not(.theme-light) .ac-clean-coupon-chip {
    background: rgba(245, 158, 11, 0.15);
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.3);
}

body.dark-mode .ac-clean-title,
body.theme-dark .ac-clean-title,
.theme-dark .ac-clean-title,
.ac-detail-wrapper:not(.theme-light) .ac-clean-title,
.ac-detail-container:not(.theme-light) .ac-clean-title,
.auction-modal-overlay:not(.theme-light) .ac-clean-title {
    color: #f8fafc;
}

body.dark-mode .ac-clean-desc,
body.theme-dark .ac-clean-desc,
.theme-dark .ac-clean-desc,
.ac-detail-wrapper:not(.theme-light) .ac-clean-desc,
.ac-detail-container:not(.theme-light) .ac-clean-desc,
.auction-modal-overlay:not(.theme-light) .ac-clean-desc {
    color: #94a3b8;
}

/* La V2 light deve usare lo stesso trattamento del banner carVertical V3
   light anche quando il body conserva il vecchio flag dark-mode. */
.ac-detail-wrapper.theme-light .ac-clean-carvertical-detail,
.ac-detail-container.theme-light .ac-clean-carvertical-detail,
.auction-modal-overlay.theme-light .ac-clean-carvertical-detail {
    background: #f0f7ff !important;
    border-color: #bfdbfe !important;
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.05) !important;
    color: #0f2238;
}
.ac-detail-wrapper.theme-light .ac-clean-carvertical-detail .ac-clean-partner-badge,
.ac-detail-container.theme-light .ac-clean-carvertical-detail .ac-clean-partner-badge,
.auction-modal-overlay.theme-light .ac-clean-carvertical-detail .ac-clean-partner-badge {
    background: #e8f1fd !important;
    border-color: #bfdbfe !important;
    color: #153050 !important;
}
.ac-detail-wrapper.theme-light .ac-clean-carvertical-detail .ac-clean-partner-icon,
.ac-detail-container.theme-light .ac-clean-carvertical-detail .ac-clean-partner-icon,
.auction-modal-overlay.theme-light .ac-clean-carvertical-detail .ac-clean-partner-icon {
    color: #0d6efd !important;
}
.ac-detail-wrapper.theme-light .ac-clean-carvertical-detail .ac-clean-coupon-chip,
.ac-detail-container.theme-light .ac-clean-carvertical-detail .ac-clean-coupon-chip,
.auction-modal-overlay.theme-light .ac-clean-carvertical-detail .ac-clean-coupon-chip {
    background: #fef3c7 !important;
    border-color: #fde68a !important;
    color: #b45309 !important;
}
.ac-detail-wrapper.theme-light .ac-clean-carvertical-detail .ac-clean-title,
.ac-detail-container.theme-light .ac-clean-carvertical-detail .ac-clean-title,
.auction-modal-overlay.theme-light .ac-clean-carvertical-detail .ac-clean-title {
    color: #0f2238 !important;
}
.ac-detail-wrapper.theme-light .ac-clean-carvertical-detail .ac-clean-desc,
.ac-detail-container.theme-light .ac-clean-carvertical-detail .ac-clean-desc,
.auction-modal-overlay.theme-light .ac-clean-carvertical-detail .ac-clean-desc,
.ac-detail-wrapper.theme-light .ac-clean-carvertical-detail .ac-clean-trust-pill,
.ac-detail-container.theme-light .ac-clean-carvertical-detail .ac-clean-trust-pill,
.auction-modal-overlay.theme-light .ac-clean-carvertical-detail .ac-clean-trust-pill {
    color: #64748b !important;
}

/* Titolo V2/V3: massimo due righe anche nella scheda desktop. */
.ac-detail-wrapper:not(.auction-v3-wrapper) .ac-detail-title,
.ac-detail-container:not(.auction-v3-wrapper) .ac-detail-title {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* La scheda V2 desktop usa il contenitore legacy .auction-detail-page. Il
   banner deve comunque restare leggibile con la palette light della V3. */
.auction-detail-page .ac-clean-carvertical-detail {
    background: #f0f7ff !important;
    border-color: #bfdbfe !important;
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.05) !important;
    color: #0f2238 !important;
}
.auction-detail-page .ac-clean-carvertical-detail .ac-clean-partner-badge {
    background: #e8f1fd !important;
    border-color: #bfdbfe !important;
    color: #153050 !important;
}
.auction-detail-page .ac-clean-carvertical-detail .ac-clean-partner-icon { color: #0d6efd !important; }
.auction-detail-page .ac-clean-carvertical-detail .ac-clean-coupon-chip {
    background: #fef3c7 !important;
    border-color: #fde68a !important;
    color: #b45309 !important;
}
.auction-detail-page .ac-clean-carvertical-detail .ac-clean-title { color: #0f2238 !important; }
.auction-detail-page .ac-clean-carvertical-detail .ac-clean-desc,
.auction-detail-page .ac-clean-carvertical-detail .ac-clean-trust-pill { color: #64748b !important; }

/* La modale legacy V2 non porta una classe theme-light sull'overlay: il
   tema scuro globale finiva quindi per sovrascrivere il banner CarVertical.
   Manteniamo il resto della modale invariato, ma il banner usa sempre la
   stessa palette chiara della scheda V3 light. */
.auction-modal-overlay:not(.auction-modal-overlay--v3) .ac-clean-carvertical-detail {
    background: #f0f7ff !important;
    border-color: #bfdbfe !important;
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.05) !important;
    color: #0f2238 !important;
}
.auction-modal-overlay:not(.auction-modal-overlay--v3) .ac-clean-carvertical-detail .ac-clean-partner-badge {
    background: #e8f1fd !important;
    border-color: #bfdbfe !important;
    color: #153050 !important;
}
.auction-modal-overlay:not(.auction-modal-overlay--v3) .ac-clean-carvertical-detail .ac-clean-partner-icon {
    color: #0d6efd !important;
}
.auction-modal-overlay:not(.auction-modal-overlay--v3) .ac-clean-carvertical-detail .ac-clean-coupon-chip {
    background: #fef3c7 !important;
    border-color: #fde68a !important;
    color: #b45309 !important;
}
.auction-modal-overlay:not(.auction-modal-overlay--v3) .ac-clean-carvertical-detail .ac-clean-title {
    color: #0f2238 !important;
}
.auction-modal-overlay:not(.auction-modal-overlay--v3) .ac-clean-carvertical-detail .ac-clean-desc,
.auction-modal-overlay:not(.auction-modal-overlay--v3) .ac-clean-carvertical-detail .ac-clean-trust-pill {
    color: #64748b !important;
}

/* Titolo della V2 legacy: massimo due righe, con ellissi. */
.auction-detail-title {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    overflow-wrap: anywhere;
}

body.dark-mode .ac-clean-trust-pill,
body.theme-dark .ac-clean-trust-pill,
.theme-dark .ac-clean-trust-pill,
.ac-detail-wrapper:not(.theme-light) .ac-clean-trust-pill,
.ac-detail-container:not(.theme-light) .ac-clean-trust-pill,
.auction-modal-overlay:not(.theme-light) .ac-clean-trust-pill {
    color: #94a3b8;
}

@media (max-width: 600px) {
    .ac-clean-affiliate-card {
        padding: 14px 12px;
        border-radius: 14px;
    }
    .ac-clean-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .ac-clean-footer-row {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-clean-primary {
        justify-content: center;
        width: 100%;
    }
}

/* ==========================================================================
   AC-036: Box Identificatore Specifiche a Doppia Larghezza (Targa o Telaio)
   ========================================================================== */
.ac-detail-spec-tile--double {
    grid-column: 1 / -1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 14px !important;
    min-height: 52px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 12px !important;
}

.ac-detail-spec-tile-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
}

.ac-detail-spec-tile-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.ac-detail-spec-tile--double .ac-detail-spec-tile-right {
    display: flex;
    align-items: center;
    align-self: flex-end;
    margin-bottom: 2px;
}

.ac-spec-cv-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #0284c7;
    color: #ffffff !important;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.ac-spec-cv-action-btn:hover {
    background: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
    color: #ffffff !important;
}

.ac-spec-cv-action-btn span:not(.material-icons-outlined),
.ac-spec-cv-btn-text {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    vertical-align: middle;
    transform: translateY(1.2px);
    position: relative;
}

.ac-spec-cv-action-icon {
    font-size: 15px !important;
    line-height: 1;
}

.ac-spec-cv-btn-logo {
    height: 16px;
    width: auto;
    max-width: 85px;
    object-fit: contain;
    vertical-align: middle;
    display: inline-block;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
    transform: translateY(-0.5px);
    position: relative;
}

.ac-spec-cv-action-arrow {
    font-size: 13px !important;
    line-height: 1;
    opacity: 0.85;
    vertical-align: middle;
    transform: translateY(0.8px);
}

.ac-spec-vin-code {
    font-family: 'Plus Jakarta Sans', monospace, sans-serif;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: inherit;
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dark Mode Overrides */
.ac-detail-container.theme-dark .ac-spec-cv-action-btn,
.ac-detail-wrapper.theme-dark .ac-spec-cv-action-btn,
.auction-modal-overlay.theme-dark .ac-spec-cv-action-btn,
body.dark-mode .ac-spec-cv-action-btn {
    background: #0284c7;
    color: #ffffff !important;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.ac-detail-container.theme-dark .ac-spec-cv-action-btn:hover,
.ac-detail-wrapper.theme-dark .ac-spec-cv-action-btn:hover,
.auction-modal-overlay.theme-dark .ac-spec-cv-action-btn:hover,
body.dark-mode .ac-spec-cv-action-btn:hover {
    background: #0ea5e9;
}

@media (max-width: 900px) {
    .ac-detail-spec-tile--double {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 10px 11px !important;
        gap: 8px !important;
        box-sizing: border-box !important;
        min-height: 54px !important;
    }
    .ac-detail-spec-tile--double .ac-detail-spec-tile-left {
        width: auto !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        overflow: hidden !important;
    }
    .ac-detail-spec-tile--double .ac-detail-spec-tile-icon-box {
        display: flex !important;
        flex: 0 0 34px !important;
        width: 34px !important;
        height: 34px !important;
    }
    .ac-detail-spec-tile--double .ac-detail-spec-tile-content {
        width: auto !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        overflow: hidden !important;
    }
    .ac-detail-spec-tile--double .ac-detail-spec-tile-label {
        display: block !important;
        margin-bottom: 3px !important;
        font-size: 9.5px !important;
        line-height: 1 !important;
    }
    .ac-detail-spec-tile--double .ac-detail-it-plate-wrapper {
        width: 95px !important;
        max-width: 95px !important;
        flex: 0 0 95px !important;
    }
    .ac-detail-spec-tile--double .ac-detail-it-plate-svg {
        width: 95px !important;
        max-width: 95px !important;
        height: 19px !important;
        aspect-ratio: 240 / 50 !important;
    }
    .ac-detail-spec-tile--double .ac-detail-spec-tile-right {
        width: auto !important;
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        align-self: center !important;
        margin-left: auto !important;
        margin-bottom: 0 !important;
    }
    .ac-detail-spec-tile--double .ac-spec-cv-action-btn {
        width: auto !important;
        max-width: none !important;
        height: 34px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 6px 12px !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
        gap: 5px !important;
        box-sizing: border-box !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
    .ac-detail-spec-tile--double .ac-spec-cv-action-icon {
        font-size: 15px !important;
        line-height: 1 !important;
        flex-shrink: 0 !important;
    }
    .ac-detail-spec-tile--double .ac-spec-cv-action-arrow {
        font-size: 13px !important;
        line-height: 1 !important;
        display: inline-flex !important;
        transform: translateY(0.8px) !important;
    }
    .ac-detail-spec-tile--double .ac-spec-cv-btn-logo {
        height: 15px !important;
        max-width: 80px !important;
        transform: translateY(-0.5px) !important;
        position: relative !important;
    }
    .ac-detail-spec-tile--double .ac-spec-cv-btn-text,
    .ac-detail-spec-tile--double .ac-spec-cv-action-btn span:not(.material-icons-outlined) {
        transform: translateY(1.2px) !important;
    }
}

@media (max-width: 360px) {
    .ac-detail-spec-tile--double .ac-spec-cv-action-btn {
        font-size: 10px !important;
        padding: 5px 8px !important;
        gap: 4px !important;
    }
}

/* ==========================================================================
   AC-044 / AC-051: GOOGLE ADSENSE CARD (SCHEDA VEICOLO & MODALE V3/V2)
   DEFAULT-HIDDEN: il blocco e la card sono display: none di default e appaiono
   ESCLUSIVAMENTE quando l'iframe pubblicitario è presente ed erogato.
   ========================================================================== */
.ac-detail-bento-block-adsense,
.ac-detail-adsense-slot-wrapper,
.ac-detail-adsense-card {
    display: none !important;
}

/* Attivazione selettiva SOLO in presenza reale di annuncio caricato */
.ac-detail-bento-block-adsense:has(iframe),
.ac-detail-bento-block-adsense.has-ad {
    display: flex !important;
    flex-direction: column;
    width: 100%;
}

.ac-detail-bento-block-adsense:has(iframe) .ac-detail-adsense-card,
.ac-detail-bento-block-adsense.has-ad .ac-detail-adsense-card {
    display: block !important;
}

.ac-detail-adsense-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 16px 18px;
    border: 1px solid rgba(13, 110, 253, 0.15);
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.05);
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ac-detail-adsense-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 8px;
}

.ac-detail-adsense-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #64748b;
    background: rgba(100, 116, 139, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.ac-detail-adsense-body {
    width: 100%;
    min-height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Supporto Dark Mode Scheda Veicolo */
.ac-detail-wrapper:not(.theme-light) .ac-detail-adsense-card,
.ac-detail-container:not(.theme-light) .ac-detail-adsense-card,
.auction-modal-overlay:not(.theme-light) .ac-detail-adsense-card,
.auction-v3-wrapper.dark .ac-detail-adsense-card {
    background: #132238;
    border-color: rgba(13, 110, 253, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.ac-detail-wrapper:not(.theme-light) .ac-detail-adsense-label,
.ac-detail-container:not(.theme-light) .ac-detail-adsense-label,
.auction-modal-overlay:not(.theme-light) .ac-detail-adsense-label,
.auction-v3-wrapper.dark .ac-detail-adsense-label {
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.08);
}

/* Se marcato unfilled: forzatura display none */
.ac-detail-bento-block-adsense.is-unfilled,
.ac-detail-adsense-card.is-unfilled {
    display: none !important;
}

@media (max-width: 900px) {
    .ac-detail-bento-block-adsense,
    .ac-detail-adsense-slot-wrapper {
        order: 4 !important;
        width: 100% !important;
        min-width: 0 !important;
    }
    .ac-detail-bento-block-affiliate {
        order: 8 !important;
        width: 100% !important;
        min-width: 0 !important;
    }
    .ac-detail-action-participate-card {
        order: 9 !important;
    }
}

