/* Ficha de vehículo — galería + compra */
.page-car-details .main-content {
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 2rem;
}

.cd-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.25rem 1rem 2.5rem;
}

.cd-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0 1.25rem;
    font-size: 0.9rem;
    color: #64748b;
}

.cd-crumb a {
    color: var(--dj-blue);
    text-decoration: none;
    font-weight: 600;
}

.cd-crumb a:hover { color: var(--dj-red); }

.cd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 1.75rem;
    align-items: start;
}

.cd-gallery {
    background: #0f172a;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.cd-stage {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #0b1220;
    overflow: hidden;
}

.cd-stage__media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.25s ease;
    user-select: none;
}

.cd-stage__media.is-video {
    object-fit: contain;
    background: #000;
}

.cd-stage__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, background 0.2s ease;
}

.cd-stage__nav:hover {
    transform: translateY(-50%) scale(1.05);
    background: #fff;
}

.cd-stage__nav--prev { left: 14px; }
.cd-stage__nav--next { right: 14px; }

.cd-stage__count {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 3;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.cd-stage__badge {
    position: absolute;
    left: 14px;
    top: 14px;
    z-index: 3;
    background: var(--dj-red);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
}

.cd-thumbs {
    display: flex;
    gap: 0.55rem;
    padding: 0.85rem;
    overflow-x: auto;
    background: #111827;
    scrollbar-width: thin;
}

.cd-thumb {
    flex: 0 0 auto;
    width: 78px;
    height: 58px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    opacity: 0.72;
    padding: 0;
    background: #1f2937;
}

.cd-thumb img,
.cd-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cd-thumb.is-active {
    opacity: 1;
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--dj-red);
}

.cd-thumb__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    font-size: 1rem;
}

.cd-panel {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    padding: 1.5rem 1.5rem 1.35rem;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
    position: sticky;
    top: 96px;
}

.cd-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dj-blue);
    margin-bottom: 0.65rem;
}

.cd-title {
    font-family: 'Barlow Condensed', Manrope, sans-serif;
    font-size: clamp(1.9rem, 3vw, 2.55rem);
    font-weight: 800;
    line-height: 1.05;
    color: var(--dj-navy, #001A5C);
    margin: 0 0 0.4rem;
}

.cd-meta {
    color: #64748b;
    margin-bottom: 1.25rem;
    font-size: 1rem;
}

.cd-price-box {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--dj-blue) 8%, white), #fff),
        #f8fafc;
    border: 1px solid rgba(var(--brand-secondary-rgb, 0, 45, 114), 0.12);
    margin-bottom: 1.25rem;
}

.cd-price-box__label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.cd-price-box__value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dj-red);
    line-height: 1;
}

.cd-specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.cd-spec {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem 0.8rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.cd-spec i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--dj-blue) 12%, white);
    color: var(--dj-blue);
    flex-shrink: 0;
}

.cd-spec strong {
    display: block;
    font-size: 0.95rem;
    color: #0f172a;
    line-height: 1.2;
}

.cd-spec span {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
}

.cd-section-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--dj-navy, #001A5C);
    margin: 0 0 0.55rem;
}

.cd-desc {
    color: #334155;
    line-height: 1.65;
    margin-bottom: 1.15rem;
}

.cd-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.35rem;
}

.cd-feature {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--dj-red) 8%, white);
    color: var(--dj-red);
    font-size: 0.82rem;
    font-weight: 700;
}

.cd-actions {
    display: grid;
    gap: 0.65rem;
}

.cd-actions .btn {
    width: 100%;
    justify-content: center;
}

.cd-videos {
    margin-top: 2rem;
}

.cd-videos__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.cd-video-card {
    border-radius: 14px;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.cd-video-card iframe,
.cd-video-card video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    border: 0;
    background: #000;
}

.cd-similar {
    margin-top: 2.5rem;
    padding-top: 0.5rem;
}

.cd-similar__head {
    margin-bottom: 1.25rem;
}

.cd-similar__head h2 {
    font-family: 'Barlow Condensed', Manrope, sans-serif;
    font-weight: 800;
    color: var(--dj-navy, #001A5C);
    margin: 0 0 0.25rem;
}

.cd-similar__head p {
    color: #64748b;
    margin: 0;
}

.cd-similar-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #eef2f7;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cd-similar-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
}

.cd-similar-card__img {
    height: 160px;
    background-size: cover;
    background-position: center;
}

.cd-similar-card__body {
    padding: 1rem;
}

.cd-similar-card__title {
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.cd-similar-card__price {
    color: var(--dj-red);
    font-weight: 800;
}

@media (max-width: 991px) {
    .cd-layout {
        grid-template-columns: 1fr;
    }

    .cd-panel {
        position: static;
    }

    .cd-stage {
        aspect-ratio: 5 / 4;
    }
}

@media (max-width: 576px) {
    .cd-wrap {
        padding: 0.75rem 0.75rem 5.5rem;
    }

    .cd-stage {
        aspect-ratio: 1 / 1;
    }

    .cd-price-box__value {
        font-size: 1.65rem;
    }

    .cd-specs {
        grid-template-columns: 1fr 1fr;
    }
}
