/* ================================
   ساخت چیدمان دو ستونه برای صفحه سبد خرید
================================ */
/* Cart Page Base */
.custom-cart-page .woocommerce {
    max-width: 1240px;
    margin: 0 auto;
    padding: 32px 16px;
}

/* WooCommerce notices */
.custom-cart-page .woocommerce-notices-wrapper {
    margin-bottom: 20px;
}

/* Cart form */
.custom-cart-page .woocommerce-cart-form {
    background: #ffffff;
    border: 1px solid #edf0f3;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

/* Cart table */
.custom-cart-page table.shop_table {
    border: none;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

.custom-cart-page table.shop_table th {
    background: #f8fafc;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    padding: 16px;
    border: none;
}

.custom-cart-page table.shop_table td {
    border-top: 1px solid #edf0f3;
    padding: 18px 16px;
    vertical-align: middle;
}

/* Product thumbnail */
.custom-cart-page .product-thumbnail img {
    width: 78px;
    height: 78px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid #eef2f7;
}

/* Product name */
.custom-cart-page .product-name a {
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
}

.custom-cart-page .product-name a:hover {
    color: #2563eb;
}

/* Price and subtotal */
.custom-cart-page .product-price,
.custom-cart-page .product-subtotal {
    color: #0f172a;
    font-weight: 700;
}

/* Remove icon */
.custom-cart-page .product-remove a.remove {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0 !important;
    margin: 0 auto;
    border-radius: 999px;
    background: #fff1f2;
    color: #e11d48 !important;
    font-size: 22px;
    font-weight: 700;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    transition: 0.2s ease;
}

.custom-cart-page .product-remove a.remove:hover {
    background: #e11d48;
    color: #ffffff !important;
}

/* راست‌چین کردن دکمه حذف (ضربدر) در موبایل */
@media (max-width: 768px) {
    .custom-cart-page .product-remove a.remove {
        margin: 0 0 0 auto !important; /* هل دادن به سمت راست در سیستم‌های راست‌چین */
    }
    
    /* در صورتی که والد (td) چیدمان flex داشته باشد، این مورد تراز افقی را راست‌چین می‌کند */
    .custom-cart-page td.product-remove {
        text-align: right !important;
        display: flex !important;
        justify-content: flex-start !important;
        padding-right: 15px !important; /* ایجاد کمی فاصله از لبه راست باکس */
    }
}

/* ================================
   زیباتر کردن تعداد محصول
================================ */
/* Quantity wrapper */
.custom-cart-page .quantity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    border: 1px solid #dbe3ea;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    height: 42px;
}

/* Quantity input */
.custom-cart-page .quantity input.qty {
    width: 54px;
    height: 42px;
    min-height: 42px;
    border: none !important;
    border-radius: 0 !important;
    background: #ffffff;
    color: #0f172a;
    font-weight: 800;
    text-align: center;
    outline: none;
    box-shadow: none !important;
    padding: 0;
    margin: 0;
}

/* Hide number arrows in Chrome/Safari/Edge */
.custom-cart-page .quantity input.qty::-webkit-outer-spin-button,
.custom-cart-page .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Hide number arrows in Firefox */
.custom-cart-page .quantity input.qty[type="number"] {
    -moz-appearance: textfield;
}

/* Common plus/minus buttons */
.custom-cart-page .quantity .plus,
.custom-cart-page .quantity .minus,
.custom-cart-page .quantity button.plus,
.custom-cart-page .quantity button.minus,
.custom-cart-page .quantity .qty-plus,
.custom-cart-page .quantity .qty-minus,
.custom-cart-page .quantity .quantity-plus,
.custom-cart-page .quantity .quantity-minus {
    width: 38px;
    height: 42px;
    min-width: 38px;
    min-height: 42px;
    border: none !important;
    border-radius: 0 !important;
    background: #f8fafc;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    padding: 0;
    margin: 0;
    cursor: pointer;
    box-shadow: none !important;
    transition: 0.2s ease;
}

/* Hover */
.custom-cart-page .quantity .plus:hover,
.custom-cart-page .quantity .minus:hover,
.custom-cart-page .quantity button.plus:hover,
.custom-cart-page .quantity button.minus:hover,
.custom-cart-page .quantity .qty-plus:hover,
.custom-cart-page .quantity .qty-minus:hover,
.custom-cart-page .quantity .quantity-plus:hover,
.custom-cart-page .quantity .quantity-minus:hover {
    background: #e2e8f0;
    color: #2563eb;
}

/* Divider feel between buttons and input */
.custom-cart-page .quantity .minus,
.custom-cart-page .quantity button.minus,
.custom-cart-page .quantity .qty-minus,
.custom-cart-page .quantity .quantity-minus {
    border-left: 1px solid #edf0f3 !important;
}

.custom-cart-page .quantity .plus,
.custom-cart-page .quantity button.plus,
.custom-cart-page .quantity .qty-plus,
.custom-cart-page .quantity .quantity-plus {
    border-right: 1px solid #edf0f3 !important;
}

/* Focus state on whole quantity box */
.custom-cart-page .quantity:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

/* ================================
   زیباتر کردن کوپن و دکمه بروزرسانی سبد خرید
================================ */
/* ==========================================================
   بخش کوپن تخفیف (دقیقاً هم‌قد و هم‌تراز)
========================================================== */
.custom-cart-page .coupon {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-wrap: nowrap;
}

.custom-cart-page .coupon input.input-text,
.custom-cart-page .coupon button.button {
    height: 46px !important;
    min-height: 46px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    vertical-align: middle !important;
}

/* input کوپن */
.custom-cart-page .coupon input.input-text {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    border: 1px solid #dbe3ea;
    padding: 0 14px !important;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    line-height: 46px;
}

.custom-cart-page .coupon input.input-text:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

/* دکمه اعمال کوپن */
.custom-cart-page .coupon button.button {
    flex: 0 0 auto;
    border: 1px solid #dbe3ea;
    padding: 0 14px !important;
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
}

.custom-cart-page .coupon button.button:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* دکمه */
.custom-cart-page button[name="update_cart"] {
    height: 46px;
    border-radius: 14px;
    padding: 0 18px;
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
    border: none;
    transition: 0.2s ease;
}

.custom-cart-page button[name="update_cart"]:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.custom-cart-page button[name="update_cart"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* استایل موبایل */
@media (max-width: 768px) {
    .custom-cart-page .coupon {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .custom-cart-page .coupon input.input-text {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        width: auto !important;
        height: 46px !important;
        padding: 0 12px !important;
        margin: 0 !important;
    }

    .custom-cart-page .coupon button.button {
        flex: 0 0 auto !important;
        height: 46px !important;
        min-height: 46px !important;
        padding: 0 12px !important;
        margin: 0 !important;
        line-height: 1 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
        font-size: 12px !important;
    }
}

/* ================================
   زیباتر کردن خلاصه سفارش
================================ */
.custom-cart-page .cart-collaterals {
    margin-top: 28px;
}

.custom-cart-page .cart-collaterals .cart_totals {
    width: 100%;
    float: none;
    background: #ffffff;
    border: 1px solid #edf0f3;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.custom-cart-page .cart_totals h2 {
    text-align: center;
    margin: 0 0 18px;
    color: #0f172a;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.5;
}

.custom-cart-page .cart_totals table.shop_table {
    border: none;
}

.custom-cart-page .cart_totals table.shop_table th,
.custom-cart-page .cart_totals table.shop_table td {
    padding: 14px 0;
    border-top: 1px solid #edf0f3;
    background: transparent;
}

.custom-cart-page .cart_totals table.shop_table th {
    color: #64748b;
    font-weight: 700;
}

.custom-cart-page .cart_totals table.shop_table td {
    color: #0f172a;
    font-weight: 800;
    text-align: left;
}

.custom-cart-page .order-total th,
.custom-cart-page .order-total td {
    font-size: 18px;
    color: #0f172a !important;
}

/* ================================
   دکمه ادامه جهت تسویه حساب
================================ */
.custom-cart-page .wc-proceed-to-checkout {
    padding: 18px 0 0;
}

.custom-cart-page .wc-proceed-to-checkout a.checkout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    border-radius: 16px;
    background: #16a34a;
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
    transition: 0.2s ease;
    box-shadow: 0 12px 22px rgba(22, 163, 74, 0.22);
}

.custom-cart-page .wc-proceed-to-checkout a.checkout-button:hover {
    background: #15803d;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(22, 163, 74, 0.28);
}

/* ================================
   چیدمان دو ستونه با CSS
================================ */
@media (min-width: 992px) {
    .custom-cart-page .woocommerce {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 380px;
        gap: 28px;
        align-items: start;
    }

    .custom-cart-page .woocommerce-notices-wrapper {
        grid-column: 1 / -1;
    }

    .custom-cart-page .woocommerce-cart-form {
        grid-column: 1;
    }

    .custom-cart-page .cart-collaterals {
        grid-column: 2;
        margin-top: 0;
        position: sticky;
        top: 24px;
    }
}

/* ================================
   ریسپانسیو موبایل
================================ */
@media (max-width: 768px) {
    .custom-cart-page .woocommerce {
        padding: 20px 12px;
    }

    .custom-cart-page .woocommerce-cart-form,
    .custom-cart-page .cart-collaterals .cart_totals {
        border-radius: 16px;
        padding: 16px;
    }

    .custom-cart-page table.shop_table_responsive tr {
        margin-bottom: 14px;
        border: 1px solid #edf0f3;
        border-radius: 16px;
        overflow: hidden;
        background: #ffffff;
    }

    .custom-cart-page table.shop_table_responsive tr td {
        padding: 14px;
        border-top: 1px solid #edf0f3;
    }

    .custom-cart-page table.shop_table_responsive tr td::before {
        color: #64748b;
        font-weight: 700;
    }

    .custom-cart-page .product-thumbnail img {
        width: 68px;
        height: 68px;
    }

    .custom-cart-page .coupon {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .custom-cart-page .coupon input.input-text {
        width: 100% !important;
    }

    .custom-cart-page .coupon button.button,
    .custom-cart-page button[name="update_cart"] {
        width: 100%;
    }

    .custom-cart-page .actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .custom-cart-page .wc-proceed-to-checkout a.checkout-button {
        min-height: 52px;
        font-size: 16px;
    }
}

/* ================================
   کد مربوط به پیام اعتمادسازی زیر دکمه پرداخت
================================ */
.custom-cart-page .custom-cart-trust-box {
    margin-top: 16px;
    padding: 16px 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #edf0f3;
    text-align: center;
}

.custom-cart-page .custom-cart-trust-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.custom-cart-page .custom-cart-trust-item:last-child {
    margin-bottom: 0;
}

.custom-cart-page .custom-cart-trust-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 999px;
    background: #dcfce7;
    color: #16a34a;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

/* ================================
   کد مربوط به پیام ارسال رایگان
================================ */
.custom-cart-page .custom-free-shipping-box {
    margin-bottom: 16px;
    padding: 15px 16px;
    border-radius: 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    line-height: 1.8;
}

.custom-cart-page .custom-free-shipping-box.success {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #166534;
}

.custom-cart-page .custom-free-shipping-box {
    text-align: center;
    line-height: 1.8;
}

/* ================================
   به روز شدن سبد خرید
================================ */
.custom-cart-page .woocommerce-message,
.custom-cart-page .woocommerce-error,
.custom-cart-page .woocommerce-info {
    position: relative;
    padding: 16px 18px;
    margin-bottom: 0px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.8;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* remove default icon */
.custom-cart-page .woocommerce-message::before,
.custom-cart-page .woocommerce-error::before,
.custom-cart-page .woocommerce-info::before {
    display: none !important;
}

/* success */
.custom-cart-page .woocommerce-message {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #166534;
}

/* error */
.custom-cart-page .woocommerce-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* info */
.custom-cart-page .woocommerce-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e3a8a;
}

/* لینک داخل پیام */
.custom-cart-page .woocommerce-message a,
.custom-cart-page .woocommerce-error a,
.custom-cart-page .woocommerce-info a {
    color: inherit;
    font-weight: 800;
    text-decoration: underline;
}

/* فاصله از جدول سبد */
.custom-cart-page .woocommerce-notices-wrapper {
    margin-bottom: 20px;
}

/* ==========================================================
   استایل اختصاصی برای باکس سبد خرید خالی 
========================================================== */
/* هدف قرار دادنِ والدِ پیام و دکمه */
.woocommerce-cart .woocommerce:has(.return-to-shop) {
    background: #ffffff !important; 
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 20px 30px !important; 
    
    /* تغییرات اصلی برای کوچک شدن باکس به اندازه محتوا */
    width: fit-content !important; 
    max-width: 90% !important; /* در موبایل نزند بیرون */
    margin: 20px auto !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05) !important;
    
    display: flex !important;
    flex-direction: row !important; 
    align-items: center !important; 
    gap: 20px !important; 
    
    /* این باعث می‌شود باکس فقط به اندازه محتوا شود */
    margin-left: auto !important;
    margin-right: auto !important;
}

/* اصلاح پیام متنی در همان باکس */
.woocommerce-cart .woocommerce:has(.return-to-shop) p:first-child {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    color: #334155 !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    white-space: nowrap !important; /* متن در یک خط بماند */
    text-align: center !important;
    flex-shrink: 0 !important;
}

/* حذف آیکون‌های احتمالی */
.woocommerce-cart .woocommerce:has(.return-to-shop) .woocommerce-info::before {
    display: none !important;
}

/* اصلاح دکمه */
.woocommerce-cart .woocommerce:has(.return-to-shop) .return-to-shop {
    margin: 0 !important;
    flex-shrink: 0 !important;
}

/* استایل دکمه بازگشت به فروشگاه */
.woocommerce-cart .woocommerce:has(.return-to-shop) .return-to-shop .button {
    background-color: #f1f5f9 !important; 
    color: #475569 !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    display: block !important;
    transition: all 0.3s ease !important;
    border: 1px solid #e2e8f0 !important; 
    white-space: nowrap !important;
}

/* استایل هاور دکمه */
.woocommerce-cart .woocommerce:has(.return-to-shop) .return-to-shop .button:hover {
    background-color: #e2e8f0 !important; /* کمی تیره‌تر از حالت عادی */
    color: #1e293b !important; /* رنگ متن کمی پررنگ‌تر */
    border-color: #cbd5e1 !important;
    cursor: pointer !important;
    box-shadow: none !important; /* بدون سایه برای حفظ سادگی */
}

/* ================================
   بخش حمل و نقل سبد خرید ووکامرس
   RTL + Layout + Visual Fixes
================================ */

/* ردیف حمل‌ونقل */
.woocommerce-cart .cart_totals table.shop_table tr.shipping {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    padding-bottom: 18px !important;
    margin-bottom: 0 !important;
}

/* خطوط جداکننده */
.woocommerce-cart .cart_totals table.shop_table tr.cart-subtotal th,
.woocommerce-cart .cart_totals table.shop_table tr.cart-subtotal td,
.woocommerce-cart .cart_totals table.shop_table tr.order-total th,
.woocommerce-cart .cart_totals table.shop_table tr.order-total td {
    border-bottom: 1px solid #edf2f7 !important;
}

/* عنوان حمل و نقل */
.woocommerce-cart .cart_totals table.shop_table tr.shipping th {
    display: block !important;
    width: 100% !important;
    text-align: right !important;
    direction: rtl !important;
    border: none !important;
    padding: 16px 0 8px !important;
}

/* محتوای حمل و نقل */
.woocommerce-cart .cart_totals table.shop_table tr.shipping td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    text-align: right !important;
    direction: rtl !important;
    padding: 0 !important;
    border: none !important;
}

/* لیست روش‌های ارسال */
.woocommerce-cart .cart_totals table.shop_table tr.shipping ul#shipping_method {
    width: 100% !important;
    display: block !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    list-style: none !important;
    text-align: right !important;
}

.woocommerce-cart .cart_totals table.shop_table tr.shipping ul#shipping_method li {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: 100% !important;
    text-align: right !important;
    direction: rtl !important;
    margin-bottom: 6px !important;
    padding-right: 18px !important;
    box-sizing: border-box !important;
}

.woocommerce-cart .cart_totals table.shop_table tr.shipping ul#shipping_method li label {
    display: inline-block !important;
    margin: 0 !important;
    text-align: right !important;
    font-size: 14px !important;
    color: #0f172a !important;
}

/* مقصد حمل و نقل */
.woocommerce-cart .cart_totals table.shop_table tr.shipping .woocommerce-shipping-destination {
    text-align: right !important;
    direction: rtl !important;
    margin: 6px 0 10px !important;
    padding-right: 18px !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
    color: #334155 !important;
}

/* Wrapper */
.woocommerce-cart .cart_totals .woocommerce-shipping-calculator,
.woocommerce-cart .cart_totals .shipping-calculator {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    text-align: right !important;
    direction: rtl !important;
    clear: both !important;
}


/* ===== فرم تغییر آدرس ===== */

/* کانتینر اصلی دکمه و فرم جدید */
.custom-shipping-wrapper {
    margin: 20px 0; /* کمی فاصله از بالا و پایین */
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    direction: rtl;
    text-align: right;
}

/* دکمه باز و بسته کردن */
.custom-shipping-toggle-btn {
    display: flex; /* استفاده از flex برای تراز دقیق آیکون و متن */
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #1e293b !important; /* رنگ متن */
    font-weight: bold;
    text-decoration: none !important; /* حذف زیرخط لینک */
    font-size: 14px;
    transition: background 0.2s ease; /* انیمیشن نرم در هاور */
    cursor: pointer;
}

.custom-shipping-toggle-btn:hover {
    background: #f1f5f9; /* تغییر رنگ پس‌زمینه در هاور */
}

.custom-shipping-toggle-btn .dashicons {
    font-size: 16px; /* اندازه آیکون */
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
}

/* باکس فرم اختصاصی - با پدینگ صفر در شروع انیمیشن برای نرمی کامل */
.custom-shipping-calc-form {
    display: none; /* پیش‌فرض مخفی */
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-top: 10px;
    padding: 0 18px; /* پدینگ چپ و راست */
    box-sizing: border-box;
    overflow: hidden; /* برای مدیریت انیمیشن */
}

/* ردیف‌های داخل فرم */
.form-row-custom {
    margin-top: 15px;
    margin-bottom: 15px; /* فاصله پایین هر ردیف */
}

.form-row-custom label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

/* استایل فیلدهای انتخابی و متنی سفارشی */
.custom-select-field,
.custom-input-field {
    width: 100% !important;
    max-width: 100% !important;
    height: 44px !important;
    padding: 8px 12px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background-color: #fff !important;
    font-size: 14px !important;
    color: #334155 !important;
    box-sizing: border-box !important;
    outline: none !important; /* حذف اوت‌لاین پیش‌فرض */
    -webkit-appearance: none; /* حذف ظاهر پیش‌فرض مرورگر در سافاری موبایل */
    -moz-appearance: none;
    appearance: none;
}

/* استایل فلش دلخواه برای منوی کشویی استان در موبایل */
.custom-select-field {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: left 12px center !important; /* موقعیت فلش */
    background-size: 16px !important; /* اندازه فلش */
    padding-left: 35px !important; /* فضای بیشتر برای فلش */
}

/* دکمه ثبت نهایی */
.custom-shipping-submit-btn {
    width: 100% !important;
    height: 44px;
    background-color: #22c55e !important; /* رنگ سبز */
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: bold !important;
    cursor: pointer;
    margin-top: 15px;
    margin-bottom: 18px;
    transition: background 0.2s ease; /* انیمیشن نرم دکمه */
}

.custom-shipping-submit-btn:hover {
    background-color: #16a34a !important; /* رنگ سبز تیره‌تر در هاور */
}

/* کل سلول حمل و نقل */
.woocommerce .shop_table td[data-title="حمل و نقل"]{
    display:block;
    width:100% !important;
    box-sizing:border-box;
}

/* فرم اختصاصی */
.custom-shipping-wrapper{
    display:block;
    width:100%;
    margin-top:15px;
    box-sizing:border-box;
}

/* دکمه */
.custom-shipping-toggle-btn{
    display:flex;
    width:100%;
    justify-content:center;
    align-items:center;
    box-sizing:border-box;
}

/* فرم */
.custom-shipping-calc-form{
    display:none;
    width:100%;
    margin-top:10px;
    box-sizing:border-box;
}

/* همه فیلدها */
.custom-shipping-calc-form input,
.custom-shipping-calc-form select,
.custom-shipping-calc-form button{
    width:100% !important;
    max-width:none !important;
    box-sizing:border-box;
}

/* ------ ادیت ------ */
/* فاصله از بالا */
/*@media (min-width: 769px) {

    .custom-cart-page .entry-content {
        margin-top: -40px !important;
    }
}
@media (max-width: 768px) {

    .custom-cart-page .entry-content {
        margin-top: -30px !important;
    }
}*/

/* فاصله از راست برای متن ارسال رایگان فقط توی کامپیوتر */
@media (min-width: 769px) {
    .custom-cart-page .woocommerce-shipping-methods label {
        padding-right: 5px;
    }
}

/* استایل سلول‌های جدول (ایجاد پدینگ داخلی برای هر ردیف) */
@media (max-width: 768px) {
    
    /* استایل برای کل مجموع کل سبد خرید جز ردیف حمل و نقل */
    .custom-cart-page .cart_totals table.shop_table tr th,
    .custom-cart-page .cart_totals table.shop_table tr td {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* استایل برای کل ردیف حمل و نقل */
    .custom-cart-page tr.woocommerce-shipping-totals {
        padding-right: 15px;
        padding-left: 15px;
    }
    
    /* حذف متن حمل و نقل دومی از بالای ارسال رایگان */
    .custom-cart-page tr.woocommerce-shipping-totals td::before {
        display: none !important;
    }

}