/* ══════════════════════════════════════════════════════
   Parfémový kvíz – Frontend widget
   ══════════════════════════════════════════════════════ */

/* ── Sekce na homepage ─────────────────────────────── */
.quiz-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #fdf6f0 0%, #f9f0e8 50%, #f5ebe0 100%);
    position: relative;
    overflow: hidden;
}
.quiz-section::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(196,164,132,0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.quiz-section::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(196,164,132,0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ── CTA banner (vstup do kvízu) ──────────────────── */
.quiz-cta {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
}
.quiz-cta-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    animation: quizFloat 3s ease-in-out infinite;
}
@keyframes quizFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.quiz-cta h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}
.quiz-cta p {
    font-size: 16px;
    color: #6b6b6b;
    margin-bottom: 32px;
    line-height: 1.6;
}
.quiz-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    letter-spacing: 0.5px;
}
.quiz-cta-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.quiz-cta-btn svg {
    transition: transform 0.3s ease;
}
.quiz-cta-btn:hover svg {
    transform: translateX(4px);
}

/* ── Fullscreen overlay kvízu ─────────────────────── */
.quiz-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #fff;
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.quiz-overlay.active {
    display: flex;
}

/* ── Header kvízu ─────────────────────────────────── */
.quiz-header {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.quiz-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.quiz-back-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 18px;
    color: #333;
}
.quiz-back-btn:hover {
    border-color: #1a1a1a;
    background: #f5f5f5;
}
.quiz-back-btn:disabled {
    opacity: 0.3;
    cursor: default;
}
.quiz-step-label {
    font-size: 13px;
    color: #999;
    font-weight: 500;
}
.quiz-close-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 28px;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}
.quiz-close-btn:hover {
    background: #f5f5f5;
    color: #333;
}

/* ── Progress bar ─────────────────────────────────── */
.quiz-progress {
    height: 3px;
    background: #f0f0f0;
    flex-shrink: 0;
}
.quiz-progress-fill {
    height: 100%;
    background: #1a1a1a;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 2px 2px 0;
}

/* ── Obsah kvízu (scrollable) ─────────────────────── */
.quiz-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    position: relative;
}

/* ── Slide otázky ─────────────────────────────────── */
.quiz-slide {
    width: 100%;
    max-width: 640px;
    text-align: center;
    opacity: 0;
    transform: translateX(60px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    pointer-events: none;
}
.quiz-slide.active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
    pointer-events: auto;
}
.quiz-slide.exit-left {
    opacity: 0;
    transform: translateX(-60px);
}

.quiz-question {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 40px;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

/* ── Odpovědi jako karty ──────────────────────────── */
.quiz-answers {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}
.quiz-answer {
    padding: 18px 24px;
    border: 2px solid #e8e8e8;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    text-align: left;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
}
.quiz-answer::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: #1a1a1a;
    transition: width 0.3s ease;
    border-radius: 12px 0 0 12px;
}
.quiz-answer:hover {
    border-color: #1a1a1a;
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}
.quiz-answer:hover::before {
    width: 4px;
}
.quiz-answer.selected {
    border-color: #1a1a1a;
    background: #1a1a1a;
    color: #fff;
}
.quiz-answer.selected::before {
    width: 0;
}
.quiz-answer-check {
    width: 24px;
    height: 24px;
    border: 2px solid #d0d0d0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s;
    font-size: 14px;
}
.quiz-answer.selected .quiz-answer-check {
    border-color: #fff;
    background: #fff;
    color: #1a1a1a;
}

/* ── Loader ───────────────────────────────────────── */
.quiz-loader {
    text-align: center;
    padding: 60px 20px;
}
.quiz-loader-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 30px;
    position: relative;
}
.quiz-loader-spinner::before,
.quiz-loader-spinner::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
}
.quiz-loader-spinner::before {
    border-top-color: #1a1a1a;
    animation: quizSpin 1s linear infinite;
}
.quiz-loader-spinner::after {
    border-bottom-color: #c4a484;
    animation: quizSpin 1.5s linear infinite reverse;
    inset: 6px;
}
@keyframes quizSpin {
    to { transform: rotate(360deg); }
}
.quiz-loader-text {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}
.quiz-loader-sub {
    font-size: 14px;
    color: #999;
}
.quiz-loader-dots::after {
    content: '';
    animation: quizDots 1.5s steps(4, end) infinite;
}
@keyframes quizDots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

/* ── Výsledky ─────────────────────────────────────── */
.quiz-results {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    animation: quizFadeUp 0.6s ease both;
}
@keyframes quizFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.quiz-results-header {
    text-align: center;
    margin-bottom: 40px;
}
.quiz-results-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

/* Profil uživatele */
.quiz-profile {
    background: linear-gradient(135deg, #fdf6f0, #f9f0e8);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 36px;
    text-align: center;
}
.quiz-profile-label {
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}
.quiz-profile-dominant {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
    text-transform: capitalize;
}
.quiz-profile-desc {
    font-size: 15px;
    color: #6b6b6b;
    line-height: 1.5;
}

/* Profilové dimenze – vizualizace */
.quiz-profile-bars {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 16px;
    flex-wrap: wrap;
}
.quiz-profile-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 50px;
}
.quiz-profile-bar-track {
    width: 6px;
    height: 50px;
    background: rgba(0,0,0,0.08);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}
.quiz-profile-bar-value {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 3px;
    transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.quiz-profile-bar-label {
    font-size: 10px;
    color: #999;
    font-weight: 500;
}

/* Karty produktů */
.quiz-products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
.quiz-product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.quiz-product-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}
.quiz-product-img {
    aspect-ratio: 3/4;
    background: #f8f6f4;
    overflow: hidden;
    position: relative;
}
.quiz-product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}
.quiz-product-card:hover .quiz-product-img img {
    transform: scale(1.05);
}

/* Badge skóre */
.quiz-match-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: #1a1a1a;
    backdrop-filter: blur(8px);
}
.quiz-match-badge.excellent {
    background: linear-gradient(135deg, #16a34a, #15803d);
}
.quiz-match-badge.very-good {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}
.quiz-match-badge.good {
    background: linear-gradient(135deg, #d97706, #b45309);
}

/* Info produktu */
.quiz-product-info {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.quiz-product-brand {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}
.quiz-product-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
    margin-bottom: 8px;
}
.quiz-product-match {
    font-size: 13px;
    color: #6b6b6b;
    margin-bottom: 12px;
}
.quiz-product-match strong {
    color: #1a1a1a;
    font-weight: 700;
}
.quiz-product-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 14px;
}
.quiz-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}
.quiz-product-price-old {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
}
.quiz-product-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
    font-family: inherit;
}
.quiz-product-btn:hover {
    background: #333;
}

/* Tlačítko zkusit znovu */
.quiz-results-footer {
    text-align: center;
    padding-top: 10px;
    padding-bottom: 20px;
}
.quiz-retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    background: transparent;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}
.quiz-retry-btn:hover {
    background: #1a1a1a;
    color: #fff;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
    .quiz-section { padding: 40px 0; }
    .quiz-cta h2 { font-size: 24px; }
    .quiz-cta p { font-size: 14px; }
    .quiz-cta-btn { padding: 14px 32px; font-size: 14px; }

    .quiz-body { padding: 30px 16px; justify-content: flex-start; padding-top: 40px; }
    .quiz-question { font-size: 20px; margin-bottom: 28px; }
    .quiz-answer { padding: 14px 18px; font-size: 15px; }

    .quiz-products {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .quiz-product-card {
        flex-direction: row;
    }
    .quiz-product-img {
        width: 120px;
        min-height: 160px;
        aspect-ratio: auto;
        flex-shrink: 0;
    }
    .quiz-product-info { padding: 14px 16px; }

    .quiz-results-header h2 { font-size: 22px; }
    .quiz-profile { padding: 18px 16px; }
    .quiz-profile-dominant { font-size: 18px; }
}

@media (max-width: 480px) {
    .quiz-cta h2 { font-size: 21px; }
    .quiz-question { font-size: 18px; margin-bottom: 24px; }
    .quiz-answer { padding: 13px 16px; font-size: 14px; gap: 10px; }
    .quiz-answer-check { width: 20px; height: 20px; }
}
