/**
 * Single Product - Variable Product Styles
 *
 * @package Alotoshak
 * @version 1.0.0
 */

/* ============================================
 * 1. فرم متغیر
 * ============================================ */
.alotoshak-variable-form {
    background: #ffffff;
    border-radius: var(--alo-radius-lg);
    padding: 24px;
    box-shadow: var(--alo-shadow);
    margin: 20px 0;
    border: 1px solid #f0f0f0;
}

/* ============================================
 * 2. جدول انتخاب ویژگی
 * ============================================ */
.alotoshak-variations-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.alotoshak-variations-table tr {
    border-bottom: 1px solid var(--alo-border);
}

.alotoshak-variations-table tr:last-child {
    border-bottom: none;
}

.alotoshak-variations-table th.label {
    padding: 12px 10px 12px 0;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: var(--alo-dark);
    width: 120px;
    vertical-align: middle;
}

.alotoshak-variations-table td.value {
    padding: 12px 0;
    vertical-align: middle;
}

.alotoshak-variations-table select {
    width: 100%;
    max-width: 300px;
    padding: 10px 14px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #ffffff;
    font-family: var(--alo-font);
    font-size: 14px;
    color: var(--alo-dark);
    cursor: pointer;
    transition: var(--alo-transition);
}

.alotoshak-variations-table select:focus {
    outline: none;
    border-color: var(--alo-primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.alotoshak-reset-variations {
    display: inline-block;
    margin-right: 12px;
    color: var(--alo-danger);
    font-size: 13px;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    transition: var(--alo-transition);
}

.alotoshak-reset-variations:hover {
    background: #fde8ea;
    color: var(--alo-danger);
}

/* ============================================
 * 3. بخش variation
 * ============================================ */
.alotoshak-variation-wrap {
    margin-top: 20px;
}

/* ============================================
 * 4. کارت قیمت variation
 * ============================================ */
.alotoshak-price-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: var(--alo-radius);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--alo-border);
}

.alotoshak-price-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.alotoshak-price-label {
    font-size: 14px;
    color: var(--alo-gray);
    font-weight: 500;
}

.alotoshak-discount-badge {
    background: var(--alo-danger);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    animation: aloPulse 2s infinite;
}

.alotoshak-price-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.alotoshak-price-content .woocommerce-variation-price .price {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: var(--alo-success) !important;
    direction: ltr;
}

.alotoshak-price-content .woocommerce-variation-price del {
    font-size: 16px;
    color: #adb5bd;
}

.alotoshak-price-content .woocommerce-variation-price ins {
    text-decoration: none;
    font-weight: 800;
}

/* ============================================
 * 5. بخش افزودن به سبد variation
 * ============================================ */
.alotoshak-variation-add-to-cart {
    margin-top: 20px;
}

/* ============================================
 * 6. واکنش‌گرا
 * ============================================ */
@media (max-width: 768px) {
    .alotoshak-variable-form {
        padding: 18px;
    }

    .alotoshak-variations-table th.label {
        display: block;
        width: 100%;
        padding-bottom: 5px;
    }

    .alotoshak-variations-table td.value {
        display: block;
        width: 100%;
        padding-top: 0;
    }

    .alotoshak-variations-table select {
        max-width: 100%;
    }

    .alotoshak-price-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

/************************/
.alotoshak-variation-add-to-cart .alotoshak-add-to-cart-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.alotoshak-variation-add-to-cart .alotoshak-quantity-wrapper {
    display: flex;
    align-items: center;
    background: var(--alo-light-gray);
    border-radius: 8px;
    border: 1px solid #dee2e6;
    overflow: hidden;
}