/* ============================================
   استایل سبد خرید اختصاصی ووکامرس
   پالت: سرمه‌ای #142338 / طلایی‌شنی #C2A27C
   استفاده با فایل cart.php (قالب سفارشی)
   ============================================ */

.custom-cart-wrap,
.custom-cart-wrap *{
  box-sizing: border-box;
}

/* ریست کانتینر بیرونی قالب Ahura که ممکنه باعث جابه‌جایی به چپ بشه */
body.woocommerce-cart .site-container,
body.woocommerce-cart .ahura-post-single,
body.woocommerce-cart .ahura-page-single,
body.woocommerce-cart .content-area,
body.woocommerce-cart main{
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  float: none !important;
}

.custom-cart-wrap{
  --ink: #142338;
  --ink-soft: #5B6B80;
  --accent: #C2A27C;
  --accent-dark: #A6825B;
  --accent-soft: #F1E9DC;
  --line: #E4E0D6;
  --bg: #F6F3EE;
  --danger: #B23A3A;

  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 20px 60px;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  color: var(--ink);
  direction: rtl;
  overflow-x: hidden;
}

.custom-cart-wrap .page-head{
  display:flex;
  flex-wrap: wrap;
  align-items:baseline;
  justify-content:space-between;
  gap: 8px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.custom-cart-wrap .page-head h1{
  font-size: 22px;
  font-weight: 700;
}
.custom-cart-wrap .page-head .count{
  color: var(--ink-soft);
  font-size: 14px;
}

.custom-cart-layout{
  display:grid;
  width: 100%;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items:start;
}
@media (max-width: 760px){
  .custom-cart-layout{ grid-template-columns: 1fr; }
  .custom-cart-layout .summary{ order: -1; }
}
@media (max-width: 480px){
  .custom-cart-wrap{ padding: 24px 14px 40px; }
}

.custom-cart-wrap .panel{
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}

/* --- item rows --- */
.custom-cart-wrap .cart-item{
  display:flex;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.custom-cart-wrap .cart-item:first-child{ border-top:none; padding-top:4px; }

.custom-cart-wrap .thumb{
  width: 92px;
  height: 92px;
  border-radius: 10px;
  background: var(--accent-soft);
  overflow:hidden;
  flex-shrink:0;
}
.custom-cart-wrap .thumb img{
  width:100%; height:100%; object-fit:cover; display:block;
}

.custom-cart-wrap .item-body{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
}
.custom-cart-wrap .item-title a{
  color: var(--ink);
  font-weight:600;
  font-size:14.5px;
  text-decoration:none;
}
.custom-cart-wrap .item-title a:hover{ color: var(--accent-dark); }

.custom-cart-wrap .item-meta{
  font-size:12.5px;
  color: var(--ink-soft);
}

.custom-cart-wrap .item-bottom{
  margin-top:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

/* quantity + remove */
.custom-cart-wrap .qty-control{
  display:flex;
  align-items:center;
  gap:8px;
}
.custom-cart-wrap .remove-btn{
  color: var(--danger);
  text-decoration:none;
  font-size:15px;
  width:30px; height:30px;
  display:flex; align-items:center; justify-content:center;
  border:1px solid var(--line);
  border-radius:8px;
}
.custom-cart-wrap .remove-btn:hover{ background: var(--danger); color:#fff; border-color:var(--danger); }

.custom-cart-wrap .quantity{ display:flex; }
.custom-cart-wrap .quantity .qty{
  width: 52px;
  height: 34px;
  border:1px solid var(--line);
  border-radius: 8px;
  text-align:center;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
}

.custom-cart-wrap .item-price{
  font-weight:700;
  font-size:14.5px;
  color: var(--ink);
}
.custom-cart-wrap .item-price ins{
  text-decoration:none;
}
.custom-cart-wrap .item-price del{
  color: var(--ink-soft);
  font-size:12px;
  font-weight:400;
  margin-left:6px;
}

/* update cart button */
.custom-cart-wrap .cart-actions{
  margin-top: 16px;
  text-align:left;
}
.custom-cart-wrap .update-cart-btn{
  background: var(--accent-soft);
  color: var(--ink);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 10px 22px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor:pointer;
  transition: background .15s ease;
}
.custom-cart-wrap .update-cart-btn:hover{ background: var(--accent); }

/* empty state */
.custom-cart-wrap .empty-state{
  text-align:center;
  padding: 60px 20px;
  color: var(--ink-soft);
}

/* --- summary / cart-totals (default WooCommerce template) --- */
.custom-cart-wrap .summary .cart_totals{
  padding: 0;
}
.custom-cart-wrap .summary h2{
  font-size:16px;
  font-weight:700;
  margin-bottom:16px;
}
.custom-cart-wrap .summary table.shop_table{
  width:100%;
  border:none;
  border-collapse:collapse;
}
.custom-cart-wrap .summary table.shop_table th,
.custom-cart-wrap .summary table.shop_table td{
  border-top:1px dashed var(--line);
  padding:12px 4px;
  font-size:13.5px;
  color: var(--ink-soft);
  text-align:right;
}
.custom-cart-wrap .summary table.shop_table tr:first-child th,
.custom-cart-wrap .summary table.shop_table tr:first-child td{
  border-top:none;
}
.custom-cart-wrap .summary table.shop_table tr.order-total th,
.custom-cart-wrap .summary table.shop_table tr.order-total td{
  color: var(--ink);
  font-weight:700;
  font-size:15px;
  border-top:1px solid var(--line);
}

.custom-cart-wrap .summary table.shop_table tr.cart-savings th,
.custom-cart-wrap .summary table.shop_table tr.cart-savings td{
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight:700;
  border-top:none;
  border-radius: 8px;
}
.custom-cart-wrap .summary table.shop_table tr.cart-savings th{
  border-radius: 8px 0 0 8px;
}
.custom-cart-wrap .summary table.shop_table tr.cart-savings td{
  border-radius: 0 8px 8px 0;
}

.custom-cart-wrap .summary .wc-proceed-to-checkout{
  margin-top:14px;
}
.custom-cart-wrap .summary .wc-proceed-to-checkout .checkout-button{
  display:block;
  width:100%;
  text-align:center;
  background: var(--accent) !important;
  color: var(--ink) !important;
  border-radius: 10px !important;
  font-weight:700 !important;
  padding:14px !important;
  text-decoration:none !important;
  transition: background .15s ease, color .15s ease;
}
.custom-cart-wrap .summary .wc-proceed-to-checkout .checkout-button:hover{
  background: var(--accent-dark) !important;
  color:#fff !important;
}

/* coupon form (shown automatically by WooCommerce inside cart-totals area via hook) */
.custom-cart-wrap .coupon{
  display:flex;
  gap:8px;
  margin: 4px 0 16px;
}
.custom-cart-wrap .coupon .input-text{
  flex:1;
  border:1px solid var(--line);
  border-radius:8px;
  padding:10px 12px;
  font-family:inherit;
  font-size:13px;
}
.custom-cart-wrap .coupon button{
  background: var(--ink);
  color:#fff;
  border:none;
  border-radius:8px;
  padding: 0 16px;
  font-family:inherit;
  font-weight:600;
  cursor:pointer;
}