/* TECH-CAR CARD UI MODULE CSS */
.car-card {
    position: relative;
    border: 1px solid rgba(0, 166, 255, 0.15);
    border-radius: var(--radius-lg, 12px);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px;
    text-align: left;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transform: translateZ(0); /* Hardware acceleration without the blur of backface-visibility */
}

.car-card:hover { 
    border-color: rgba(0, 166, 255, 0.6); 
    box-shadow: 0 10px 30px rgba(0, 166, 255, 0.15); 
    transform: translateY(-5px);
}

.car-thumbnail { 
    display: block; 
    margin-bottom: 15px; 
    overflow: hidden; 
    border-radius: 8px; 
    background: #ffffff; 
    position: relative;
}

.car-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 166, 255, 0.2), transparent);
    transform: translateX(-100%);
    z-index: 1;
    pointer-events: none;
    transition: none;
}

.car-card:hover .car-thumbnail::after {
    transform: translateX(100%);
    transition: transform 0.6s ease-in-out;
}

.car-card img { 
    width: 100%; 
    height: auto; 
    aspect-ratio: 16/9; 
    object-fit: contain; 
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1), filter 0.8s;
    filter: contrast(1);
    image-rendering: -webkit-optimize-contrast;
    transform: translateZ(0);
}

.car-card:hover img { 
    transform: scale(1.05); 
    filter: contrast(1.1) brightness(1.02);
}

/* CYBER BADGES */
.car-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 166, 255, 0.1);
    color: var(--clr-accent);
    border: 1px solid var(--clr-accent);
    padding: 4px 12px;
    font-size: 10px;
    font-family: var(--font-primary);
    letter-spacing: 0.5px;
    font-weight: 800;
    border-radius: var(--radius-pill, 20px);
    text-transform: uppercase;
    z-index: 2;
    backdrop-filter: blur(4px);
    box-shadow: 0 0 10px rgba(0, 166, 255, 0.2);
}

/* ⚡ XE ĐIỆN / HYBRID ĐIỆN — Electric Neon */
.car-card.is-electric .car-badge {
    color: #10b981;
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.car-card.is-electric:hover .car-thumbnail::after {
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.2), transparent);
}

.car-card.is-electric:hover {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.15);
}

.car-card.is-electric .v-price { color: #10b981; }

.car-content { padding: 0 10px 10px 10px; flex-grow: 1; display: flex; flex-direction: column; }

.car-title { 
    font-size: 18px; 
    font-weight: 800; 
    color: var(--clr-dark); 
    margin-bottom: 12px; 
    letter-spacing: -0.3px; 
    line-height: 1.3;
    text-transform: uppercase;
}

/* HUD SPECS BAR */
.car-specs-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 10px 5px;
    background: transparent;
    border-top: 1px dashed rgba(0, 166, 255, 0.3);
    border-bottom: 1px dashed rgba(0, 166, 255, 0.3);
}

.car-card.is-electric .car-specs-bar {
    border-color: rgba(16, 185, 129, 0.3);
}

.spec-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 0%;
    min-width: 0;
    gap: 4px;
    font-size: 10px;
    font-family: var(--font-primary);
    color: #000;
    font-weight: 700;
    white-space: nowrap;
    position: relative;
    padding: 0 2px;
}

.spec-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.spec-item + .spec-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    width: 1px;
    height: 70%;
    background: rgba(0, 166, 255, 0.2);
}

.car-card.is-electric .spec-item + .spec-item::before {
    background: rgba(16, 185, 129, 0.2);
}

.spec-item i {
    color: #000;
    font-size: 14px;
}

.car-versions { 
    margin-bottom: 20px; 
    border-top: 1px solid transparent;
    padding-top: 5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.version-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    font-size: 12px; 
    font-family: var(--font-primary);
}

.v-name { color: #000; font-weight: 600; }
.v-price { color: var(--clr-primary); font-weight: 800; font-size: 14px; letter-spacing: -0.5px; }

.car-actions { 
    display: flex; 
    gap: 10px; 
    margin-top: auto; 
    padding-top: 15px;
}

.btn-card-primary, .btn-card-outline {
    flex: 1; 
    padding: 10px 5px; 
    font-size: 11px; 
    font-weight: 800; 
    border-radius: 6px; 
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

/* NEON OUTLINE BUTTONS */
.btn-card-primary { 
    background: transparent; 
    color: #000; 
    border: 1px solid #000; 
}
.btn-card-primary:hover { 
    background: #000; 
    color: #fff; 
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2); 
    transform: translateY(-2px);
}

.btn-card-outline { 
    border: 1px solid #10b981; 
    color: #10b981; 
    background: transparent; 
}
.btn-card-outline:hover { 
    border-color: #059669; 
    background: rgba(16, 185, 129, 0.05); 
    color: #059669;
}

.btn-card-zalo {
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1px solid rgba(0, 104, 255, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.btn-card-zalo:hover {
    background: rgba(0, 104, 255, 0.05);
    border-color: #0068FF;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 104, 255, 0.2);
}

.btn-card-hotline {
    width: 38px;
    height: 38px;
    background: transparent;
    color: #f97316 !important;
    border: 1px solid #f97316;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.btn-card-hotline:hover {
    background: #f97316;
    color: #fff !important;
    border-color: #f97316;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.4);
}

/* ANIMATION DELAY FOR GRID ITEMS */
@keyframes fadeInUpCyber {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.car-card { animation: fadeInUpCyber 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards; opacity: 0; }
.car-card:nth-child(1) { animation-delay: 0.1s; }
.car-card:nth-child(2) { animation-delay: 0.15s; }
.car-card:nth-child(3) { animation-delay: 0.2s; }
.car-card:nth-child(4) { animation-delay: 0.25s; }
.car-card:nth-child(5) { animation-delay: 0.3s; }
.car-card:nth-child(6) { animation-delay: 0.35s; }

/* Bento Hero Card removed for Coverflow Slider */

/* CAR COLOR SWATCHES */
.car-color-swatches {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: -12px; /* Kéo sát lên chân ảnh (bù lại margin-bottom 15px của car-thumbnail) */
    margin-bottom: 15px;
    position: relative;
    z-index: 5;
}

.color-swatch {
    width: 50px;
    height: 30px;
    border-radius: 12px 0 12px 0; /* Bo góc trên-trái và dưới-phải */
    border: 1px solid #cbd5e1;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.color-swatch:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 10;
    position: relative;
    border-color: var(--clr-primary);
}
