/**
 * Styles pour le sélecteur de variantes de produits
 */

.variant-selector {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.variant-option {
    margin-bottom: 20px;
}

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

.variant-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sélecteur de couleurs */
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-option {
    padding: 10px 20px;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

.color-option:hover {
    border-color: #007bff;
    background: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.color-option.selected {
    border-color: #007bff;
    background: #007bff;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.color-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #e9ecef;
}

.color-name {
    display: block;
}

/* Sélecteur de tailles */
.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.size-option {
    min-width: 50px;
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    text-align: center;
}

.size-option:hover {
    border-color: #007bff;
    background: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.size-option.selected {
    border-color: #007bff;
    background: #007bff;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.size-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #e9ecef;
    text-decoration: line-through;
}

/* Info stock variante */
.variant-stock-info {
    margin-top: 15px;
    padding: 10px 15px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #28a745;
}

.variant-stock-info.out-of-stock {
    border-left-color: #dc3545;
}

.variant-stock-info i {
    margin-right: 8px;
}

/* Prix variante */
.variant-price {
    font-size: 24px;
    font-weight: 700;
    color: #28a745;
    margin: 15px 0;
}

.variant-price-old {
    font-size: 18px;
    color: #6c757d;
    text-decoration: line-through;
    margin-left: 10px;
}

/* Badge réduction */
.variant-discount-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #dc3545;
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

/* Message de sélection */
.variant-selection-message {
    padding: 12px 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    font-size: 14px;
    margin-top: 15px;
}

.variant-selection-message i {
    margin-right: 8px;
}

/* Responsive */
@media (max-width: 576px) {
    .variant-selector {
        padding: 15px;
    }
    
    .color-option,
    .size-option {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .variant-price {
        font-size: 20px;
    }
}

/* Animation d'apparition */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.variant-selector {
    animation: fadeInUp 0.4s ease;
}

/* État de chargement */
.variant-selector.loading {
    opacity: 0.6;
    pointer-events: none;
}

.variant-selector.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
