/**
 * Product Variants List - Final Layout
 * Row 1: Image | Name+SKU | Quantity+Price
 * Row 2: Add to Cart (Full Width)
 */

.product-variants-list-wrapper {
    margin-top: 20px;
    padding: 0;
    background: transparent;
    width: 100%;
    max-width: 100%;
}

.variants-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #232323;
}

.variants-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

/* Variant Item Container */
.variant-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 12px;
    width: 100%;
    box-sizing: border-box;
}

.variant-add-to-cart-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.variant-item.out-of-stock {
    opacity: 0.6;
    background: #fafafa;
}

/* --- TOP ROW: Image | Details | Actions --- */
.variant-main-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

/* 1. Image */
.variant-image {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.variant-image img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid #ddd;
}

.variant-image .no-image {
    width: 50px;
    height: 50px;
    background: #f5f5f5;
    border-radius: 3px;
    border: 1px solid #ddd;
}

/* 2. Details (Name + SKU) */
.variant-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    /* Prevent flex overflow */
}

.variant-name {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    line-height: 1.3;
}

.variant-sku {
    font-size: 11px;
    color: #888;
}

/* 3. Actions Top (Quantity + Price) */
.variant-actions-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.variant-quantity {
    display: flex;
    align-items: center;
}

.qty-input {
    width: 50px;
    height: 32px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.variant-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 60px;
}

.current-price {
    font-size: 15px;
    font-weight: 700;
    color: #e91e63;
}

/* --- BOTTOM ROW: Button --- */
.variant-bottom-row {
    width: 100%;
}

.variant-add-to-cart .btn,
/* Legacy class support */
.add-to-cart-variant.full-width {
    width: 100%;
    height: 40px;
    padding: 0 16px;
    background: #00b9e4;
    color: white;
    border: none;
    border-radius: 3px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
}

.add-to-cart-variant.full-width:hover {
    background: #00a3cc;
}

.add-to-cart-variant.full-width:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.add-to-cart-variant .material-icons {
    font-size: 18px;
}

/* Loading */
.variant-item.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 480px) {
    .variant-main-row {
        flex-wrap: wrap;
    }

    .variant-actions-top {
        width: 100%;
        justify-content: space-between;
        margin-top: 5px;
        padding-top: 5px;
        border-top: 1px dashed #eee;
    }
}