/* QUIZ CONTAINER */
.quiz-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 64px var(--page-gutter);
    min-height: 70vh;
}

.quiz-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.quiz-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* START PAGE */
.start-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.start-image img {
    width: 100%;
    max-height: 600px;
    border-radius: 16px;
    object-fit: cover;
}

.start-content h1 {
    font-size: 48px;
    color: var(--primary-blue);
    line-height: 1.1;
    margin-bottom: 24px;
}

.start-content p {
    font-size: 18px;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 450px;
}

/* QUIZ STEPS */
.quiz-header {
    margin-bottom: 48px;
}

.step-counter {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
    display: block;
    margin-bottom: 13px;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background-color: var(--border-light);
    margin-bottom: 32px;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--red-brand);
    transition: width 0.3s ease;
}

.quiz-question {
    font-size: 35px;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.quiz-instruction {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 32px;
}

/* OPTION CARDS */
.options-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
    margin-bottom: 8px;
}

.option-card {
    flex: 1;
    min-width: 200px;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    background-color: var(--white);
}

.option-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.option-label {
    padding: 19px 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-blue);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Active/Selected State */
.option-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.option-card.selected {
    border-color: var(--primary-blue);
    background-color: var(--light-blue-bg);
}

.checkbox-circle {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-card.selected .checkbox-circle {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.checkbox-circle::after {
    content: "✓";
    color: white;
    font-size: 12px;
    display: none;
}

.option-card.selected .checkbox-circle::after {
    display: block;
}

.quiz-actions {
    display: flex;
    gap: 16px;
}

.quiz-actions .btn-outline {
    border: 1px solid var(--primary-blue);
}

.btn-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* RESULT PAGE */
.result-hero {
    margin-bottom: 48px;
}

.result-hero img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    /* Persona photos: keep faces in frame; a persona can override via bannerPosition */
    object-position: 50% 25%;
    border-radius: 16px;
    margin-bottom: 24px;
}

.result-title {
    font-size: 48px;
    color: var(--primary-blue);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.result-description {
    font-size: 18px;
    color: var(--text-gray);
    line-height: 1.6;
    max-width: 900px;
    margin-bottom: 48px;
}

.recommended-products {
    margin-bottom: 32px;
}

.recommended-products h2 {
    font-size: 24px;
    color: var(--primary-blue);
    margin-bottom: 24px;
}

.product-cards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Product Card Base */
.product-card {
    border-radius: 16px;
    display: flex;
    overflow: hidden;
    align-items: stretch;
    min-height: 260px;
}

/* Card Variations */
.card-best-fit {
    border: 2px solid var(--primary-blue);
    background-color: #f4f7fc;
}

.card-also-suitable {
    border: 1px solid #d1d5db;
    background-color: var(--white);
}

/* Image Containers inside Cards */
.card-img-box {
    width: 35%;
    height: 100%;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
    background-color: transparent;
}

.card-img-box img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    border-radius: 14px 0 0 14px;
    display: block;
}

/* Product Details */
.product-details {
    padding: 32px 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.badge-pill {
    display: inline-block;
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
    width: fit-content;
}

.badge-green {
    background-color: #00a354;
}

.badge-blue {
    background-color: var(--primary-blue);
}

.tech-specs {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}

.spec-type {
    color: var(--text-gray);
    margin-right: 8px;
}

.spec-grade {
    color: #00a354;
}

.product-details h3 {
    color: var(--primary-blue);
    font-size: 20px;
    margin-bottom: 13px;
    line-height: 1.3;
}

.product-details p {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.5;
    margin: 0;
}

/* Defines Your Drive Section */
.defines-drive {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
}

.drive-tags {
    display: flex;
    gap: 13px;
    flex-wrap: wrap;
}

.tag {
    background-color: var(--white);
    border: 1px solid #d1d5db;
    color: var(--primary-blue);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* How You Take Care of Your Car Section */
.car-care-box {
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 32px;
    background-color: var(--white);
    margin-bottom: 32px;
}

.car-care-box h3 {
    color: var(--primary-blue);
    font-size: 21px;
    margin-bottom: 13px;
}

.car-care-box p {
    color: var(--text-gray);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.car-care-box .disclaimer-text {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 0;
}

/* Explore Actions */
.explore-actions {
    text-align: left;
    margin-bottom: 48px;
    margin-top: 32px;
}

.link-primary {
    color: var(--primary-blue);
    gap: 8px;
    font-weight: 700;
    text-decoration: none;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
}

.link-primary:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .product-cards-container {
        grid-template-columns: 1fr;
    }
    
    .product-card {
        flex-direction: column;
    }
    
    .card-img-box {
        width: 100%;
        object-fit: fill;
        height: 260px;
        padding: 0px;
    }
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .start-grid, .product-cards-container {
        grid-template-columns: 1fr;
    }
    .options-grid {
        flex-direction: column;
    }
    .option-card {
        display: flex;
        align-items: center;
    }
    .option-card img {
        width: 120px;
        height: 100%;
        border-bottom: none;
        border-right: 1px solid var(--border-color);
    }
    .option-label {
        flex-grow: 1;
    }
    .card-best-fit .card-img-box,
    .card-also-suitable .card-img-box {
        width: 100%;
        height: 200px;
    }
}

.start-content h1:focus,
.quiz-question:focus,
.result-title:focus {
    outline: none;
}

/* Q1 vehicle dropdowns */
.vehicle-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.vehicle-field label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.select-wrapper {
    position: relative;
}

.select-wrapper select {
    width: 100%;
    padding: 13px 44px 13px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    appearance: none;
    font-size: 15px;
    color: var(--primary-blue);
    background-color: var(--white);
    cursor: pointer;
    text-overflow: ellipsis;
}

.select-wrapper select:focus-visible {
    outline: 2px solid var(--secondary-blue);
    outline-offset: 1px;
}

.select-wrapper select:disabled {
    background-color: var(--light-bg);
    color: var(--text-gray);
    cursor: not-allowed;
}

.select-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

button.option-card {
    display: block;
    padding: 0;
    font: inherit;
    text-align: left;
    border: 2px solid var(--border-light);
}

button.option-card:focus-visible {
    outline: 2px solid var(--secondary-blue);
    outline-offset: 2px;
}

.option-card img {
    display: block;
}

.option-card .option-label {
    gap: 12px;
    text-align: left;
}

.checkbox-circle {
    flex-shrink: 0;
    border-radius: 50%;
}

/* Q3 allows two: those read as checkboxes */
.option-card.is-multi .checkbox-circle {
    border-radius: 4px;
}

.option-card.is-blocked {
    opacity: 0.45;
    cursor: not-allowed;
}

.option-card.is-blocked:hover {
    box-shadow: none;
}

.quiz-actions .btn-primary[disabled] {
    cursor: not-allowed;
}

.options-grid + .quiz-actions {
    margin-top: 40px;
}

/* Result */
/* Pull quote: short brand rule above, no side bar */
.drive-truth {
    padding: 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--primary-blue);
    max-width: 900px;
}

.drive-truth::before {
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    background-color: var(--red-brand);
    margin-bottom: 16px;
}

.result-hero .result-description {
    margin-bottom: 32px;
}

.vehicle-line {
    font-size: 15px;
    color: var(--text-gray);
    margin: -12px 0 24px;
}

.recommendation-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-gray);
    margin-bottom: 24px;
}

.recommendation-note svg {
    flex-shrink: 0;
    margin-top: 3px;
}

.link-button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 700;
    color: var(--primary-blue);
    text-decoration: underline;
    cursor: pointer;
}

.product-cards-container.is-single {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

a.product-card {
    text-decoration: none;
    transition: box-shadow 0.2s;
}

a.product-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Pack shots are transparent PNG/WebP: contain them on the shared grey */
.card-img-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F6F6F6;
    padding: 16px;
    height: auto;
}

.card-img-box img {
    height: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 0;
}

.card-img-box img.is-placeholder {
    width: 96px;
    height: auto;
    opacity: 0.35;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 32px 0 48px;
}

.result-actions .btn-outline {
    border: 1px solid var(--primary-blue);
    text-decoration: none;
}

.result-error {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
}

.result-error h2 {
    font-size: 24px;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.result-error p {
    color: var(--text-gray);
    font-size: 16px;
}

.result-error .result-actions {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .vehicle-fields {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 32px;
    }
    button.option-card {
        display: flex;
        align-items: stretch;
        min-width: 0;
    }
    button.option-card img {
        width: 120px;
        height: auto;
        min-height: 88px;
        flex-shrink: 0;
    }
    .options-grid + .quiz-actions {
        margin-top: 24px;
    }
    .product-cards-container.is-single {
        grid-template-columns: 1fr;
    }
    .card-img-box,
    .card-best-fit .card-img-box,
    .card-also-suitable .card-img-box {
        height: 220px;
    }
}

@media (max-width: 768px) {
    .quiz-container {
        padding-top: 32px;
        padding-bottom: 48px;
    }
    .start-content h1,
    .result-title {
        font-size: 34px;
    }
    .quiz-question {
        font-size: 26px;
        line-height: 1.2;
    }
    .quiz-header {
        margin-bottom: 24px;
    }
    .result-hero img {
        height: 200px;
    }
    .drive-truth {
        font-size: 18px;
    }
    .defines-drive,
    .car-care-box,
    .result-error {
        padding: 24px 20px;
    }
    .quiz-actions,
    .result-actions {
        flex-wrap: wrap;
    }
    .quiz-actions .btn-primary,
    .result-actions .btn-primary,
    .result-actions .btn-outline {
        flex: 1 1 auto;
        justify-content: center;
    }
}
