/* ═══════════════════════════════════════════════════════════════
   product-variants.css – Varianten-Selektor für Produktdetailseite
   BEM-ähnliche Klassen: variant-*
   ═══════════════════════════════════════════════════════════════ */

/* ── Varianten-Selektor Container ── */
.variant-selector {
    margin: 1rem 0 1.25rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

/* ── Varianten-Gruppe (je Attribut) ── */
.variant-group {
    margin-bottom: 0.75rem;
}

.variant-group:last-child {
    margin-bottom: 0;
}

.variant-group-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ── Varianten-Optionen (Flex-Wrap) ── */
.variant-group-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ── Varianten-Pill (Button) ── */
.variant-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #212529;
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
    white-space: nowrap;
}

.variant-pill:hover:not([disabled]) {
    border-color: #198754;
    color: #198754;
    background: #f0fdf4;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.15);
}

/* ── Aktive Variante ── */
.variant-pill--active {
    border-color: #198754;
    background: #198754;
    color: #fff;
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.25);
}

.variant-pill--active:hover:not([disabled]) {
    background: #157347;
    border-color: #157347;
    color: #fff;
    transform: translateY(-1px);
}

/* ── Nicht verfügbare Variante ── */
.variant-pill--unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    text-decoration: line-through;
    background: #f8f9fa;
    border-color: #dee2e6;
}

.variant-pill--unavailable:hover {
    transform: none;
    box-shadow: none;
}

/* Badge für nicht verfügbar */
.variant-pill-badge {
    font-size: 0.65rem;
    color: #dc3545;
    font-weight: 700;
}

/* ── Preisspanne-Anzeige (für Parent mit mehreren Preisen) ── */
.product-price-range {
    margin-top: 0.5rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    color: #6c757d;
    background: #f1f3f5;
    border-radius: 6px;
    display: inline-block;
}

/* ═══════════════════════════════════════════════════════════════
   Responsive: Mobile-First
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 576px) {
    .variant-selector {
        margin: 0.75rem 0 1rem;
        padding: 0.5rem 0.75rem;
    }

    .variant-pill {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .variant-group-label {
        font-size: 0.8rem;
    }

    .variant-group-options {
        gap: 0.375rem;
    }
}

/* ── Produkt-Listing: "ab X €" Preis für Parent-Produkte ── */
.product-card-price-from {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 400;
}

.product-card-variant-count {
    font-size: 0.7rem;
    color: #198754;
    margin-top: 0.125rem;
}
