/* Möble Hani — v4.5.14 «checkout polish»
   A calm, orderly checkout in the brand's warm stone / walnut / gold language.
   Loaded last, scoped to the checkout page, works in both colour themes via the
   theme's CSS variables plus two local ones defined below. No markup changes:
   everything below reshapes WooCommerce's own checkout markup. */

:root { --mh-field: #fffcf7; --mh-tint: #f7ecd8; --mh-ring: rgba(142, 96, 35, .16); }
html[data-theme="dark"] { --mh-field: #221e17; --mh-tint: #2a2318; --mh-ring: rgba(214, 171, 83, .2); }

/* 1) let the checkout breathe: escape the narrow white article card */
body.woocommerce-checkout .entry-content,
body.woocommerce-checkout main .entry-content {
  max-width: 1200px;
  margin: 26px auto 60px;
  padding: 0 20px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
body.woocommerce-checkout .entry-title {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 0 26px;
  padding-bottom: 14px;
  font-size: 24px;
  font-weight: 800;
  text-align: center;
}
body.woocommerce-checkout .entry-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
}

/* 2) two clean columns: form right, summary left (RTL), heading glued to summary */
.woocommerce form.checkout {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 20px;
  align-items: start;
}
.woocommerce-checkout #customer_details { grid-column: 1; grid-row: 1 / span 2; }
.woocommerce-checkout #order_review_heading { grid-column: 2; grid-row: 1; margin: 0 0 10px; }
.woocommerce-checkout #order_review { grid-column: 2; grid-row: 2; }

.woocommerce-checkout #customer_details,
.woocommerce-checkout #order_review {
  float: none;
  width: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
}
@media (min-width: 1024px) {
  .woocommerce-checkout #order_review { position: sticky; top: 96px; }
}

/* 3) section titles with the brand's gold bar */
.woocommerce-checkout .woocommerce-billing-fields > h3,
.woocommerce-checkout #order_review_heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}
.woocommerce-checkout .woocommerce-billing-fields > h3:before,
.woocommerce-checkout #order_review_heading:before {
  content: '';
  width: 5px;
  height: 22px;
  border-radius: 5px;
  background: var(--gold);
}

/* 4) fields: airy grid, soft inputs, gold focus ring */
.woocommerce-checkout #customer_details .col2set > .col-1,
.woocommerce-checkout #customer_details .col2set { display: block; width: auto; float: none; }
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
.woocommerce-checkout .form-row { display: flex; flex-direction: column; gap: 6px; margin: 0 0 13px; }
.woocommerce-checkout .form-row.form-row-wide { grid-column: 1 / -1; }
.woocommerce-checkout .form-row label {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
}
.woocommerce-checkout .form-row label .required,
.woocommerce-checkout .form-row label abbr { color: var(--gold); border: 0; text-decoration: none; }
.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row textarea,
.woocommerce-checkout .form-row select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--mh-field);
  color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.woocommerce-checkout .form-row input.input-text:focus,
.woocommerce-checkout .form-row textarea:focus,
.woocommerce-checkout .form-row select:focus {
  outline: 0;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--mh-ring);
}
.woocommerce-checkout .form-row ::placeholder { color: var(--muted); opacity: .8; }

/* 5) order review table: dashed separators, emphasised total */
.woocommerce-checkout table.shop_table {
  width: 100%;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
}
.woocommerce-checkout table.shop_table th {
  padding: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}
.woocommerce-checkout table.shop_table td {
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  background: transparent;
  font-size: 13px;
}
.woocommerce-checkout table.shop_table td.product-name { font-weight: 700; }
.woocommerce-checkout table.shop_table td.product-name .product-quantity,
.woocommerce-checkout table.shop_table td.product-name strong { color: var(--muted); font-weight: 600; font-size: 12px; }
.woocommerce-checkout table.shop_table tfoot th {
  padding: 11px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  text-align: right;
}
.woocommerce-checkout table.shop_table tfoot td { border-bottom: 1px dashed var(--line); }
.woocommerce-checkout table.shop_table tfoot tr.order-total th,
.woocommerce-checkout table.shop_table tfoot tr.order-total td { border-bottom: 0; padding-top: 13px; }
.woocommerce-checkout table.shop_table tfoot tr.order-total td {
  color: var(--gold-dark);
  font-size: 17px;
  font-weight: 800;
}

/* 6) payment methods as selectable cards */
.woocommerce-checkout #payment {
  margin-top: 16px;
  padding: 14px;
  background: var(--mh-tint);
  border: 1px solid var(--line);
  border-radius: 15px;
}
.woocommerce-checkout #payment ul.wc_payment_methods {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.woocommerce-checkout #payment ul.wc_payment_methods > li {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  padding: 12px 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.woocommerce-checkout #payment ul.wc_payment_methods > li:has(input:checked) {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--mh-ring);
}
.woocommerce-checkout #payment li.wc_payment_method > input.input-radio {
  width: 17px;
  height: 17px;
  margin: 0 0 0 8px;
  accent-color: var(--gold);
  vertical-align: -3px;
}
.woocommerce-checkout #payment li.wc_payment_method > label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.woocommerce-checkout #payment .payment_box {
  margin: 8px 0 0;
  padding: 7px 12px 7px 0;
  border-inline-start: 2px solid var(--gold-soft);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}
.woocommerce-checkout #payment .payment_box img { max-height: 26px; border-radius: 5px; }

/* 7) the one big action + a quiet trust line */
.woocommerce-checkout #place_order {
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff8ec;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .2px;
  box-shadow: 0 10px 22px rgba(120, 82, 30, .28);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.woocommerce-checkout #place_order:before { content: '🔒'; margin-inline-end: 9px; font-size: 14px; }
.woocommerce-checkout #place_order:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 14px 28px rgba(120, 82, 30, .34);
}
.woocommerce-checkout #payment:after {
  content: 'ضمانت محصول • پرداخت امن بانکی • پشتیبانی تا تحویل';
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
}
.woocommerce-checkout .woocommerce-privacy-policy-text {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
}

/* 8) notices in the same card language */
.woocommerce-checkout .woocommerce-info,
.woocommerce-checkout .woocommerce-message,
.woocommerce-checkout .woocommerce-error {
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  list-style: none;
}
.woocommerce-checkout .woocommerce-error { border-color: #b4533f; background: #f7e3de; }
html[data-theme="dark"] .woocommerce-checkout .woocommerce-error { background: #3a211c; }

/* 9) small screens: single column, nothing sticky */
@media (max-width: 900px) {
  .woocommerce form.checkout { grid-template-columns: 1fr; }
  .woocommerce-checkout #customer_details,
  .woocommerce-checkout #order_review_heading,
  .woocommerce-checkout #order_review { grid-column: 1; grid-row: auto; }
  .woocommerce-checkout #order_review { position: static; }
  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper { grid-template-columns: 1fr; }
  .woocommerce-checkout #customer_details,
  .woocommerce-checkout #order_review { padding: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .woocommerce-checkout * { transition: none !important; }
  .woocommerce-checkout #place_order:hover { transform: none; }
}

/* ---------- v4.5.15 — billing section typography, numbered badges, price notice ----------
   Merchant feedback: the billing block felt sloppy; fonts/sizes must be one coherent
   scale across the whole section, plus a visible "call before paying" reminder. */

/* one type system for the entire checkout */
.woocommerce-checkout form.checkout,
.woocommerce-checkout form.checkout input,
.woocommerce-checkout form.checkout select,
.woocommerce-checkout form.checkout textarea,
.woocommerce-checkout form.checkout button {
  font-family: Vazirmatn, Tahoma, Arial, sans-serif;
}
.woocommerce-checkout form.checkout { font-size: 14px; line-height: 1.75; color: var(--ink); }

/* section headings: one size, one weight, numbered gold badges (۱ / ۲) */
.woocommerce-checkout .woocommerce-billing-fields > h3,
.woocommerce-checkout #order_review_heading {
  gap: 11px;
  margin: 0 0 18px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.6;
}
.woocommerce-checkout .woocommerce-billing-fields > h3:before,
.woocommerce-checkout #order_review_heading:before {
  content: '۱';
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff8ec;
  font-size: 13px;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(120, 82, 30, .25);
}
.woocommerce-checkout #order_review_heading:before { content: '۲'; }

/* one scale for labels / inputs / helpers */
.woocommerce-checkout .form-row { gap: 7px; margin: 0 0 14px; }
.woocommerce-checkout .form-row label { font-size: 13px; font-weight: 700; line-height: 1.6; }
.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row textarea,
.woocommerce-checkout .form-row select {
  min-height: 48px;
  padding: 11px 15px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
}
.woocommerce-checkout .form-row input.input-text:hover,
.woocommerce-checkout .form-row select:hover { border-color: var(--gold-soft); }
.woocommerce-checkout .form-row ::placeholder { font-size: 12.5px; }

/* summary + payment keep the same scale */
.woocommerce-checkout table.shop_table td { font-size: 13.5px; }
.woocommerce-checkout table.shop_table tfoot tr.order-total td { font-size: 17px; }
.woocommerce-checkout #payment li.wc_payment_method > label { font-size: 14px; }
.woocommerce-checkout #payment .payment_box { font-size: 12.5px; }
.woocommerce-checkout #payment ul.wc_payment_methods > li:hover { border-color: var(--gold-soft); }
.woocommerce-checkout #place_order { font-size: 15.5px; }

/* roomier cards so the section breathes */
.woocommerce-checkout #customer_details,
.woocommerce-checkout #order_review { padding: 24px; }
@media (max-width: 900px) {
  .woocommerce-checkout #customer_details,
  .woocommerce-checkout #order_review { padding: 18px; }
}

/* the "call before paying" reminder (markup from mh_checkout_price_notice()) */
.mh-checkout-price-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto 18px;
  padding: 13px 18px;
  border: 1px solid #d9b36a;
  border-radius: 14px;
  background: linear-gradient(135deg, #fdf3dd, #f7e6c0);
  color: #5a3d12;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.9;
  box-shadow: 0 6px 16px rgba(120, 82, 30, .12);
}
.mh-checkout-price-notice .mh-notice-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #fff8ec;
  font-size: 17px;
}
.mh-checkout-price-notice b { font-weight: 800; }
.mh-checkout-price-notice a {
  color: #7a4a12;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
}
html[data-theme="dark"] .mh-checkout-price-notice {
  background: linear-gradient(135deg, #33270f, #3d2e14);
  border-color: #6b5426;
  color: #f3dfae;
  box-shadow: none;
}
html[data-theme="dark"] .mh-checkout-price-notice a { color: #f0cd85; }
@media (max-width: 600px) {
  .mh-checkout-price-notice { align-items: flex-start; padding: 12px 14px; font-size: 12.5px; }
  .mh-checkout-price-notice a { white-space: normal; }
}

/* ---------- v4.5.16 — hardened full-width billing fields ----------
   Live-site report: inputs shrank to intrinsic width (tiny boxes) because legacy
   WooCommerce / cached CSS won the cascade on the live install. This block re-asserts
   the layout with body-prefixed selectors + !important so nothing can shrink the
   fields again, and enlarges the type so nothing reads "small". */
body.woocommerce-checkout #customer_details,
body.woocommerce-checkout #customer_details .col2set,
body.woocommerce-checkout #customer_details .col-1,
body.woocommerce-checkout #customer_details .col-2,
body.woocommerce-checkout .woocommerce-billing-fields,
body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
body.woocommerce-checkout .woocommerce-shipping-fields,
body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper,
body.woocommerce-checkout .woocommerce-additional-fields {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  box-sizing: border-box !important;
}
body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0 16px !important;
}
/* safety net: if a plugin ever drops the wrapper div, grid the fields container itself */
body.woocommerce-checkout .woocommerce-billing-fields:has(> .form-row) {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0 16px !important;
}
body.woocommerce-checkout .form-row {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  clear: none !important;
  margin: 0 0 14px !important;
  box-sizing: border-box !important;
}
body.woocommerce-checkout .form-row.form-row-wide { grid-column: 1 / -1 !important; }
body.woocommerce-checkout .form-row label {
  display: block !important;
  width: 100% !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.7 !important;
}
body.woocommerce-checkout .form-row input.input-text,
body.woocommerce-checkout .form-row textarea,
body.woocommerce-checkout .form-row select,
body.woocommerce-checkout .form-row .select2-container {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  min-height: 50px !important;
  padding: 12px 16px !important;
  border-radius: 12px !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
}
body.woocommerce-checkout .form-row ::placeholder { font-size: 13px !important; opacity: .75; }
body.woocommerce-checkout .woocommerce-billing-fields > h3,
body.woocommerce-checkout #order_review_heading { font-size: 18px !important; }
body.woocommerce-checkout table.shop_table td,
body.woocommerce-checkout table.shop_table th { font-size: 14px !important; }
@media (max-width: 900px) {
  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
  body.woocommerce-checkout .woocommerce-billing-fields:has(> .form-row) {
    grid-template-columns: 1fr !important;
  }
}

/* ---------- v4.5.17 — notice above the ZarinPal row + item gallery under specs ---------- */
/* the price notice now lives inside the order-review card, right above the payment
   methods list (first row = "پرداخت امن با زرین پال") */
body.woocommerce-checkout #order_review .mh-checkout-price-notice,
body.woocommerce-checkout .woocommerce-checkout-review-order .mh-checkout-price-notice {
  max-width: none !important;
  margin: 18px 0 14px !important;
}
body.woocommerce-checkout #order_review .mh-checkout-price-notice:first-child { margin-top: 0 !important; }

/* gallery of the selected product, printed under its name/specs in the order table */
.mh-item-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.mh-item-gallery img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--mh-field);
  box-shadow: 0 3px 8px rgba(60, 42, 18, .12);
  transition: transform .18s ease, box-shadow .18s ease;
}
.mh-item-gallery img:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 16px rgba(60, 42, 18, .18);
}
html[data-theme="dark"] .mh-item-gallery img { box-shadow: 0 3px 8px rgba(0, 0, 0, .35); }
@media (max-width: 600px) {
  .mh-item-gallery img { width: 48px; height: 48px; border-radius: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .mh-item-gallery img { transition: none; }
}

/* ---------- v4.5.18 — gallery actually renders in the checkout table ----------
   The gallery div arrives inside the product-name cell (appended via the
   woocommerce_cart_item_name filter, the only per-row hook review-order.php offers).
   Flex + order put it on its own LAST row: name+quantity stay inline on row one,
   variation specs (dl) on row two, gallery below them. */
body.woocommerce-checkout table.shop_table td.product-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 5px;
}
body.woocommerce-checkout td.product-name .mh-item-gallery,
body.woocommerce-checkout td.product-name > div {
  order: 9;
  flex: 0 0 100%;
  margin-top: 2px;
}
body.woocommerce-checkout td.product-name dl.variation { flex: 0 0 100%; }

/* ---------- v4.5.19 — gallery block UNDER the "جزئیات صورتحساب" section ---------- */
.mh-checkout-gallery {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.mh-checkout-gallery h4 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
  color: var(--ink);
}
.mh-checkout-gallery h4:before {
  content: '';
  width: 4px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--gold), var(--gold-dark));
}
.mh-checkout-gallery-item { margin: 0 0 12px; }
.mh-checkout-gallery-item:last-child { margin-bottom: 0; }
.mh-checkout-gallery-item b {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}

/* ---------- v4.5.20 — "سفارش شما" merges into its card (level with the right column)
   and the checkout gallery becomes a flippable product-style gallery ---------- */

/* the heading becomes the TOP of the order card, so both cards start at the same
   level and both section titles sit inside their cards (like "جزئیات صورتحساب") */
body.woocommerce-checkout #order_review_heading {
  margin: 0;
  padding: 24px 24px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
}
body.woocommerce-checkout #order_review {
  margin-top: 0;
  padding-top: 6px;
  border-top: 0;
  border-radius: 0 0 18px 18px;
}
@media (min-width: 1024px) {
  body.woocommerce-checkout #order_review_heading {
    position: sticky;
    top: 96px;
    z-index: 6;
  }
  body.woocommerce-checkout #order_review {
    position: sticky;
    top: calc(96px + 62px); /* heading stays glued on top of the card while pinned */
  }
}
@media (max-width: 900px) {
  body.woocommerce-checkout #order_review_heading { padding: 18px 18px 12px; }
}

/* --- flippable gallery widget (same frame size as the product-page gallery) --- */
.mh-cg-main {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 773 / 766;
  margin: 6px auto 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--mh-field);
  overflow: hidden;
  touch-action: pan-y;
}
.mh-cg-main img.mh-cg-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .35s ease;
}
.mh-cg-main img.mh-cg-slide.is-active { opacity: 1; }
.mh-cg-prev,
.mh-cg-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .16);
  opacity: .92;
  transition: background .18s ease, color .18s ease;
}
.mh-cg-prev { right: 8px; }  /* RTL: قبلی */
.mh-cg-next { left: 8px; }   /* RTL: بعدی */
.mh-cg-prev:hover,
.mh-cg-next:hover { background: var(--gold); color: #fff8ec; }
.mh-cg-thumbs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.mh-cg-thumbs .mh-cg-thumb {
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: var(--mh-field);
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease;
}
.mh-cg-thumbs .mh-cg-thumb:hover { transform: translateY(-2px); }
.mh-cg-thumbs .mh-cg-thumb.is-active { border-color: var(--gold); }
.mh-cg-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mh-checkout-gallery-item.mh-cg-single .mh-cg-prev,
.mh-checkout-gallery-item.mh-cg-single .mh-cg-next,
.mh-checkout-gallery-item.mh-cg-single .mh-cg-thumbs { display: none; }
@media (max-width: 600px) {
  .mh-cg-main { width: 100%; }
  .mh-cg-thumbs .mh-cg-thumb { width: 54px; height: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  .mh-cg-main img.mh-cg-slide,
  .mh-cg-prev, .mh-cg-next, .mh-cg-thumbs .mh-cg-thumb { transition: none; }
}

/* ---------- v4.5.21 — the "سفارش شما" card was split in two ----------
   form.checkout has `gap:20px`, so the heading-cap (row 1) floated 20px above the
   card body (row 2) with page background between them = "کادر ناقص".
   Killing the ROW gap fuses cap+body into one continuous card; the column gap
   (space between the two columns) stays untouched. On single-column mobile the
   heading instead gets a top margin so it keeps its distance from the billing card. */
body.woocommerce-checkout form.checkout { row-gap: 0; }
body.woocommerce-checkout #order_review_heading { margin: 0; }
body.woocommerce-checkout #order_review { margin-top: 0; }
@media (max-width: 900px) {
  body.woocommerce-checkout #order_review_heading { margin-top: 20px; }
}
/* make the fused card read as one surface: same inner top padding on both halves */
body.woocommerce-checkout #order_review_heading { padding-bottom: 14px; }
body.woocommerce-checkout #order_review { padding-top: 8px; }

/* ---------- v4.5.22 — cart page (/cart/) mobile responsive ----------
   The Woo cart table overflows narrow screens. On ≤768px each cart_item row becomes
   a product card: thumbnail + name on top, price/qty/subtotal as labelled chips,
   remove button pinned to the corner. Coupon, totals and checkout button go full-width. */
body.woocommerce-cart .entry-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 20px 40px;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}
@media (max-width: 768px) {
  body.woocommerce-cart table.shop_table.cart {
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  body.woocommerce-cart table.cart thead { display: none; }
  body.woocommerce-cart table.cart tbody tr.cart_item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    position: relative;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    margin: 0 0 12px;
    box-shadow: 0 6px 16px rgba(60, 42, 18, .08);
  }
  body.woocommerce-cart table.cart td { border: 0; padding: 0; display: block; }
  body.woocommerce-cart table.cart td.product-remove {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
  }
  body.woocommerce-cart table.cart td.product-thumbnail { flex: 0 0 74px; }
  body.woocommerce-cart table.cart td.product-thumbnail img {
    width: 74px;
    height: 74px;
    object-fit: cover;
    border-radius: 12px;
  }
  body.woocommerce-cart table.cart td.product-name {
    flex: 1 1 55%;
    padding-inline-end: 30px;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.7;
  }
  body.woocommerce-cart table.cart td.product-price,
  body.woocommerce-cart table.cart td.product-quantity,
  body.woocommerce-cart table.cart td.product-subtotal {
    flex: 1 1 30%;
    background: var(--mh-tint, #f7f3ea);
    border-radius: 10px;
    padding: 7px 10px;
    font-size: 12.5px;
    text-align: center;
  }
  body.woocommerce-cart table.cart td.product-price:before,
  body.woocommerce-cart table.cart td.product-quantity:before,
  body.woocommerce-cart table.cart td.product-subtotal:before {
    content: attr(data-title);
    display: block;
    margin-bottom: 2px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--muted);
  }
  body.woocommerce-cart table.cart tfoot tr { display: block; }
  body.woocommerce-cart table.cart tfoot th {
    display: block;
    text-align: start;
    font-size: 12px;
    padding: 10px 0 4px;
  }
  body.woocommerce-cart table.cart tfoot td { display: block; width: 100%; padding: 0 0 8px; }
  body.woocommerce-cart form.cart .coupon {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  body.woocommerce-cart form.cart .coupon input {
    flex: 1 1 100%;
    min-height: 44px;
    border-radius: 10px;
  }
  body.woocommerce-cart form.cart .coupon button { flex: 1; min-height: 44px; border-radius: 10px; }
  body.woocommerce-cart .cart_totals { width: 100%; float: none; }
  body.woocommerce-cart .cart_totals table th,
  body.woocommerce-cart .cart_totals table td {
    display: block;
    width: 100%;
    text-align: start;
    padding: 5px 0;
  }
  body.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
    width: 100%;
    min-height: 50px;
    border-radius: 12px;
    font-size: 15px;
  }
  body.woocommerce-cart .cross-sells ul.products li.product,
  body.woocommerce-cart .cart-collaterals { width: 100%; float: none; }
}
/* v4.5.22 extras: remove button chip + cart actions row on mobile */
body.woocommerce-cart a.remove {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--mh-tint, #f5efe4);
  color: #b62c3e;
  font-size: 16px;
  line-height: 1;
}
@media (max-width: 768px) {
  body.woocommerce-cart table.cart tr.actions .coupon { margin-bottom: 10px; }
  body.woocommerce-cart table.cart tr.actions button[type="submit"] {
    width: 100%;
    min-height: 44px;
    border-radius: 10px;
  }
}
