/* ══════════════════════════════════════════
   NOEMANI EXTRA v8
   - Elementor Mega Menu: دست نزن
   - سبد خرید: کامل اصلاح
   - بقیه موارد
══════════════════════════════════════════ */

/* ══ ۱. Elementor Mega Menu - فقط z-index و position ══ */
/* هیچ override ای روی کلاس‌های elementor نداریم */
/* فقط مطمئن می‌شویم header بالای همه باشد */
.site-header { z-index: 9999 !important; }

/* ══ ۲. محبوب‌ترین محصولات - گرید کامل ══ */
.noe-products-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 20px !important;
}
.noe-product-card {
  background: #fff !important;
  border-radius: 16px !important;
  border: 1.5px solid #e4e4e4 !important;
  overflow: hidden !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.07) !important;
  transition: all .25s !important;
  display: flex !important;
  flex-direction: column !important;
}
.noe-product-card:hover {
  box-shadow: 0 10px 32px rgba(76,175,80,.18) !important;
  transform: translateY(-5px) !important;
  border-color: #4caf50 !important;
}
.noe-product-badge {
  position: absolute; top: 10px; right: 10px;
  background: #e53935; color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 50px; z-index: 2;
}
.noe-product-img {
  position: relative; aspect-ratio: 1/1;
  background: #fff; overflow: hidden; border-bottom: 1px solid #f5f5f5;
}
.noe-product-img img {
  width: 100% !important; height: 100% !important;
  object-fit: contain !important; padding: 14px !important;
  transition: transform .35s !important;
}
.noe-product-card:hover .noe-product-img img { transform: scale(1.05) !important; }
.noe-product-info { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.noe-product-cat { font-size: 11px; color: #4caf50; font-weight: 600; margin-bottom: 4px; }
.noe-product-title { font-size: 14px; font-weight: 700; color: #222; margin-bottom: 10px; line-height: 1.4; flex: 1; }
.noe-product-title a { color: #222; }
.noe-product-title a:hover { color: #4caf50; }
.noe-product-price { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.noe-price-current { font-size: 18px; font-weight: 900; color: #4caf50; }
.noe-price-old { font-size: 13px; color: #999; text-decoration: line-through; }
.noe-add-btn {
  display: block !important; width: 100% !important;
  padding: 11px !important; background: #4caf50 !important;
  color: #fff !important; border: none !important;
  border-radius: 10px !important; font-size: 13px !important;
  font-weight: 700 !important; cursor: pointer !important;
  text-align: center !important; transition: background .2s !important;
  text-decoration: none !important;
}
.noe-add-btn:hover { background: #388e3c !important; color: #fff !important; }
.noe-add-btn + a, .added_to_cart, a.added_to_cart { display: none !important; }

/* ══ ۳. سبد خرید - کامل بازنویسی ══ */
.woocommerce-cart .woocommerce { padding: 0 !important; }
.woocommerce-cart-form { overflow-x: auto !important; }

/* جدول اصلی */
.woocommerce table.shop_table {
  width: 100% !important;
  border-collapse: collapse !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 20px rgba(0,0,0,.08) !important;
  border: none !important;
}
/* هدر جدول */
.woocommerce table.shop_table thead th {
  background: #4caf50 !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  padding: 16px 20px !important;
  text-align: right !important;
  vertical-align: middle !important;
  border: none !important;
  white-space: nowrap !important;
}
/* سلول‌های بدنه */
.woocommerce table.shop_table tbody td {
  background: #fff !important;
  padding: 18px 20px !important;
  text-align: right !important;
  vertical-align: middle !important;
  border-bottom: 1px solid #f0f0f0 !important;
  border-top: none !important;
  border-right: none !important;
  border-left: none !important;
}
.woocommerce table.shop_table tbody tr:last-child td { border-bottom: none !important; }
/* عکس */
.woocommerce table.shop_table td.product-thumbnail { width: 90px !important; }
.woocommerce table.shop_table td.product-thumbnail img {
  width: 75px !important; height: 75px !important;
  object-fit: contain !important; border-radius: 10px !important;
  border: 1px solid #eee !important; padding: 6px !important;
  background: #fafafa !important; display: block !important;
  margin: 0 auto !important;
}
/* اسم */
.woocommerce table.shop_table td.product-name { font-weight: 700 !important; font-size: 14px !important; }
.woocommerce table.shop_table td.product-name a { color: #222 !important; font-weight: 700 !important; }
.woocommerce table.shop_table td.product-name a:hover { color: #4caf50 !important; }
/* قیمت - vertical-align: middle مهمترین چیز */
.woocommerce table.shop_table td.product-price,
.woocommerce table.shop_table td.product-subtotal {
  color: #4caf50 !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
  text-align: center !important;
}
.woocommerce table.shop_table td.product-price ins,
.woocommerce table.shop_table td.product-subtotal ins { text-decoration: none !important; }
.woocommerce table.shop_table td.product-price del { color: #999 !important; font-size: 12px !important; display: block !important; }
/* تعداد */
.woocommerce table.shop_table td.product-quantity { vertical-align: middle !important; text-align: center !important; }
.woocommerce table.shop_table td.product-quantity .quantity { display: flex !important; justify-content: center !important; }
.woocommerce table.shop_table td.product-quantity input[type=number] {
  width: 65px !important; text-align: center !important;
  border: 1.5px solid #e4e4e4 !important; border-radius: 8px !important;
  padding: 8px !important; font-size: 14px !important; font-weight: 700 !important;
}
/* دکمه حذف */
.woocommerce table.shop_table td.product-remove { text-align: center !important; }
.woocommerce table.shop_table td.product-remove a {
  color: #e53935 !important; font-size: 18px !important; font-weight: 700 !important;
  width: 30px !important; height: 30px !important; border-radius: 50% !important;
  background: #ffeaea !important; display: flex !important;
  align-items: center !important; justify-content: center !important;
  margin: 0 auto !important;
}
.woocommerce table.shop_table td.product-remove a:hover { background: #e53935 !important; color: #fff !important; }
/* جمع کل */
.woocommerce .cart-collaterals { margin-top: 30px !important; }
.woocommerce .cart_totals {
  background: #fff !important; border-radius: 16px !important;
  padding: 28px !important; box-shadow: 0 4px 20px rgba(0,0,0,.08) !important;
  float: none !important; width: 100% !important; max-width: 420px !important;
  margin-right: 0 !important;
}
.woocommerce .cart_totals h2 {
  font-size: 18px !important; font-weight: 800 !important;
  color: #222 !important; margin-bottom: 20px !important;
  padding-bottom: 14px !important; border-bottom: 2px solid #f0f0f0 !important;
}
.woocommerce .cart_totals table { width: 100% !important; border: none !important; box-shadow: none !important; border-radius: 0 !important; }
.woocommerce .cart_totals table th,
.woocommerce .cart_totals table td {
  padding: 12px 0 !important; border-bottom: 1px solid #f5f5f5 !important;
  background: transparent !important; text-align: right !important;
  vertical-align: middle !important; font-size: 14px !important;
  border-top: none !important; border-right: none !important; border-left: none !important;
}
.woocommerce .cart_totals table .order-total th,
.woocommerce .cart_totals table .order-total td {
  font-weight: 900 !important; font-size: 18px !important;
  color: #4caf50 !important; border-bottom: none !important;
}
.woocommerce a.checkout-button,
.woocommerce .wc-proceed-to-checkout a {
  background: #4caf50 !important; color: #fff !important;
  border-radius: 12px !important; font-weight: 700 !important;
  font-size: 15px !important; padding: 16px !important;
  display: block !important; text-align: center !important;
  margin-top: 20px !important; width: 100% !important;
  border: none !important; transition: background .2s !important;
}
.woocommerce a.checkout-button:hover { background: #388e3c !important; }
/* فیلد کد تخفیف */
.woocommerce .coupon { display: flex !important; gap: 10px !important; margin-bottom: 16px !important; }
.woocommerce .coupon input#coupon_code {
  flex: 1 !important; padding: 12px 14px !important;
  border: 1.5px solid #e4e4e4 !important; border-radius: 10px !important;
  font-size: 14px !important; outline: none !important;
}
.woocommerce .coupon button[name="apply_coupon"] {
  padding: 12px 18px !important; background: #388e3c !important;
  color: #fff !important; border: none !important; border-radius: 10px !important;
  font-weight: 700 !important; cursor: pointer !important; white-space: nowrap !important;
  font-size: 13px !important;
}

/* ══ ۴. صفحه فروشگاه - page-hero full-width ══ */
.woocommerce-page .page-hero,
.woocommerce-shop .page-hero {
  width: 100% !important; display: block !important;
  margin-left: 0 !important; margin-right: 0 !important;
}
.woocommerce-page .page-hero h1 { text-align: center !important; }

/* ══ ۵. مخفی کردن View cart ══ */
.woocommerce-notices-wrapper { display: none !important; }
a.added_to_cart { display: none !important; }
.woocommerce ul.products li.product a.button + a { display: none !important; }

/* ══ ۶. سایدبار مقالات - static ══ */
.blog-sidebar, .single-post-layout > aside { position: static !important; top: auto !important; }

/* ══ ۷. خبرنامه موبایل ══ */
@media(max-width:680px){
  .newsletter-box { flex-direction:column !important; padding:28px 20px !important; gap:20px !important; text-align:center; }
  .newsletter-form { flex-direction:column !important; gap:10px !important; width:100% !important; max-width:100% !important; }
  .newsletter-form input { width:100% !important; padding:14px !important; border-radius:12px !important; }
  .newsletter-form button { width:100% !important; padding:14px !important; border-radius:12px !important; }
  /* سبد خرید موبایل */
  .woocommerce table.shop_table td.product-thumbnail { display:none !important; }
  /* درباره ما موبایل */
  .about-inner { grid-template-columns:1fr !important; }
  .about-imgs { order:-1 !important; height:220px !important; }
  .about-img-main { width:100% !important; height:220px !important; }
  .about-content { order:1 !important; }
  .single-post-layout { grid-template-columns:1fr !important; }
  .blog-sidebar { display:none !important; }
  /* محصولات */
  .noe-products-grid { grid-template-columns:repeat(2,1fr) !important; }
}
@media(max-width:420px){ .noe-products-grid { grid-template-columns:1fr !important; } }
@media(max-width:1100px){ .noe-products-grid { grid-template-columns:repeat(3,1fr) !important; } }

/* ══ ۸. checkout - باکس کارت ══ */
.woocommerce-checkout #payment ul.payment_methods { direction:rtl !important; padding:0 !important; }
.woocommerce-checkout #payment ul.payment_methods li {
  display:flex !important; flex-direction:column !important;
  align-items:flex-start !important; border-bottom:1px solid #f0f0f0 !important; padding:0 !important;
}
.woocommerce-checkout #payment ul.payment_methods li label {
  display:flex !important; align-items:center !important; gap:10px !important;
  padding:14px 16px !important; width:100% !important; cursor:pointer !important;
  font-weight:700 !important; font-size:14px !important;
}
.woocommerce-checkout #payment ul.payment_methods li input[type="radio"] {
  order:-1 !important; width:18px !important; height:18px !important;
  accent-color:#4caf50 !important; flex-shrink:0 !important; margin:0 !important;
}
.woocommerce-checkout #payment .payment_box {
  width:calc(100% - 32px) !important; margin:0 16px 16px !important;
  direction:ltr !important; background:#f9f9f9 !important;
  border-radius:12px !important; padding:20px !important;
}
.woocommerce-checkout #payment .payment_box .form-row { display:block !important; width:100% !important; float:none !important; margin-bottom:14px !important; }
.woocommerce-checkout #payment .payment_box label { display:block !important; font-weight:700 !important; font-size:13px !important; margin-bottom:6px !important; text-align:left !important; padding:0 !important; border:none !important; width:auto !important; }
.woocommerce-checkout #payment .payment_box input { display:block !important; width:100% !important; padding:12px 14px !important; border:1.5px solid #e4e4e4 !important; border-radius:10px !important; font-size:14px !important; direction:ltr !important; text-align:left !important; background:#fff !important; outline:none !important; }
.woocommerce-checkout #payment .payment_box input:focus { border-color:#4caf50 !important; }
ul#shipping_method { padding:0 !important; margin:0 !important; }
ul#shipping_method li { display:flex !important; align-items:center !important; gap:8px !important; padding:10px 0 !important; list-style:none !important; border-bottom:1px solid #f0f0f0 !important; }
ul#shipping_method li input[type="radio"] { width:18px !important; height:18px !important; accent-color:#4caf50 !important; flex-shrink:0 !important; }
#place_order { font-size:0 !important; background:#4caf50 !important; color:#fff !important; border-radius:12px !important; font-weight:700 !important; padding:16px 32px !important; width:100% !important; border:none !important; cursor:pointer !important; margin-top:16px !important; }
#place_order::before { content:'ثبت سفارش' !important; font-size:16px !important; }
#place_order:hover { background:#388e3c !important; }


/* ══════════════════════════════════════════
   NOEMANI FIX v9.2
   1) Mega menu position/visibility in header
   2) WooCommerce cart table/product cell alignment
══════════════════════════════════════════ */

/* ── Header / Mega Menu stable positioning ── */
.site-header,
.site-header .container,
.header-inner,
.main-nav,
.main-nav > ul,
.main-nav > ul > li {
  overflow: visible !important;
}
.site-header { z-index: 99990 !important; }
.site-header .container { position: relative !important; }
.main-nav { position: static !important; }
.main-nav > ul.primary-menu { position: static !important; }
.main-nav > ul.primary-menu > li { position: relative !important; }

/* Normal dropdowns remain attached to their own menu item. */
.main-nav > ul.primary-menu > li:not(.noe-mega-menu):not(.mega-menu) > .sub-menu {
  right: 0 !important;
  left: auto !important;
  top: calc(100% + 10px) !important;
  width: max-content !important;
  min-width: 230px !important;
  max-width: 320px !important;
}

/* Real mega menu: attach to header container, not the small nav element. */
.main-nav > ul.primary-menu > li.noe-mega-menu,
.main-nav > ul.primary-menu > li.mega-menu,
.main-nav > ul.primary-menu > li.noe-product-cats-mega {
  position: static !important;
}
.main-nav > ul.primary-menu > li.noe-mega-menu > .sub-menu,
.main-nav > ul.primary-menu > li.mega-menu > .sub-menu,
.main-nav > ul.primary-menu > li.noe-product-cats-mega > .sub-menu {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 20px !important;
  left: 20px !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  background: #fff !important;
  border: 1px solid #e4e4e4 !important;
  border-radius: 18px !important;
  box-shadow: 0 18px 55px rgba(0,0,0,.15) !important;
  padding: 22px !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
  gap: 10px 16px !important;
  z-index: 100000 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(10px) !important;
  pointer-events: none !important;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease !important;
}
.main-nav > ul.primary-menu > li.noe-mega-menu:hover > .sub-menu,
.main-nav > ul.primary-menu > li.noe-mega-menu:focus-within > .sub-menu,
.main-nav > ul.primary-menu > li.mega-menu:hover > .sub-menu,
.main-nav > ul.primary-menu > li.mega-menu:focus-within > .sub-menu,
.main-nav > ul.primary-menu > li.noe-product-cats-mega:hover > .sub-menu,
.main-nav > ul.primary-menu > li.noe-product-cats-mega:focus-within > .sub-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}
.main-nav > ul.primary-menu > li.noe-mega-menu > .sub-menu > li,
.main-nav > ul.primary-menu > li.mega-menu > .sub-menu > li,
.main-nav > ul.primary-menu > li.noe-product-cats-mega > .sub-menu > li {
  min-width: 0 !important;
}
.main-nav > ul.primary-menu > li.noe-mega-menu > .sub-menu > li > a,
.main-nav > ul.primary-menu > li.mega-menu > .sub-menu > li > a,
.main-nav > ul.primary-menu > li.noe-product-cats-mega > .sub-menu > li > a {
  display: block !important;
  min-height: 48px !important;
  padding: 13px 14px !important;
  border-radius: 12px !important;
  background: #f7fbf7 !important;
  border: 1px solid #edf4ed !important;
  color: #3f9143 !important;
  font-weight: 800 !important;
  line-height: 1.7 !important;
  text-align: right !important;
  white-space: normal !important;
}
.main-nav > ul.primary-menu > li.noe-mega-menu > .sub-menu > li > a:hover,
.main-nav > ul.primary-menu > li.mega-menu > .sub-menu > li > a:hover,
.main-nav > ul.primary-menu > li.noe-product-cats-mega > .sub-menu > li > a:hover {
  background: #4caf50 !important;
  border-color: #4caf50 !important;
  color: #fff !important;
}

/* Nested lists inside a mega menu must be visible; previous dropdown CSS was hiding them. */
.main-nav > ul.primary-menu > li.noe-mega-menu > .sub-menu .sub-menu,
.main-nav > ul.primary-menu > li.mega-menu > .sub-menu .sub-menu,
.main-nav > ul.primary-menu > li.noe-product-cats-mega > .sub-menu .sub-menu {
  position: static !important;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto !important;
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;
  padding: 7px 0 0 !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
.main-nav > ul.primary-menu > li.noe-mega-menu > .sub-menu .sub-menu a,
.main-nav > ul.primary-menu > li.mega-menu > .sub-menu .sub-menu a,
.main-nav > ul.primary-menu > li.noe-product-cats-mega > .sub-menu .sub-menu a {
  background: transparent !important;
  border: 0 !important;
  padding: 8px 10px !important;
  color: #333 !important;
  font-weight: 600 !important;
}

/* JetMenu / Elementor / Max Mega Menu compatibility: do not let theme dropdown styles clip plugin panels. */
.site-header .elementor,
.site-header .elementor-section,
.site-header .elementor-container,
.site-header .elementor-widget-container,
.site-header .jet-menu-container,
.site-header .jet-menu,
.site-header .jet-mega-menu,
.site-header [class*="jet-mega-menu"],
.site-header [id^="mega-menu-wrap-"],
.site-header [id^="mega-menu-wrap-"] > ul {
  overflow: visible !important;
  z-index: 100000 !important;
}
.site-header .jet-sub-mega-menu,
.site-header .jet-mega-menu-mega-container,
.site-header .jet-mega-menu-mega-container__inner,
.site-header [id^="mega-menu-wrap-"] .mega-sub-menu {
  z-index: 100001 !important;
}

/* ── WooCommerce cart: robust desktop layout ── */
.woocommerce-cart .entry-content > .woocommerce,
.woocommerce-cart main .woocommerce,
.woocommerce-cart #content .woocommerce {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 28px !important;
  direction: rtl !important;
}
.woocommerce-cart .woocommerce-notices-wrapper {
  flex: 0 0 100% !important;
}
.woocommerce-cart .woocommerce-cart-form {
  flex: 1 1 760px !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  padding-bottom: 4px !important;
}
.woocommerce-cart .cart-collaterals {
  flex: 0 0 360px !important;
  width: 360px !important;
  margin-top: 0 !important;
}
.woocommerce-cart .cart_totals {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

.woocommerce-cart table.shop_table.cart,
.woocommerce-cart table.cart {
  min-width: 760px !important;
  width: 100% !important;
  table-layout: fixed !important;
  direction: rtl !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  overflow: hidden !important;
}
.woocommerce-cart table.cart thead th,
.woocommerce-cart table.cart tbody td {
  box-sizing: border-box !important;
  vertical-align: middle !important;
}
.woocommerce-cart table.cart th.product-remove,
.woocommerce-cart table.cart td.product-remove { width: 52px !important; min-width: 52px !important; max-width: 52px !important; padding: 12px 10px !important; text-align: center !important; }
.woocommerce-cart table.cart th.product-thumbnail,
.woocommerce-cart table.cart td.product-thumbnail { width: 96px !important; min-width: 96px !important; max-width: 96px !important; padding: 12px 10px !important; text-align: center !important; }
.woocommerce-cart table.cart th.product-name,
.woocommerce-cart table.cart td.product-name { width: auto !important; min-width: 210px !important; text-align: right !important; }
.woocommerce-cart table.cart th.product-price,
.woocommerce-cart table.cart td.product-price,
.woocommerce-cart table.cart th.product-subtotal,
.woocommerce-cart table.cart td.product-subtotal { width: 128px !important; min-width: 128px !important; max-width: 128px !important; text-align: center !important; }
.woocommerce-cart table.cart th.product-quantity,
.woocommerce-cart table.cart td.product-quantity { width: 112px !important; min-width: 112px !important; max-width: 112px !important; text-align: center !important; }

.woocommerce-cart table.cart thead th {
  line-height: 1.5 !important;
  white-space: nowrap !important;
}
.woocommerce-cart table.cart td.product-thumbnail a,
.woocommerce-cart table.cart td.product-thumbnail img {
  display: block !important;
  margin: 0 auto !important;
}
.woocommerce-cart table.cart td.product-thumbnail img {
  width: 72px !important;
  max-width: 72px !important;
  height: 72px !important;
  max-height: 72px !important;
  object-fit: contain !important;
  padding: 6px !important;
  border-radius: 10px !important;
  background: #fafafa !important;
  border: 1px solid #eee !important;
}
.woocommerce-cart table.cart td.product-name a {
  display: inline !important;
  color: #222 !important;
  font-weight: 800 !important;
  line-height: 1.8 !important;
  white-space: normal !important;
  word-break: normal !important;
}
.woocommerce-cart table.cart td.product-price,
.woocommerce-cart table.cart td.product-subtotal,
.woocommerce-cart table.cart td.product-price .amount,
.woocommerce-cart table.cart td.product-subtotal .amount {
  color: #4caf50 !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
  line-height: 1.6 !important;
}
.woocommerce-cart table.cart td.product-quantity .quantity {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
}
.woocommerce-cart table.cart td.product-quantity input.qty {
  width: 62px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 6px 8px !important;
  text-align: center !important;
  direction: ltr !important;
  border: 1.5px solid #e4e4e4 !important;
  border-radius: 10px !important;
  background: #fff !important;
}
.woocommerce-cart table.cart td.product-remove a.remove {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  line-height: 30px !important;
  margin: 0 auto !important;
  border-radius: 50% !important;
  background: #ffeaea !important;
  color: #d93636 !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  text-decoration: none !important;
}
.woocommerce-cart table.cart td.product-remove a.remove:hover {
  background: #d93636 !important;
  color: #fff !important;
}
.woocommerce-cart table.cart td.actions {
  padding: 18px 20px !important;
  text-align: left !important;
}
.woocommerce-cart table.cart td.actions .coupon {
  float: right !important;
  display: flex !important;
  gap: 10px !important;
  width: min(100%, 470px) !important;
  margin: 0 !important;
}
.woocommerce-cart table.cart td.actions .coupon input.input-text {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  height: 44px !important;
  padding: 10px 14px !important;
  border: 1.5px solid #e4e4e4 !important;
  border-radius: 10px !important;
}
.woocommerce-cart table.cart td.actions button.button {
  min-height: 44px !important;
  padding: 10px 18px !important;
  white-space: nowrap !important;
}

/* Stack cart table and totals before the table gets squeezed. */
@media (max-width: 1120px) {
  .woocommerce-cart .entry-content > .woocommerce,
  .woocommerce-cart main .woocommerce,
  .woocommerce-cart #content .woocommerce {
    display: block !important;
  }
  .woocommerce-cart .woocommerce-cart-form {
    width: 100% !important;
    margin-bottom: 28px !important;
  }
  .woocommerce-cart .cart-collaterals {
    width: 100% !important;
    max-width: 460px !important;
    margin-right: 0 !important;
    margin-left: auto !important;
  }
}

/* Mobile cart cards */
@media (max-width: 760px) {
  .woocommerce-cart .woocommerce-cart-form { overflow: visible !important; }
  .woocommerce-cart table.shop_table.cart,
  .woocommerce-cart table.cart,
  .woocommerce-cart table.cart tbody,
  .woocommerce-cart table.cart tfoot,
  .woocommerce-cart table.cart tr,
  .woocommerce-cart table.cart td {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  .woocommerce-cart table.cart { min-width: 0 !important; box-shadow: none !important; border-radius: 0 !important; background: transparent !important; }
  .woocommerce-cart table.cart thead { display: none !important; }
  .woocommerce-cart table.cart tr.cart_item {
    position: relative !important;
    background: #fff !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 18px rgba(0,0,0,.06) !important;
    padding: 16px !important;
    margin-bottom: 16px !important;
  }
  .woocommerce-cart table.cart tr.cart_item td {
    background: transparent !important;
    border: 0 !important;
    padding: 8px 0 !important;
    text-align: right !important;
  }
  .woocommerce-cart table.cart td.product-remove {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    width: 32px !important;
    padding: 0 !important;
  }
  .woocommerce-cart table.cart td.product-thumbnail {
    text-align: center !important;
    padding-top: 8px !important;
  }
  .woocommerce-cart table.cart td.product-thumbnail img {
    width: 96px !important;
    max-width: 96px !important;
    height: 96px !important;
    max-height: 96px !important;
  }
  .woocommerce-cart table.cart td.product-name {
    text-align: center !important;
    padding-left: 42px !important;
    padding-right: 42px !important;
  }
  .woocommerce-cart table.cart td.product-price,
  .woocommerce-cart table.cart td.product-quantity,
  .woocommerce-cart table.cart td.product-subtotal {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 14px !important;
    text-align: left !important;
  }
  .woocommerce-cart table.cart td.product-price::before,
  .woocommerce-cart table.cart td.product-quantity::before,
  .woocommerce-cart table.cart td.product-subtotal::before {
    content: attr(data-title) !important;
    color: #555 !important;
    font-weight: 800 !important;
    text-align: right !important;
  }
  .woocommerce-cart table.cart td.actions {
    background: #fff !important;
    border-radius: 16px !important;
    padding: 16px !important;
  }
  .woocommerce-cart table.cart td.actions .coupon {
    float: none !important;
    width: 100% !important;
    flex-direction: column !important;
    margin-bottom: 12px !important;
  }
  .woocommerce-cart table.cart td.actions button.button,
  .woocommerce-cart table.cart td.actions .coupon input.input-text {
    width: 100% !important;
  }
  .woocommerce-cart .cart-collaterals,
  .woocommerce-cart .cart_totals {
    max-width: none !important;
    width: 100% !important;
  }
}

@media (max-width: 680px) {
  .main-nav > ul.primary-menu > li.noe-mega-menu > .sub-menu,
  .main-nav > ul.primary-menu > li.mega-menu > .sub-menu,
  .main-nav > ul.primary-menu > li.noe-product-cats-mega > .sub-menu {
    position: static !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 6px 0 0 !important;
    background: transparent !important;
  }
}

/* ══════════════════════════════════════════
   NOEMANI FIX v10.0 — JetMenu/Elementor mega menu isolation
   علت مشکل: مگامنو JetPlugins/Elementor داخل ul.sub-menu می‌آید، اما استایل‌های قالب آن را مثل زیرمنوی معمولی وردپرس grid/dropdown می‌کردند.
══════════════════════════════════════════ */
html { --noe-header-bottom: 118px; }
.site-header,
.site-header .container,
.header-inner,
.main-nav,
.main-nav > ul,
.main-nav > ul > li,
.main-nav .noe-external-mega,
.main-nav .noe-external-mega * {
  overflow: visible !important;
}
.site-header {
  z-index: 999990 !important;
  isolation: isolate !important;
}
.main-nav > ul.primary-menu > li.noe-external-mega,
.main-nav > ul > li.noe-external-mega {
  position: static !important;
}

/* Outer WordPress submenu that only hosts a Jet/Elementor mega template. */
body .site-header .main-nav > ul.primary-menu > li.noe-external-mega > ul.sub-menu,
body .site-header .main-nav > ul > li.noe-external-mega > ul.sub-menu,
body .site-header .main-nav > ul.primary-menu > li.noe-external-mega > .sub-menu,
body .site-header .main-nav > ul > li.noe-external-mega > .sub-menu {
  position: fixed !important;
  top: var(--noe-header-bottom) !important;
  right: 50% !important;
  left: auto !important;
  width: min(1040px, calc(100vw - 32px)) !important;
  min-width: 0 !important;
  max-width: calc(100vw - 32px) !important;
  height: auto !important;
  max-height: calc(100vh - var(--noe-header-bottom) - 24px) !important;
  overflow: visible !important;
  overflow-y: auto !important;
  margin: 10px 0 0 !important;
  padding: 0 !important;
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  list-style: none !important;
  z-index: 999999 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translate(50%, 10px) !important;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease !important;
}
body .site-header .main-nav > ul.primary-menu > li.noe-external-mega:hover > ul.sub-menu,
body .site-header .main-nav > ul.primary-menu > li.noe-external-mega:focus-within > ul.sub-menu,
body .site-header .main-nav > ul.primary-menu > li.noe-external-mega.noe-menu-open > ul.sub-menu,
body .site-header .main-nav > ul > li.noe-external-mega:hover > ul.sub-menu,
body .site-header .main-nav > ul > li.noe-external-mega:focus-within > ul.sub-menu,
body .site-header .main-nav > ul > li.noe-external-mega.noe-menu-open > ul.sub-menu {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translate(50%, 0) !important;
}

/* Do not let theme card/grid rules touch Jet/Elementor content. */
body .site-header .main-nav > ul > li.noe-external-mega > ul.sub-menu > li,
body .site-header .main-nav > ul > li.noe-external-mega > .sub-menu > li {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  list-style: none !important;
  position: static !important;
}
body .site-header .main-nav > ul > li.noe-external-mega > ul.sub-menu > li > a:empty,
body .site-header .main-nav > ul > li.noe-external-mega > .sub-menu > li > a:empty {
  display: none !important;
}

/* JetMenu / Elementor panel itself: full width inside the fixed host. */
body .site-header .main-nav li.noe-external-mega .jet-sub-mega-menu,
body .site-header .main-nav li.noe-external-mega .jet-mega-menu-mega-container,
body .site-header .main-nav li.noe-external-mega .jet-mega-menu-mega-container__inner,
body .site-header .main-nav li.noe-external-mega .jet-menu-container,
body .site-header .main-nav li.noe-external-mega [id^="mega-menu-wrap-"] .mega-sub-menu,
body .site-header .main-nav li.noe-external-mega .elementor,
body .site-header .main-nav li.noe-external-mega .elementor-section,
body .site-header .main-nav li.noe-external-mega .elementor-container,
body .site-header .main-nav li.noe-external-mega .elementor-widget-container {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}
body .site-header .main-nav li.noe-external-mega .jet-sub-mega-menu,
body .site-header .main-nav li.noe-external-mega .jet-mega-menu-mega-container,
body .site-header .main-nav li.noe-external-mega .jet-menu-container {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  display: block !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
body .site-header .main-nav li.noe-external-mega .elementor-section.elementor-section-boxed > .elementor-container {
  max-width: none !important;
}
body .site-header .main-nav li.noe-external-mega .elementor-column,
body .site-header .main-nav li.noe-external-mega .elementor-widget,
body .site-header .main-nav li.noe-external-mega .elementor-element {
  min-width: 0 !important;
}

/* Keep native category fallback only for menus that are NOT Jet/Elementor. */
body .site-header .main-nav > ul.primary-menu > li.noe-external-mega.noe-mega-menu > .sub-menu,
body .site-header .main-nav > ul.primary-menu > li.noe-external-mega.mega-menu > .sub-menu,
body .site-header .main-nav > ul.primary-menu > li.noe-external-mega.noe-product-cats-mega > .sub-menu {
  grid-template-columns: none !important;
}

/* Cart hardening: avoid product cell squeeze on laptop widths. */
@media (min-width: 761px) and (max-width: 1280px) {
  .woocommerce-cart .entry-content > .woocommerce,
  .woocommerce-cart main .woocommerce,
  .woocommerce-cart #content .woocommerce {
    display: block !important;
  }
  .woocommerce-cart .woocommerce-cart-form {
    width: 100% !important;
    margin-bottom: 28px !important;
    overflow-x: auto !important;
  }
  .woocommerce-cart .cart-collaterals {
    width: 100% !important;
    max-width: 460px !important;
    margin-right: 0 !important;
    margin-left: auto !important;
  }
  .woocommerce-cart table.shop_table.cart,
  .woocommerce-cart table.cart {
    min-width: 820px !important;
  }
}

@media (max-width: 680px) {
  body .site-header .main-nav > ul > li.noe-external-mega > ul.sub-menu,
  body .site-header .main-nav > ul > li.noe-external-mega > .sub-menu {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
    margin: 0 !important;
  }
}

/* JetMenu variants that place the mega panel directly under the LI, not inside ul.sub-menu. */
body .site-header .main-nav > ul.primary-menu > li.noe-external-mega > .jet-sub-mega-menu,
body .site-header .main-nav > ul.primary-menu > li.noe-external-mega > .jet-mega-menu-mega-container,
body .site-header .main-nav > ul.primary-menu > li.noe-external-mega > .jet-menu-container,
body .site-header .main-nav > ul > li.noe-external-mega > .jet-sub-mega-menu,
body .site-header .main-nav > ul > li.noe-external-mega > .jet-mega-menu-mega-container,
body .site-header .main-nav > ul > li.noe-external-mega > .jet-menu-container {
  position: fixed !important;
  top: var(--noe-header-bottom) !important;
  right: 50% !important;
  left: auto !important;
  width: min(1040px, calc(100vw - 32px)) !important;
  min-width: 0 !important;
  max-width: calc(100vw - 32px) !important;
  max-height: calc(100vh - var(--noe-header-bottom) - 24px) !important;
  overflow: visible !important;
  overflow-y: auto !important;
  margin: 10px 0 0 !important;
  padding: 0 !important;
  display: block !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  z-index: 999999 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translate(50%, 10px) !important;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease !important;
}
body .site-header .main-nav > ul.primary-menu > li.noe-external-mega:hover > .jet-sub-mega-menu,
body .site-header .main-nav > ul.primary-menu > li.noe-external-mega:hover > .jet-mega-menu-mega-container,
body .site-header .main-nav > ul.primary-menu > li.noe-external-mega:hover > .jet-menu-container,
body .site-header .main-nav > ul.primary-menu > li.noe-external-mega:focus-within > .jet-sub-mega-menu,
body .site-header .main-nav > ul.primary-menu > li.noe-external-mega:focus-within > .jet-mega-menu-mega-container,
body .site-header .main-nav > ul.primary-menu > li.noe-external-mega:focus-within > .jet-menu-container,
body .site-header .main-nav > ul.primary-menu > li.noe-external-mega.noe-menu-open > .jet-sub-mega-menu,
body .site-header .main-nav > ul.primary-menu > li.noe-external-mega.noe-menu-open > .jet-mega-menu-mega-container,
body .site-header .main-nav > ul.primary-menu > li.noe-external-mega.noe-menu-open > .jet-menu-container,
body .site-header .main-nav > ul > li.noe-external-mega:hover > .jet-sub-mega-menu,
body .site-header .main-nav > ul > li.noe-external-mega:hover > .jet-mega-menu-mega-container,
body .site-header .main-nav > ul > li.noe-external-mega:hover > .jet-menu-container,
body .site-header .main-nav > ul > li.noe-external-mega:focus-within > .jet-sub-mega-menu,
body .site-header .main-nav > ul > li.noe-external-mega:focus-within > .jet-mega-menu-mega-container,
body .site-header .main-nav > ul > li.noe-external-mega:focus-within > .jet-menu-container,
body .site-header .main-nav > ul > li.noe-external-mega.noe-menu-open > .jet-sub-mega-menu,
body .site-header .main-nav > ul > li.noe-external-mega.noe-menu-open > .jet-mega-menu-mega-container,
body .site-header .main-nav > ul > li.noe-external-mega.noe-menu-open > .jet-menu-container {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translate(50%, 0) !important;
}

/* ══════════════════════════════════════════
   NOEMANI FIX v11.0 — Native header mega menu + cart layout hardening
══════════════════════════════════════════ */

/* Cart page must not use the narrow blog/page content width. */
body.woocommerce-cart .post-content,
body.woocommerce-cart .entry-content,
body.woocommerce-cart .page-content {
  max-width: none !important;
  width: 100% !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}
body.woocommerce-cart #content > .container,
body.woocommerce-cart main > .container {
  max-width: 1220px !important;
}

/* Desktop cart: table on the right, totals on the left, no squeeze/overlap. */
body.woocommerce-cart .post-content > .woocommerce,
body.woocommerce-cart .entry-content > .woocommerce,
body.woocommerce-cart main .woocommerce,
body.woocommerce-cart #content .woocommerce {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 360px !important;
  grid-template-areas:
    "form totals"
    "form totals" !important;
  gap: 28px !important;
  align-items: start !important;
  direction: rtl !important;
  width: 100% !important;
  max-width: none !important;
}
body.woocommerce-cart .woocommerce-notices-wrapper {
  grid-column: 1 / -1 !important;
  grid-area: auto !important;
}
body.woocommerce-cart .woocommerce-cart-form {
  grid-area: form !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  overflow-x: visible !important;
  float: none !important;
}
body.woocommerce-cart .cart-collaterals {
  grid-area: totals !important;
  width: 360px !important;
  max-width: 360px !important;
  min-width: 0 !important;
  margin: 0 !important;
  float: none !important;
  clear: none !important;
}
body.woocommerce-cart .cart_totals {
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  margin: 0 !important;
}
body.woocommerce-cart table.shop_table.cart,
body.woocommerce-cart table.cart {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  table-layout: fixed !important;
  direction: rtl !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}
body.woocommerce-cart table.cart thead,
body.woocommerce-cart table.cart tbody,
body.woocommerce-cart table.cart tfoot {
  width: 100% !important;
}
body.woocommerce-cart table.cart thead { display: table-header-group !important; }
body.woocommerce-cart table.cart tbody { display: table-row-group !important; }
body.woocommerce-cart table.cart tr { display: table-row !important; }
body.woocommerce-cart table.cart th,
body.woocommerce-cart table.cart td {
  display: table-cell !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
}
body.woocommerce-cart table.cart th.product-remove,
body.woocommerce-cart table.cart td.product-remove { width: 46px !important; min-width: 46px !important; max-width: 46px !important; padding: 12px 8px !important; text-align: center !important; }
body.woocommerce-cart table.cart th.product-thumbnail,
body.woocommerce-cart table.cart td.product-thumbnail { width: 86px !important; min-width: 86px !important; max-width: 86px !important; padding: 12px 8px !important; text-align: center !important; }
body.woocommerce-cart table.cart th.product-name,
body.woocommerce-cart table.cart td.product-name { width: auto !important; min-width: 0 !important; text-align: right !important; }
body.woocommerce-cart table.cart th.product-price,
body.woocommerce-cart table.cart td.product-price { width: 112px !important; min-width: 112px !important; max-width: 112px !important; text-align: center !important; }
body.woocommerce-cart table.cart th.product-quantity,
body.woocommerce-cart table.cart td.product-quantity { width: 104px !important; min-width: 104px !important; max-width: 104px !important; text-align: center !important; visibility: visible !important; opacity: 1 !important; }
body.woocommerce-cart table.cart th.product-subtotal,
body.woocommerce-cart table.cart td.product-subtotal { width: 112px !important; min-width: 112px !important; max-width: 112px !important; text-align: center !important; visibility: visible !important; opacity: 1 !important; }
body.woocommerce-cart table.cart td.product-thumbnail img {
  width: 64px !important;
  max-width: 64px !important;
  height: 64px !important;
  max-height: 64px !important;
  object-fit: contain !important;
}
body.woocommerce-cart table.cart td.product-name a {
  display: block !important;
  line-height: 1.7 !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
}
body.woocommerce-cart table.cart td.product-quantity .quantity,
body.woocommerce-cart table.cart td.product-quantity .quantity input.qty {
  visibility: visible !important;
  opacity: 1 !important;
}
body.woocommerce-cart table.cart td.product-quantity .quantity {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
body.woocommerce-cart table.cart td.product-quantity input.qty {
  width: 58px !important;
  min-width: 58px !important;
  height: 38px !important;
  margin: 0 auto !important;
}

@media (max-width: 1180px) {
  body.woocommerce-cart .post-content > .woocommerce,
  body.woocommerce-cart .entry-content > .woocommerce,
  body.woocommerce-cart main .woocommerce,
  body.woocommerce-cart #content .woocommerce {
    display: block !important;
  }
  body.woocommerce-cart .woocommerce-cart-form {
    overflow-x: auto !important;
    margin-bottom: 28px !important;
  }
  body.woocommerce-cart table.shop_table.cart,
  body.woocommerce-cart table.cart {
    min-width: 760px !important;
  }
  body.woocommerce-cart .cart-collaterals {
    width: 100% !important;
    max-width: 460px !important;
    margin-right: 0 !important;
    margin-left: auto !important;
  }
}

/* Native Noemani mega menu: ignore/hide JetMenu's broken panel for the categories item. */
.site-header,
.site-header > .container,
.header-inner,
.main-nav,
.main-nav > ul,
.main-nav > ul > li.noe-menu-categories {
  overflow: visible !important;
}
.site-header > .container {
  position: relative !important;
}
.main-nav > ul > li.noe-menu-categories {
  position: static !important;
}
body .site-header .main-nav > ul > li.noe-menu-categories > ul.sub-menu,
body .site-header .main-nav > ul > li.noe-menu-categories > .sub-menu,
body .site-header .main-nav > ul > li.noe-menu-categories > .jet-sub-mega-menu,
body .site-header .main-nav > ul > li.noe-menu-categories > .jet-mega-menu-mega-container,
body .site-header .main-nav > ul > li.noe-menu-categories > .jet-menu-container {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.noe-header-mega {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 50% !important;
  left: auto !important;
  width: min(1080px, calc(100vw - 32px)) !important;
  max-width: calc(100vw - 32px) !important;
  z-index: 1000000 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translate(50%, 10px) !important;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease !important;
  direction: rtl !important;
}
.site-header.noe-mega-open .noe-header-mega,
.noe-header-mega:hover {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translate(50%, 0) !important;
}
.noe-header-mega__inner {
  background: #fff !important;
  border: 1px solid rgba(76,175,80,.18) !important;
  border-radius: 22px !important;
  box-shadow: 0 24px 70px rgba(0,0,0,.18) !important;
  padding: 18px !important;
  display: grid !important;
  grid-template-columns: 190px minmax(0, 1fr) !important;
  gap: 18px !important;
  min-height: 350px !important;
  overflow: hidden !important;
}
.noe-header-mega__cats {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding: 4px !important;
  border-left: 1px solid #f0f0f0 !important;
  max-height: 430px !important;
  overflow-y: auto !important;
}
.noe-header-mega__cat {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 12px 14px !important;
  border-radius: 14px !important;
  background: #f6f6f6 !important;
  color: #333 !important;
  text-decoration: none !important;
  font-weight: 800 !important;
  line-height: 1.5 !important;
}
.noe-header-mega__cat small {
  min-width: 24px !important;
  height: 24px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(76,175,80,.12) !important;
  color: #4caf50 !important;
  font-size: 11px !important;
}
.noe-header-mega__cat:hover,
.noe-header-mega__cat.is-active {
  background: #4caf50 !important;
  color: #fff !important;
}
.noe-header-mega__cat:hover small,
.noe-header-mega__cat.is-active small {
  background: rgba(255,255,255,.22) !important;
  color: #fff !important;
}
.noe-header-mega__content {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}
.noe-header-mega__top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 4px 4px 12px !important;
  border-bottom: 1px solid #f0f0f0 !important;
}
.noe-header-mega__top strong {
  display: block !important;
  color: #222 !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  line-height: 1.4 !important;
}
.noe-header-mega__top p {
  margin: 4px 0 0 !important;
  color: #777 !important;
  font-size: 13px !important;
}
.noe-header-mega__all {
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  background: #4caf50 !important;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}
.noe-header-mega__products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
}
.noe-header-mega__product {
  border: 1px solid #eee !important;
  border-radius: 18px !important;
  background: #fff !important;
  padding: 12px !important;
  box-shadow: 0 6px 18px rgba(0,0,0,.04) !important;
  min-width: 0 !important;
}
.noe-header-mega__thumb {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 132px !important;
  border-radius: 14px !important;
  background: #fafafa !important;
  overflow: hidden !important;
  margin-bottom: 10px !important;
}
.noe-header-mega__thumb img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: contain !important;
  padding: 8px !important;
}
.noe-header-mega__product h3 {
  margin: 0 0 8px !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
  font-weight: 800 !important;
  color: #222 !important;
}
.noe-header-mega__product h3 a {
  color: inherit !important;
  text-decoration: none !important;
}
.noe-header-mega__price,
.noe-header-mega__price .amount {
  color: #4caf50 !important;
  font-weight: 900 !important;
  font-size: 14px !important;
}
.noe-header-mega__price del {
  color: #999 !important;
  font-weight: 600 !important;
  display: block !important;
  font-size: 12px !important;
}

@media (max-width: 980px) {
  .noe-header-mega__inner { grid-template-columns: 160px 1fr !important; }
  .noe-header-mega__products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 680px) {
  .noe-header-mega { display: none !important; }
}

/* ══════════════════════════════════════════
   NOEMANI v4.2 SAFE PATCH
   هدف: فقط اصلاح فروشگاه، دکمه برگشت به خرید، و موبایل سبد خرید
   بدون دستکاری checkout و بدون بازنویسی مگامنو
══════════════════════════════════════════ */

/* Shop page: center the shop title box and center product cards when product count is low. */
body.woocommerce-shop .shop-layout {
  display: block !important;
  max-width: 980px !important;
  margin-right: auto !important;
  margin-left: auto !important;
}
body.woocommerce-shop .shop-sidebar {
  display: none !important;
}
body.woocommerce-shop .shop-layout > div:not(.shop-sidebar),
body.woocommerce-shop .woocommerce-products-header,
body.woocommerce-shop .shop-toolbar {
  max-width: 760px !important;
  margin-right: auto !important;
  margin-left: auto !important;
}
body.woocommerce-shop .woocommerce-products-header__title.page-title,
body.woocommerce-shop h1.woocommerce-products-header__title,
body.woocommerce-shop .page-title {
  text-align: center !important;
  margin-right: auto !important;
  margin-left: auto !important;
}
body.woocommerce-shop .woocommerce ul.products,
body.woocommerce-shop ul.products {
  grid-template-columns: repeat(auto-fit, minmax(220px, 260px)) !important;
  justify-content: center !important;
  justify-items: stretch !important;
  max-width: 760px !important;
  margin-right: auto !important;
  margin-left: auto !important;
}
body.woocommerce-shop .woocommerce ul.products li.product,
body.woocommerce-shop ul.products li.product {
  width: 100% !important;
  max-width: 260px !important;
}

/* Cart actions: replace the empty green update square with a clear return-to-shop button. */
body.woocommerce-cart table.cart td.actions {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  text-align: initial !important;
}
body.woocommerce-cart table.cart td.actions .coupon {
  order: 1 !important;
  float: none !important;
  margin: 0 !important;
  flex: 1 1 420px !important;
  max-width: 520px !important;
}
body.woocommerce-cart table.cart td.actions .noe-cart-return-shop {
  order: 2 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 44px !important;
  padding: 10px 18px !important;
  border-radius: 12px !important;
  background: #4caf50 !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  width: auto !important;
  min-width: 150px !important;
  margin: 0 !important;
}
body.woocommerce-cart table.cart td.actions .noe-cart-return-shop:hover {
  background: #388e3c !important;
  color: #fff !important;
}
body.woocommerce-cart table.cart td.actions button[name="update_cart"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Cart desktop/laptop: keep readable columns, but do not touch checkout. */
@media (min-width: 761px) {
  body.woocommerce-cart table.cart th.product-remove,
  body.woocommerce-cart table.cart td.product-remove { width: 48px !important; }
  body.woocommerce-cart table.cart th.product-thumbnail,
  body.woocommerce-cart table.cart td.product-thumbnail { width: 88px !important; }
  body.woocommerce-cart table.cart th.product-price,
  body.woocommerce-cart table.cart td.product-price,
  body.woocommerce-cart table.cart th.product-subtotal,
  body.woocommerce-cart table.cart td.product-subtotal { width: 112px !important; }
  body.woocommerce-cart table.cart th.product-quantity,
  body.woocommerce-cart table.cart td.product-quantity { width: 104px !important; }
}

/* Cart mobile: final override after all old v4 cart rules. */
@media (max-width: 760px) {
  body.woocommerce-cart #content > .container,
  body.woocommerce-cart main > .container,
  body.woocommerce-cart .container {
    max-width: 100% !important;
    padding-right: 14px !important;
    padding-left: 14px !important;
  }
  body.woocommerce-cart .post-content,
  body.woocommerce-cart .entry-content,
  body.woocommerce-cart .page-content {
    max-width: none !important;
    width: 100% !important;
  }
  body.woocommerce-cart .post-content > .woocommerce,
  body.woocommerce-cart .entry-content > .woocommerce,
  body.woocommerce-cart main .woocommerce,
  body.woocommerce-cart #content .woocommerce {
    display: block !important;
    width: 100% !important;
  }
  body.woocommerce-cart .woocommerce-cart-form {
    width: 100% !important;
    overflow: visible !important;
    margin-bottom: 18px !important;
  }
  body.woocommerce-cart table.shop_table.cart,
  body.woocommerce-cart table.cart,
  body.woocommerce-cart table.cart tbody,
  body.woocommerce-cart table.cart tfoot,
  body.woocommerce-cart table.cart tr,
  body.woocommerce-cart table.cart td {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }
  body.woocommerce-cart table.cart {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    table-layout: auto !important;
    overflow: visible !important;
  }
  body.woocommerce-cart table.cart thead {
    display: none !important;
  }
  body.woocommerce-cart table.cart tr.cart_item {
    position: relative !important;
    display: block !important;
    background: #fff !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 18px rgba(0,0,0,.06) !important;
    padding: 16px !important;
    margin-bottom: 16px !important;
    overflow: hidden !important;
  }
  body.woocommerce-cart table.cart tr.cart_item td {
    background: transparent !important;
    border: 0 !important;
    padding: 8px 0 !important;
    text-align: right !important;
  }
  body.woocommerce-cart table.cart td.product-remove {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    width: 32px !important;
    padding: 0 !important;
    z-index: 2 !important;
  }
  body.woocommerce-cart table.cart td.product-thumbnail {
    text-align: center !important;
    padding-top: 4px !important;
  }
  body.woocommerce-cart table.cart td.product-thumbnail img {
    width: 96px !important;
    max-width: 96px !important;
    height: 96px !important;
    max-height: 96px !important;
    margin: 0 auto !important;
    object-fit: contain !important;
  }
  body.woocommerce-cart table.cart td.product-name {
    text-align: center !important;
    padding-left: 38px !important;
    padding-right: 38px !important;
  }
  body.woocommerce-cart table.cart td.product-name a {
    display: block !important;
    font-size: 14px !important;
    line-height: 1.8 !important;
    color: #222 !important;
  }
  body.woocommerce-cart table.cart td.product-price,
  body.woocommerce-cart table.cart td.product-quantity,
  body.woocommerce-cart table.cart td.product-subtotal {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    text-align: left !important;
    border-top: 1px solid #f2f2f2 !important;
    padding: 10px 0 !important;
  }
  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) !important;
    color: #555 !important;
    font-weight: 800 !important;
    text-align: right !important;
  }
  body.woocommerce-cart table.cart td.product-quantity .quantity {
    width: auto !important;
    justify-content: flex-end !important;
  }
  body.woocommerce-cart table.cart td.product-quantity input.qty {
    width: 62px !important;
    min-width: 62px !important;
    height: 38px !important;
  }
  body.woocommerce-cart table.cart td.actions {
    display: block !important;
    background: #fff !important;
    border-radius: 16px !important;
    padding: 16px !important;
    box-shadow: 0 4px 18px rgba(0,0,0,.05) !important;
    margin-top: 8px !important;
  }
  body.woocommerce-cart table.cart td.actions .coupon {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: none !important;
    margin-bottom: 12px !important;
  }
  body.woocommerce-cart table.cart td.actions .coupon input.input-text,
  body.woocommerce-cart table.cart td.actions .coupon button.button,
  body.woocommerce-cart table.cart td.actions .noe-cart-return-shop {
    width: 100% !important;
    max-width: none !important;
  }
  body.woocommerce-cart .cart-collaterals,
  body.woocommerce-cart .cart_totals {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }
}


/* ══════════════════════════════════════════
   NOEMANI v4.5 — Single article sidebar/sticky fix
   فقط صفحه مقالات: جلوگیری از پریدن ویجت «آنچه در این مقاله می‌خوانیم» و محصولات روی متن
══════════════════════════════════════════ */
body.single-post #content,
body.single-post #content .container,
body.single-post .single-post-layout,
body.single-post .post-content,
body.single-post .entry-content,
body.single-post .elementor-location-single,
body.single-post .elementor-widget-theme-post-content {
  overflow: visible !important;
}

/* ستون پیش‌فرض مقالات قالب: دیگر sticky نباشد تا در RTL از ستون خارج نشود. */
body.single-post #content .blog-sidebar,
body.single-post #content .single-post-layout > aside,
body.single-post #content .single-post-layout > .blog-sidebar {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  translate: none !important;
  max-height: none !important;
  overflow: visible !important;
  z-index: 1 !important;
}

/*
  Elementor / JetSticky / TOC معمولاً هنگام اسکرول inline style position:fixed می‌گذارد.
  این selector ها فقط داخل #content و فقط در single post اعمال می‌شوند؛ پس روی منو، سبد خرید و پرداخت اثری ندارند.
*/
body.single-post #content .elementor-sticky,
body.single-post #content .elementor-sticky--active,
body.single-post #content .elementor-sticky--effects,
body.single-post #content .elementor-sticky__spacer,
body.single-post #content [data-settings*="sticky"],
body.single-post #content [data-sticky],
body.single-post #content .jet-sticky-section,
body.single-post #content .jet-sticky-column,
body.single-post #content .jet-sticky-section--stuck,
body.single-post #content .jet-sticky-column-sticky,
body.single-post #content .sticky-column,
body.single-post #content .sticky-sidebar,
body.single-post #content .theiaStickySidebar,
body.single-post #content .elementor-widget-table-of-contents,
body.single-post #content .elementor-widget-wp-widget-nav_menu,
body.single-post #content .elementor-widget-woocommerce-products,
body.single-post #content .elementor-widget-wc-archive-products,
body.single-post #content [class*="table-of-contents"],
body.single-post #content [class*="toc"],
body.single-post #content [class*="sticky"] {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  translate: none !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  z-index: auto !important;
}

body.single-post #content .elementor-sticky__spacer,
body.single-post #content .sticky-spacer,
body.single-post #content [class*="sticky-spacer"] {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

@media (min-width: 901px) {
  body.single-post #content .single-post-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 300px !important;
    gap: 40px !important;
    align-items: start !important;
  }
  body.single-post #content .single-post-layout > article {
    min-width: 0 !important;
    position: relative !important;
    z-index: 2 !important;
  }
}

@media (max-width: 900px) {
  body.single-post #content .single-post-layout {
    grid-template-columns: 1fr !important;
  }
  body.single-post #content .blog-sidebar,
  body.single-post #content .single-post-layout > aside {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 24px !important;
  }
}


/* NOEMANI v4.11 optional safe Elementor helper */
/* اگر خواستید فقط همان باکس عنوان فروشگاه وسط‌چین شود، در المنتور به خود باکس عنوان کلاس زیر را بدهید: noe-shop-title-box */
.noe-shop-title-box {
  width: 100% !important;
  max-width: 760px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
  clear: both !important;
  text-align: center !important;
  box-sizing: border-box !important;
}
.noe-shop-title-box,
.noe-shop-title-box > .elementor-widget-container {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.noe-shop-title-box .elementor-heading-title,
.noe-shop-title-box h1,
.noe-shop-title-box h2 {
  width: 100% !important;
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* ══════════════════════════════════════════
   NOEMANI v4.13 — Shop Elementor Listing Grid centering
   فقط صفحه فروشگاه: وقتی Jet Listing Grid سه ستون دارد ولی فقط دو محصول نمایش داده می‌شود،
   کارت‌ها از سمت راست نچسبند و وسط همان باکس محصولات قرار بگیرند.
   عنوان، سبد خرید، پرداخت، مقاله و مگامنو دست نخورده‌اند.
══════════════════════════════════════════ */
body.page-id-4530 .elementor-widget-jet-listing-grid .jet-listing-grid__items,
body.postid-4530 .elementor-widget-jet-listing-grid .jet-listing-grid__items,
body.woocommerce-shop .elementor-widget-jet-listing-grid .jet-listing-grid__items,
.elementor-editor-active [data-elementor-id="4530"] .elementor-widget-jet-listing-grid .jet-listing-grid__items,
.elementor-editor-preview [data-elementor-id="4530"] .elementor-widget-jet-listing-grid .jet-listing-grid__items {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: stretch !important;
  gap: 26px !important;
  direction: rtl !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

body.page-id-4530 .elementor-widget-jet-listing-grid .jet-listing-grid__item,
body.postid-4530 .elementor-widget-jet-listing-grid .jet-listing-grid__item,
body.woocommerce-shop .elementor-widget-jet-listing-grid .jet-listing-grid__item,
.elementor-editor-active [data-elementor-id="4530"] .elementor-widget-jet-listing-grid .jet-listing-grid__item,
.elementor-editor-preview [data-elementor-id="4530"] .elementor-widget-jet-listing-grid .jet-listing-grid__item {
  flex: 0 1 280px !important;
  width: 280px !important;
  max-width: 280px !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

@media (max-width: 767px) {
  body.page-id-4530 .elementor-widget-jet-listing-grid .jet-listing-grid__items,
  body.postid-4530 .elementor-widget-jet-listing-grid .jet-listing-grid__items,
  body.woocommerce-shop .elementor-widget-jet-listing-grid .jet-listing-grid__items,
  .elementor-editor-active [data-elementor-id="4530"] .elementor-widget-jet-listing-grid .jet-listing-grid__items,
  .elementor-editor-preview [data-elementor-id="4530"] .elementor-widget-jet-listing-grid .jet-listing-grid__items {
    gap: 16px !important;
  }
  body.page-id-4530 .elementor-widget-jet-listing-grid .jet-listing-grid__item,
  body.postid-4530 .elementor-widget-jet-listing-grid .jet-listing-grid__item,
  body.woocommerce-shop .elementor-widget-jet-listing-grid .jet-listing-grid__item,
  .elementor-editor-active [data-elementor-id="4530"] .elementor-widget-jet-listing-grid .jet-listing-grid__item,
  .elementor-editor-preview [data-elementor-id="4530"] .elementor-widget-jet-listing-grid .jet-listing-grid__item {
    flex-basis: min(100%, 300px) !important;
    width: min(100%, 300px) !important;
    max-width: 300px !important;
  }
}


/* ══════════════════════════════════════════
   NOEMANI v4.16 — Shop Elementor archive real full-width fix
   بررسی از DevTools نشان داد صفحه فروشگاه archive محصول است و page.php اجرا نمی‌شود.
   بنابراین مشکل باید روی template Elementor با ID 4530 و containerهای واقعی آن حل شود.
   این بخش فقط صفحه فروشگاه/ادیتور همان template را هدف می‌گیرد.
══════════════════════════════════════════ */
body.woocommerce-shop .elementor-4530.elementor-location-archive,
body.post-type-archive-product .elementor-4530.elementor-location-archive,
.elementor-editor-active .elementor-4530.elementor-location-archive,
.elementor-editor-preview .elementor-4530.elementor-location-archive {
  width: 100% !important;
  max-width: 1220px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  box-sizing: border-box !important;
}

/* خود کانتینرهای اصلی که در DevTools دیده شدند باید 100% شوند؛ نه کارت‌های محصول. */
body.woocommerce-shop .elementor-4530 .elementor-element.elementor-element-ab5ffb8,
body.woocommerce-shop .elementor-4530 .elementor-element.elementor-element-acb475d,
body.woocommerce-shop .elementor-4530 .elementor-element.elementor-element-5b53db92,
body.woocommerce-shop .elementor-4530 .elementor-element.elementor-element-447535d1,
body.woocommerce-shop .elementor-4530 .elementor-element.elementor-element-61e2975b,
body.post-type-archive-product .elementor-4530 .elementor-element.elementor-element-ab5ffb8,
body.post-type-archive-product .elementor-4530 .elementor-element.elementor-element-acb475d,
body.post-type-archive-product .elementor-4530 .elementor-element.elementor-element-5b53db92,
body.post-type-archive-product .elementor-4530 .elementor-element.elementor-element-447535d1,
body.post-type-archive-product .elementor-4530 .elementor-element.elementor-element-61e2975b,
.elementor-editor-active .elementor-4530 .elementor-element.elementor-element-ab5ffb8,
.elementor-editor-active .elementor-4530 .elementor-element.elementor-element-acb475d,
.elementor-editor-active .elementor-4530 .elementor-element.elementor-element-5b53db92,
.elementor-editor-active .elementor-4530 .elementor-element.elementor-element-447535d1,
.elementor-editor-active .elementor-4530 .elementor-element.elementor-element-61e2975b,
.elementor-editor-preview .elementor-4530 .elementor-element.elementor-element-ab5ffb8,
.elementor-editor-preview .elementor-4530 .elementor-element.elementor-element-acb475d,
.elementor-editor-preview .elementor-4530 .elementor-element.elementor-element-5b53db92,
.elementor-editor-preview .elementor-4530 .elementor-element.elementor-element-447535d1,
.elementor-editor-preview .elementor-4530 .elementor-element.elementor-element-61e2975b {
  --width: 100% !important;
  --max-width: 100% !important;
  --content-width: 100% !important;
  --container-widget-width: 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  align-self: stretch !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* e-con-boxed در Elementor یک .e-con-inner داخلی دارد؛ همان inner هم باید تمام عرض شود. */
body.woocommerce-shop .elementor-4530 .elementor-element.elementor-element-ab5ffb8 > .e-con-inner,
body.woocommerce-shop .elementor-4530 .elementor-element.elementor-element-acb475d > .e-con-inner,
body.woocommerce-shop .elementor-4530 .elementor-element.elementor-element-5b53db92 > .e-con-inner,
body.post-type-archive-product .elementor-4530 .elementor-element.elementor-element-ab5ffb8 > .e-con-inner,
body.post-type-archive-product .elementor-4530 .elementor-element.elementor-element-acb475d > .e-con-inner,
body.post-type-archive-product .elementor-4530 .elementor-element.elementor-element-5b53db92 > .e-con-inner,
.elementor-editor-active .elementor-4530 .elementor-element.elementor-element-ab5ffb8 > .e-con-inner,
.elementor-editor-active .elementor-4530 .elementor-element.elementor-element-acb475d > .e-con-inner,
.elementor-editor-active .elementor-4530 .elementor-element.elementor-element-5b53db92 > .e-con-inner,
.elementor-editor-preview .elementor-4530 .elementor-element.elementor-element-ab5ffb8 > .e-con-inner,
.elementor-editor-preview .elementor-4530 .elementor-element.elementor-element-acb475d > .e-con-inner,
.elementor-editor-preview .elementor-4530 .elementor-element.elementor-element-5b53db92 > .e-con-inner {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* این کانتینرها فقط باید عنوان و گرید را عمودی زیر هم نگه دارند. */
body.woocommerce-shop .elementor-4530 .elementor-element.elementor-element-acb475d > .e-con-inner,
body.woocommerce-shop .elementor-4530 .elementor-element.elementor-element-5b53db92,
body.post-type-archive-product .elementor-4530 .elementor-element.elementor-element-acb475d > .e-con-inner,
body.post-type-archive-product .elementor-4530 .elementor-element.elementor-element-5b53db92,
.elementor-editor-active .elementor-4530 .elementor-element.elementor-element-acb475d > .e-con-inner,
.elementor-editor-active .elementor-4530 .elementor-element.elementor-element-5b53db92,
.elementor-editor-preview .elementor-4530 .elementor-element.elementor-element-acb475d > .e-con-inner,
.elementor-editor-preview .elementor-4530 .elementor-element.elementor-element-5b53db92 {
  --flex-direction: column !important;
  --align-items: stretch !important;
  flex-direction: column !important;
  align-items: stretch !important;
}

/* باکس عنوان فروشگاه: تمام عرض باشد، اما متن فارسی همچنان سمت راست بماند. */
body.woocommerce-shop .elementor-4530 .elementor-element.elementor-element-447535d1,
body.post-type-archive-product .elementor-4530 .elementor-element.elementor-element-447535d1,
.elementor-editor-active .elementor-4530 .elementor-element.elementor-element-447535d1,
.elementor-editor-preview .elementor-4530 .elementor-element.elementor-element-447535d1 {
  text-align: right !important;
  justify-content: center !important;
}

@media (max-width: 767px) {
  body.woocommerce-shop .elementor-4530.elementor-location-archive,
  body.post-type-archive-product .elementor-4530.elementor-location-archive,
  .elementor-editor-active .elementor-4530.elementor-location-archive,
  .elementor-editor-preview .elementor-4530.elementor-location-archive {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* ══════════════════════════════════════════
   NOEMANI v4.17 — Home popular products responsive fix
   فقط بخش «محبوب‌ترین محصولات» صفحه اول را هدف می‌گیرد.
   علت خرابی: در extra.css قانون max-width:1100 بعد از قوانین موبایل آمده بود و روی موبایل هم گرید را ۳ ستونه می‌کرد.
══════════════════════════════════════════ */
body.home .products-section .noe-products-grid,
body.front-page .products-section .noe-products-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(230px, 280px)) !important;
  justify-content: center !important;
  align-items: stretch !important;
  gap: 22px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

body.home .products-section .noe-product-card,
body.front-page .products-section .noe-product-card {
  width: 100% !important;
  max-width: 280px !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

body.home .products-section .noe-product-title,
body.front-page .products-section .noe-product-title,
body.home .products-section .noe-product-title a,
body.front-page .products-section .noe-product-title a {
  font-size: 14px !important;
  line-height: 1.55 !important;
  font-weight: 700 !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  writing-mode: horizontal-tb !important;
  text-align: center !important;
}

body.home .products-section .noe-product-price,
body.front-page .products-section .noe-product-price {
  justify-content: center !important;
  text-align: center !important;
}

@media (min-width: 901px) {
  body.home .products-section .noe-products-grid,
  body.front-page .products-section .noe-products-grid {
    grid-template-columns: repeat(4, minmax(230px, 1fr)) !important;
  }
  body.home .products-section .noe-product-card,
  body.front-page .products-section .noe-product-card {
    max-width: none !important;
  }
}

@media (min-width: 681px) and (max-width: 900px) {
  body.home .products-section .noe-products-grid,
  body.front-page .products-section .noe-products-grid {
    grid-template-columns: repeat(2, minmax(240px, 300px)) !important;
  }
}

@media (max-width: 680px) {
  body.home .products-section .noe-products-grid,
  body.front-page .products-section .noe-products-grid {
    grid-template-columns: minmax(0, min(100%, 320px)) !important;
    justify-content: center !important;
    gap: 18px !important;
  }
  body.home .products-section .noe-product-card,
  body.front-page .products-section .noe-product-card {
    max-width: 320px !important;
  }
  body.home .products-section .noe-product-img,
  body.front-page .products-section .noe-product-img {
    aspect-ratio: 1 / 0.86 !important;
  }
}

/* Noemani v4.18 - homepage hero image replacement
   Products stay on the left, text area remains on the right. */
body.home .hero-slide,
body.front-page .hero-slide {
  background-image:
    linear-gradient(90deg, rgba(246,242,224,0.04) 0%, rgba(246,242,224,0.08) 42%, rgba(21,72,36,0.72) 72%, rgba(21,72,36,0.82) 100%),
    url('../images/noemani-hero-rice-left.jpg') !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

body.home .hero-content,
body.front-page .hero-content {
  margin-left: auto !important;
  margin-right: 0 !important;
  text-align: right !important;
}

@media (max-width: 680px) {
  body.home .hero-slide,
  body.front-page .hero-slide {
    background-position: 28% center !important;
  }
  body.home .hero-slide::before,
  body.front-page .hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(20,70,35,0.38);
    z-index: 1;
    pointer-events: none;
  }
  body.home .hero-content,
  body.front-page .hero-content {
    max-width: 100% !important;
    padding: 40px 18px !important;
  }
}

/* ══════════════════════════════════════════
   NOEMANI v4.23 — stable rollback + product gallery safe fix
   پایه: v4.18 پایدار. تغییرات v4.19 تا v4.22 روی مگامنو/هدر حذف شدند.
   فقط صفحه محصول: چینش thumbnailها افقی و متن‌ها RTL/راست‌چین.
══════════════════════════════════════════ */

/* فقط صفحه محصول؛ گالری را از RTL متن جدا نگه می‌داریم تا thumbnailها و کلیک تصویر خراب نشوند. */
body.single-product .woocommerce-product-gallery,
body.single-product .woocommerce-product-gallery *,
body.single-product .elementor-widget-woocommerce-product-images,
body.single-product .elementor-widget-woocommerce-product-images *,
body.single-product .jet-woo-product-gallery,
body.single-product .jet-woo-product-gallery *,
body.single-product [class*="product-gallery"],
body.single-product [class*="product-gallery"] * {
  box-sizing: border-box !important;
}

body.single-product .woocommerce-product-gallery,
body.single-product .elementor-widget-woocommerce-product-images,
body.single-product .jet-woo-product-gallery,
body.single-product [class*="product-gallery"] {
  direction: ltr !important;
}

/* خود عکس اصلی محصول بزرگ و طبیعی بماند. */
body.single-product .woocommerce-product-gallery__wrapper,
body.single-product .woocommerce-product-gallery .flex-viewport,
body.single-product .woocommerce-product-gallery__image,
body.single-product .jet-woo-product-gallery__image,
body.single-product [class*="product-gallery"] [class*="image"] {
  max-width: 100% !important;
}
body.single-product .woocommerce-product-gallery__image img,
body.single-product .woocommerce-product-gallery img.wp-post-image,
body.single-product .elementor-widget-woocommerce-product-images img,
body.single-product .jet-woo-product-gallery img,
body.single-product [class*="product-gallery"] img {
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
}

/* thumbnailهای WooCommerce: کنار هم، بدون شماره، نه زیر هم. */
body.single-product .woocommerce-product-gallery .flex-control-nav.flex-control-thumbs,
body.single-product ol.flex-control-nav.flex-control-thumbs,
body.single-product ul.flex-control-nav.flex-control-thumbs {
  direction: ltr !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 14px auto 0 !important;
  padding: 0 !important;
  list-style: none !important;
  clear: both !important;
}
body.single-product .woocommerce-product-gallery .flex-control-nav.flex-control-thumbs li,
body.single-product ol.flex-control-nav.flex-control-thumbs li,
body.single-product ul.flex-control-nav.flex-control-thumbs li {
  display: block !important;
  float: none !important;
  width: 72px !important;
  max-width: 72px !important;
  min-width: 72px !important;
  height: 72px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  cursor: pointer !important;
}
body.single-product .woocommerce-product-gallery .flex-control-thumbs li::marker,
body.single-product ol.flex-control-nav.flex-control-thumbs li::marker,
body.single-product ul.flex-control-nav.flex-control-thumbs li::marker {
  content: '' !important;
}
body.single-product .woocommerce-product-gallery .flex-control-thumbs img,
body.single-product ol.flex-control-nav.flex-control-thumbs img,
body.single-product ul.flex-control-nav.flex-control-thumbs img {
  display: block !important;
  width: 72px !important;
  height: 72px !important;
  max-width: 72px !important;
  max-height: 72px !important;
  object-fit: contain !important;
  padding: 6px !important;
  border: 1px solid rgba(76,175,80,.28) !important;
  border-radius: 10px !important;
  background: #fff !important;
  opacity: 1 !important;
}
body.single-product .woocommerce-product-gallery .flex-control-thumbs img.flex-active,
body.single-product .woocommerce-product-gallery .flex-control-thumbs img:hover {
  border-color: #4caf50 !important;
  box-shadow: 0 4px 14px rgba(76,175,80,.18) !important;
}

/* thumbnailهای JetWoo/Elementor gallery نیز افقی بمانند. */
body.single-product .jet-woo-product-gallery__thumbs,
body.single-product .jet-woo-product-gallery__thumbs-list,
body.single-product .jet-woo-product-gallery .swiper-wrapper,
body.single-product [class*="product-gallery"] [class*="thumb"] ul,
body.single-product [class*="product-gallery"] [class*="thumbs"] {
  direction: ltr !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  margin-top: 14px !important;
}
body.single-product .jet-woo-product-gallery__thumb,
body.single-product .jet-woo-product-gallery .swiper-slide,
body.single-product [class*="product-gallery"] [class*="thumb"] li,
body.single-product [class*="product-gallery"] [class*="thumb"] .swiper-slide {
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  height: 72px !important;
  margin: 0 !important;
  float: none !important;
  list-style: none !important;
}

/* متن‌های محصول از راست شروع شوند، بدون دخالت در گالری تصویر و دکمه‌ها. */
body.single-product .summary,
body.single-product .entry-summary,
body.single-product .product_title,
body.single-product .elementor-widget-theme-post-title,
body.single-product .elementor-widget-woocommerce-product-title,
body.single-product .elementor-widget-woocommerce-product-short-description,
body.single-product .woocommerce-product-details__short-description,
body.single-product .woocommerce-tabs,
body.single-product .woocommerce-Tabs-panel,
body.single-product .elementor-widget-text-editor,
body.single-product .elementor-widget-woocommerce-product-content {
  direction: rtl !important;
  text-align: right !important;
}
body.single-product .summary ul,
body.single-product .entry-summary ul,
body.single-product .woocommerce-product-details__short-description ul,
body.single-product .woocommerce-Tabs-panel ul,
body.single-product .elementor-widget-text-editor ul {
  direction: rtl !important;
  text-align: right !important;
  padding-right: 1.25em !important;
  padding-left: 0 !important;
}
body.single-product .summary li,
body.single-product .entry-summary li,
body.single-product .woocommerce-product-details__short-description li,
body.single-product .woocommerce-Tabs-panel li,
body.single-product .elementor-widget-text-editor li {
  text-align: right !important;
}

@media (max-width: 767px) {
  body.single-product .woocommerce-product-gallery .flex-control-thumbs li,
  body.single-product ol.flex-control-nav.flex-control-thumbs li,
  body.single-product ul.flex-control-nav.flex-control-thumbs li,
  body.single-product .jet-woo-product-gallery__thumb,
  body.single-product .jet-woo-product-gallery .swiper-slide,
  body.single-product [class*="product-gallery"] [class*="thumb"] li,
  body.single-product [class*="product-gallery"] [class*="thumb"] .swiper-slide {
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    height: 64px !important;
  }
  body.single-product .woocommerce-product-gallery .flex-control-thumbs img,
  body.single-product ol.flex-control-nav.flex-control-thumbs img,
  body.single-product ul.flex-control-nav.flex-control-thumbs img {
    width: 64px !important;
    height: 64px !important;
    max-width: 64px !important;
    max-height: 64px !important;
  }
}

/* ══════════════════════════════════════════
   NOEMANI v4.28 — اساسی‌ترین اصلاح پرداخت
   ساختار checkout با template override کنترل می‌شود؛ CSS فقط روی همین ساختار اعمال می‌شود.
   هدف: برداشتن محدودیت عرض، دو ستون پایدار دسکتاپ، تک‌ستون ریسپانسیو، جدول سفارش خوانا.
══════════════════════════════════════════ */

body.woocommerce-checkout .noe-checkout-page-container,
body.woocommerce-checkout .noe-checkout-page-content,
body.woocommerce-checkout .noe-checkout-page-content > .woocommerce {
  width: 100% !important;
  max-width: 1220px !important;
  margin-inline: auto !important;
  box-sizing: border-box !important;
}
body.woocommerce-checkout .noe-checkout-page-content {
  max-width: none !important;
}
body.woocommerce-checkout .noe-checkout-page-content > .woocommerce {
  max-width: 1180px !important;
}

/* صفحات عمومی هم دیگر داخل 860px گیر نمی‌کنند، اما صفحات محصول/فروشگاه دست‌نخورده می‌مانند. */
body:not(.woocommerce-checkout) .noe-fullwidth-page-container,
body:not(.woocommerce-checkout) .noe-fullwidth-page-content,
.noe-contact-page-container {
  width: 100% !important;
  max-width: 1220px !important;
  margin-inline: auto !important;
  box-sizing: border-box !important;
}
body:not(.woocommerce-checkout) .noe-fullwidth-page-content {
  max-width: none !important;
}

body.woocommerce-checkout form.checkout.noe-checkout-form {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
  float: none !important;
  clear: both !important;
  direction: rtl !important;
  box-sizing: border-box !important;
}

body.woocommerce-checkout .noe-checkout-grid {
  display: grid !important;
  grid-template-columns: minmax(560px, 1fr) minmax(340px, 420px) !important;
  grid-template-areas: "details review" !important;
  gap: 32px !important;
  align-items: start !important;
  width: 100% !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
  direction: rtl !important;
  box-sizing: border-box !important;
}
body.woocommerce-checkout .noe-checkout-details-card,
body.woocommerce-checkout .noe-checkout-review-card {
  min-width: 0 !important;
  width: 100% !important;
  float: none !important;
  clear: none !important;
  box-sizing: border-box !important;
  background: rgba(245, 251, 245, .92) !important;
  border: 1px solid rgba(76,175,80,.08) !important;
  border-radius: 20px !important;
  box-shadow: 0 4px 18px rgba(0,0,0,.045) !important;
}
body.woocommerce-checkout .noe-checkout-details-card {
  grid-area: details !important;
  padding: 30px !important;
}
body.woocommerce-checkout .noe-checkout-review-card {
  grid-area: review !important;
  padding: 24px !important;
}
body.woocommerce-checkout .noe-checkout-details-card .col2-set,
body.woocommerce-checkout .noe-checkout-details-card #customer_details,
body.woocommerce-checkout .noe-checkout-details-card .col-1,
body.woocommerce-checkout .noe-checkout-details-card .col-2 {
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  clear: both !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
body.woocommerce-checkout .noe-checkout-details-card .col-2 {
  margin-top: 24px !important;
}

body.woocommerce-checkout .noe-checkout-details-card h3,
body.woocommerce-checkout .noe-checkout-review-card #order_review_heading {
  margin: 0 0 22px !important;
  padding: 0 !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  line-height: 1.6 !important;
  color: #222 !important;
  text-align: right !important;
  direction: rtl !important;
}
body.woocommerce-checkout .noe-checkout-review-card #order_review_heading {
  text-align: center !important;
}

/* فیلدهای پرداخت */
body.woocommerce-checkout .noe-checkout-form .form-row,
body.woocommerce-checkout .noe-checkout-form .woocommerce form .form-row {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  clear: both !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
body.woocommerce-checkout .noe-checkout-form .form-row-first,
body.woocommerce-checkout .noe-checkout-form .form-row-last {
  width: 100% !important;
  float: none !important;
}
body.woocommerce-checkout .noe-checkout-form label {
  display: block !important;
  margin-bottom: 7px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #444 !important;
  text-align: right !important;
}
body.woocommerce-checkout .noe-checkout-form input.input-text,
body.woocommerce-checkout .noe-checkout-form input[type="text"],
body.woocommerce-checkout .noe-checkout-form input[type="email"],
body.woocommerce-checkout .noe-checkout-form input[type="tel"],
body.woocommerce-checkout .noe-checkout-form textarea,
body.woocommerce-checkout .noe-checkout-form select,
body.woocommerce-checkout .noe-checkout-form .select2-container .select2-selection--single {
  width: 100% !important;
  max-width: none !important;
  min-height: 48px !important;
  padding: 12px 14px !important;
  border: 1.5px solid #e4e4e4 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #333 !important;
  font-size: 14px !important;
  text-align: right !important;
  direction: rtl !important;
  box-sizing: border-box !important;
  outline: none !important;
}
body.woocommerce-checkout .noe-checkout-form .select2-container {
  width: 100% !important;
}

/* جدول سفارش: بدون ستون سبز عمودی و بدون فشردگی */
body.woocommerce-checkout .noe-checkout-review-card #order_review,
body.woocommerce-checkout .noe-checkout-review-card .woocommerce-checkout-review-order {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  clear: both !important;
  direction: rtl !important;
  box-sizing: border-box !important;
}
body.woocommerce-checkout .noe-checkout-review-card table.shop_table,
body.woocommerce-checkout .noe-checkout-review-card table.woocommerce-checkout-review-order-table {
  display: table !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  table-layout: auto !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 0 !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  background: #fff !important;
  box-shadow: none !important;
  direction: rtl !important;
  box-sizing: border-box !important;
}
body.woocommerce-checkout .noe-checkout-review-card table.shop_table thead { display: table-header-group !important; }
body.woocommerce-checkout .noe-checkout-review-card table.shop_table tbody { display: table-row-group !important; }
body.woocommerce-checkout .noe-checkout-review-card table.shop_table tfoot { display: table-row-group !important; }
body.woocommerce-checkout .noe-checkout-review-card table.shop_table tr { display: table-row !important; }
body.woocommerce-checkout .noe-checkout-review-card table.shop_table th,
body.woocommerce-checkout .noe-checkout-review-card table.shop_table td {
  display: table-cell !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 12px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid #eef3ee !important;
  background: #fff !important;
  color: #333 !important;
  font-size: 13px !important;
  line-height: 1.75 !important;
  vertical-align: middle !important;
  text-align: right !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
  box-sizing: border-box !important;
}
body.woocommerce-checkout .noe-checkout-review-card table.shop_table thead th {
  background: #4caf50 !important;
  color: #fff !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}
body.woocommerce-checkout .noe-checkout-review-card table.shop_table .product-name {
  width: 62% !important;
  text-align: right !important;
}
body.woocommerce-checkout .noe-checkout-review-card table.shop_table .product-total,
body.woocommerce-checkout .noe-checkout-review-card table.shop_table tfoot td {
  width: 38% !important;
  text-align: left !important;
  direction: ltr !important;
  color: #4caf50 !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}
body.woocommerce-checkout .noe-checkout-review-card table.shop_table tfoot th {
  font-weight: 900 !important;
}
body.woocommerce-checkout .noe-checkout-review-card ul#shipping_method {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  direction: rtl !important;
}
body.woocommerce-checkout .noe-checkout-review-card ul#shipping_method li {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
  border: 0 !important;
  list-style: none !important;
}

/* پرداخت */
body.woocommerce-checkout .noe-checkout-review-card #payment,
body.woocommerce-checkout .noe-checkout-review-card .woocommerce-checkout-payment {
  width: 100% !important;
  max-width: none !important;
  margin: 18px 0 0 !important;
  padding: 18px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-sizing: border-box !important;
  direction: rtl !important;
}
body.woocommerce-checkout .noe-checkout-review-card #payment ul.payment_methods,
body.woocommerce-checkout .noe-checkout-review-card .woocommerce-checkout-payment ul.payment_methods {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
body.woocommerce-checkout .noe-checkout-review-card #payment ul.payment_methods li {
  list-style: none !important;
  border-bottom: 1px solid #eef3ee !important;
  padding: 12px 0 !important;
}
body.woocommerce-checkout .noe-checkout-review-card #place_order {
  width: 100% !important;
  margin-top: 18px !important;
  border-radius: 12px !important;
}

/* ریسپانسیو: تبلت و موبایل */
@media (max-width: 1040px) {
  body.woocommerce-checkout .noe-checkout-grid {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "details"
      "review" !important;
    max-width: 760px !important;
    gap: 24px !important;
  }
}
@media (max-width: 620px) {
  body.woocommerce-checkout .noe-checkout-page-container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  body.woocommerce-checkout .noe-checkout-details-card,
  body.woocommerce-checkout .noe-checkout-review-card {
    padding: 16px !important;
    border-radius: 16px !important;
  }
  body.woocommerce-checkout .noe-checkout-review-card table.shop_table th,
  body.woocommerce-checkout .noe-checkout-review-card table.shop_table td {
    padding: 10px 8px !important;
    font-size: 12px !important;
  }
}
