/* ============================================================
   Test Drive Page — Toyota Theme
   ============================================================ */
:root {
    --toyota-red:      #EB0A1E;
    --toyota-red-dark: #c00819;
    --td-text:         #1a1a1a;
    --td-muted:        #6c757d;
    --td-border:       #e5e5e5;
    --td-soft:         #f7f7f7;
}

.td-container { padding-bottom: 40px; }

/* ---------- Header ---------- */
.td-header {
    background: #000;
    color: #fff;
    padding: 18px 0;
    font-weight: 700;
    font-size: 1.05rem;
}

/* ---------- Stepper ---------- */
.td-stepper-wrap { padding: 28px 0 18px; }
.td-stepper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.td-step {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #9a9a9a;
    font-weight: 600;
    font-size: 0.98rem;
}
.td-step .circle {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 2px solid #d0d0d0;
    color: #9a9a9a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    background: #fff;
    transition: all .25s ease;
}
.td-step.active .circle,
.td-step.done .circle {
    background: var(--toyota-red);
    border-color: var(--toyota-red);
    color: #fff;
}
.td-step.active, .td-step.done { color: var(--td-text); }
.td-step-bar {
    width: 80px;
    height: 2px;
    background: #d8d8d8;
    border-radius: 2px;
}
.td-step-bar.filled { background: var(--toyota-red); }
hr.td-divider {
    margin-top: 4px;
    margin-bottom: 0;
    border-top: 1px solid #ececec;
    opacity: 1;
}

/* ---------- Category tabs ---------- */
.td-cat-tabs {
    display: flex;
    gap: 28px;
    justify-content: flex-end;
    align-items: center;
    padding: 18px 0 10px;
    overflow-x: auto;
    border-bottom: 1px solid #ececec;
}
.td-cat-tabs .td-tab {
    color: #6e6e6e;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    padding: 6px 2px;
    position: relative;
    cursor: pointer;
    font-size: 1.02rem;
}
.td-cat-tabs .td-tab.active { color: var(--toyota-red); }
.td-cat-tabs .td-tab.active::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    bottom: -11px;
    height: 3px;
    background: var(--toyota-red);
}

.used-badge {
    background: linear-gradient(135deg, #ff9a00, #ff6b00);
    color: #fff;
    font-size: .7rem;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: .5px;
    vertical-align: middle;
    margin-left: 8px;
}

/* ---------- Step 1: car slider ---------- */
.td-slider-wrap { position: relative; padding: 30px 0 10px; }
.td-car-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
    min-height: 360px;
    padding: 10px 50px;
}
.td-car-img {
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    filter: drop-shadow(0 18px 22px rgba(0,0,0,0.12));
}
.td-badge-model {
    display: inline-block;
    background: #222; color: #fff;
    padding: 6px 14px;
    font-weight: 700;
    letter-spacing: .5px;
    clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
    font-size: 0.78rem;
    margin-bottom: 14px;
}
.td-car-meta h3 {
    font-weight: 800;
    font-size: 1.9rem;
    margin-bottom: 16px;
}
.td-car-meta .td-price-label { color: #444; font-size: 1.05rem; }
.td-car-meta .td-price { font-size: 1.9rem; font-weight: 800; color: #111; }
.td-car-meta .td-price-note { color: #9a9a9a; font-size: .85rem; margin-top: 8px; }

.td-arrow {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    width: 46px; height: 46px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all .2s;
}
.td-arrow:hover { background: var(--toyota-red); }
.td-arrow.prev { left: 6px; }
.td-arrow.next { right: 6px; }

.td-thumb-row {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 12px 0 6px;
}
.td-thumb {
    width: 110px; height: 70px;
    border: 2px solid transparent;
    background: #fafafa;
    padding: 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
}
.td-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.td-thumb.active { border-color: var(--toyota-red); background: #fff; }
.td-thumb:hover { transform: translateY(-2px); }

/* ---------- Step 2: branch ---------- */
.td-map {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    height: 420px;
    width: 100%;
}
.td-sel-car {
    background: #fafafa;
    border: 1px solid #ececec;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    gap: 14px;
    align-items: center;
}
.td-sel-car img { width: 90px; height: 60px; object-fit: contain; }
.td-sel-car .label {
    color: #8a8a8a;
    font-size: .8rem;
    font-weight: 600;
    background: #efefef;
    padding: 2px 10px;
    border-radius: 4px;
    display: inline-block;
}
.td-sel-car .name { font-weight: 700; font-size: 1.05rem; margin-top: 6px; }

.td-branch-box {
    background: #fafafa;
    border: 1px solid #ececec;
    border-radius: 14px;
    padding: 18px;
    margin-top: 16px;
}
.td-branch-box label { font-weight: 700; font-size: .95rem; margin-bottom: 8px; }
.td-branch-info {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #ddd;
    color: #444;
    font-size: .92rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.td-branch-info i { color: var(--toyota-red); margin-right: 6px; }

/* ---------- Step 3: form ---------- */
.td-form-card {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    padding: 28px;
}
.td-form-card .form-label { font-weight: 600; }
.td-form-card .form-label .req { color: var(--toyota-red); margin-left: 4px; }
.td-form-card .form-control,
.td-form-card .form-select {
    background: #f3f3f3;
    border-color: transparent;
    border-radius: 999px;
    padding: 12px 18px;
    font-size: .95rem;
}
.td-form-card .form-control:focus,
.td-form-card .form-select:focus {
    background: #fff;
    border-color: var(--toyota-red);
    box-shadow: 0 0 0 .15rem rgba(235,10,30,.12);
}
.td-form-card .form-control.is-invalid {
    border-color: var(--toyota-red);
    background: #fff5f6;
}
.td-radio-row {
    display: flex;
    gap: 26px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.td-form-card .form-check-input:checked {
    background-color: var(--toyota-red);
    border-color: var(--toyota-red);
}

.td-summary {
    background: #fafafa;
    border: 1px solid #ececec;
    border-radius: 14px;
    padding: 18px;
}
.td-summary .head {
    background: #efefef;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 700;
    margin-bottom: 8px;
}
.td-summary .img {
    width: 100%;
    height: 110px;
    object-fit: contain;
    margin-bottom: 10px;
}
.td-summary .dealer .name { font-weight: 700; }
.td-summary .dealer .area { color: #8a8a8a; font-size: .9rem; }

/* ---------- Buttons ---------- */
.btn-td-primary {
    background: var(--toyota-red);
    color: #fff;
    border: 0;
    border-radius: 999px;
    font-weight: 700;
    padding: 12px 44px;
    transition: all .2s;
}
.btn-td-primary:hover:not(:disabled) {
    background: var(--toyota-red-dark);
    color: #fff;
    transform: translateY(-1px);
}
.btn-td-primary:disabled {
    background: #d0d0d0;
    color: #fff;
    cursor: not-allowed;
}
.btn-td-dark {
    background: #111;
    color: #fff;
    border: 0;
    border-radius: 999px;
    font-weight: 700;
    padding: 12px 44px;
}
.btn-td-dark:hover { background: #000; color: #fff; }

.td-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 28px;
}

/* ---------- Bottom links ---------- */
.td-bottom-links {
    border-top: 1px solid #ececec;
    margin-top: 30px;
    padding: 20px 0;
    text-align: center;
}
.td-bottom-links a {
    color: var(--toyota-red);
    font-weight: 700;
    text-decoration: none;
    margin: 0 18px;
}

/* ---------- Success modal ---------- */
.td-success-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 16px;
    box-shadow: 0 10px 24px rgba(46,204,113,0.35);
    animation: td-pop .5s ease;
}
@keyframes td-pop {
    0%   { transform: scale(0);   opacity: 0; }
    70%  { transform: scale(1.1); }
    100% { transform: scale(1);   opacity: 1; }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .td-car-card {
        grid-template-columns: 1fr;
        padding: 10px 16px;
        text-align: center;
    }
    .td-car-meta h3       { font-size: 1.4rem; }
    .td-car-meta .td-price { font-size: 1.4rem; }
    .td-car-img            { max-height: 220px; }
    .td-step-bar           { width: 30px; }
    .td-step .label        { display: none; }
    .td-cat-tabs           { justify-content: flex-start; gap: 18px; }
}
