/**
 * Variants List Styles
 * Interface simplifiée pour les variantes de produits
 */

/* Container principal */
.variants-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    justify-content: center;
}

/* Colonne de variantes */
.variants-column {
    display: flex;
    flex-direction: column;
}

/* En-tête de colonne */
.variants-column__header {
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--color-text);
    margin-bottom: 0;
}

.variants-column__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    letter-spacing: -0.02em;
}

.variants-column__subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0.25rem 0 0 0;
    font-weight: 400;
}

/* Carte variante */
.variant-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.variant-card:first-child {
    border-top: 1px solid #e5e7eb;
}

/* Image variante */
.variant-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
    /* background: #f9fafb;
    border: 1px solid #e5e7eb; */
}

.variant-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Info variante */
.variant-info {
    flex: 1;
    min-width: 0;
}

.variant-title {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text);
    margin: 0;
    letter-spacing: -0.01em;
}

/* Prix */
.variant-price {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    letter-spacing: -0.02em;
    min-width: 80px;
    text-align: right;
}

/* Actions */
.variant-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* Sélecteur de quantité */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: transparent;
    /* border: 1px solid #d1d5db; */
    border-radius: 4px;
    padding: 0.125rem;
}

.qty-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 1.125rem;
    font-weight: 400;
    color: #6b7280;
    cursor: pointer;
}

.qty-input {
    width: 40px;
    height: 32px;
    text-align: center;
    font-size: 0.9375rem;
    font-weight: 500;
    border: none;
    background: transparent;
    color: var(--color-text);
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input:focus {
    outline: none;
}

/* Bouton Ajouter */
.variant-actions .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--color-text);
    color: white;
    border: 1px solid var(--color-text);
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.3s ease, color 0.3s ease;
}

.variant-actions .btn:hover:not(:disabled) {
    background: white;
    color: var(--color-text);
}

.variant-actions .btn svg {
    width: 18px;
    height: 18px;
}

.variant-actions .btn:disabled {
    background: #e5e7eb;
    border-color: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive Design */

/* Tablette - garde les 2 colonnes mais réduit les espaces */
@media (max-width: 1024px) {
    .variants-list {
        gap: 2rem;
        padding: 2rem 1.5rem;
        max-width: 100%;
    }

    .variant-card {
        gap: 1rem;
    }

    .variant-actions {
        gap: 0.75rem;
    }

    .variant-actions .btn {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 768px) {
    .variants-list {
        gap: 1.5rem;
        padding: 1.5rem 1rem;
    }

    .variants-column__header {
        padding-bottom: 1rem;
    }

    .variants-column__title {
        font-size: 1.125rem;
    }

    .variants-column__subtitle {
        font-size: 0.8125rem;
    }

    .variant-card {
        gap: 0.75rem;
        padding: 1rem 0;
    }

    .variant-title {
        font-size: 0.9375rem;
    }

    .variant-price {
        font-size: 1rem;
        min-width: 70px;
    }

    .variant-actions .btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.75rem;
    }

    .variant-actions .btn svg {
        width: 16px;
        height: 16px;
    }

    .qty-btn {
        width: 30px;
        height: 30px;
    }

    .qty-input {
        width: 38px;
        height: 30px;
        font-size: 0.875rem;
    }
}

/* Mobile - passe en 1 colonne avec layout compact */
@media (max-width: 640px) {
    .variants-list {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem 1rem;
    }

    .variant-card {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "title price"
            "actions actions";
        gap: 0.75rem;
    }

    .variant-info {
        grid-area: title;
    }

    .variant-price {
        grid-area: price;
    }

    .variant-actions {
        grid-area: actions;
        width: 100%;
    }

    .variant-actions .btn {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .variants-list {
        padding: 1rem 0.75rem;
        gap: 1.5rem;
    }

    .variants-column__header {
        padding-bottom: 0.75rem;
    }

    .variants-column__title {
        font-size: 1rem;
    }

    .variant-card {
        padding: 0.875rem 0;
        gap: 0.625rem;
    }

    .variant-title {
        font-size: 0.875rem;
    }

    .variant-price {
        font-size: 0.9375rem;
    }

    .quantity-selector {
        border-radius: 3px;
    }

    .qty-btn {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }

    .qty-input {
        width: 36px;
        height: 28px;
        font-size: 0.875rem;
    }

    .variant-actions .btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.75rem;
        letter-spacing: 0.3px;
    }

    .variant-actions .btn svg {
        width: 14px;
        height: 14px;
    }
}
