.woocommerce {
    max-width: 1760px;
    margin: 0 auto;
    padding: 5px 20px !important;
}
a.checkout-button.button.alt.wc-forward {
    background: var(--Primary);
}


button.button[name=update_cart] {
    background: var(--Primary) !important;
    color: var(--White) !important;
    padding: 15px 30px !important;
    border-radius: 5px !important;
}
.qty{
    opacity: 0;
    position: absolute;
    z-index: -1;
}
div[id$=_Box]{
    width: auto;
    justify-content: space-between;
    z-index: 9999;
}
.woocommerce .blockUI.blockOverlay{
    opacity: 1 !important;
    background-color: #fffff189 !important;
}
.woocommerce .blockUI.blockOverlay::before {
    content: 'در حال بروز رسانی سبد خرید...';
    width: 140px !important;
    height: 50px !important;
    background: url(https://www.enetcable.com/wp-content/uploads/2023/08/logo-1.png) top center !important;
    animation: beat 1s linear infinite !important;
    font-size: 10px;
    padding-top: 60px;
    background-repeat: no-repeat !important;
}
div[id$=_Box] input{
    width: 90%;
}
button#empty_cart {
    background: var(--Red);
    color: var(--White);
    padding: 15px;
    position: absolute;
    left: 15%;
    bottom: 17px;
    border-radius: 4px;
}

form.woocommerce-cart-form {
    position: relative;
}








/* ===== CART PAGE - TWO COLUMN LAYOUT ===== */

/* صفحه سبد خرید */
.woocommerce-cart .woocommerce {
    /* max-width: 1200px; */
    margin: 0 auto;
    padding: 20px;
}

/* لایه‌اوت دو ستونه */
.woocommerce-cart .woocommerce-cart-form,
.woocommerce-cart .cart-collaterals {
    display: block;
}

/* ایجاد گرید دو ستونه برای کل محتوا */
.woocommerce-cart .woocommerce > * {
    width: 100%;
}

/* کانتینر اصلی دو ستونه */
.woocommerce-cart .woocommerce {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

/* ستون جدول سبد (سمت راست - بزرگ‌تر) */
.woocommerce-cart .woocommerce-cart-form {
    flex: 1 1 60%;
    min-width: 0;
    order: 2;
}

/* ستون جمع کل (سمت چپ - کوچک‌تر) */
.woocommerce-cart .cart-collaterals {
    flex: 0 0 30%;
    width: 30%;
    order: 2;
    position: relative;
    height: stretch;
}



  .cart_totals {
    position: sticky;
    top: 130px; /* ارتفاع هدر + منو — در صورت نیاز تنظیم کن */
  }

/* نوتیس‌ها کل عرض را بگیرند */
.woocommerce-cart .woocommerce-notices-wrapper,
.woocommerce-cart .woocommerce-error,
.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-info {
    flex: 0 0 100%;
    width: 100%;
    order: 0;
    box-sizing: border-box;
}

/* ===== جدول محصولات ===== */
.shop_table.cart {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    margin: 0 !important;
}

.shop_table.cart thead tr {
    background-color: #f5f5f5;
}

.shop_table.cart thead th {
    padding: 12px 15px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    border-bottom: 1px solid #e0e0e0;
}

.shop_table.cart tbody tr.cart_item {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.shop_table.cart tbody tr.cart_item:hover {
    background-color: #fafafa;
}

.shop_table.cart tbody td {
    padding: 8px;
    vertical-align: middle;
    text-align: center;
}

/* تصویر محصول */
.shop_table.cart .product-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
}

/* نام محصول */
.shop_table.cart .product-name a {
    color: #333;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.5;
}

.shop_table.cart .product-name a:hover {
    color: #0073aa;
}

/* قیمت */
.shop_table.cart .product-price,
.shop_table.cart .product-subtotal {
    font-size: 13px;
    color: #333;
    white-space: nowrap;
}
/* دکمه حذف — عملیات */
.shop_table.cart .product-cart-actions {
    width: 50px;
}

.shop_table.cart .custom-cart-remove-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #b0b0b0 !important;
    background-color: #f5f5f5;
    text-decoration: none;
    line-height: 1;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shop_table.cart .custom-cart-remove-icon svg {
    transition: transform 0.25s ease;
}

.shop_table.cart .custom-cart-remove-icon:hover {
    background-color: #fde8e8;
    color: #e53935 !important;
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.25);
    transform: translateY(-2px);
}

.shop_table.cart .custom-cart-remove-icon:hover svg {
    transform: scale(1.1) rotate(-6deg);
}

.shop_table.cart .custom-cart-remove-icon:active {
    transform: translateY(0) scale(0.95);
    box-shadow: none;
}

/* ===== کنترل تعداد - فرم سفارشی ===== */
#Quentity_42093_Box,
#Quentity_11138_Box,
#Quentity_50663_Box,
#Quentity_21244_Box,
div[id^="Quentity_"][id$="_Box"] {
    display: flex;
    align-items: center;
    gap: 0;
    direction: ltr;
    border: 1px solid #ddd;
    border-radius: 6px;
    /* overflow: hidden; */
    width: fit-content;
    background: transparent;
    padding: 0;
    margin: 0 auto;
}

div[id^="Quentity_"][id$="_Box"] button {
    width: 32px;
    height: 32px;
    background-color: #f5f5f5;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #555;
    transition: background-color 0.2s;
    padding: 0;
    line-height: 1;
}

div[id^="Quentity_"][id$="_Box"] button:hover {
    background-color: #e0e0e0;
}

div[id^="Quentity_"][id$="_Box"] input[type="text"] {
    width: 45px;
    height: 32px;
    text-align: center;
    border: none;
    border-right: 1px solid #ddd;
    border-left: 1px solid #ddd;
    font-size: 14px;
    color: #333;
    padding: 0;
    -moz-appearance: textfield;
}

div[id^="Quentity_"][id$="_Box"] input[type="text"]:focus {
    outline: none;
    background-color: #f9f9f9;
}

/* مخفی کردن input اصلی WooCommerce */
.shop_table.cart .product-quantity .quantity {
    display: none;
}

/* ===== دکمه‌های پایین جدول ===== */
.shop_table.cart .actions {
    padding: 15px;
    background-color: #fafafa;
    border-top: 1px solid #e0e0e0;
}

.shop_table.cart .actions .button {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid #ddd;
    background-color: #f0f0f0;
    color: #333;
    transition: all 0.2s;
}

.shop_table.cart .actions .button:hover:not(:disabled) {
    background-color: #e0e0e0;
}

.shop_table.cart .actions .button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* دکمه خالی کردن سبد */
#empty_cart {
    margin-top: 10px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    background-color: #ff4444;
    color: #fff;
    border: none;
    transition: background-color 0.2s;
}

#empty_cart:hover {
    background-color: #cc0000;
}

/* ===== باکس جمع کل (ستون چپ) ===== */
.cart_totals {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    width: 100% !important;
    box-sizing: border-box;
}

.cart_totals h2 {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin: 0 0 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #333;
    border-right: none;
    text-align: center;
}

.cart_totals .shop_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.cart_totals .shop_table tr th,
.cart_totals .shop_table tr td {
    padding: 10px 5px;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.cart_totals .shop_table tr th {
    text-align: right;
    color: #666;
    font-weight: 400;
}

.cart_totals .shop_table tr td {
    text-align: left;
    color: #333;
}

.cart_totals .shop_table tr.order-total th,
.cart_totals .shop_table tr.order-total td {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    border-bottom: none;
    padding-top: 15px;
}

.cart_totals .shop_table tr.order-total td span {
    color: #222;
}

/* دکمه ادامه ثبت سفارش */
.wc-proceed-to-checkout .checkout-button {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background-color: #333;
    color: #fff !important;
    text-align: center;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
    margin-top: 10px;
    box-sizing: border-box;
}

.wc-proceed-to-checkout .checkout-button:hover {
    background-color: #555;
}

/* ===== پیام خطا (حداقل سفارش) ===== */
.woocommerce-error {
    background-color: #fff3f3;
    border: 1px solid #ffcccc;
    border-right: 4px solid #ff4444;
    border-radius: 6px;
    padding: 12px 16px;
    list-style: none;
    margin-bottom: 20px;
    color: #cc0000;
    font-size: 13px;
}

/* ===== ریسپانسیو ===== */
@media (max-width: 768px) {
    .woocommerce-cart .woocommerce {
        flex-direction: column;
    }

    .woocommerce-cart .woocommerce-cart-form,
    .woocommerce-cart .cart-collaterals {
        flex: 0 0 100%;
        width: 100%;
        order: unset;
    }

    .woocommerce-cart .cart-collaterals {
        position: static;
        order: 2;
    }

    .woocommerce-cart .woocommerce-cart-form {
        order: 1;
    }

    .shop_table.cart thead {
        display: none;
    }

    .shop_table.cart tr.cart_item {
        display: flex;
        flex-wrap: wrap;
        padding: 10px;
        border-bottom: 1px solid #eee;
    }

    .shop_table.cart td {
        border: none;
        padding: 5px;
    }

    .shop_table.cart .product-thumbnail {
        width: 70px;
    }

    .shop_table.cart .product-name {
        flex: 1;
    }
}

.woocommerce-cart .cart_totals table.shop_table.shop_table_responsive {
    border: none;
}



/* ===================================
   CART MOBILE
   زیر ۷۶۸px
=================================== */

@media (max-width: 768px) {

  /* ── ریست لایه‌اوت ── */
  .woocommerce-cart .woocommerce {
    display: block !important;
    padding: 10px 12px;
  }

  .woocommerce-cart .woocommerce-cart-form,
  .woocommerce-cart .cart-collaterals {
    display: block !important;
    width: 100% !important;
    flex: unset !important;
    position: static !important;
  }

  /* ── پیام خطا ── */
  .woocommerce-error {
    display: block;
    font-size: 12px;
    padding: 10px 12px;
    margin-bottom: 14px;
    border-radius: 8px;
    list-style: none;
    border-right: 3px solid #e53935;
    background: #fff5f5;
    color: #c62828;
    line-height: 1.6;
  }

  /* ── جدول: حذف display:table ── */
  .shop_table.cart,
  .shop_table.cart tbody {
    display: block !important;
    width: 100% !important;
    border: none !important;
    background: transparent !important;
  }

  .shop_table.cart thead {
    display: none !important;
  }

  /* ══════════════════════════════
     هر ردیف = کارت با flex column
  ══════════════════════════════ */
  .shop_table.cart tr.cart_item {
    display: flex !important;
    flex-direction: column !important;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
  }

  /* همه td ها: block و border-bottom به عنوان جداکننده */
  .shop_table.cart tr.cart_item td {
    display: flex !important;
    align-items: center;
    padding: 10px 14px !important;
    border: none !important;
    border-bottom: 1px solid #f3f3f3 !important;
    box-sizing: border-box;
    width: 100%;
  }

  .shop_table.cart tr.cart_item td:last-child {
    border-bottom: none !important;
  }

 

  /* ── ردیف ۱: تصویر ── */
  .shop_table.cart td.product-thumbnail {
    justify-content: center;
    padding: 12px 14px !important;
    background: #fafafa;
  }

  .shop_table.cart td.product-thumbnail a {
    display: block;
  }

  .shop_table.cart td.product-thumbnail img {
    width: 90px !important;
    height: 90px !important;
    object-fit: cover !important;
    border-radius: 8px;
    border: 1px solid #eee;
    display: block !important;
  }

  /* ── ردیف ۲: نام ── */
  .shop_table.cart td.product-name {
    padding: 10px 14px !important;
  }

  .shop_table.cart td.product-name a {
    font-size: 12px;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    line-height: 1.5;
    text-align: right;
  }

  /* ── ردیف ۳: قیمت واحد ── */
  .shop_table.cart td.product-price {
    background: #fafafa;
  }

  .shop_table.cart td.product-price::before {
    content: "قیمت واحد:";
    font-size: 12px;
    color: #999;
    margin-left: 6px;
    white-space: nowrap;
  }

  .shop_table.cart td.product-price .woocommerce-Price-amount {
    font-size: 14px;
    color: #444;
  }

  /* ── ردیف ۴: تعداد ── */
  .shop_table.cart td.product-quantity {
    justify-content: space-between;
  }

  .shop_table.cart td.product-quantity::before {
    content: "تعداد:";
    font-size: 12px;
    color: #999;
  }

  .shop_table.cart td.product-quantity .quantity {
    display: none !important;
  }

  div[id$="_Box"] {
    display: inline-flex !important;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 20px;
    overflow: hidden;
    direction: ltr;
    margin-left: 0 !important;
  }

  div[id$="_Box"] button {
    width: 32px;
    height: 32px;
    background: #f5f5f5;
    border: none;
    font-size: 18px;
    font-weight: 700;
    color: #444;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  div[id$="_Box"] button:active {
    background: #e8e8e8;
  }

  div[id$="_Box"] input[type="text"] {
    width: 40px;
    height: 32px;
    text-align: center;
    border: none;
    border-right: 1px solid #ddd;
    border-left: 1px solid #ddd;
    font-size: 14px;
    font-weight: 700;
    color: #222;
    padding: 0;
    background: #fff;
  }

  /* ── ردیف ۵: جمع جزء ── */
  .shop_table.cart td.product-subtotal {
    background: #f8f8f8;
    justify-content: space-between;
  }

  .shop_table.cart td.product-subtotal::before {
    content: "جمع:";
    font-size: 12px;
    color: #999;
  }

  .shop_table.cart td.product-subtotal .woocommerce-Price-amount {
    font-size: 15px;
    font-weight: 700;
    color: #111;
  }
.shop_table.cart td.product-row-number { order: 1; }
.shop_table.cart td.product-thumbnail { order: 2; }
.shop_table.cart td.product-name      { order: 3; }
.shop_table.cart td.product-price     { order: 4; }
.shop_table.cart td.product-quantity  { order: 5; }
.shop_table.cart td.product-subtotal  { order: 6; }
.shop_table.cart td.product-cart-actions { order: 7; }

.shop_table.cart td.product-row-number {
    display: none !important; /* توی کارت موبایل معمولاً نیازی به شماره ردیف نیست */
}

.shop_table.cart td.product-cart-actions {
    justify-content: center;
    padding: 10px 14px !important;
}

.shop_table.cart td.product-cart-actions .custom-cart-remove-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #fdf2f2;
    color: #e53935 !important;
    text-decoration: none;
    transition: all 0.2s ease;
}

.shop_table.cart td.product-cart-actions .custom-cart-remove-icon:active {
    background-color: #e53935;
    color: #fff !important;
    transform: scale(0.92);
}
 
  /* ── ردیف actions ── */
  .shop_table.cart tr.actions,
  .shop_table.cart tr:last-child {
    display: block !important;
  }

  .shop_table.cart .actions td {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0 !important;
    border: none !important;
    width: 100%;
  }

  #empty_cart {
    width: 100%;
    padding: 11px;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    color: #e53935;
    border: 1px solid #e53935;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    margin-top: 4px;
  }

  /* ══════════════════════════════
     باکس مجموع کل
  ══════════════════════════════ */
  .cart-collaterals {
    margin-top: 16px;
  }

  .cart_totals {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
  }

  .cart_totals h2 {
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    margin: 0;
    padding: 14px;
    color: #111;
    border-bottom: 1px solid #ebebeb;
  }

  .cart_totals .shop_table,
  .cart_totals .shop_table tbody {
    display: block !important;
    width: 100%;
    border: none;
    background: transparent;
  }

  .cart_totals .shop_table tr {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f3f3 !important;
    box-sizing: border-box;
  }

  .cart_totals .shop_table tr.order-total {
    border-bottom: none !important;
    background: #fafafa;
  }

  .cart_totals .shop_table th {
    font-size: 13px;
    font-weight: 400;
    color: #888;
  }

  .cart_totals .shop_table td {
    font-size: 14px;
    font-weight: 600;
    color: #222;
  }

  .cart_totals .shop_table tr.order-total th,
  .cart_totals .shop_table tr.order-total td {
    font-size: 16px;
    font-weight: 700;
    color: #111;
  }

  .wc-proceed-to-checkout {
    padding: 14px;
  }

  .wc-proceed-to-checkout .checkout-button {
    display: block !important;
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;
    background-color: #222 !important;
    color: #fff !important;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .wc-proceed-to-checkout .checkout-button:active {
    background-color: #555 !important;
  }
  .woocommerce table.shop_table_responsive tr td::before, .woocommerce-page table.shop_table_responsive tr td::before{
    contet:'' !important;
  }
  td.product-price {
    justify-content:space-between;
  }
   div[id^="Quentity_"][id$="_Box"]{
     overflow:visible !important;
   }
  td.product-name:before{
    content: '' !important;
  }
  button#empty_cart{
    position:relative;
    left: unset;
    bottom: unset;
    width: 90%;
    margin: 0 5%;
  }
} /* end @media */

td.product-thumbnail{
    position:relative;
}


td.product-thumbnail a {
    position: relative;
    display: inline-block;
}

