/* ======================================================
   ARF — Vehicle Details  (scope: .vd-page / .vd-*)
   ====================================================== */

/* ── 0. Scope + page shell ───────────────────────────── */
.vd-page {
    --vd-brand:       #8a1a1f;
    --vd-brand-sub:   rgba(138,26,31,0.07);
    --vd-brand-bdr:   rgba(138,26,31,0.2);
    --vd-ink:         #24272c;
    --vd-body:        #696665;
    --vd-muted:       #8e8e93;
    --vd-border:      #ededed;
    --vd-soft:        #f8f8f9;
    --vd-success:     #14a077;
    --vd-danger:      #c0392b;
    --vd-radius:      14px;
    --vd-shadow:      0 4px 16px rgba(36,39,44,.06);
    padding-top: 1.75rem;
    padding-bottom: 3.5rem;
}

/* ── 1. Inline breadcrumb ────────────────────────────── */
.vd-breadcrumb {
    font-size: 0.8125rem;
    color: var(--vd-muted);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.vd-breadcrumb a {
    color: var(--vd-body);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.13s;
}

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

.vd-breadcrumb .vd-sep {
    color: var(--vd-border);
    font-size: 0.7rem;
}

.vd-breadcrumb .vd-current {
    color: var(--vd-ink);
    font-weight: 600;
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── 2. Gallery ──────────────────────────────────────── */
.vd-gallery {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 28px rgba(36,39,44,0.1);
}

.vd-gallery .image-list-details { height: 420px; overflow: hidden; }
.vd-gallery img { width: 100%; height: 100%; object-fit: cover; }

.vd-gallery-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 5;
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.vd-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    backdrop-filter: blur(6px);
}

.vd-pill.brand { background: var(--vd-brand); color: #fff; }
.vd-pill.dark  { background: rgba(23,26,33,0.75); color: #fff; }

.vd-noimg {
    height: 420px;
    background: var(--vd-soft);
    border: 1px solid var(--vd-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    color: #9aa1ab;
    margin-bottom: 1.25rem;
}

/* ── 3. Quick stats strip ────────────────────────────── */
.vd-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 1.25rem;
}

.vd-stat {
    background: #fff;
    border: 1px solid var(--vd-border);
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.vd-stat:hover {
    border-color: var(--vd-brand-bdr);
    box-shadow: 0 2px 12px rgba(138,26,31,0.06);
}

.vd-stat .label {
    font-size: 0.625rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--vd-muted);
    font-weight: 600;
    margin-bottom: 5px;
}

.vd-stat .value {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--vd-ink);
    word-break: break-word;
    line-height: 1.25;
}

@media (max-width: 991px) { .vd-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px)  { .vd-stats { grid-template-columns: repeat(2, 1fr); } }

/* ── 4. Content cards ────────────────────────────────── */
.vd-card {
    background: #fff;
    border: 1px solid var(--vd-border);
    border-radius: 16px;
    padding: 1.625rem;
    margin-bottom: 1.125rem;
}

.vd-card-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--vd-ink);
    margin: 0 0 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.vd-card-title .vd-title-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--vd-brand-sub);
    color: var(--vd-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9375rem;
    flex-shrink: 0;
}

.vd-card-sub {
    color: var(--vd-body);
    font-size: 0.875rem;
    margin: 0 0 1.25rem;
    line-height: 1.6;
}

/* ── 5. Spec grid ────────────────────────────────────── */
.vd-spec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 2rem;
}

.vd-spec {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--vd-soft);
}

.vd-spec:last-child { border-bottom: none; }

.vd-spec .k {
    font-size: 0.8125rem;
    color: var(--vd-muted);
    font-weight: 500;
    flex-shrink: 0;
}

.vd-spec .v {
    font-size: 0.875rem;
    color: var(--vd-ink);
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

@media (max-width: 767px) { .vd-spec-grid { grid-template-columns: 1fr; } }

/* ── 6. Safety flags grid (redesign) ────────────────── */
.vd-safety-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.625rem;
    margin-top: 1.125rem;
}

.vd-safety-item {
    background: #fff;
    border: 1px solid var(--vd-border);
    border-radius: 10px;
    padding: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    transition: border-color 0.14s;
}

.vd-safety-item.is-good { border-color: rgba(20,160,119,0.22); background: rgba(20,160,119,0.03); }
.vd-safety-item.is-bad  { border-color: rgba(192,57,43,0.2);  background: rgba(192,57,43,0.03);  }

.vd-safety-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.vd-safety-item.is-good .vd-safety-dot { background: rgba(20,160,119,0.12); color: #14a077; }
.vd-safety-item.is-bad  .vd-safety-dot { background: rgba(192,57,43,0.1);   color: #c0392b; }

.vd-safety-info {}

.vd-safety-label {
    font-size: 0.6875rem;
    color: var(--vd-muted);
    font-weight: 500;
    line-height: 1;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.vd-safety-val {
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
}

.vd-safety-item.is-good .vd-safety-val { color: #14a077; }
.vd-safety-item.is-bad  .vd-safety-val { color: #c0392b; }

@media (max-width: 575px) { .vd-safety-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── 7. Before-rebuild thumbs ────────────────────────── */
.vd-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.vd-thumbs a {
    display: block;
    height: 88px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--vd-border);
}

.vd-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.vd-thumbs a:hover img { transform: scale(1.08); }

@media (max-width: 520px) { .vd-thumbs { grid-template-columns: repeat(3, 1fr); } }

/* ── 8. Rebuild history ──────────────────────────────── */
.vd-rebuild {
    border: 1px solid var(--vd-border);
    border-radius: 12px;
    padding: 1rem 1.125rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.vd-rebuild:hover {
    border-color: var(--vd-brand-bdr);
    box-shadow: 0 4px 16px rgba(138,26,31,0.06);
}

.vd-rebuild-num {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--vd-ink);
    margin: 0 0 0.25rem;
}

.vd-tag-latest {
    background: var(--vd-brand);
    color: #fff;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.vd-rebuild-meta {
    font-size: 0.8125rem;
    color: var(--vd-muted);
    margin: 0;
}

.vd-rebuild-ref {
    font-family: 'SFMono-Regular', 'Fira Code', monospace;
    font-size: 0.75rem;
    background: var(--vd-soft);
    border: 1px solid var(--vd-border);
    border-radius: 6px;
    padding: 0.125rem 0.4rem;
    color: var(--vd-body);
}

.vd-report-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--vd-brand);
    color: #fff !important;
    padding: 0.5625rem 1rem;
    border-radius: 9px;
    font-weight: 600;
    font-size: 0.8125rem;
    white-space: nowrap;
    transition: opacity 0.14s;
    flex-shrink: 0;
}

.vd-report-btn:hover { opacity: 0.87; color: #fff; }

.vd-note {
    margin: 1rem 0 0;
    color: var(--vd-muted);
    font-size: 0.875rem;
    line-height: 1.6;
}

.vd-note a { color: var(--vd-brand); font-weight: 600; text-decoration: none; }
.vd-note a:hover { text-decoration: underline; }

/* ── 9. Description + disclaimer ─────────────────────── */
.vd-desc {
    margin: 1.125rem 0 0;
    color: var(--vd-body);
    font-size: 0.9rem;
    line-height: 1.75;
}

.vd-disclaimer {
    background: var(--vd-soft);
    border: 1px solid var(--vd-border);
    border-left: 3px solid rgba(138,26,31,0.35);
    border-radius: 10px;
    padding: 1rem 1.125rem;
    color: var(--vd-muted);
    font-size: 0.8125rem;
    line-height: 1.65;
    margin-top: 1.125rem;
}

/* ── 10. SIGNATURE: Sidebar price card ───────────────── */
.vd-price-card {
    background: #fff;
    border: 1px solid var(--vd-border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.125rem;
    box-shadow: 0 4px 20px rgba(36,39,44,0.07);
}

/* Dark gradient header — same pattern as workshop/plan cards */
.vd-pch {
    background: linear-gradient(135deg, #21252f 0%, #171a21 100%);
    padding: 1.125rem 1.25rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.vd-pch::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(138,26,31,0.3) 0%, transparent 68%);
    pointer-events: none;
}

.vd-pch-avatar {
    width: 46px;
    height: 46px;
    border-radius: 11px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    font-size: 1.125rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    letter-spacing: 0.05em;
}

.vd-pch-meta {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.vd-pch-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.25rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vd-pch-vin {
    font-size: 0.6875rem;
    color: rgba(255,255,255,0.45);
    font-family: 'SFMono-Regular', monospace;
    letter-spacing: 0.02em;
    line-height: 1;
}

.vd-pch-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(20,160,119,0.2);
    border: 1px solid rgba(20,160,119,0.3);
    border-radius: 100px;
    padding: 0.2rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 700;
    color: #5de8c5;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

/* White body section */
.vd-pcb {
    padding: 1.25rem;
}

.vd-price {
    font-size: 2.125rem;
    font-weight: 800;
    color: var(--vd-brand);
    line-height: 1;
    margin: 0 0 0.25rem;
    letter-spacing: -0.03em;
}

.vd-price-sub {
    color: var(--vd-muted);
    font-size: 0.8rem;
    margin: 0 0 1rem;
}

.vd-mini-spec {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.875rem 0;
    margin-bottom: 0.875rem;
    border-top: 1px solid var(--vd-border);
    border-bottom: 1px solid var(--vd-border);
}

.vd-mini-spec .it {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--vd-body);
    font-weight: 500;
    background: var(--vd-soft);
    border: 1px solid var(--vd-border);
    border-radius: 100px;
    padding: 0.25rem 0.625rem;
}

.vd-mini-spec .it i { color: var(--vd-brand); font-size: 0.8125rem; }

.vd-damage-alert {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(192,57,43,0.05);
    border: 1px solid rgba(192,57,43,0.18);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    color: #c0392b;
    margin-bottom: 1rem;
}

.vd-damage-alert i { flex-shrink: 0; }
.vd-damage-alert strong { font-weight: 600; }

/* Buttons */
.vd-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.875rem;
    text-align: center;
    transition: opacity 0.14s, background-color 0.14s, transform 0.14s;
    text-decoration: none;
    cursor: pointer;
}

.vd-btn:hover { transform: translateY(-1px); }

.vd-btn-primary {
    background: linear-gradient(135deg, #8a1a1f 0%, #24272c 100%);
    color: #fff !important;
    margin-bottom: 0.625rem;
}

.vd-btn-primary:hover { opacity: 0.88; color: #fff; }

.vd-btn-outline {
    border: 1.5px solid var(--vd-border);
    color: var(--vd-ink) !important;
    background: #fff;
}

.vd-btn-outline:hover { border-color: var(--vd-brand); color: var(--vd-brand) !important; }

/* Seller row */
.vd-seller {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--vd-border);
    text-decoration: none;
}

.vd-seller-av {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--vd-border);
}

.vd-seller-av.is-initials {
    background: linear-gradient(135deg, #21252f 0%, #171a21 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
}

.vd-seller-name {
    font-weight: 700;
    color: var(--vd-ink);
    font-size: 0.9rem;
    display: block;
    line-height: 1.2;
    text-decoration: none;
    transition: color 0.13s;
}

.vd-seller-name:hover { color: var(--vd-brand); }

.vd-seller-role {
    color: var(--vd-muted);
    font-size: 0.75rem;
    display: block;
    margin-top: 2px;
}

/* ── 11. Secondary sidebar cards ─────────────────────── */
.vd-side-card {
    background: #fff;
    border: 1px solid var(--vd-border);
    border-radius: 14px;
    padding: 1.125rem 1.25rem;
    margin-bottom: 1.125rem;
}

.vd-report-listing {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--vd-muted);
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 0.13s;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    text-align: left;
}

.vd-report-listing:hover { color: var(--vd-brand); }

/* Recommended vehicles */
.vd-rec-header {
    margin-bottom: 1rem;
}

.vd-rec-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--vd-ink);
    margin: 0 0 0.2rem;
}

.vd-rec-sub {
    font-size: 0.8rem;
    color: var(--vd-muted);
    margin: 0;
}

.vd-rec-list { display: flex; flex-direction: column; gap: 0.75rem; }

.vd-rec-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: background 0.13s, border-color 0.13s;
}

.vd-rec-item:hover {
    background: var(--vd-soft);
    border-color: var(--vd-border);
}

.vd-rec-img {
    width: 60px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--vd-soft);
    border: 1px solid var(--vd-border);
}

.vd-rec-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--vd-ink);
    line-height: 1.35;
    display: block;
    margin-bottom: 0.2rem;
}

.vd-rec-price {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--vd-brand);
    display: block;
}

.vd-rec-more {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--vd-brand);
    text-decoration: none;
    margin-top: 0.625rem;
    transition: gap 0.14s;
}

.vd-rec-more:hover { gap: 0.4rem; color: var(--vd-brand); }

/* ── 12. Sticky sidebar ──────────────────────────────── */
@media (min-width: 992px) { .vd-sticky { position: sticky; top: 90px; } }

/* ── 13. Utility carry-overs ─────────────────────────── */
.vd-ink         { color: var(--vd-ink); }
.vd-muted-block { color: var(--vd-muted); font-size: 0.875rem; margin: 0 0 1rem; }
.vd-block-full  { display: block; height: 100%; }
.vd-noshrink    { flex-shrink: 0; }
.vd-fs-85       { font-size: 0.875rem; margin: 0; }
.vd-fw6-m0      { font-weight: 600; margin: 0; }
.vd-mb-28       { margin-bottom: 1.125rem; }
.vd-p-section   { padding: 0.875rem 1.25rem; }

/* ── 14. Responsive ──────────────────────────────────── */
@media (max-width: 767px) {
    .vd-gallery .image-list-details { height: 280px; }
    .vd-noimg { height: 280px; }
    .vd-safety-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .vd-stat,
    .vd-rebuild,
    .vd-btn,
    .vd-thumbs img { transition: none; }
}
