/* ─── Productfinder Base ─────────────────────────────────── */
#seibersdorfer-productfinder {
    position: relative;
    font-family: inherit;
    width: 100%;
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1rem;
}
#seibersdorfer-productfinder .loading {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.7);
    background-image: url('../img/loading.gif');
    background-repeat: no-repeat;
    background-position: center;
    z-index: 99;
}

/* ─── Intro ──────────────────────────────────────────────── */
.pf-intro {
    text-align: center;
    padding: 2rem 0;
}
.pf-intro-content {
    max-width: 600px;
    margin: 0 auto;
}
.pf-intro-content p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #444;
}

/* ─── Progress ───────────────────────────────────────────── */
.pf-progress {
    margin-bottom: 1.5rem;
    text-align: center;
}
.pf-progress-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
    margin-bottom: 0.5rem;
}
.pf-progress-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 99px;
    overflow: hidden;
    max-width: 400px;
    margin: 0 auto;
}
.pf-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 99px;
    transition: width 0.5s ease;
}

/* ─── Question ───────────────────────────────────────────── */
.pf-question {
    animation: pfFadeIn 0.3s ease;
}

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

.pf-question-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 0.25rem;
    text-align: center;
}
.pf-question-subline {
    font-size: 1rem;
    color: #666;
    text-align: center;
    margin: 0 0 1.5rem;
}
.pf-question-text p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin: 0 0 1.5rem;
    text-align: center;
}

/* ─── Answer Cards ───────────────────────────────────────── */
.pf-answers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.pf-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 1.25rem 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    text-align: center;
    flex: 0 1 200px;
    min-height: 90px;
    user-select: none;
}
.pf-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 16px rgba(37,99,235,0.08);
    background: #f8faff;
}
.pf-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.pf-card input:checked + .pf-card-label,
.pf-card input:checked ~ .pf-card-label {
    color: #1d4ed8;
}
.pf-card input:checked ~ lottie-player {
    filter: drop-shadow(0 0 6px rgba(37,99,235,0.3));
}
.pf-card:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.pf-card:has(input:checked)::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #2563eb;
    background: #dbeafe;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pf-card-no {
    opacity: 0.7;
}
.pf-card-no:has(input:checked) {
    opacity: 1;
}

.pf-card-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    transition: color 0.2s;
}

/* radio/checkbox inside labels – keep accessible but hidden */
.pf-card input[type="radio"],
.pf-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* ─── Navigation ─────────────────────────────────────────── */
.pf-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 0.5rem;
}

.pf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.75rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, opacity 0.2s;
    line-height: 1.4;
}

.pf-btn-primary {
    background: #2563eb;
    color: #fff;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(37,99,235,0.25);
}
.pf-btn-primary:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 20px rgba(37,99,235,0.35);
}

.pf-btn-next {
    background: #2563eb;
    color: #fff;
}
.pf-btn-next:hover:not(.disabled) {
    background: #1d4ed8;
}
.pf-btn-next.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pf-btn-back {
    background: #f3f4f6;
    color: #444;
}
.pf-btn-back:hover {
    background: #e5e7eb;
}

.pf-btn-start {
    margin-top: 1rem;
}

.pf-error {
    display: none;
    text-align: center;
    color: #dc2626;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0.75rem 0 0;
}

/* ─── Results ────────────────────────────────────────────── */
.pf-results {
    animation: pfFadeIn 0.3s ease;
}
.pf-results-text {
    text-align: center;
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
.pf-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.pf-restart {
    text-align: center;
    margin-top: 2rem;
}
.pf-restart .pf-btn {
    display: inline-block;
    text-decoration: none;
}
.pf-product-card {
    display: block;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.2s;
}
.pf-product-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.pf-product-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pf-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pf-product-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111;
    margin: 10px 12px 4px;
    line-height: 1.3;
}
.pf-product-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: #2563eb;
    margin: 0 12px 12px;
}
.pf-product-price del {
    font-weight: 400;
    color: #999;
    margin-right: 4px;
}
.pf-product-price ins {
    text-decoration: none;
}

.pf-reasons {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.pf-reasons h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #166534;
    margin: 0 0 0.5rem;
}
.pf-reasons ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.pf-reasons li {
    position: relative;
    padding: 0.3rem 0 0.3rem 1.25rem;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.5;
}
.pf-reasons li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0.3rem;
    color: #16a34a;
    font-weight: 700;
    font-size: 0.85rem;
}

.pf-no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
    font-size: 1.1rem;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
    #seibersdorfer-productfinder {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    .pf-answers {
        gap: 8px;
    }
    .pf-card {
        padding: 1rem 0.5rem;
        min-height: 70px;
        flex-basis: 160px;
    }
    .pf-card lottie-player {
        width: 60px !important;
        height: 60px !important;
    }
    .pf-question-title {
        font-size: 1.25rem;
    }
    .pf-btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.9rem;
    }
}
@media (max-width: 400px) {
    .pf-card {
        flex-basis: 100%;
    }
}
