/* ==========================================================================
   Module: Car Showcase (2-Column Digital Showroom)
   ========================================================================== */

.car-showcase {
    background: var(--color-dark-1);
    padding-bottom: var(--space-16);
    overflow: hidden;
    position: relative;
    color: var(--color-white);
}

/* 1. Model Selector Navigation (Ultra Compact Wrapping) */
.car-showcase__nav-wrapper {
    background-color: var(--color-dark-1);
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    margin-bottom: var(--space-8);
    position: sticky;
    top: var(--header-h);
    z-index: 90;
    padding: var(--space-2) 1rem;
}

.car-showcase__nav-wrapper--scanline {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky; /* Phải là sticky để top: var(--header-h) không tạo offset đẩy xuống */
    overflow: hidden;
}

.car-showcase__nav-wrapper--scanline::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 250px;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--color-primary), #ffc107, var(--color-primary), transparent);
    animation: cyberScanLine 6s linear infinite;
    z-index: 2;
}

.car-showcase__nav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    padding: 10px 0;
}

.car-showcase__nav-item {
    background: none;
    border: none;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; 
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    width: auto;
    position: relative;
}

.car-showcase__nav-item:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -4px;
    color: rgba(255, 255, 255, 0.15);
    font-weight: 300;
}

.car-showcase__nav-item:hover {
    color: #fff;
}

.car-showcase__nav-item.is-active {
    color: var(--color-primary);
}

.car-showcase__nav-item .nav-item-icon {
    display: flex;
    align-items: center;
    opacity: 0.5;
}

.car-showcase__nav-item.is-active .nav-item-icon {
    opacity: 1;
    color: var(--color-primary);
}

/* 2. Showroom 2-Column Grid */
.car-showcase__grid-2col {
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: var(--space-12);
    align-items: center;
}

/* Left Column */
/* Left Column Meta */
.car-showcase__meta-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: var(--space-4);
}

/* Biến thể hiển thị trên Stage (Góc trái trên cùng) */
.car-showcase__meta-wrapper--on-stage {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 20;
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.05); /* Lớp nền mờ nhẹ để nổi bật Pill */
    padding: 4px;
    border-radius: 6px;
    backdrop-filter: blur(10px);
    display: flex;
    gap: 6px;
}



/* 1. HOT (Outline Red Style) */
.car-showcase__meta-wrapper--on-stage.is-hot .p-year {
    background: transparent;
    border: 1px solid #E53935;
    color: #E53935;
    box-shadow: none;
}
.car-showcase__meta-wrapper--on-stage.is-hot .car-showcase__badge {
    background: transparent;
    color: #FF8A80;
    border-color: #E53935;
}

/* 2. SAVING (Outline Green Style) */
.car-showcase__meta-wrapper--on-stage.is-saving .p-year {
    background: transparent;
    border: 1px solid #66BB6A;
    color: #66BB6A;
    box-shadow: none;
}
.car-showcase__meta-wrapper--on-stage.is-saving .car-showcase__badge {
    background: transparent;
    color: #A5D6A7;
    border-color: #66BB6A;
}

/* 3. NEW (Outline Blue Style) */
.car-showcase__meta-wrapper--on-stage.is-new .p-year {
    background: transparent;
    border: 1px solid #42A5F5;
    color: #42A5F5;
    box-shadow: none;
}
.car-showcase__meta-wrapper--on-stage.is-new .car-showcase__badge {
    background: transparent;
    color: #90CAF9;
    border-color: #42A5F5;
}

.p-year {
    display: inline-block;
    font-weight: 850;
    color: var(--color-primary);
    background: transparent;
    border: 1px solid var(--color-primary);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 10.5px;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.car-showcase__badge {
    display: inline-block;
    padding: 4px 12px;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 10px;
    font-weight: 800;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s;
}

.showcase-brand-header {
    position: relative;
    padding-top: var(--space-4);
    margin-bottom: var(--space-6);
}

/* Hiệu ứng Hyper-Random 10 Pha di chuyển */
.model-part {
    font-size: 2.25rem;
    font-weight: 950;
    line-height: 1;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 4.5px;
    margin-bottom: 12px; /* Tăng khoảng cách để phân tách rõ ràng hai phần tiêu đề */
    position: relative;
    z-index: 5;
}

.brand-part {
    font-size: 1.8rem; /* Làm to thương hiệu lên một chút */
    font-weight: 800;
    line-height: 1;
    color: rgba(255, 255, 255, 0.25); /* Màu trắng mờ tinh tế hơn khi nằm dưới */
    text-transform: uppercase;
    letter-spacing: 10px;
    margin: 0;
    display: block;
    background: linear-gradient(135deg, transparent 30%, rgba(200, 0, 26, 0.6) 50%, transparent 70%);
    -webkit-background-clip: text;
    background-clip: text;
    background-size: 400% 400%;
    animation: brandShineHyper 30s ease-in-out infinite;
    user-select: none;
    pointer-events: none;
}

@keyframes brandShineHyper {
    /* (Animation giữ nguyên) */
    0%   { background-position: 0% 50%; }
    10%  { background-position: 100% 50%; }
    11%  { background-position: 50% 0%; }
    20%  { background-position: 50% 100%; }
    21%  { background-position: 100% 50%; }
    30%  { background-position: 0% 50%; }
    31%  { background-position: 50% 100%; }
    40%  { background-position: 50% 0%; }
    41%  { background-position: 100% 100%; }
    50%  { background-position: 0% 0%; }
    51%  { background-position: 0% 0%; }
    60%  { background-position: 100% 100%; }
    61%  { background-position: 100% 0%; }
    70%  { background-position: 0% 100%; }
    71%  { background-position: 0% 100%; }
    80%  { background-position: 100% 0%; }
    81%  { background-position: 150% 50%; }
    90%  { background-position: 50% 50%; }
    91%  { background-position: 10% 10%; }
    100% { background-position: 25% 25%; }
}

.p-year-legacy { /* Giữ class cũ nếu cần */
    display: none;
}

.p-tagline {
    font-size: 16px;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-6);
    font-weight: 500;
    line-height: 1.4;
}

/* Variants List (Name & Price) */
.showcase-mobile-variants-toggle {
    display: none;
}

.p-variants {
    margin-bottom: var(--space-8);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.variant-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 12px;
    border-radius: 4px;
    border-left: 2px solid var(--color-primary);
}

.v-name {
    font-size: 14px;
    color: #999;
    font-weight: 700;
    text-transform: uppercase;
}

.v-price {
    font-size: 18px;
    font-weight: 900;
    color: var(--color-primary);
    font-family: var(--font-heading);
}

.v-unit {
    font-size: 16px;
    color: #999;
    font-weight: 500;
    text-transform: lowercase;
    margin-left: 4px;
}

/* Inline Specs (Under Price) */
.car-showcase__specs-inline {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-10);
    padding: var(--space-6);
    background: var(--color-dark-2);
    border-radius: 8px;
}

.spec-inline-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.spec-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.spec-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
}

.spec-value {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    display: block;
}

.car-showcase__cta {
    display: flex;
    gap: var(--space-4);
}

.cta-group {
    display: flex;
    gap: 15px;
    width: 100%;
}

.btn-showroom {
    flex: 1;
    padding: 18px 26px;
    font-size: 11.5px;
    font-weight: 800;
    text-align: center;
    border-radius: 4px;
    transition: all 0.3s;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-showroom--primary {
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(200, 0, 26, 0.2);
}

.btn-showroom--primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(200, 0, 26, 0.3);
}

.btn-showroom--outline {
    background: transparent;
    color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 700;
}

.btn-showroom--outline:hover {
    border-color: var(--color-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Right Column (The Stage) */
.car-showcase__display {
    position: relative;
    padding: var(--space-4);
}

.showroom-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* Khung bao ngoài cố định tỷ lệ */
    background: var(--color-dark-2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 5px; /* Bo viền 5px cho khung ngoài */
    padding: 4px; /* Giảm padding xuống tối thiểu để ảnh chiếm gần trọn khung */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    overflow: hidden;
}

/* Stage badge gỡ bỏ */

.stage-light {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    z-index: 1;
}

.showroom-car-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 5;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.showroom-car-img.is-updating {
    opacity: 0;
    transform: scale(0.95) translateX(30px);
}

.showroom-car-shadow {
    position: absolute;
    bottom: 5%;
    left: 10%;
    width: 80%;
    height: 40px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.15) 0%, transparent 80%);
    z-index: 2;
    filter: blur(10px);
}

.showroom-colors {
    margin-top: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-10);
    justify-content: center;
}

.color-label {
    font-size: 12px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
}

.color-label span { color: #fff; }

.color-list {
    display: flex;
    gap: 8px;
}

.color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #ddd;
    cursor: pointer;
    transition: transform 0.2s;
}

.color-dot.is-active {
    box-shadow: 0 0 0 2px var(--color-primary);
    transform: scale(1.1);
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .car-showcase__grid-2col {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }
    .car-showcase__info { order: 2; text-align: center; }
    .p-name { font-size: 42px; }
    .car-showcase__specs-inline { justify-content: center; }
    .cta-group { justify-content: center; max-width: 500px; margin: 0 auto; }
}

@media (max-width: 768px) {
    /* Nâng cấp Cụm thông số kỹ thuật xe (Specs-inline) sang dạng App Widget */
    .car-showcase__specs-inline { 
        grid-template-columns: repeat(2, 1fr); /* Ép về 2 cột thay vì 1 cột cũ rích */
        gap: 10px;
        padding: 12px;
        background: rgba(20, 20, 20, 0.6); /* Nền kính mờ */
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 16px;
        margin-bottom: 24px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }

    .spec-inline-item {
        background: rgba(255, 255, 255, 0.03); /* Phân ô vuông độc lập */
        border-radius: 12px;
        padding: 12px 8px;
        flex-direction: column; /* Icon ở trên, text ở dưới */
        align-items: center;
        justify-content: center;
        gap: 6px;
        text-align: center;
        border: 1px solid rgba(255, 255, 255, 0.03);
    }

    .spec-icon {
        width: 32px;
        height: 32px;
        background: transparent;
        border: none;
        box-shadow: none;
        margin-bottom: 2px;
    }

    .spec-label {
        font-size: 9.5px;
        letter-spacing: 0.5px;
        opacity: 0.6;
    }

    .spec-value {
        font-size: 13.5px;
        color: #fff;
        text-shadow: 0 2px 4px rgba(0,0,0,0.5); /* Giúp thông số bén hơn */
    }
    .p-variants {
        display: none !important;
    }
    .showcase-mobile-variants-toggle {
        display: block !important;
    }
    .p-name { font-size: 32px; }
    .p-tagline { font-size: 16px; margin-bottom: 1rem !important; }
    .showcase-brand-header { margin-bottom: 0.75rem !important; }
    
    .cta-group { 
        flex-direction: row; /* Trả lại hàng ngang tinh tế */
        gap: 8px; /* Khéo sát 2 phím liền kề */
    }
    
    .btn-showroom {
        padding: 12px 6px; /* Bóp dẹt tỷ lệ phím bấm, gạt bỏ khoảng chữ thừa */
        font-size: 10.5px; /* Giảm font chữ để hai lệnh "Nhận báo giá dài" không bị rớt dòng */
        letter-spacing: 0;
    }

    /* Đảo ngược màu Nút Nhận Báo Giá trên Mobile để bắt mắt cực đại */
    .btn-quote-mobile {
        background-color: var(--color-gold, #ffc107) !important;
        color: #111 !important;
        border: none !important;
        box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
    }

    .btn-quote-mobile:hover {
        background-color: #e0a800 !important;
    }

    .btn-quote-mobile svg {
        width: 15px; /* Thu nhỏ icon chút đỉnh cho cân đối form di động */
        height: 15px;
    }
}

