/* ═══════════════════════════════════════════════════════════════
   CAR DETAIL PAGE
   ═══════════════════════════════════════════════════════════════ */

/* Breadcrumbs + back */
.d-crumb {
    max-width: var(--container);
    margin: 0 auto;
    padding: 20px 24px 0;
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--stone);
}
.d-crumb a, .d-crumb .cur { white-space: nowrap; }
.d-crumb a { color: var(--stone); }
.d-crumb a:hover { color: var(--ink); }
.d-crumb .sep { color: var(--stone-2); }
.d-crumb .cur { color: var(--ink); font-weight: 500; }

/* Top head */
.d-head {
    max-width: var(--container);
    margin: 0 auto;
    padding: 16px 24px 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}
.d-head-main { flex: 1 1 420px; min-width: 0; }
@media (max-width: 640px) {
    .d-head-main { flex: 0 0 auto; }
}
.d-head .eyebrow { margin-bottom: 6px; }
.d-head h1 {
    font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem);
    letter-spacing: -0.025em;
    line-height: 1.05;
}
.d-head-meta {
    margin-top: 8px;
    font-size: 14px;
    color: var(--graphite);
    display: flex; gap: 16px; flex-wrap: wrap;
    font-family: var(--font-mono);
}
.d-head-meta span { display: inline-flex; align-items: center; gap: 6px; }
.d-head-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--stone-2); }

.d-head-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.d-head-actions .btn-icon-lb {
    display: inline-flex; align-items: center; gap: 6px;
    white-space: nowrap;
    height: 40px; padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 13px;
    color: var(--graphite);
    transition: border-color var(--dur-fast), color var(--dur-fast);
}
.d-head-actions .btn-icon-lb:hover { border-color: var(--ink); color: var(--ink); }
.d-head-actions .btn-icon-lb svg { width: 14px; height: 14px; stroke-width: 1.75; }

/* Gallery */
.d-gallery {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 8px;
    height: 540px;
}
.d-g-main {
    background: #101010;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}
.d-g-main-img {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 50% 70%, rgba(255,255,255,0.08), transparent 60%),
        linear-gradient(180deg, #2a2a2a 0%, #0e0e0e 100%);
}
.d-g-main > svg {
    position: absolute;
    left: 50%; top: 55%; transform: translate(-50%, -50%);
    width: 65%; max-width: 680px; opacity: 0.22;
}
.d-g-flag {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 3;
    pointer-events: none;
}
.d-g-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: grid; place-content: center;
    cursor: pointer;
    z-index: 4;
    border: 0; padding: 0;
    transition: background var(--dur-fast), transform var(--dur-fast);
}
.d-g-arrow:hover { background: #fff; }
.d-g-arrow:active { transform: translateY(-50%) scale(0.92); }
.d-g-arrow.prev { left: 16px; }
.d-g-arrow.next { right: 16px; }
.d-g-arrow svg { width: 18px; height: 18px; stroke-width: 2; color: var(--ink); }
@media (max-width: 720px) {
    .d-g-arrow { width: 38px; height: 38px; }
    .d-g-arrow.prev { left: 8px; }
    .d-g-arrow.next { right: 8px; }
}

.d-g-count {
    position: absolute; bottom: 16px; left: 16px;
    padding: 6px 12px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 12px;
    display: inline-flex; align-items: center; gap: 6px;
    pointer-events: none;
    z-index: 3;
}


.d-g-chips {
    position: absolute; top: 16px; left: 16px;
    display: flex; gap: 6px;
}
.d-g-chips .chip {
    height: 24px; padding: 0 10px;
    white-space: nowrap;
    background: rgba(255,255,255,0.95);
    border-radius: 999px;
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.06em; text-transform: uppercase;
    display: inline-flex; align-items: center;
    color: var(--ink);
}
.d-g-chips .chip.is-accent { background: var(--accent); color: #fff; }

.d-g-side {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    gap: 8px;
}
.d-g-thumb {
    background: #1a1a1a;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: opacity var(--dur-fast);
}
.d-g-thumb.is-empty { cursor: default; opacity: 0.55; }
.d-g-thumb::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, #2a2a2a 0%, #0e0e0e 100%);
}
.d-g-thumb svg {
    position: absolute;
    left: 50%; top: 55%; transform: translate(-50%, -50%);
    width: 70%; opacity: 0.2;
}
.d-g-thumb:hover::after {
    content: ""; position: absolute; inset: 0;
    border: 2px solid var(--ink); border-radius: 10px;
}

/* Main columns */
.d-body {
    max-width: var(--container);
    margin: 0 auto;
    padding: 40px 24px 0;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 48px;
    align-items: start;
}

/* Left column */
.d-section { padding: 32px 0; border-top: 1px solid var(--line); }
.d-section:first-child { border-top: 0; padding-top: 0; }
.d-section h2 {
    font-size: 22px;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

/* Specs grid */
.d-specs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
}
.d-spec {
    padding: 16px 20px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.d-spec:nth-child(3n) { border-right: 0; }
.d-spec:nth-last-child(-n+3) { border-bottom: 0; }
.d-spec-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--stone);
    font-weight: 600;
    margin-bottom: 4px;
}
.d-spec-value {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.d-spec-value.big { font-size: 17px; font-weight: 600; }
.d-spec-sub { font-size: 11px; color: var(--stone); margin-top: 2px; font-family: var(--font-mono); }

/* Description */
.d-desc {
    font-size: 15px;
    line-height: 1.65;
    color: var(--graphite);
    max-width: 68ch;
}
.d-desc p + p { margin-top: 1em; }
.d-desc b { color: var(--ink); font-weight: 600; }

/* Equipment columns */
.d-equip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 32px;
}
.d-equip-col h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--stone);
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line-2);
}
.d-equip-col ul li {
    padding: 6px 0;
    font-size: 13px;
    color: var(--graphite);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.d-equip-col ul li::before {
    content: "";
    width: 3px; height: 3px;
    margin-top: 8px;
    border-radius: 50%;
    background: var(--stone-2);
    flex-shrink: 0;
}

/* History timeline */
.d-history {
    position: relative;
    padding-left: 20px;
}
.d-history::before {
    content: "";
    position: absolute;
    left: 4px; top: 8px; bottom: 8px;
    width: 1px;
    background: var(--line);
}
.d-h-item {
    position: relative;
    padding: 12px 0;
}
.d-h-item::before {
    content: "";
    position: absolute;
    left: -20px; top: 18px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--stone-2);
}
.d-h-item.is-ok::before { border-color: var(--ok); }
.d-h-item.is-current::before { background: var(--ink); border-color: var(--ink); }
.d-h-date {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--stone);
    margin-bottom: 2px;
}
.d-h-title { font-weight: 600; font-size: 14px; color: var(--ink); }
.d-h-note { font-size: 13px; color: var(--graphite); margin-top: 2px; }
.d-h-note b { color: var(--ink); font-weight: 600; font-family: var(--font-mono); }

/* Verify report checklist */
.d-verify {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 24px;
}
.d-v-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line-2);
    font-size: 13px;
}
.d-v-item:last-child { border-bottom: 0; }
.d-v-check {
    width: 18px; height: 18px;
    border-radius: 50%;
    display: grid; place-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.d-v-check.is-ok   { background: var(--ok-soft); color: var(--ok); }
.d-v-check.is-warn { background: var(--warn-soft); color: var(--warn); }
.d-v-check svg { width: 10px; height: 10px; stroke-width: 3; }
.d-v-label { flex: 1; color: var(--graphite); }
.d-v-label b { color: var(--ink); font-weight: 600; display: block; }

/* Similar grid */
.d-similar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 16px;
}

/* ═════════ Right column: sticky price + actions ═════════ */
.d-side {
    position: sticky;
    top: calc(var(--topbar-h) + 20px);
    display: grid;
    gap: 16px;
}

.d-price-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
}
.d-price-hd { padding: 20px 24px 16px; }
.d-price-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--stone); font-weight: 600; margin-bottom: 6px; }
.d-price {
    font-family: var(--font-mono);
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--ink);
    line-height: 1;
}
.d-price-old {
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--stone);
    text-decoration: line-through;
}
.d-price-note {
    margin-top: 10px;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    background: var(--accent-soft);
    color: var(--accent-ink);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.d-install {
    padding: 14px 24px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
}
.d-install-label { color: var(--stone); }
.d-install-value {
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--ink);
}
.d-install-sub { font-size: 11px; color: var(--stone); font-family: var(--font-mono); }

.d-actions {
    padding: 16px 24px 20px;
    border-top: 1px solid var(--line);
    display: grid; gap: 8px;
}
.d-actions .btn { width: 100%; height: 48px; font-size: 15px; }

.d-contact-seller {
    padding: 16px 24px;
    background: var(--canvas);
    border-top: 1px solid var(--line);
    display: flex; align-items: center; gap: 12px;
}
.d-seller-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e7e7e7, #c0c0c0);
    display: grid; place-content: center;
    font-weight: 700;
    color: var(--ink);
    font-size: 13px;
    flex-shrink: 0;
}
.d-seller-meta { flex: 1; min-width: 0; }
.d-seller-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.d-seller-sub { font-size: 11px; color: var(--stone); font-family: var(--font-mono); margin-top: 1px; display:flex; align-items: center; gap: 4px; }
.d-seller-sub .tick { color: var(--ok); }

/* Trust badges */
.d-trust {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 4px 0;
}
.d-trust-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 20px;
    font-size: 13px;
}
.d-trust-item + .d-trust-item { border-top: 1px solid var(--line-2); }
.d-trust-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--paper);
    display: grid; place-content: center;
    flex-shrink: 0;
    color: var(--ink);
}
.d-trust-icon svg { width: 16px; height: 16px; stroke-width: 1.75; }
.d-trust-text b { font-weight: 600; color: var(--ink); display: block; }
.d-trust-text span { color: var(--stone); font-size: 12px; }
