/* =========================
   Product Page Layout
========================= */
.product-main-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 30px;
    margin-top: 30px;
    align-items: start;
    direction: rtl;
    font-family: 'IRANSansX', sans-serif;
}

/* =========================
   Purchase Sidebar
========================= */
.product-purchase-sidebar {
    position: sticky;
    top: 100px;
}

.purchase-card {
    padding: 24px;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* =========================
   Product Info Items
========================= */
.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #444;
}

.product-summary__title {
    font-size: 15px;
}

/* =========================
   Main Add to Cart Button
========================= */
.main-add-to-cart-btn {
    width: 100%;
    margin: 20px 0;
    padding: 14px;
    border: 0;
    border-radius: 12px;
    background: #e6123d;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.main-add-to-cart-btn:hover {
    background: #c70e34;
}

/* =========================
   Product Specs Grid
========================= */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.spec-item {
    padding: 15px 10px;
    background: #f8f8f8;
    border-radius: 10px;
    text-align: center;
}

.spec-label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.8rem;
    color: #888;
}

.spec-value {
    font-weight: 700;
    color: #333;
}

/* =========================
   Contact / Installment
========================= */
.contact-sales-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    margin-top: 140px;
    padding: 12px;
    border: 1px solid #00a082;
    border-radius: 10px;
    color: #00a082;
    text-decoration: none;
}

.installment-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #eefbff;
    border-radius: 10px;
    color: #007bff;
}

/* =========================
   Attribute Selection Wrapper
========================= */
.attribute-selection {
    width: 100%;
    margin-top: 20px;
    padding: 20px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.attribute-selection form.cart {
    width: 100%;
}

/* =========================
   Variations Table
   عنوان بالا / گزینه‌ها پایین
========================= */
.attribute-selection .variations {
    width: 100%;
    margin: 0;
    border: 0;
}

.attribute-selection .variations tbody {
    width: 100%;
}

.attribute-selection .variations tr {
    display: block;
    width: 100%;
    margin-bottom: 20px;
}

.attribute-selection .variations td {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
}

.attribute-selection .variations td.label {
    margin-bottom: 10px;
    text-align: right;
}

.attribute-selection .variations td.label label {
    display: block;
    margin: 0;
    font-family: 'IRANSansX', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    text-align: right;
}

.attribute-selection .variations td.value {
    text-align: right;
}

/* =========================
   فقط مخفی‌سازی محدود
   اگر سواچ فعال است، select اصلی پنهان شود
========================= */
.attribute-selection .variations td.value > select {
    display: none !important;
}

/* اگر افزونه این لیبل اضافی را تولید می‌کند */
.attribute-selection .variation-select-label.hidden {
    display: none !important;
}

/* =========================
   Swatches Container
========================= */
.attribute-selection .tawcvs-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    direction: rtl;
}

/* =========================
   Swatch Wrapper
========================= */
.attribute-selection .swatch-item-wrapper {
    display: inline-flex;
}

/* =========================
   Swatch Item Style
========================= */
.attribute-selection .swatch,
.attribute-selection .swatch-label {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8f8f8;
    color: #333;
    font-family: 'IRANSansX', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.25s ease;
}

/* Hover */
.attribute-selection .swatch:hover,
.attribute-selection .swatch-label:hover {
    background: #fff;
    border-color: #a21253;
    color: #a21253;
}

/* Selected */
.attribute-selection .selected .swatch,
.attribute-selection .active .swatch,
.attribute-selection .swatch.selected,
.attribute-selection .swatch-label.selected {
    background: #fff !important;
    border-color: #a21253 !important;
    color: #a21253 !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(162, 18, 83, 0.12);
}

/* =========================
   Reset Variations
========================= */
.attribute-selection .reset_variations {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    color: #a21253;
    text-decoration: none;
}

/* =========================
   Quantity + Add to Cart
========================= */
.attribute-selection {
    margin-top: 15px;
}

.attribute-selection .woocommerce-variation-add-to-cart {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.attribute-selection .quantity {
    margin: 0;
}

.attribute-selection .single_add_to_cart_button {
    border-radius: 10px;
    font-family: 'IRANSansX', sans-serif;
}

/* مخفی کردن سطر اصلی ووکامرس که شامل دکمه و تعداد است */
.single_variation_wrap {
    position: absolute !important;
    opacity: 0 !important;
    z-index: -9999 !important;
    pointer-events: none !important; /* غیرفعال کردن تعامل با این المنت */
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* مخفی کردن فقط بخش دکمه و تعداد ووکامرس */
.variations_form .woocommerce-variation-add-to-cart {
    position: absolute !important;
    opacity: 0 !important;
    z-index: -9999 !important;
    pointer-events: none !important;
}

/* قیمت اصلی ووکامرس که در single_variation قرار دارد را بگذارید بماند */
.woocommerce-variation-price {
    display: block !important;
    opacity: 1 !important;
    position: static !important;
}

.reset_variations {
    display: none !important;
}


.btn-proxy-add-to-cart {
    width: 100%;
    height: 72px;
    background: #f50057;
    color: #fff;
    border: none;
    border-radius: 28px;
    font-family: IRANSansX, sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 10px 25px rgba(245, 0, 87, 0.18);
    padding: 0 24px;
}

.btn-proxy-add-to-cart:hover {
    background: #e1004f;
    box-shadow: 0 12px 28px rgba(245, 0, 87, 0.24);
}

.btn-proxy-add-to-cart:active {
    transform: scale(0.98);
}

.btn-proxy-add-to-cart:focus {
    outline: none;
}



/* =========================
   Responsive
========================= */
@media (max-width: 992px) {
    .product-main-layout {
        grid-template-columns: 1fr;
    }

    .product-purchase-sidebar {
        position: static;
    }

    .specs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .purchase-card {
        padding: 18px;
    }

    .specs-grid {
        grid-template-columns: 1fr;
    }

    .attribute-selection .swatch,
    .attribute-selection .swatch-label {
        min-width: auto;
        font-size: 13px;
        padding: 8px 10px;
    }

    .attribute-selection .woocommerce-variation-add-to-cart {
        flex-direction: column;
        align-items: stretch;
    }

    .attribute-selection .quantity,
    .attribute-selection .single_add_to_cart_button {
        width: 100%;
    }
}
