/* ═══ cart.css — جداشده از main.css (خطوط 1390-3017 نسخهٔ v1.1.267) بدون هیچ تغییری در محتوا/ترتیب.
   سبد خرید (هر سه نسل: v1، hg-cart، hcart)
   ترتیب لود (زنجیرهٔ dependency در functions.php) = ترتیب قبلی داخل main.css. ═══ */
/* ════════════════════════════════════════
   WooCommerce CART — استایل کامل
════════════════════════════════════════ */

/* ── عنوان صفحه ── */
.woocommerce-cart .wc-page-content h1,
.woocommerce-cart .wc-page-content h2 {
  font-size: 22px; font-weight: 700; color: var(--black, #0d0d0d);
  margin-bottom: 24px;
}

/* ── جدول سبد ── */
.woocommerce-cart-form { width: 100%; }

.shop_table.cart {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  border: 0.5px solid #ededed;
}

.shop_table.cart thead th {
  font-size: 11px; font-weight: 700; color: #888;
  text-align: right; padding: 12px 16px;
  border-bottom: 0.5px solid #ededed;
  text-transform: uppercase; letter-spacing: .04em;
}

.shop_table.cart tbody tr {
  border-bottom: 0.5px solid #f5f5f5;
  transition: background .15s;
}
.shop_table.cart tbody tr:last-child { border-bottom: 0; }
.shop_table.cart tbody tr:hover { background: #fafafa; }

.shop_table.cart td {
  padding: 14px 16px;
  vertical-align: middle;
}

/* تصویر محصول */
.shop_table.cart .product-thumbnail {
  width: 72px;
}
.shop_table.cart .product-thumbnail img {
  width: 60px; height: 60px;
  object-fit: cover; border-radius: 10px;
  border: 0.5px solid #ededed;
}

/* نام محصول */
.shop_table.cart .product-name {
  font-size: 14px; font-weight: 600; color: #0d0d0d;
}
.shop_table.cart .product-name a {
  color: inherit; text-decoration: none;
  transition: color .15s;
}
.shop_table.cart .product-name a:hover { color: #14783d; }
.shop_table.cart .product-name .variation {
  font-size: 11px; color: #888; font-weight: 400; margin-top: 3px;
}
.shop_table.cart .product-name .variation dt,
.shop_table.cart .product-name .variation dd {
  display: inline; margin: 0;
}
.shop_table.cart .product-name .variation dt::after { content: ': '; }
.shop_table.cart .product-name .variation dd::after { content: ' · '; }
.shop_table.cart .product-name .variation dd:last-child::after { content: ''; }

/* قیمت */
.shop_table.cart .product-price,
.shop_table.cart .product-subtotal {
  font-size: 14px; font-weight: 700; color: #14783d;
  text-align: center;
}
.shop_table.cart .product-price .woocommerce-Price-amount,
.shop_table.cart .product-subtotal .woocommerce-Price-amount { color: #14783d; }

/* تعداد */
.shop_table.cart .product-quantity { text-align: center; }
.shop_table.cart .product-quantity .qty {
  width: 64px; height: 36px;
  border: 0.5px solid #e0e0e0; border-radius: 8px;
  text-align: center; font-size: 14px; font-weight: 600;
  font-family: inherit;
  background: #fff; color: #0d0d0d;
  padding: 0 8px;
}
.shop_table.cart .product-quantity .qty:focus {
  outline: 2px solid #14783d; border-color: transparent;
}

/* دکمه حذف */
.shop_table.cart .product-remove { text-align: center; }
.shop_table.cart .product-remove a.remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 7px; background: #fff5f5;
  color: #c0392b !important; font-size: 16px; font-weight: 700;
  text-decoration: none; border: 0.5px solid #fdd;
  transition: background .15s;
}
.shop_table.cart .product-remove a.remove:hover { background: #ffe0e0; }

/* ── actions row ── */
.shop_table.cart .actions {
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.shop_table.cart .actions .coupon {
  display: flex; align-items: center; gap: 8px;
}
.shop_table.cart .actions .coupon input[type="text"] {
  height: 40px; padding: 0 14px;
  border: 0.5px solid #e0e0e0; border-radius: 10px;
  font-size: 13px; font-family: inherit;
  width: 200px; color: #0d0d0d;
}
.shop_table.cart .actions .coupon input[type="text"]:focus { outline: 2px solid #14783d; border-color: transparent; }
.shop_table.cart .actions .button,
.woocommerce .button {
  height: 40px; padding: 0 18px;
  border-radius: 10px; border: none;
  font-size: 13px; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: background .15s;
  background: #0d0d0d; color: #fff;
}
.shop_table.cart .actions .button:hover,
.woocommerce .button:hover { background: #242424; }

/* دکمه بروزرسانی */
.shop_table.cart .actions [name="update_cart"] {
  background: #f5f5f5; color: #555;
}
.shop_table.cart .actions [name="update_cart"]:hover { background: #eee; }
.shop_table.cart .actions [name="update_cart"]:disabled { opacity: .45; cursor: not-allowed; }

/* ── Cart totals ── */
.cart-collaterals {
  margin-top: 28px;
  display: flex;
  justify-content: flex-start; /* RTL: سمت راست */
}
.cart_totals {
  width: 100%;
  max-width: 380px;
  background: #fff; border-radius: 16px;
  border: 0.5px solid #ededed;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  overflow: hidden;
}
.cart_totals h2 {
  font-size: 14px !important; font-weight: 700 !important;
  padding: 14px 18px; border-bottom: 0.5px solid #f0f0f0;
  margin-bottom: 0 !important; color: #0d0d0d !important;
}
.cart_totals table {
  width: 100%; border-collapse: collapse;
}
.cart_totals table th,
.cart_totals table td {
  padding: 12px 18px; font-size: 13px;
  border-bottom: 0.5px solid #f5f5f5;
  text-align: right;
}
.cart_totals table th { color: #666; font-weight: 600; }
.cart_totals table td { color: #0d0d0d; font-weight: 700; }
.cart_totals table .order-total th,
.cart_totals table .order-total td {
  border-bottom: 0;
  font-size: 15px;
}
.cart_totals table .order-total td { color: #14783d; font-size: 16px; }
.cart_totals .woocommerce-Price-amount { color: inherit; }

/* دکمه رفتن به تسویه */
.cart_totals .wc-proceed-to-checkout {
  padding: 14px 18px;
}
.cart_totals .wc-proceed-to-checkout .checkout-button {
  display: block; width: 100%; height: 50px;
  background: #0d0d0d; color: #fff;
  border-radius: 14px; border: none;
  font-size: 14px; font-weight: 700; font-family: inherit;
  cursor: pointer; text-align: center; text-decoration: none;
  line-height: 50px;
  transition: background .15s, transform .1s;
  box-shadow: 0 8px 22px rgba(0,0,0,.14);
}
.cart_totals .wc-proceed-to-checkout .checkout-button:hover {
  background: #242424; transform: translateY(-1px);
}

/* ── پیام خالی بودن سبد ── */
.woocommerce-cart .cart-empty {
  text-align: center; padding: 60px 20px;
  font-size: 15px; color: #888;
}
.woocommerce-cart .return-to-shop {
  text-align: center; margin-top: 16px;
}
.woocommerce-cart .return-to-shop .button {
  display: inline-block; padding: 0 24px; height: 44px; line-height: 44px;
  background: #0d0d0d; color: #fff; border-radius: 12px;
  text-decoration: none; font-weight: 700; font-size: 13px;
  transition: background .15s;
}
.woocommerce-cart .return-to-shop .button:hover { background: #242424; }

/* ── WC notices ── */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error {
  border-radius: 10px; padding: 12px 16px;
  font-size: 13px; margin-bottom: 16px; list-style: none;
  display: flex; align-items: center; gap: 8px;
}
.woocommerce-notices-wrapper .woocommerce-message {
  background: #f0faf4; border: 0.5px solid rgba(20,120,61,.2); color: #14783d;
}
.woocommerce-notices-wrapper .woocommerce-error {
  background: #fff0ee; border: 0.5px solid rgba(192,57,43,.2); color: #c0392b;
}
.woocommerce-notices-wrapper .woocommerce-message a.button {
  margin-right: auto; height: 32px; line-height: 32px; padding: 0 14px;
  background: #14783d; color: #fff; border-radius: 8px;
  text-decoration: none; font-size: 12px; font-weight: 700;
}

/* ── موبایل ── */
@media (max-width: 768px) {
  .shop_table.cart thead { display: none; }
  .shop_table.cart, .shop_table.cart tbody,
  .shop_table.cart tr, .shop_table.cart td {
    display: block; width: 100%;
  }
  .shop_table.cart tr {
    padding: 12px 0; position: relative;
    border-bottom: 0.5px solid #f0f0f0;
  }
  .shop_table.cart .product-remove {
    position: absolute; top: 14px; left: 12px; text-align: right;
  }
  .shop_table.cart .product-thumbnail {
    display: inline-block; width: auto; vertical-align: middle;
  }
  .shop_table.cart .product-name {
    display: inline-block; vertical-align: middle;
    padding-right: 10px; width: calc(100% - 90px);
  }
  .shop_table.cart .product-price::before { content: 'قیمت: '; font-size: 11px; color: #888; }
  .shop_table.cart .product-subtotal::before { content: 'جمع: '; font-size: 11px; color: #888; }
  .shop_table.cart .product-price, .shop_table.cart .product-subtotal {
    text-align: right; padding: 4px 16px;
  }
  .shop_table.cart .product-quantity { text-align: right; padding: 6px 16px; }
  .shop_table.cart .actions { flex-direction: column; align-items: stretch; }
  .shop_table.cart .actions .coupon { flex-direction: column; }
  .shop_table.cart .actions .coupon input[type="text"] { width: 100%; }
  .cart_totals { max-width: 100%; }
}

/* ════════════════════════════════════════
   HASTIGEM CART — رنگ‌بندی سایت
════════════════════════════════════════ */

/* ── vars ── */
:root {
  --hg-green: #14783d;
  --hg-green-2: #0f6832;
  --hg-green-soft: #eefaf4;
  --hg-red: #c0392b;
  --hg-red-soft: #fff1f0;
  --hg-line: rgba(13,13,13,.08);
  --hg-line-2: rgba(13,13,13,.13);
  --hg-soft: #f8faf9;
  --hg-muted: #7b8794;
  --hg-shadow: 0 18px 50px rgba(13,13,13,.055);
  --hg-shadow-soft: 0 8px 26px rgba(13,13,13,.045);
}

/* ── wrap ── */
.hg-cart-wrap {
  padding: 32px clamp(1rem,4vw,2rem) 80px;
  max-width: 1180px;
  margin: 0 auto;
}

/* ── عنوان ── */
.hg-cart-title-row {
  margin-bottom: 24px;
}
.hg-cart-title {
  font-size: 30px; font-weight: 800;
  color: #0d0d0d; letter-spacing: -.7px; line-height: 1.2;
}
.hg-cart-subtitle {
  margin-top: 6px; font-size: 14px; color: var(--hg-muted);
}

/* ── layout ── */
.hg-cart-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 360px;
  gap: 18px;
  align-items: start;
}
.hg-cart-list { display: flex; flex-direction: column; gap: 12px; }

/* ── cart item ── */
.hg-cart-item {
  background: #fff;
  border: 1px solid var(--hg-line);
  border-radius: 24px;
  padding: 14px;
  display: grid;
  grid-template-columns: 96px minmax(0,1fr) auto;
  gap: 14px;
  align-items: center;
  box-shadow: var(--hg-shadow-soft);
  transition: box-shadow .2s;
}
.hg-cart-item:hover { box-shadow: 0 12px 34px rgba(13,13,13,.08); }

/* تصویر */
.hg-item-img {
  width: 96px; height: 96px; border-radius: 20px;
  overflow: hidden;
  background: radial-gradient(circle at 70% 25%,rgba(20,120,61,.15),transparent 30%),
              linear-gradient(135deg,#fff,#f2faf6);
  border: 1px solid rgba(20,120,61,.1);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.hg-item-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.hg-item-img a { display: block; width: 100%; height: 100%; }
.hg-item-img a img { width: 100%; height: 100%; object-fit: cover; }
/* placeholder SVG وقتی عکس نیست */
.hg-item-img > svg {
  width: 36px; height: 36px; stroke: rgba(20,120,61,.35); stroke-width: 1.2; fill: none;
}

/* اطلاعات */
.hg-item-main { min-width: 0; }
.hg-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hg-item-title {
  font-size: 17px; font-weight: 800; color: #0d0d0d; letter-spacing: -.3px;
}
.hg-item-title a { color: inherit; text-decoration: none; }
.hg-item-title a:hover { color: var(--hg-green); }
.hg-item-sub { color: var(--hg-muted); font-size: 12px; margin-top: 4px; }

/* chips */
.hg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hg-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 999px;
  background: var(--hg-soft); border: 1px solid var(--hg-line);
  color: #53606d; font-size: 11px; font-weight: 700;
}
.hg-chip svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2; fill: none; }
.hg-chip-green {
  background: var(--hg-green-soft);
  border-color: rgba(20,120,61,.12);
  color: var(--hg-green-2);
}

/* meta pills — variations */
.hg-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.hg-meta-pill {
  border: 1px solid var(--hg-line); background: #fff;
  color: #384553; border-radius: 12px;
  padding: 6px 10px; font-size: 11px; font-weight: 700;
}
.hg-meta-pill span { color: var(--hg-muted); font-weight: 600; margin-left: 3px; }

/* item-side */
.hg-item-side {
  min-width: 148px; display: flex;
  flex-direction: column; align-items: flex-end; gap: 10px;
}

/* حذف */
.hg-remove {
  width: 34px; height: 34px; border: none; border-radius: 12px;
  display: grid; place-items: center;
  color: var(--hg-red); background: var(--hg-red-soft);
  cursor: pointer; text-decoration: none;
  transition: background .15s, transform .15s;
}
.hg-remove:hover { background: #ffe4e2; transform: scale(1.06); }
.hg-remove svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }

/* قیمت */
.hg-item-price {
  font-size: 15px; font-weight: 800; color: #0d0d0d; white-space: nowrap;
  text-align: left;
}
.hg-item-price .woocommerce-Price-amount { color: #0d0d0d; }

/* تعداد — WC quantity input */
.hg-qty .quantity {
  display: grid; grid-template-columns: 34px 44px 34px;
  height: 38px; overflow: hidden;
  border: 1px solid var(--hg-line); border-radius: 14px; background: #fff;
}
.hg-qty .qty {
  border: 0; border-inline: 1px solid var(--hg-line);
  text-align: center; font-weight: 700; font-size: 14px; font-family: inherit;
  width: 100%; color: #0d0d0d; background: #fff; outline: 0;
  -moz-appearance: textfield;
}
.hg-qty .qty::-webkit-outer-spin-button,
.hg-qty .qty::-webkit-inner-spin-button { -webkit-appearance: none; }
.hg-qty-single {
  font-size: 14px; font-weight: 700; color: #0d0d0d;
}
/* WC default quantity buttons — hide اگه تم خودش داره */
.hg-qty .qty-plus, .hg-qty .qty-minus {
  border: 0; background: #f8f8f8; font-size: 16px; font-weight: 700;
  cursor: pointer; color: #555; font-family: inherit;
  transition: background .12s;
}
.hg-qty .qty-plus:hover, .hg-qty .qty-minus:hover { background: #f0f0f0; }

/* ── actions row ── */
.hg-cart-actions {
  margin-top: 14px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.hg-coupon { display: flex; align-items: center; gap: 8px; }
.hg-coupon-input {
  height: 42px; padding: 0 14px;
  border: 1px solid var(--hg-line); border-radius: 14px;
  font-size: 13px; font-family: inherit; color: #0d0d0d;
  background: #fff; width: 200px; outline: 0;
}
.hg-coupon-input:focus { border-color: rgba(20,120,61,.4); }
.hg-coupon-btn {
  height: 42px; padding: 0 16px; border-radius: 14px;
  border: 1px solid rgba(20,120,61,.25);
  background: var(--hg-green-soft); color: var(--hg-green-2);
  font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer;
  transition: background .15s;
}
.hg-coupon-btn:hover { background: #ddf5ea; }
.hg-update-btn {
  height: 42px; padding: 0 16px; border-radius: 14px;
  border: 1px solid var(--hg-line); background: #f5f5f5;
  color: #555; font-size: 13px; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: background .15s;
}
.hg-update-btn:hover { background: #ebebeb; }
.hg-update-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── summary sidebar ── */
.hg-summary {
  position: sticky; top: calc(var(--header-h,64px) + 16px);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 26px;
  box-shadow: var(--hg-shadow);
  padding: 18px;
}
.hg-summary-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.hg-summary-head h2 {
  font-size: 17px; font-weight: 800; letter-spacing: -.4px; color: #0d0d0d;
}
.hg-summary-icon {
  width: 38px; height: 38px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--hg-green-soft); color: var(--hg-green);
}
.hg-summary-icon svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 2; fill: none; }

/* totals */
.hg-totals-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 11px 0;
  border-top: 1px solid var(--hg-line);
  font-size: 13px; color: var(--hg-muted);
}
.hg-totals-row strong { color: #0d0d0d; font-size: 14px; }
.hg-discount { color: var(--hg-green) !important; font-weight: 800; }

.hg-total-box {
  margin-top: 12px; padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg,#f0faf5,#fff);
  border: 1px solid rgba(20,120,61,.1);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.hg-total-box span { color: var(--hg-muted); font-size: 13px; font-weight: 700; }
.hg-total-box strong {
  color: var(--hg-green-2); font-size: 20px; font-weight: 900;
  letter-spacing: -.5px; white-space: nowrap;
}
.hg-total-box .woocommerce-Price-amount { color: inherit; }

/* دکمه checkout */
.hg-proceed { margin-top: 14px; }
.hg-checkout-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 52px; border-radius: 18px;
  background: linear-gradient(135deg,#111,#0d0d0d);
  color: #fff; font-size: 14px; font-weight: 800; font-family: inherit;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(13,13,13,.18);
  transition: background .15s, transform .1s, box-shadow .15s;
}
.hg-checkout-btn:hover {
  background: #242424; transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(13,13,13,.2);
}
.hg-checkout-btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; }

.hg-trust {
  margin-top: 12px; display: flex; align-items: center; justify-content: center;
  gap: 6px; color: var(--hg-green-2); font-size: 12px; font-weight: 700;
}
.hg-trust svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }

/* ── WooCommerce cart-totals default override ── */
.hg-summary .cart_totals { background: none; border: none; box-shadow: none; border-radius: 0; }
.hg-summary .cart_totals h2 { display: none; }
.hg-summary .cart_totals table { width: 100%; border-collapse: collapse; }
.hg-summary .cart_totals table tr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 0; border-top: 1px solid var(--hg-line);
  font-size: 13px;
}
.hg-summary .cart_totals table th { color: var(--hg-muted); font-weight: 600; }
.hg-summary .cart_totals table td { color: #0d0d0d; font-weight: 700; text-align: left; }
.hg-summary .cart_totals table .order-total th,
.hg-summary .cart_totals table .order-total td { font-size: 15px; }
.hg-summary .cart_totals table .order-total td { color: var(--hg-green-2); font-size: 18px; }
.hg-summary .cart_totals .wc-proceed-to-checkout { padding: 14px 0 0; }
.hg-summary .cart_totals .checkout-button {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 52px; border-radius: 18px;
  background: #0d0d0d; color: #fff;
  font-size: 14px; font-weight: 800; font-family: inherit;
  text-decoration: none; border: none; cursor: pointer;
  box-shadow: 0 14px 28px rgba(13,13,13,.18);
  transition: background .15s, transform .1s;
}
.hg-summary .cart_totals .checkout-button:hover {
  background: #242424; transform: translateY(-1px);
}

/* ── WC notices ── */
.woocommerce-notices-wrapper ul {
  list-style: none; padding: 0; margin: 0 0 16px;
}
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info {
  background: var(--hg-green-soft); border: 1px solid rgba(20,120,61,.2);
  color: var(--hg-green-2); border-radius: 12px;
  padding: 12px 16px; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
}
.woocommerce-notices-wrapper .woocommerce-error {
  background: var(--hg-red-soft); border: 1px solid rgba(192,57,43,.2);
  color: var(--hg-red); border-radius: 12px;
  padding: 12px 16px; font-size: 13px; font-weight: 600;
}
.woocommerce-notices-wrapper .woocommerce-message .button {
  margin-right: auto; height: 32px; padding: 0 14px;
  background: var(--hg-green); color: #fff; border-radius: 8px;
  text-decoration: none; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center;
}

/* ── سبد خالی ── */
.woocommerce-cart .cart-empty {
  text-align: center; padding: 64px 20px;
  font-size: 16px; color: var(--hg-muted); font-weight: 600;
}
.woocommerce-cart .return-to-shop { text-align: center; margin-top: 18px; }
.woocommerce-cart .return-to-shop a {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 24px; border-radius: 14px;
  background: #0d0d0d; color: #fff; font-weight: 700; font-size: 13px;
  text-decoration: none; transition: background .15s;
}
.woocommerce-cart .return-to-shop a:hover { background: #242424; }

/* ── موبایل ── */
@media (max-width: 860px) {
  .hg-cart-layout { display: block; }
  .hg-cart-title { font-size: 22px; }
  .hg-summary { position: static; margin-top: 14px; border-radius: 22px; }
  .hg-cart-item {
    grid-template-columns: 78px minmax(0,1fr);
    gap: 10px; padding: 12px; border-radius: 20px;
  }
  .hg-item-img { width: 78px; height: 78px; border-radius: 16px; }
  .hg-item-side {
    grid-column: 1 / -1; flex-direction: row; align-items: center;
    justify-content: space-between; min-width: 0;
    border-top: 1px solid var(--hg-line); padding-top: 10px;
  }
  .hg-item-title { font-size: 15px; }
  .hg-cart-actions { flex-direction: column; align-items: stretch; }
  .hg-coupon { flex-direction: column; }
  .hg-coupon-input { width: 100%; }
  .hg-coupon-btn, .hg-update-btn { width: 100%; }
}

/* ── سبد خالی ── */
.hg-cart-empty-wrap {
  display: flex; align-items: center; justify-content: center;
  min-height: 50vh; padding: 40px 20px;
}
.hg-cart-empty {
  text-align: center; max-width: 320px;
}
.hg-cart-empty svg {
  width: 72px; height: 72px;
  stroke: #d0d8e0; margin: 0 auto 20px;
  display: block;
}
.hg-cart-empty h2 {
  font-size: 20px; font-weight: 800; color: #0d0d0d;
  margin-bottom: 8px;
}
.hg-cart-empty p {
  font-size: 14px; color: var(--hg-muted, #7b8794);
  margin-bottom: 24px;
}
.hg-back-shop {
  display: inline-flex; align-items: center; height: 46px; padding: 0 24px;
  border-radius: 14px; background: #0d0d0d; color: #fff;
  font-weight: 700; font-size: 13px; text-decoration: none;
  transition: background .15s, transform .1s;
}
.hg-back-shop:hover { background: #242424; transform: translateY(-1px); }


/* Minimal cart safeguards — without overriding the shared site header. */
.mobile-nav svg,
.mnav-item svg {
    display: block;
    max-width: none;
}

/* سبد خرید: فقط فضای کلی و موارد خطرناک، نه بازطراحی React Cart Block */
body.woocommerce-cart {
    background: var(--hg-u-page, #f6f6f2) !important;
    color: #17181b;
}
body.woocommerce-cart .site-main,
body.woocommerce-cart .hastigem-cart-page,
body.woocommerce-cart .wc-page-wrap,
body.woocommerce-cart .wc-page-container,
body.woocommerce-cart .wc-page-content {
    background: transparent;
    background-color: transparent;
    background-image: none;
}
.woocommerce-cart .wp-block-woocommerce-cart {
    max-width: 1120px;
    width: 100%;
    margin-inline: auto;
    padding: 28px clamp(1rem,4vw,2rem) 96px;
    font-family: 'Vazirmatn', system-ui, sans-serif;
}
.woocommerce-cart .wc-block-components-product-metadata__description {
    display: none !important;
}
.woocommerce-cart .wc-block-components-product-name {
    color: var(--black);
    font-weight: 800;
    text-decoration: none;
}
.woocommerce-cart .wc-block-components-button,
.woocommerce-cart .wc-block-cart__submit-button {
    border-radius: 16px !important;
}

@media (max-width: 781px) {
    .woocommerce-cart .wp-block-woocommerce-cart {
        padding: 16px 12px calc(var(--mobile-nav) + 42px);
    }
    .woocommerce-cart .wc-block-cart-item__image img {
        border-radius: 14px;
    }
}


/* ═══════════════════════════════════════
   HASTIGEM CUSTOM CART PAGE — v19
   قالب واقعی سبد خرید، مستقل از Woo Cart Block
═══════════════════════════════════════ */
.hastigem-cart-page{
    min-height: calc(100vh - var(--header-h));
}
.hcart-container{
    max-width: 1180px;
    margin: 0 auto;
    padding: 36px clamp(1rem,4vw,2rem) 96px;
}
.hcart-title-row{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    margin-bottom:22px;
}
.hcart-title-row h1{
    font-size:34px;
    line-height:1.25;
    letter-spacing:-.9px;
    font-weight:900;
    color:var(--black);
}
.hcart-title-row p{
    margin-top:8px;
    color:var(--gray-600);
    font-size:14px;
}
.hcart-layout{
    display:grid;
    grid-template-columns:minmax(0,1fr) 360px;
    gap:18px;
    align-items:start;
}
.hcart-items{
    display:flex;
    flex-direction:column;
    gap:12px;
    min-width:0;
}
.hcart-item{
    background:#fff;
    border:1px solid rgba(0,0,0,.075);
    border-radius:24px;
    padding:14px;
    display:grid;
    grid-template-columns:96px minmax(0,1fr);
    gap:14px;
    align-items:center;
    box-shadow:0 8px 26px rgba(0,0,0,.045);
}
.hcart-thumb{
    width:96px;
    height:96px;
    border-radius:22px;
    background:
        radial-gradient(circle at 70% 25%, rgba(20,120,61,.13), transparent 34%),
        linear-gradient(135deg,#fff,#f7fbf8);
    border:1px solid rgba(20,120,61,.11);
    display:grid;
    place-items:center;
    overflow:hidden;
}
.hcart-thumb a,
.hcart-thumb img{
    width:100%;
    height:100%;
    display:block;
}
.hcart-thumb img{
    object-fit:cover;
    border-radius:20px;
}
.hcart-info{
    min-width:0;
}
.hcart-name-row{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
}
.hcart-name{
    display:inline-block;
    color:var(--black);
    font-size:17px;
    font-weight:900;
    line-height:1.55;
    text-decoration:none;
    letter-spacing:-.35px;
}
.hcart-name:hover{color:#14783d;}
.hcart-unit-price{
    margin-top:2px;
    color:#14783d;
    font-size:12px;
    font-weight:800;
}
.hcart-unit-price del{
    color:#aaa;
    font-size:11px;
    margin-left:5px;
}
.hcart-unit-price ins{
    text-decoration:none;
    color:#14783d;
}
.hcart-remove{
    width:34px;
    height:34px;
    border-radius:13px;
    display:grid;
    place-items:center;
    color:#d14343;
    background:#fff4f4;
    border:1px solid #ffe0e0;
    flex-shrink:0;
}
.hcart-remove svg{
    width:17px;
    height:17px;
    stroke:currentColor;
    stroke-width:2;
    fill:none;
    stroke-linecap:round;
    stroke-linejoin:round;
}
.hcart-chips{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-top:10px;
}
.hcart-chip{
    display:inline-flex;
    align-items:center;
    padding:5px 9px;
    border-radius:999px;
    background:#f8f8f8;
    border:1px solid rgba(0,0,0,.06);
    color:#53606d;
    font-size:11px;
    font-weight:800;
}
.hcart-chip-green{
    background:#eefaf4;
    border-color:rgba(20,120,61,.10);
    color:#14783d;
}
.hcart-meta{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-top:10px;
    color:#384553;
    font-size:11px;
    font-weight:700;
}
.hcart-meta dl,
.hcart-meta dt,
.hcart-meta dd,
.hcart-meta p{
    display:inline;
    margin:0;
}
.hcart-meta dt{
    color:var(--gray-400);
    margin-left:3px;
}
.hcart-meta dd{
    margin-left:8px;
}
.hcart-meta .variation{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
}
.hcart-meta .variation > *{
    background:#fff;
    border:1px solid rgba(0,0,0,.075);
    border-radius:999px;
    padding:4px 8px;
}
.hcart-bottom{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:12px;
    margin-top:12px;
}
.hcart-line-total{
    color:var(--black);
    font-size:15px;
    font-weight:900;
    white-space:nowrap;
}
.hcart-line-total .amount{
    font-weight:900;
}
.hcart-qty-control{
    width:118px;
    height:38px;
    display:grid;
    grid-template-columns:36px 46px 36px;
    align-items:center;
    overflow:hidden;
    border:1px solid rgba(0,0,0,.10);
    border-radius:15px;
    background:#fff;
    box-shadow:0 4px 14px rgba(0,0,0,.035);
}
.hcart-qty-btn{
    width:36px;
    height:38px;
    border:0;
    background:#fafafa;
    color:var(--black);
    display:grid;
    place-items:center;
    font-size:17px;
    font-weight:900;
    line-height:1;
    transition:background .15s ease,color .15s ease,opacity .15s ease;
}
.hcart-qty-btn:hover{
    background:#eefaf4;
    color:#14783d;
}
.hcart-qty-btn:disabled{
    opacity:.42;
    cursor:not-allowed;
    background:#fafafa;
    color:#999;
}
.hcart-qty-input{
    width:46px;
    height:38px;
    border:0;
    border-inline:1px solid rgba(0,0,0,.075);
    background:#fff;
    color:var(--black);
    text-align:center;
    outline:none;
    font-size:14px;
    font-weight:900;
    -moz-appearance:textfield;
}
.hcart-qty-input::-webkit-outer-spin-button,
.hcart-qty-input::-webkit-inner-spin-button{
    -webkit-appearance:none;
    margin:0;
}
.hcart-qty-input:focus{
    background:#fbfffd;
}
.hcart-actions-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-top:4px;
}
.hcart-back-shop,
.hcart-update{
    height:42px;
    border-radius:15px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 14px;
    font-size:13px;
    font-weight:900;
    text-decoration:none;
}
.hcart-back-shop{
    background:#fff;
    border:1px solid rgba(0,0,0,.08);
    color:var(--gray-800);
}
.hcart-update{
    border:1px solid rgba(20,120,61,.16);
    background:#eefaf4;
    color:#14783d;
}

/* Summary */
.hcart-summary{
    position:sticky;
    top:calc(var(--header-h) + 18px);
    background:rgba(255,255,255,.88);
    backdrop-filter:blur(20px);
    -webkit-backdrop-filter:blur(20px);
    border:1px solid rgba(255,255,255,.92);
    border-radius:26px;
    box-shadow:0 18px 50px rgba(0,0,0,.055);
    padding:18px;
}
.hcart-summary-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:14px;
}
.hcart-summary-head h2{
    font-size:18px;
    font-weight:900;
    letter-spacing:-.4px;
}
.hcart-summary-head span{
    min-height:26px;
    padding:4px 10px;
    border-radius:999px;
    background:#f8f8f8;
    color:var(--gray-600);
    font-size:11px;
    font-weight:800;
}
.hcart-coupon{
    display:grid;
    grid-template-columns:1fr auto;
    gap:8px;
    margin:10px 0 14px;
}
.hcart-coupon input{
    height:44px;
    border:1px solid rgba(0,0,0,.075);
    border-radius:15px;
    padding:0 12px;
    background:#fff;
    color:var(--black);
    outline:none;
}
.hcart-coupon input:focus{
    border-color:rgba(20,120,61,.32);
}
.hcart-coupon button{
    height:44px;
    border:1px solid rgba(20,120,61,.18);
    background:#eefaf4;
    color:#14783d;
    border-radius:15px;
    padding:0 14px;
    font-weight:900;
}
.hcart-summary-line{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:12px 0;
    border-top:1px solid rgba(0,0,0,.07);
    color:var(--gray-600);
    font-size:13px;
}
.hcart-summary-line strong{
    color:var(--black);
    font-size:14px;
    font-weight:900;
}
.hcart-discount strong,
.hcart-discount strong a{
    color:#14783d;
}
.hcart-total-box{
    margin-top:10px;
    padding:14px;
    border-radius:20px;
    background:linear-gradient(135deg,#f0faf5,#fff);
    border:1px solid rgba(20,120,61,.10);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}
.hcart-total-box span{
    color:var(--gray-600);
    font-size:13px;
    font-weight:800;
}
.hcart-total-box strong{
    color:#0f6832;
    font-size:20px;
    font-weight:900;
    white-space:nowrap;
}
.hcart-total-box small{
    display:none;
}
.hcart-checkout{
    width:100%;
    height:54px;
    border-radius:18px;
    margin-top:14px;
    background:linear-gradient(135deg,#111,#050505);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    text-decoration:none;
    font-size:14px;
    font-weight:900;
    box-shadow:0 16px 30px rgba(0,0,0,.16);
}
.hcart-checkout svg{
    width:19px;
    height:19px;
    stroke:#fff;
    stroke-width:2;
    fill:none;
    stroke-linecap:round;
    stroke-linejoin:round;
}
.hcart-trust{
    margin-top:12px;
    text-align:center;
    color:#14783d;
    font-size:12px;
    font-weight:800;
}
.hcart-empty{
    max-width:520px;
    margin:28px auto 0;
    text-align:center;
    background:#fff;
    border:1px solid rgba(0,0,0,.075);
    border-radius:28px;
    padding:34px 20px;
    box-shadow:0 16px 42px rgba(0,0,0,.055);
}
.hcart-empty-icon{
    width:64px;
    height:64px;
    border-radius:22px;
    background:#eefaf4;
    color:#14783d;
    display:grid;
    place-items:center;
    margin:0 auto 14px;
}
.hcart-empty-icon svg{
    width:30px;
    height:30px;
    stroke:currentColor;
    stroke-width:2;
    fill:none;
    stroke-linecap:round;
    stroke-linejoin:round;
}
.hcart-empty h2{
    font-size:20px;
    font-weight:900;
    margin-bottom:8px;
}
.hcart-empty p{
    color:var(--gray-600);
    font-size:13px;
    line-height:1.8;
}
.hcart-empty a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:44px;
    margin-top:18px;
    padding:0 18px;
    border-radius:16px;
    background:var(--black);
    color:#fff;
    font-size:13px;
    font-weight:900;
    text-decoration:none;
}

@media(max-width:860px){
    .hcart-container{
        padding:22px 12px calc(var(--mobile-nav) + 42px);
    }
    .hcart-title-row{
        margin-bottom:16px;
    }
    .hcart-title-row h1{
        font-size:24px;
    }
    .hcart-title-row p{
        font-size:12px;
        margin-top:5px;
    }
    .hcart-layout{
        display:block;
    }
    .hcart-items{
        gap:10px;
    }
    .hcart-item{
        grid-template-columns:74px minmax(0,1fr);
        gap:10px;
        padding:10px;
        border-radius:20px;
        align-items:start;
    }
    .hcart-thumb{
        width:74px;
        height:74px;
        border-radius:18px;
    }
    .hcart-thumb img{
        border-radius:17px;
    }
    .hcart-name-row{
        gap:8px;
    }
    .hcart-name{
        font-size:14px;
        line-height:1.5;
    }
    .hcart-unit-price{
        font-size:11px;
    }
    .hcart-remove{
        width:31px;
        height:31px;
        border-radius:12px;
    }
    .hcart-chips{
        gap:5px;
        margin-top:8px;
    }
    .hcart-chip{
        font-size:10px;
        padding:4px 7px;
    }
    .hcart-meta{
        gap:5px;
        margin-top:8px;
        font-size:10px;
    }
    .hcart-meta .variation > *{
        padding:3px 7px;
    }
    .hcart-bottom{
        grid-column:1/-1;
        margin-top:8px;
        padding-top:0;
        border-top:0;
        justify-content:flex-end;
    }
    .hcart-line-total{
        font-size:14px;
    }
    .hcart-qty-control{
        width:108px;
        height:36px;
        grid-template-columns:33px 42px 33px;
        border-radius:14px;
    }
    .hcart-qty-btn{
        width:33px;
        height:36px;
        font-size:16px;
    }
    .hcart-qty-input{
        width:42px;
        height:36px;
        font-size:13px;
    }
    .hcart-actions-row{
        margin-top:2px;
    }
    .hcart-back-shop,
    .hcart-update{
        height:40px;
        border-radius:14px;
        font-size:12px;
        padding:0 12px;
    }
    .hcart-summary{
        position:static;
        margin-top:12px;
        border-radius:22px;
        padding:14px;
    }
    .hcart-summary-head h2{
        font-size:16px;
    }
    .hcart-total-box{
        border-radius:18px;
        padding:13px;
    }
    .hcart-total-box strong{
        font-size:18px;
    }
    .hcart-checkout{
        height:52px;
        border-radius:17px;
    }
}
@media(max-width:390px){
    .hcart-item{
        grid-template-columns:66px minmax(0,1fr);
    }
    .hcart-thumb{
        width:66px;
        height:66px;
    }
    .hcart-title-row h1{
        font-size:22px;
    }
    .hcart-bottom{
        flex-wrap:wrap;
    }
}

.hcart-update.hcart-update-needed{
    background:#14783d;
    border-color:#14783d;
    color:#fff;
    box-shadow:0 10px 22px rgba(20,120,61,.14);
}

/* v21 — quantity under product price + hidden manual update */
.hcart-qty-under-price{
    margin-top:10px;
}
.hcart-qty-under-price .hcart-qty{
    display:inline-flex;
}
.hcart-layout.is-updating{
    opacity:.72;
    pointer-events:none;
}
.hcart-line-total{
    align-self:center;
}

.hcart-actions-row{display:none!important;}

/* v22 — polished cart update notice */
.hastigem-cart-page .woocommerce-message,
.hastigem-cart-page .woocommerce-info,
.hastigem-cart-page .woocommerce-error{
    max-width:100%;
    margin:0 0 16px !important;
    padding:12px 14px !important;
    border-radius:18px !important;
    border:1px solid rgba(20,120,61,.12) !important;
    background:linear-gradient(135deg,#eefaf4,#fff) !important;
    color:#14783d !important;
    box-shadow:0 10px 28px rgba(20,120,61,.07) !important;
    font-size:13px !important;
    font-weight:900 !important;
    line-height:1.8 !important;
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
}
.hastigem-cart-page .woocommerce-message::before,
.hastigem-cart-page .woocommerce-info::before{
    content:"✓";
    width:24px;
    height:24px;
    border-radius:999px;
    background:#14783d;
    color:#fff;
    display:inline-grid;
    place-items:center;
    font-size:13px;
    font-weight:900;
    flex:0 0 24px;
}
.hastigem-cart-page .woocommerce-error{
    border-color:rgba(209,67,67,.16)!important;
    background:linear-gradient(135deg,#fff4f4,#fff)!important;
    color:#d14343!important;
}
.hastigem-cart-page .woocommerce-error::before{
    content:"!";
    width:24px;
    height:24px;
    border-radius:999px;
    background:#d14343;
    color:#fff;
    display:inline-grid;
    place-items:center;
    font-size:13px;
    font-weight:900;
    flex:0 0 24px;
}
.hastigem-cart-page .woocommerce-message.hcart-notice-fade{
    opacity:0;
    transform:translateY(-6px);
    transition:opacity .25s ease, transform .25s ease;
}

/* v22 — quantity sits directly under the unit price amount */
.hcart-unit-price{
    display:inline-flex;
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
}
.hcart-unit-price .amount{
    display:inline-flex;
    align-items:center;
    line-height:1.5;
}
.hcart-qty-under-price{
    margin-top:0;
    display:block;
}

/* v23 — quantity under row total price like the original preview */
.hcart-bottom{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:flex-start;
    gap:10px;
    margin-top:12px;
}
.hcart-qty-under-total{
    display:block;
}
.hcart-qty-under-total .hcart-qty{
    display:inline-flex;
}
.hcart-unit-price{
    display:block;
}
.hcart-unit-price .amount{
    display:inline-flex;
    align-items:center;
    line-height:1.5;
}

@media(max-width:860px){
    .hcart-bottom{
        grid-column:1/-1;
        align-items:flex-start;
        margin-top:10px;
        padding-top:10px;
        border-top:1px solid rgba(0,0,0,.065);
    }
}

/* v24 — final cart item structure: image / info / side like the original preview */
.hcart-item{
    grid-template-columns:96px minmax(0,1fr) 154px !important;
    align-items:center !important;
}
.hcart-info{
    min-width:0 !important;
}
.hcart-side{
    min-width:154px;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:center;
    gap:12px;
}
.hcart-side .hcart-remove{
    margin-bottom:2px;
}
.hcart-side .hcart-line-total{
    margin-top:34px;
    font-size:16px;
    font-weight:900;
    color:var(--black);
    white-space:nowrap;
}
.hcart-side .hcart-qty-under-total{
    display:block;
}
.hcart-side .hcart-qty{
    display:inline-flex;
}
.hcart-name-row,
.hcart-bottom{
    display:contents;
}

/* Notice: no emoji/check icon, no overlap */
.hastigem-cart-page .woocommerce-message,
.hastigem-cart-page .woocommerce-info{
    position:relative !important;
    display:block !important;
    padding:11px 14px !important;
    margin:0 0 16px !important;
    border:1px solid rgba(20,120,61,.12) !important;
    border-radius:16px !important;
    background:#eefaf4 !important;
    color:#14783d !important;
    font-size:13px !important;
    font-weight:800 !important;
    line-height:1.8 !important;
    box-shadow:0 8px 24px rgba(20,120,61,.055) !important;
}
.hastigem-cart-page .woocommerce-message::before,
.hastigem-cart-page .woocommerce-info::before,
.hastigem-cart-page .woocommerce-error::before{
    content:none !important;
    display:none !important;
}

@media(max-width:860px){
    .hcart-item{
        grid-template-columns:74px minmax(0,1fr) !important;
        align-items:start !important;
    }
    .hcart-side{
        grid-column:1/-1;
        min-width:0;
        width:100%;
        flex-direction:row;
        align-items:center;
        justify-content:space-between;
        gap:10px;
        padding-top:10px;
        margin-top:2px;
        border-top:1px solid rgba(0,0,0,.065);
    }
    .hcart-side .hcart-remove{
        order:3;
        margin:0;
    }
    .hcart-side .hcart-line-total{
        order:1;
        margin:0;
        font-size:14px;
    }
    .hcart-side .hcart-qty-under-total{
        order:2;
    }
}
@media(max-width:390px){
    .hcart-item{
        grid-template-columns:66px minmax(0,1fr) !important;
    }
    .hcart-side{
        flex-wrap:wrap;
    }
}

/* v25 — align trash, row total and quantity to the left edge of product card */
.hcart-side{
    align-items:flex-end !important;
    justify-content:center !important;
    text-align:left !important;
    direction:rtl !important;
}
.hcart-side .hcart-remove,
.hcart-side .hcart-line-total,
.hcart-side .hcart-qty-under-total{
    align-self:flex-end !important;
}
.hcart-side .hcart-line-total{
    margin-top:0 !important;
    text-align:left !important;
    min-width:118px !important;
}
.hcart-side .hcart-qty-control{
    margin-left:0 !important;
    margin-right:0 !important;
}
.hcart-side .hcart-remove{
    margin-left:0 !important;
    margin-right:0 !important;
}
@media(max-width:860px){
    .hcart-side{
        align-items:center !important;
        text-align:initial !important;
    }
    .hcart-side .hcart-remove,
    .hcart-side .hcart-line-total,
    .hcart-side .hcart-qty-under-total{
        align-self:auto !important;
    }
}
