/* =============================================
   AROMATICA PARFUM FINDER - QUIZ STYLES
   Theme: Transparent, Gold (#D4A65A), Premium
   ============================================= */

/* ---- Base Container ---- */
.apf-quiz-container {
    position: relative;
    width: 100%;
    max-width: 65%;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: inherit;
    text-align: center;
    color: #fff;
    background: transparent;
}

/* ---- Welcome Screen ---- */
.apf-welcome {
    animation: apfFadeIn 0.6s ease;
}

.apf-welcome-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.apf-welcome-subtitle {
    font-size: 16px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 30px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.apf-start-btn {
    display: inline-block;
    padding: 14px 40px;
    background: rgb(212,166,90);
    color: #000;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    border-radius: 5px !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apf-start-btn:hover {
    background: #B38846;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212,166,90,0.4);
}

/* ---- Progress Bar ---- */
.apf-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
}

.apf-progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.apf-progress-dot.active {
    background: rgb(212,166,90);
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(212,166,90,0.5);
}

.apf-progress-dot.done {
    background: rgb(212,166,90);
}

.apf-progress-line {
    width: 30px;
    height: 2px;
    background: rgba(255,255,255,0.2);
    transition: background 0.3s ease;
}

.apf-progress-line.done {
    background: rgb(212,166,90);
}

/* ---- Question Step ---- */
.apf-step {
    display: none;
    animation: apfSlideIn 0.5s ease;
}

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

.apf-question-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgb(212,166,90);
    margin-bottom: 8px;
}

.apf-question-text {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 25px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* ---- Answer Options ---- */
.apf-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.apf-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    min-width: 140px;
    background: rgba(255,255,255,0.08);
    border: 1.5px solid rgba(255,255,255,0.25);
    border-radius: 5px !important;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.apf-option:hover {
    border-color: rgb(212,166,90);
    background: rgba(212,166,90,0.12);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212,166,90,0.2);
}

.apf-option.selected {
    border-color: rgb(212,166,90);
    background: rgba(212,166,90,0.2);
    box-shadow: 0 0 15px rgba(212,166,90,0.3);
}

.apf-option-icon {
    font-size: 22px;
}

/* ---- Navigation Buttons ---- */
.apf-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.apf-nav-btn {
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 5px !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apf-btn-prev {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.4);
    color: #fff;
}

.apf-btn-prev:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.1);
}

.apf-btn-next {
    background: rgb(212,166,90);
    border: none;
    color: #000;
}

.apf-btn-next:hover {
    background: #B38846;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212,166,90,0.4);
}

.apf-btn-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ---- Loading Animation ---- */
.apf-loading {
    display: none;
    text-align: center;
    padding: 40px 20px;
    animation: apfFadeIn 0.5s ease;
}

.apf-loading.active {
    display: block;
}

.apf-loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.15);
    border-top-color: rgb(212,166,90);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: apfSpin 0.8s linear infinite;
}

.apf-loading-text {
    font-size: 16px;
    color: rgba(255,255,255,0.9);
}

.apf-loading-dots::after {
    content: '';
    animation: apfDots 1.5s steps(4, end) infinite;
}

/* ---- Results Section ---- */
.apf-results {
    display: none;
    animation: apfFadeIn 0.6s ease;
}

.apf-results.active {
    display: block;
}

.apf-results-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.apf-results-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 25px;
}

/* ---- Carousel Wrapper ---- */
.apf-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

/* ---- Product Cards (Carousel) ---- */
.apf-product-cards {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 10px 0;
    flex: 0 1 auto;
    max-width: calc(100% - 120px);
    min-width: 0;
}

.apf-product-cards::-webkit-scrollbar {
    display: none;
}

.apf-product-card {
    flex: 0 0 200px;
    max-width: 200px;
    scroll-snap-align: center;
    background: rgba(255,255,255,0.95);
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Force responsive card size on small screens */
@media (max-width: 768px) {
    .apf-quiz-container {
        max-width: 100% !important;
        padding: 20px 10px !important;
    }
    .apf-product-card {
        flex: 0 0 240px !important;
        max-width: 240px !important;
        min-width: 240px !important;
    }
}
@media (max-width: 480px) {
    .apf-product-card {
        flex: 0 0 75vw !important;
        max-width: 75vw !important;
        min-width: 75vw !important;
    }
}

.apf-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

/* ---- Carousel Arrows ---- */
.apf-arrow {
    flex-shrink: 0;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: none !important;
    color: rgba(255,255,255,0.6) !important;
    font-size: 28px !important;
    font-weight: 300 !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.apf-arrow:hover {
    color: rgb(212,166,90) !important;
    transform: scale(1.2);
    background: transparent !important;
}

/* Hide arrows & hint when no scrolling needed */
.apf-carousel-wrapper.apf-no-scroll .apf-arrow {
    display: none !important;
}

.apf-carousel-wrapper.apf-no-scroll::after {
    display: none !important;
}

.apf-product-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #fdfdfd;
    mix-blend-mode: multiply;
    padding: 5px;
    box-sizing: border-box;
}

.apf-product-info {
    padding: 12px 10px 15px;
}

.apf-product-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.3;
}

.apf-product-match {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(212,166,90,0.15);
    color: #B38846;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    margin-bottom: 8px;
}

.apf-product-price {
    font-size: 15px;
    font-weight: 700;
    color: rgb(212,166,90);
    margin-bottom: 10px;
}

.apf-product-price del {
    font-size: 12px;
    color: #999;
    font-weight: 400;
    margin-right: 5px;
}

.apf-product-btn {
    display: inline-block;
    padding: 8px 18px;
    background: rgb(212,166,90);
    color: #000;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 5px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.apf-product-btn:hover {
    background: #B38846;
    color: #000;
    text-decoration: none;
}

/* ---- Restart Button ---- */
.apf-restart-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 25px;
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.4);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    border-radius: 5px !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apf-restart-btn:hover {
    border-color: rgb(212,166,90);
    color: rgb(212,166,90);
}

/* ---- No Results ---- */
.apf-no-results {
    width: 100%;
    padding: 40px 20px;
    text-align: center;
    animation: apfFadeIn 0.5s ease;
}

.apf-no-results-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.8;
}

.apf-no-results-text {
    font-size: 16px;
    color: rgba(255,255,255,0.8);
    max-width: 350px;
    margin: 0 auto;
    line-height: 1.6;
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes apfFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes apfSlideIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes apfSpin {
    to { transform: rotate(360deg); }
}

@keyframes apfDots {
    0%  { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

@keyframes apfArrowPulse {
    0%, 100% { opacity: 0.3; }
    50%      { opacity: 0.7; }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .apf-quiz-container {
        padding: 20px 15px;
        background: transparent !important;
    }

    .apf-results,
    .apf-results.active {
        background: transparent !important;
    }

    .apf-carousel-wrapper {
        flex-wrap: wrap;
    }

    /* Decorative arrows on mobile — visual hint to swipe */
    .apf-arrow {
        position: static !important;
        flex-shrink: 0 !important;
        width: 24px !important;
        height: 24px !important;
        font-size: 16px !important;
        pointer-events: none !important;
        opacity: 0.5;
        color: rgba(255,255,255,0.7) !important;
        animation: apfArrowPulse 2s ease-in-out infinite;
    }

    .apf-welcome-title {
        font-size: 24px;
    }

    .apf-question-text {
        font-size: 20px;
    }

    .apf-options {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .apf-option {
        padding: 12px 5px !important;
        font-size: 13px !important;
        min-width: 0 !important;
        width: calc(50% - 5px) !important;
        max-width: none !important;
        flex: 0 0 calc(50% - 5px) !important;
        justify-content: center !important;
        text-align: center !important;
    }

    /* Carousel mode on tablet/mobile */
    /* Standard Bulletproof Mobile Carousel Layout */
    .apf-carousel-wrapper {
        display: block;
        position: relative;
        padding: 0 40px !important;
        box-sizing: border-box !important;
        width: 100%;
    }

    .apf-product-cards {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        scrollbar-width: none;
        justify-content: flex-start !important;
        background: transparent !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: none !important;
        padding: 10px 0 15px 0;
    }

    /* Position arrows absolutely in the wrapper padding */
    .apf-arrow {
        position: absolute !important;
        top: 40% !important;
        transform: translateY(-50%);
        background: transparent !important;
        color: #fff !important;
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
        font-size: 32px !important;
        font-weight: 300 !important;
        z-index: 99 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        margin: 0 !important;
        box-shadow: none !important;
        text-shadow: 0 2px 8px rgba(0,0,0,0.8) !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }
    .apf-arrow-left { left: -5px !important; }
    .apf-arrow-right { right: -5px !important; }

    /* Swipe hint text */
    .apf-carousel-wrapper::after {
        content: '← Glissez pour voir plus →';
        display: block;
        width: 100%;
        text-align: center;
        font-size: 12px;
        color: rgba(255,255,255,0.45);
        margin-top: 4px;
        letter-spacing: 0.5px;
    }

    .apf-product-cards::-webkit-scrollbar {
        display: none;
    }


}

@media (max-width: 480px) {
    .apf-quiz-container {
        max-width: 100% !important;
        padding: 15px 5px !important;
    }

    .apf-welcome-title {
        font-size: 20px;
    }

    .apf-welcome-subtitle {
        font-size: 14px;
    }

    .apf-question-text {
        font-size: 18px;
    }

    .apf-options {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .apf-option {
        padding: 10px 2px !important;
        font-size: 12px !important;
        min-width: 0 !important;
        width: calc(50% - 4px) !important;
        max-width: none !important;
        flex: 0 0 calc(50% - 4px) !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .apf-option-icon {
        font-size: 18px;
    }

    .apf-product-cards {
        padding: 10px 10% 15px 10%;
    }



    .apf-product-img {
        aspect-ratio: 1 / 1;
        height: auto;
    }

    .apf-results-title {
        font-size: 20px;
    }
}
