/*
Theme Name: MissGallery
Theme URI: https://missgallery.ir
Author: MissGallery Team
Description: قالب اختصاصی فروشگاه زیورآلات میس‌گالری — لوکس، مینیمال، راست‌به‌چپ و کاملاً سازگار با ووکامرس.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 8.0
License: GPL v2 or later
Text Domain: missgallery
Tags: e-commerce, woocommerce, rtl-language-support, custom-colors, block-styles
*/

/* ==========================================================================
   1) توکن‌های طراحی (Design Tokens)
   طلایی #D4AF37 | زغالی #2C2C2C | سفید #FFFFFF | مشکی متن #1A1A1A
   ========================================================================== */
:root {
  --mg-gold: #d4af37;
  --mg-gold-deep: #c9a94e;
  --mg-gold-soft: #f6ecd2;
  --mg-charcoal: #2c2c2c;
  --mg-charcoal-2: #3a3a3a;
  --mg-white: #ffffff;
  --mg-text: #1a1a1a;
  --mg-muted: #6b6b6b;
  --mg-line: #ece7dd;

  --mg-radius: 18px;
  --mg-radius-sm: 12px;
  --mg-shadow: 0 18px 45px -25px rgba(26, 26, 26, 0.35);
  --mg-shadow-gold: 0 16px 40px -20px rgba(212, 175, 55, 0.55);
  --mg-container: 1240px;
  --mg-font: "Vazirmatn", "IRANSansX", Tahoma, sans-serif;
  --mg-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2) پایه و تایپوگرافی
   ========================================================================== */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--mg-white);
  color: var(--mg-text);
  font-family: var(--mg-font);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--mg-font);
  font-weight: 800;
  line-height: 1.45;
  color: var(--mg-text);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }

p { margin: 0 0 1em; }

a { color: var(--mg-text); text-decoration: none; transition: color var(--mg-transition); }
a:hover { color: var(--mg-gold-deep); }

img { max-width: 100%; height: auto; display: block; }

.mg-container {
  width: 100%;
  max-width: var(--mg-container);
  margin-inline: auto;
  padding-inline: 20px;
}

.mg-section { padding: clamp(48px, 7vw, 96px) 0; }
.mg-section--soft { background: #fbf9f5; }

.mg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--mg-gold-deep);
  background: var(--mg-gold-soft);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 14px;
}

.mg-lead { color: var(--mg-muted); max-width: 62ch; }

.mg-screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
}

/* ==========================================================================
   3) دکمه‌ها — طلایی با متن مشکی
   ========================================================================== */
.mg-btn,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--mg-gold), var(--mg-gold-deep));
  color: var(--mg-text);
  font-family: var(--mg-font);
  font-weight: 800;
  font-size: 15px;
  border: 0;
  border-radius: 999px;
  padding: 13px 28px;
  cursor: pointer;
  box-shadow: var(--mg-shadow-gold);
  transition: transform var(--mg-transition), box-shadow var(--mg-transition), filter var(--mg-transition);
}
.mg-btn:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
  color: var(--mg-text);
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.mg-btn--ghost {
  background: transparent;
  color: var(--mg-white);
  border: 1px solid rgba(212, 175, 55, 0.6);
  box-shadow: none;
}
.mg-btn--ghost:hover { background: rgba(212, 175, 55, 0.14); color: var(--mg-white); }

.mg-btn--outline {
  background: transparent;
  color: var(--mg-text);
  border: 1px solid var(--mg-line);
  box-shadow: none;
}

/* ==========================================================================
   4) هدر زغالی + منو
   ========================================================================== */
.mg-topbar {
  background: #1f1f1f;
  color: #e9e2d2;
  font-size: 12.5px;
  padding: 8px 0;
}
.mg-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mg-topbar a { color: #e9e2d2; }

.mg-header {
  background: var(--mg-charcoal);
  color: var(--mg-white);
  position: sticky;
  top: 0;
  z-index: 90;
}
.mg-header__inner {
  display: flex; align-items: center; gap: 18px;
  min-height: 78px;
}
.mg-logo { display: flex; align-items: center; gap: 10px; }
.mg-logo__mark {
  width: 42px; height: 42px; border-radius: 14px;
  background: linear-gradient(135deg, var(--mg-gold), var(--mg-gold-deep));
  display: grid; place-items: center;
  color: var(--mg-charcoal); font-weight: 900;
}
.mg-logo__text { display: flex; flex-direction: column; line-height: 1.2; }
.mg-logo__title { font-size: 19px; font-weight: 900; color: var(--mg-gold); }
.mg-logo__sub { font-size: 11px; color: #b9b2a4; }

.mg-nav { margin-inline-start: auto; }
.mg-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.mg-nav li { position: relative; }
.mg-nav a { color: var(--mg-white); font-size: 14.5px; font-weight: 600; padding: 10px 14px; display: block; border-radius: 999px; }
.mg-nav a:hover, .mg-nav .current-menu-item > a { color: var(--mg-gold); background: rgba(255, 255, 255, 0.06); }

.mg-nav .sub-menu {
  position: absolute; top: 100%; inset-inline-end: 0;
  min-width: 220px; background: var(--mg-charcoal-2);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--mg-radius-sm);
  padding: 8px; display: none; flex-direction: column;
  box-shadow: var(--mg-shadow);
}
.mg-nav li:hover > .sub-menu { display: flex; }

.mg-header__actions { display: flex; align-items: center; gap: 6px; }
.mg-icon-btn {
  position: relative;
  width: 42px; height: 42px; border-radius: 999px;
  display: grid; place-items: center;
  color: var(--mg-gold); background: rgba(255, 255, 255, 0.06);
  border: 0; cursor: pointer;
  transition: background var(--mg-transition);
}
.mg-icon-btn:hover { background: rgba(212, 175, 55, 0.2); }
.mg-cart-count {
	position: absolute;
	top: -5px;
	inset-inline-start: -5px;
	z-index: 10;

	display: flex !important;
	align-items: center;
	justify-content: center;

	min-width: 21px;
	height: 21px;
	padding: 0 5px;
	border-radius: 999px;

	background: #d4af37;
	color: #1a1a1a !important;
	-webkit-text-fill-color: #1a1a1a !important;

	font-family: Tahoma, sans-serif;
	font-size: 11px !important;
	font-weight: 900 !important;
	line-height: 21px !important;
	text-align: center;
	text-indent: 0 !important;

	opacity: 1 !important;
	visibility: visible !important;
}

.mg-search-panel {
  display: none; background: var(--mg-charcoal-2);
  border-top: 1px solid rgba(212, 175, 55, 0.25);
  padding: 16px 0;
}
.mg-search-panel.is-open { display: block; }
.mg-search-panel form { display: flex; gap: 10px; }
.mg-search-panel input[type="search"] {
  flex: 1; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.25); color: var(--mg-white);
  padding: 12px 18px; font-family: var(--mg-font);
}

.mg-burger { display: none; }

/* ==========================================================================
   5) هیرو
   ========================================================================== */
.mg-hero { position: relative; background: var(--mg-charcoal); color: var(--mg-white); overflow: hidden; }
.mg-hero__slides { position: relative; min-height: clamp(430px, 62vh, 640px); }
.mg-hero__slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease;
}
.mg-hero__slide.is-active { opacity: 1; }
.mg-hero__slide img { width: 100%; height: 100%; object-fit: cover; }
.mg-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to left, rgba(20, 20, 20, 0.9), rgba(20, 20, 20, 0.35));
}
.mg-hero__content {
  position: absolute; inset: 0; display: flex; align-items: center;
}
.mg-hero h1 { color: var(--mg-white); max-width: 18ch; }
.mg-hero h1 span { color: var(--mg-gold); }
.mg-hero p { color: #ddd5c6; max-width: 46ch; }
.mg-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.mg-hero__dots { position: absolute; bottom: 24px; inset-inline-start: 50%; transform: translateX(50%); display: flex; gap: 8px; }
.mg-hero__dots button {
  width: 26px; height: 4px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.35); cursor: pointer;
}
.mg-hero__dots button.is-active { background: var(--mg-gold); }

/* ==========================================================================
   6) مزیت‌ها، نظرات و چیدمان‌ها
   ========================================================================== */
.mg-grid { display: grid; gap: 22px; }
.mg-grid--4 { grid-template-columns: repeat(4, 1fr); }
.mg-grid--3 { grid-template-columns: repeat(3, 1fr); }
.mg-grid--2 { grid-template-columns: repeat(2, 1fr); }

.mg-benefit {
  background: var(--mg-white); border: 1px solid var(--mg-line);
  border-radius: var(--mg-radius); padding: 24px;
  transition: transform var(--mg-transition), box-shadow var(--mg-transition);
}
.mg-benefit:hover { transform: translateY(-4px); box-shadow: var(--mg-shadow); }
.mg-benefit__icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--mg-gold-soft); color: var(--mg-gold-deep);
  display: grid; place-items: center; margin-bottom: 14px;
}
.mg-benefit h3 { font-size: 1.05rem; margin-bottom: 6px; }
.mg-benefit p { color: var(--mg-muted); font-size: 14px; margin: 0; }

.mg-testimonial {
  background: var(--mg-white); border: 1px solid var(--mg-line);
  border-radius: var(--mg-radius); padding: 26px;
}
.mg-testimonial__stars { color: var(--mg-gold); letter-spacing: 2px; }
.mg-testimonial cite { display: block; margin-top: 14px; font-style: normal; font-weight: 800; }
.mg-testimonial small { color: var(--mg-muted); }

.mg-section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 30px; flex-wrap: wrap;
}

/* ==========================================================================
   6.1) اسلایدر دسته‌بندی‌ها (عکس مربع کامل + عنوان زیر مربع)
   ========================================================================== */
.mg-cat-slider-wrapper {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 12px 4px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mg-cat-slider-wrapper::-webkit-scrollbar {
  display: none;
}

.mg-cat-item {
  flex: 0 0 calc(12.5% - 14px);
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: transform var(--mg-transition);
}

.mg-cat-item:hover {
  transform: translateY(-4px);
}

.mg-cat-item__thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--mg-radius-sm);
  overflow: hidden;
  background: #f5f5f5;
  border: 1px solid var(--mg-line);
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  transition: border-color var(--mg-transition), box-shadow var(--mg-transition);
}

.mg-cat-item:hover .mg-cat-item__thumb {
  border-color: var(--mg-gold);
  box-shadow: var(--mg-shadow-gold);
}

.mg-cat-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.mg-cat-item:hover .mg-cat-item__thumb img {
  transform: scale(1.08);
}

.mg-cat-item__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--mg-text);
  text-align: center;
  white-space: nowrap;
  transition: color var(--mg-transition);
}

.mg-cat-item:hover .mg-cat-item__title {
  color: var(--mg-gold-deep);
}

/* خبرنامه */
.mg-newsletter {
  background: #2C2C2C;;
  color: var(--mg-white); border-radius: 26px;
  padding: clamp(28px, 5vw, 56px);
  display: grid; gap: 24px; grid-template-columns: 1.2fr 1fr; align-items: center;
}
.mg-newsletter h2 { color: var(--mg-white); }
.mg-newsletter p { color: #ccc4b5; margin: 0; }
.mg-newsletter form { display: flex; gap: 10px; }
.mg-newsletter input[type="tel"] {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--mg-white);
  padding: 13px 20px;
  font-family: var(--mg-font);
}

/* ==========================================================================
   7) کارت محصول ووکامرس + مشاهده سریع
   ========================================================================== */
.woocommerce ul.products,
.woocommerce-page ul.products {
  display: grid; gap: 26px; margin: 0; padding: 0; list-style: none;
}
.woocommerce ul.products.columns-4 { grid-template-columns: repeat(4, 1fr); }
.woocommerce ul.products.columns-3 { grid-template-columns: repeat(3, 1fr); }

.woocommerce ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; text-align: start; }
.woocommerce ul.products li.product a img { border-radius: var(--mg-radius); margin-bottom: 12px; }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 1rem !important; font-weight: 800; padding: 0 !important;
}
.woocommerce ul.products li.product .price { color: var(--mg-text); font-weight: 800; }
.woocommerce ul.products li.product .price del { color: var(--mg-muted); font-weight: 500; }
.woocommerce ul.products li.product .price ins { text-decoration: none; }

.mg-loop-media { position: relative; overflow: hidden; border-radius: var(--mg-radius); background: #f3efe8; }
.mg-loop-media__hover {
  position: absolute; inset: 0; opacity: 0; transition: opacity var(--mg-transition);
}
li.product:hover .mg-loop-media__hover { opacity: 1; }
.mg-loop-media img { transition: transform 0.9s ease; }
li.product:hover .mg-loop-media img { transform: scale(1.08); }

.mg-quickview-btn {
  position: absolute; inset-inline: 14px; bottom: 14px;
  opacity: 0; transform: translateY(10px);
  transition: opacity var(--mg-transition), transform var(--mg-transition);
  background: rgba(255, 255, 255, 0.94); color: var(--mg-text);
  border: 0; border-radius: 999px; padding: 11px 16px;
  font-family: var(--mg-font); font-weight: 700; cursor: pointer;
}
li.product:hover .mg-quickview-btn { opacity: 1; transform: none; }

.woocommerce span.onsale,
.mg-badge {
  background: var(--mg-gold) !important; color: var(--mg-charcoal) !important;
  border-radius: 999px !important; font-weight: 800; min-height: 0 !important;
  line-height: 1 !important; padding: 7px 13px !important;
  inset-inline-end: 12px; inset-inline-start: auto; top: 12px;
}

.mg-modal {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(20, 20, 20, 0.6); backdrop-filter: blur(4px);
}
.mg-modal.is-open { display: flex; }
.mg-modal__box {
  background: var(--mg-white); border-radius: 22px; max-width: 900px; width: 100%;
  max-height: 88vh; overflow: auto; padding: 26px; position: relative;
}
.mg-modal__close { position: absolute; top: 14px; inset-inline-start: 14px; border: 0; background: transparent; font-size: 22px; cursor: pointer; }

/* ==========================================================================
   8) صفحه محصول — گالری چندنما + زوم روی هاور
   ========================================================================== */
.mg-single-product { display: grid; grid-template-columns: 1.05fr 1fr; gap: 42px; }

.mg-gallery__stage {
  position: relative; overflow: hidden; border-radius: 22px;
  background: #f3efe8; aspect-ratio: 4 / 5; cursor: zoom-in;
}
.mg-gallery__stage img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.25s ease;
  transform-origin: center center;
}
.mg-gallery__stage.is-zooming img { transform: scale(2.1); }
.mg-gallery__thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.mg-gallery__thumbs button {
  width: 78px; height: 96px; border-radius: 14px; overflow: hidden;
  border: 2px solid transparent; padding: 0; cursor: pointer; background: none;
}
.mg-gallery__thumbs button.is-active { border-color: var(--mg-gold); }
.mg-gallery__hint { margin-top: 8px; font-size: 12.5px; color: var(--mg-muted); }

.woocommerce div.product .product_title { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--mg-text); font-size: 1.4rem; font-weight: 900; }
.woocommerce div.product form.cart div.quantity { border: 1px solid var(--mg-line); border-radius: 999px; overflow: hidden; }
.woocommerce div.product form.cart .qty { border: 0; text-align: center; font-family: var(--mg-font); padding: 12px; }

.mg-trust-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.mg-trust {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--mg-line); border-radius: 999px;
  padding: 8px 14px; font-size: 13px; color: var(--mg-muted); background: #fbf9f5;
}
.mg-stock-warn { color: #a4571c; font-weight: 700; font-size: 14px; }

.woocommerce div.product .woocommerce-tabs ul.tabs { padding: 0 !important; border: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.woocommerce div.product .woocommerce-tabs ul.tabs::before { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li {
  background: #fbf9f5 !important; border: 1px solid var(--mg-line) !important;
  border-radius: 999px !important; margin: 0 !important;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: var(--mg-gold-soft) !important; border-color: var(--mg-gold) !important; }

/* ==========================================================================
   9) آرشیو محصول + سایدبار فیلتر
   ========================================================================== */
.mg-shop-layout { display: grid; grid-template-columns: 280px 1fr; gap: 34px; align-items: start; }
.mg-filter-card {
  border: 1px solid var(--mg-line); border-radius: var(--mg-radius);
  padding: 20px; background: var(--mg-white); margin-bottom: 18px;
}
.mg-filter-card h3 { font-size: 1rem; }
.mg-filter-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mg-filter-card a { font-size: 14px; color: var(--mg-muted); }
.mg-filter-card a:hover { color: var(--mg-gold-deep); }
.mg-shop-hero {
  background: linear-gradient(135deg, #fbf6ea, #fff); border: 1px solid var(--mg-line);
  border-radius: 22px; padding: clamp(22px, 4vw, 40px); margin-bottom: 30px;
}
.mg-subcat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mg-chip {
  border: 1px solid var(--mg-line); border-radius: 999px;
  padding: 8px 16px; font-size: 13.5px; background: var(--mg-white);
}
.mg-chip:hover, .mg-chip.is-active { background: var(--mg-gold-soft); border-color: var(--mg-gold); }

/* کنترل فیلتر در موبایل؛ در دسکتاپ سایدبار عادی نمایش داده می‌شود. */
.mg-mobile-filter-bar,
.mg-mobile-filter-header,
.mg-filter-overlay {
  display: none;
}

@media (max-width: 900px) {
  .mg-mobile-filter-bar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 16px;
  }

  .mg-mobile-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 18px;
    border: 1px solid var(--mg-line);
    border-radius: 999px;
    background: var(--mg-text);
    color: var(--mg-white);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--mg-shadow);
  }

  .mg-mobile-filter-toggle__icon {
    color: var(--mg-gold);
    font-size: 20px;
    line-height: 1;
  }

  .mg-shop-filters {
    position: fixed;
    z-index: 10001;
    inset: auto 0 0 0;
    max-height: min(84vh, 760px);
    padding: 0 16px calc(18px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 24px 24px 0 0;
    background: var(--mg-white);
    box-shadow: 0 -18px 55px rgba(0, 0, 0, 0.24);
    transform: translateY(105%);
    visibility: hidden;
    transition: transform 240ms ease, visibility 240ms ease;
  }

  .mg-shop-filters.is-open {
    transform: translateY(0);
    visibility: visible;
  }

  .mg-mobile-filter-header {
    position: sticky;
    z-index: 2;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 62px;
    margin: 0 -16px 16px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--mg-line);
    background: var(--mg-white);
  }

  .mg-mobile-filter-close {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--mg-line);
    border-radius: 50%;
    background: var(--mg-bg);
    color: var(--mg-text);
    font: inherit;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
  }

  .mg-filter-overlay {
    position: fixed;
    z-index: 10000;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.52);
    opacity: 0;
    visibility: hidden;
    transition: opacity 200ms ease, visibility 200ms ease;
  }

  body.mg-filters-open {
    overflow: hidden;
  }

  body.mg-filters-open .mg-filter-overlay {
    display: block;
    opacity: 1;
    visibility: visible;
  }

  .mg-shop-filters .mg-filter-card {
    padding: 16px;
    margin-bottom: 12px;
  }
}

/* بردکرامب */
.mg-breadcrumb, .woocommerce .woocommerce-breadcrumb {
  font-size: 13px; color: var(--mg-muted); padding: 16px 0; margin: 0;
}
.woocommerce .woocommerce-breadcrumb a { color: var(--mg-muted); }

/* ==========================================================================
   10) وبلاگ / مجله
   ========================================================================== */
.mg-post-card {
  border: 1px solid var(--mg-line); border-radius: var(--mg-radius);
  overflow: hidden; background: var(--mg-white);
  transition: transform var(--mg-transition), box-shadow var(--mg-transition);
}
.mg-post-card:hover { transform: translateY(-4px); box-shadow: var(--mg-shadow); }
.mg-post-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.mg-post-card__body { padding: 20px; }
.mg-post-card__meta { font-size: 12.5px; color: var(--mg-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.mg-entry { max-width: 78ch; margin-inline: auto; }
.mg-entry img { border-radius: var(--mg-radius); }
.mg-share { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 0; }

/* ==========================================================================
   11) صفحات درباره/خدمات/تماس
   ========================================================================== */
.mg-split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.mg-stat { border: 1px solid var(--mg-line); border-radius: var(--mg-radius); padding: 20px; text-align: center; }
.mg-stat strong { display: block; font-size: 1.7rem; color: var(--mg-gold-deep); }
.mg-stat span { font-size: 13px; color: var(--mg-muted); }
.mg-map iframe, .mg-map { width: 100%; border: 0; border-radius: var(--mg-radius); min-height: 320px; }

.mg-form-field { display: grid; gap: 6px; margin-bottom: 14px; }
.mg-form-field label { font-size: 13.5px; font-weight: 700; }
.mg-form-field input, .mg-form-field textarea, .mg-form-field select {
  border: 1px solid var(--mg-line); border-radius: var(--mg-radius-sm);
  padding: 12px 16px; font-family: var(--mg-font); font-size: 15px; background: var(--mg-white);
}
.mg-form-field input:focus, .mg-form-field textarea:focus { outline: 2px solid var(--mg-gold); border-color: var(--mg-gold); }
.mg-form-note { font-size: 13px; color: var(--mg-muted); }
.mg-alert { border-radius: var(--mg-radius-sm); padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
.mg-alert--ok { background: #eef7ee; color: #256029; }
.mg-alert--err { background: #fdeeee; color: #8a2222; }

/* ==========================================================================
   12) فوتر زغالی
   ========================================================================== */
.mg-footer { background: var(--mg-charcoal); color: #ded7c9; margin-top: 60px; }
.mg-footer a { color: #ded7c9; font-size: 14px; }
.mg-footer a:hover { color: var(--mg-gold); }
.mg-footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px;
  padding: clamp(38px, 6vw, 68px) 0;
}
.mg-footer h4 { color: var(--mg-gold); font-size: 15px; margin-bottom: 14px; }
.mg-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mg-footer__bar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 0; font-size: 13px;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.mg-badges { display: flex; gap: 12px; align-items: center; }
.mg-badges img, .mg-badges a {
  background: rgba(255, 255, 255, 0.06); border-radius: 12px; padding: 8px;
  min-width: 74px; text-align: center; font-size: 12px;
}

/* ==========================================================================
   13) انیمیشن ظهور در اسکرول
   ========================================================================== */
.mg-reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.mg-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .mg-reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}

/* ==========================================================================
   14) واکنش‌گرا — Mobile First fallbacks
   ========================================================================== */
@media (max-width: 1024px) {
  .mg-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .woocommerce ul.products.columns-4 { grid-template-columns: repeat(3, 1fr); }
  .mg-shop-layout { grid-template-columns: 1fr; }
  .mg-single-product { grid-template-columns: 1fr; }
  .mg-footer__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 782px) {
  .mg-nav { display: none; position: absolute; top: 100%; inset-inline: 0; background: var(--mg-charcoal-2); padding: 12px; }
  .mg-nav.is-open { display: block; }
  .mg-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .mg-nav .sub-menu { position: static; display: flex; border: 0; background: transparent; }
  .mg-burger { display: grid; }
  .mg-header { position: relative; }
  .mg-header__inner { min-height: 66px; }
  .mg-grid--3, .mg-grid--2, .mg-split, .mg-newsletter { grid-template-columns: 1fr; }
  .woocommerce ul.products.columns-4, .woocommerce ul.products.columns-3 { grid-template-columns: repeat(2, 1fr); }
  .mg-topbar__inner span.mg-topbar__hide { display: none; }

  /* ریسپانسیو اسلایدر دسته‌بندی‌ها در موبایل */
  .mg-cat-item {
    flex: 0 0 100px;
    min-width: 100px;
  }
  .mg-cat-item__title {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .mg-grid--4 { grid-template-columns: 1fr; }
  .woocommerce ul.products.columns-4, .woocommerce ul.products.columns-3 { grid-template-columns: 1fr; }
  .mg-footer__grid { grid-template-columns: 1fr; }
  .mg-newsletter form { flex-direction: column; }
}
@media (max-width: 767px) {
    .mg-cat-slider-wrapper {
        display: flex;
        gap: 14px;
        overflow-x: auto;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .mg-cat-slider-wrapper::-webkit-scrollbar {
        display: none;
    }

    .mg-cat-item {
        flex: 0 0 calc(50% - 7px);
        scroll-snap-align: start;
    }

    .mg-cat-arrow {
        display: none;
    }
}
/* دکمه مشاهده سریع زیر قیمت محصولات */
.woocommerce ul.products li.product .mg-quickview-btn--below {
	position: static !important;
	inset: auto !important;
	transform: none !important;
	opacity: 1 !important;
	visibility: visible !important;

	display: block;
	width: 100%;
	max-width: 220px;
	margin: 12px auto 8px;
	padding: 10px 16px;

	border: 1px solid var(--mg-gold);
	border-radius: 999px;
	background: transparent;
	color: var(--mg-text);
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.5;
	text-align: center;
	cursor: pointer;
	transition:
		background-color 0.2s ease,
		color 0.2s ease,
		border-color 0.2s ease;
}

.woocommerce ul.products li.product .mg-quickview-btn--below:hover,
.woocommerce ul.products li.product .mg-quickview-btn--below:focus-visible {
	background: var(--mg-gold);
	color: #17120a;
	border-color: var(--mg-gold);
}

/* ==========================================================================
   15) سبد خرید و پرداخت — استایل اختصاصی MissGallery
   ========================================================================== */
body.woocommerce-cart main,
body.woocommerce-checkout main {
	background:
		radial-gradient(circle at 90% 8%, rgba(212, 175, 55, 0.08), transparent 26%),
		#fbf9f5;
}

body.woocommerce-cart .entry-content,
body.woocommerce-checkout .entry-content {
	margin-top: 0;
}

/* چیدمان اصلی بلوک‌های جدید ووکامرس */
.wc-block-cart,
.wc-block-checkout {
	width: min(1180px, calc(100% - 40px));
	max-width: 1180px;
	margin: 0 auto clamp(56px, 7vw, 90px) !important;
	padding-top: 18px;
	font-family: var(--mg-font);
}

.wc-block-cart__main,
.wc-block-checkout__main {
	background: var(--mg-white);
	border: 1px solid var(--mg-line);
	border-radius: 24px;
	box-shadow: var(--mg-shadow);
	padding: clamp(20px, 3vw, 36px) !important;
}

.wc-block-cart__sidebar,
.wc-block-checkout__sidebar {
	align-self: start;
	background: linear-gradient(145deg, #fffaf0 0%, #f6ecd2 100%);
	border: 1px solid rgba(212, 175, 55, 0.3);
	border-radius: 24px;
	box-shadow: var(--mg-shadow-gold);
	padding: clamp(20px, 2.5vw, 30px) !important;
}

/* عنوان‌ها */
.wc-block-cart h2,
.wc-block-cart h3,
.wc-block-checkout h2,
.wc-block-checkout h3,
.wc-block-components-title {
	font-family: var(--mg-font) !important;
	color: var(--mg-text);
	font-weight: 800 !important;
}

.wc-block-components-sidebar-layout {
	gap: clamp(24px, 4vw, 48px) !important;
}

/* ردیف محصولات داخل سبد */
.wc-block-cart-items {
	border: 0 !important;
	margin: 0 !important;
}

.wc-block-cart-items thead {
	font-size: 13px;
	color: var(--mg-muted);
}

.wc-block-cart-items__row {
	position: relative;
	border-bottom: 1px solid var(--mg-line) !important;
}

.wc-block-cart-items__row:last-child {
	border-bottom: 0 !important;
}

.wc-block-cart-item__image {
	padding: 20px 0 20px 18px !important;
}

.wc-block-cart-item__image img {
	width: 112px !important;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	background: #fbf7ef;
	border: 1px solid var(--mg-line);
	border-radius: 18px;
}

.wc-block-cart-item__product {
	padding: 22px 0 !important;
}

.wc-block-components-product-name {
	display: inline-block;
	font-size: 16px !important;
	font-weight: 800 !important;
	line-height: 1.8 !important;
	color: var(--mg-text) !important;
}

.wc-block-cart-item__prices,
.wc-block-components-product-price {
	color: var(--mg-gold-deep);
	font-weight: 800;
}

.wc-block-components-product-metadata,
.wc-block-components-product-metadata__description {
	font-size: 12.5px !important;
	color: var(--mg-muted) !important;
}

/* انتخاب تعداد */
.wc-block-components-quantity-selector {
	min-width: 118px;
	border: 1px solid #ded7c9 !important;
	border-radius: 999px !important;
	background: var(--mg-white);
	overflow: hidden;
}

.wc-block-components-quantity-selector input,
.wc-block-components-quantity-selector button {
	min-height: 38px !important;
	font-family: var(--mg-font) !important;
	font-weight: 700;
}

.wc-block-components-quantity-selector button:hover {
	background: var(--mg-gold-soft) !important;
	color: var(--mg-text) !important;
}

.wc-block-cart-item__remove-link {
	color: #8d4f4f !important;
	font-family: var(--mg-font) !important;
	font-size: 12.5px !important;
	text-decoration: none !important;
}

.wc-block-cart-item__remove-link:hover {
	color: #b3261e !important;
}

/* جمع سبد و کوپن */
.wc-block-components-totals-wrapper {
	border-top: 1px solid rgba(201, 169, 78, 0.26) !important;
	padding: 18px 0 !important;
}

.wc-block-components-totals-wrapper:first-child {
	border-top: 0 !important;
}

.wc-block-components-totals-item__label,
.wc-block-components-totals-item__value {
	font-family: var(--mg-font) !important;
}

.wc-block-components-totals-footer-item {
	font-size: 19px !important;
	font-weight: 900 !important;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	color: var(--mg-gold-deep);
}

.wc-block-components-totals-coupon__button,
.wc-block-components-panel__button {
	font-family: var(--mg-font) !important;
	font-weight: 700 !important;
}

.wc-block-components-totals-coupon__form {
	gap: 10px;
}

/* ورودی‌های سبد و تسویه حساب */
.wc-block-components-text-input input,
.wc-block-components-combobox .wc-block-components-combobox-control input,
.wc-block-components-address-form select,
.wc-block-components-select .wc-block-components-select__select,
.wc-block-components-textarea {
	min-height: 52px !important;
	border: 1px solid #ded7c9 !important;
	border-radius: 13px !important;
	background: var(--mg-white) !important;
	color: var(--mg-text) !important;
	font-family: var(--mg-font) !important;
	box-shadow: none !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wc-block-components-text-input input:focus,
.wc-block-components-combobox .wc-block-components-combobox-control input:focus,
.wc-block-components-address-form select:focus,
.wc-block-components-select .wc-block-components-select__select:focus,
.wc-block-components-textarea:focus {
	border-color: var(--mg-gold) !important;
	box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.14) !important;
	outline: 0 !important;
}

.wc-block-components-text-input label,
.wc-block-components-checkbox label,
.wc-block-components-radio-control label {
	font-family: var(--mg-font) !important;
}

/* مرحله‌های صفحه پرداخت */
.wc-block-components-checkout-step {
	margin-bottom: 18px !important;
	padding-bottom: 22px !important;
	border-bottom: 1px solid var(--mg-line);
}

.wc-block-components-checkout-step:last-child {
	border-bottom: 0;
}

.wc-block-components-checkout-step__heading {
	margin-bottom: 18px !important;
}

.wc-block-components-checkout-step__title {
	font-size: 18px !important;
	font-weight: 850 !important;
}

.wc-block-components-checkout-step__description {
	color: var(--mg-muted) !important;
	font-size: 13px !important;
}

/* دکمه اصلی پرداخت */
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
	min-height: 58px !important;
	border: 1px solid var(--mg-charcoal) !important;
	border-radius: 999px !important;
	background: var(--mg-charcoal) !important;
	color: var(--mg-white) !important;
	font-family: var(--mg-font) !important;
	font-size: 15px !important;
	font-weight: 900 !important;
	box-shadow: 0 14px 30px -18px rgba(26, 26, 26, 0.7);
	transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease !important;
}

.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover {
	background: var(--mg-gold) !important;
	border-color: var(--mg-gold) !important;
	color: #17120a !important;
	transform: translateY(-2px);
}

/* پیام‌های خطا و اطلاع‌رسانی */
.wc-block-components-notice-banner {
	border-radius: 14px !important;
	font-family: var(--mg-font) !important;
}

.wc-block-components-notice-banner.is-error {
	background: #fff5f4 !important;
	border-color: #e8a29c !important;
}

/* سبد خرید خالی */
.wp-block-woocommerce-empty-cart-block {
	width: min(1180px, calc(100% - 40px));
	margin: 18px auto 70px !important;
	padding: clamp(28px, 5vw, 60px) !important;
	background: var(--mg-white);
	border: 1px solid var(--mg-line);
	border-radius: 26px;
	box-shadow: var(--mg-shadow);
}

.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title {
	font-size: clamp(22px, 3vw, 34px) !important;
	font-weight: 900;
}

.wp-block-woocommerce-empty-cart-block .wp-block-heading {
	position: relative;
	margin-top: 44px;
	padding-top: 28px;
}

.wp-block-woocommerce-empty-cart-block .wp-block-heading::before {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	width: 56px;
	height: 3px;
	border-radius: 999px;
	background: var(--mg-gold);
	transform: translateX(-50%);
}

/* سازگاری با سبد و پرداخت کلاسیک ووکامرس */
.woocommerce-cart .woocommerce-cart-form,
.woocommerce-checkout form.checkout {
	background: var(--mg-white);
	border: 1px solid var(--mg-line);
	border-radius: 24px;
	box-shadow: var(--mg-shadow);
	padding: clamp(20px, 3vw, 34px);
}

.woocommerce-cart .cart-collaterals .cart_totals,
.woocommerce-checkout #order_review {
	background: var(--mg-gold-soft);
	border: 1px solid rgba(212, 175, 55, 0.3);
	border-radius: 22px;
	padding: 24px;
}

.woocommerce-cart table.shop_table,
.woocommerce-checkout table.shop_table {
	border: 0 !important;
	border-collapse: separate;
	border-spacing: 0;
}

.woocommerce-cart table.shop_table td,
.woocommerce-cart table.shop_table th,
.woocommerce-checkout table.shop_table td,
.woocommerce-checkout table.shop_table th {
	border-color: var(--mg-line) !important;
}

/* تبلت و موبایل */
@media (max-width: 900px) {
	.wc-block-cart,
	.wc-block-checkout {
		width: min(100% - 28px, 760px);
	}

	.wc-block-components-sidebar-layout {
		display: flex !important;
		flex-direction: column !important;
	}

	.wc-block-cart__main,
	.wc-block-checkout__main,
	.wc-block-cart__sidebar,
	.wc-block-checkout__sidebar {
		width: 100% !important;
		max-width: none !important;
	}

	.wc-block-cart__sidebar,
	.wc-block-checkout__sidebar {
		position: static !important;
		order: 2;
	}
}

@media (max-width: 600px) {
	body.woocommerce-cart main,
	body.woocommerce-checkout main {
		background: #fbf9f5;
	}

	.wc-block-cart,
	.wc-block-checkout {
		width: calc(100% - 20px);
		padding-top: 8px;
	}

	.wc-block-cart__main,
	.wc-block-checkout__main,
	.wc-block-cart__sidebar,
	.wc-block-checkout__sidebar {
		border-radius: 18px;
		padding: 16px !important;
	}

	.wc-block-cart-item__image {
		padding-left: 10px !important;
	}

	.wc-block-cart-item__image img {
		width: 78px !important;
		border-radius: 13px;
	}

	.wc-block-components-product-name {
		font-size: 14px !important;
	}

	.wc-block-components-quantity-selector {
		min-width: 104px;
	}

	.wp-block-woocommerce-empty-cart-block {
		width: calc(100% - 20px);
		padding: 26px 16px !important;
		border-radius: 18px;
	}
}
/* =========================================================
   MISSGALLERY — CLASSIC WOOCOMMERCE CART
   ========================================================= */

body.woocommerce-cart {
	background:
		radial-gradient(
			circle at 82% 12%,
			rgba(212, 175, 55, 0.08),
			transparent 24%
		),
		#fcfaf6;
}

/* چیدمان اصلی: محصولات سمت راست، جمع سبد سمت چپ */
body.woocommerce-cart.mg-cart-has-items
.woocommerce:has(.woocommerce-cart-form) {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) minmax(320px, 390px) !important;
	gap: clamp(24px, 3vw, 40px) !important;
	align-items: start !important;

	width: min(1340px, calc(100% - 40px)) !important;
	max-width: 1340px !important;
	margin: 25px auto 90px !important;
}

/* پیام‌های ووکامرس */
body.woocommerce-cart.mg-cart-has-items
.woocommerce:has(.woocommerce-cart-form)
> .woocommerce-notices-wrapper,

body.woocommerce-cart.mg-cart-has-items
.woocommerce:has(.woocommerce-cart-form)
> .woocommerce-message,

body.woocommerce-cart.mg-cart-has-items
.woocommerce:has(.woocommerce-cart-form)
> .woocommerce-error,

body.woocommerce-cart.mg-cart-has-items
.woocommerce:has(.woocommerce-cart-form)
> .woocommerce-info {
	grid-column: 1 / -1 !important;
}

/* باکس محصولات */
body.woocommerce-cart.mg-cart-has-items
.woocommerce:has(.woocommerce-cart-form)
> .woocommerce-cart-form {
	grid-column: 1 !important;
	grid-row: 2 !important;

	width: 100% !important;
	margin: 0 !important;
	padding: clamp(18px, 2.5vw, 30px) !important;

	border: 1px solid #e6dfd2 !important;
	border-radius: 24px !important;
	background: #fff !important;

	box-shadow:
		0 18px 45px rgba(49, 39, 20, 0.08) !important;
}

/* جدول محصولات */
body.woocommerce-cart table.shop_table {
	width: 100% !important;
	margin: 0 !important;
	border: 0 !important;
	border-collapse: collapse !important;
}

body.woocommerce-cart table.shop_table th {
	padding: 15px 10px !important;
	color: #766f66 !important;
	font-size: 13px !important;
	font-weight: 800 !important;
}

body.woocommerce-cart table.shop_table td {
	padding: 18px 10px !important;
	border-top: 1px solid #eee7dc !important;
	vertical-align: middle !important;
}

/* عکس محصول */
body.woocommerce-cart table.cart img {
	width: 78px !important;
	height: 78px !important;
	object-fit: cover !important;

	border: 1px solid #ece4d7 !important;
	border-radius: 14px !important;
	background: #faf6ee !important;
}

/* نام و قیمت محصول */
body.woocommerce-cart table.cart .product-name a {
	color: #211d18 !important;
	font-weight: 900 !important;
}

body.woocommerce-cart table.cart .product-price,
body.woocommerce-cart table.cart .product-subtotal {
	font-weight: 900 !important;
	white-space: nowrap !important;
}

/* تعداد */
body.woocommerce-cart table.cart .quantity .qty {
	width: 78px !important;
	min-height: 42px !important;
	padding: 6px !important;

	border: 1px solid #ded5c7 !important;
	border-radius: 999px !important;
	background: #fff !important;

	text-align: center !important;
	font-family: inherit !important;
	font-weight: 800 !important;
}

/* حذف محصول */
body.woocommerce-cart table.cart .product-remove a {
	display: grid !important;
	place-items: center !important;

	width: 34px !important;
	height: 34px !important;

	border-radius: 50% !important;
	background: #fff1ef !important;
	color: #a33b32 !important;

	font-size: 20px !important;
	line-height: 1 !important;
}

body.woocommerce-cart table.cart .product-remove a:hover {
	background: #a33b32 !important;
	color: #fff !important;
}

/* ردیف کوپن و بروزرسانی */
body.woocommerce-cart table.cart td.actions {
	padding: 22px 0 0 !important;
	border-top: 1px solid #eee7dc !important;
}

body.woocommerce-cart table.cart td.actions::after {
	content: "";
	display: table;
	clear: both;
}

/* باکس کد تخفیف */
body.woocommerce-cart table.cart td.actions .coupon {
	float: right !important;
	display: grid !important;
	grid-template-columns: minmax(120px, 1fr) auto !important;
	gap: 10px !important;

	width: min(100%, 440px) !important;
	padding: 12px !important;

	border: 1px dashed rgba(191, 145, 32, 0.55) !important;
	border-radius: 17px !important;
	background: #fffaf0 !important;
}

body.woocommerce-cart
table.cart td.actions .coupon #coupon_code {
	width: 100% !important;
	min-height: 46px !important;
	margin: 0 !important;
	padding: 10px 15px !important;

	border: 1px solid #e1d8c8 !important;
	border-radius: 11px !important;
	background: #fff !important;

	font-family: inherit !important;
}

body.woocommerce-cart
table.cart td.actions .coupon .button {
	min-height: 46px !important;
	margin: 0 !important;
	padding: 10px 20px !important;

	border-radius: 11px !important;
	background: #d4af37 !important;
	color: #17130c !important;

	font-weight: 900 !important;
	white-space: nowrap !important;
}

/* دکمه بروزرسانی */
body.woocommerce-cart
table.cart td.actions > .button {
	float: left !important;
	min-height: 46px !important;
	margin: 0 !important;
	padding: 10px 22px !important;

	border-radius: 999px !important;
}

/* ستون جمع سبد */
body.woocommerce-cart.mg-cart-has-items
.woocommerce:has(.woocommerce-cart-form)
> .cart-collaterals {
	grid-column: 2 !important;
	grid-row: 2 !important;

	width: 100% !important;
	margin: 0 !important;
}

body.woocommerce-cart .cart-collaterals::before,
body.woocommerce-cart .cart-collaterals::after {
	display: none !important;
}

body.woocommerce-cart
.cart-collaterals .cart_totals {
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: clamp(22px, 2.5vw, 32px) !important;

	border: 1px solid rgba(212, 175, 55, 0.38) !important;
	border-radius: 24px !important;

	background:
		linear-gradient(
			145deg,
			#fffaf0 0%,
			#f5e8c7 100%
		) !important;

	box-shadow:
		0 20px 45px rgba(128, 91, 15, 0.12) !important;
}

body.woocommerce-cart .cart_totals h2 {
	margin: 0 0 18px !important;
	padding-bottom: 15px !important;

	border-bottom: 1px solid rgba(190, 148, 47, 0.25) !important;

	font-size: clamp(23px, 2.3vw, 30px) !important;
}

body.woocommerce-cart .cart_totals table th,
body.woocommerce-cart .cart_totals table td {
	padding: 15px 4px !important;
	border-top: 1px solid rgba(190, 148, 47, 0.20) !important;
}

body.woocommerce-cart .cart_totals .order-total th,
body.woocommerce-cart .cart_totals .order-total td {
	font-size: 18px !important;
	font-weight: 900 !important;
}

body.woocommerce-cart .cart_totals .order-total .amount {
	color: #b58820 !important;
}

/* پرداخت */
body.woocommerce-cart .wc-proceed-to-checkout {
	padding: 20px 0 0 !important;
}

body.woocommerce-cart
.wc-proceed-to-checkout .checkout-button {
	width: 100% !important;
	margin: 0 !important;
	padding: 15px 22px !important;

	border-radius: 999px !important;
	background: #292826 !important;
	color: #fff !important;

	font-size: 15px !important;
	font-weight: 900 !important;
}

body.woocommerce-cart
.wc-proceed-to-checkout .checkout-button:hover {
	background: #d4af37 !important;
	color: #17130c !important;
}

/* =========================================================
   سبد خرید خالی
   ========================================================= */

body.woocommerce-cart.mg-cart-is-empty
.woocommerce:not(.widget) {
	width: min(1180px, calc(100% - 40px)) !important;
	max-width: 1180px !important;
	margin: 25px auto 90px !important;
	text-align: center !important;
}

body.woocommerce-cart.mg-cart-is-empty
.cart-empty.woocommerce-info {
	margin: 0 auto 18px !important;
	padding: 30px 24px !important;

	border: 1px solid #e6dfd2 !important;
	border-top: 3px solid #d4af37 !important;
	border-radius: 20px !important;

	background: #fff !important;
	box-shadow:
		0 18px 45px rgba(49, 39, 20, 0.08) !important;

	font-size: 17px !important;
	font-weight: 900 !important;
}

/* جدیدترین محصولات سبد خالی */
body.woocommerce-cart .mg-empty-cart-products {
	margin-top: 38px !important;
	padding: clamp(24px, 4vw, 42px) !important;

	border: 1px solid #e6dfd2 !important;
	border-radius: 24px !important;
	background: #fff !important;

	box-shadow:
		0 18px 45px rgba(49, 39, 20, 0.08) !important;

	text-align: right !important;
}

body.woocommerce-cart .mg-empty-cart-products__head {
	display: flex !important;
	align-items: flex-end !important;
	justify-content: space-between !important;
	gap: 20px !important;
	margin-bottom: 28px !important;
}

body.woocommerce-cart .mg-empty-cart-products__head h2 {
	margin: 5px 0 !important;
}

body.woocommerce-cart .mg-empty-cart-products__head p {
	margin: 0 !important;
	color: #766f66 !important;
}

/* تبلت */
@media (max-width: 980px) {
	body.woocommerce-cart.mg-cart-has-items
	.woocommerce:has(.woocommerce-cart-form) {
		grid-template-columns: 1fr !important;
		width: min(760px, calc(100% - 28px)) !important;
	}

	body.woocommerce-cart.mg-cart-has-items
	.woocommerce:has(.woocommerce-cart-form)
	> .woocommerce-cart-form,

	body.woocommerce-cart.mg-cart-has-items
	.woocommerce:has(.woocommerce-cart-form)
	> .cart-collaterals {
		grid-column: 1 !important;
		grid-row: auto !important;
	}

	body.woocommerce-cart table.cart td.actions .coupon {
		float: none !important;
		width: 100% !important;
	}

	body.woocommerce-cart table.cart td.actions > .button {
		float: none !important;
		width: 100% !important;
		margin-top: 12px !important;
	}
}

/* موبایل */
@media (max-width: 650px) {
	body.woocommerce-cart.mg-cart-has-items
	.woocommerce:has(.woocommerce-cart-form),

	body.woocommerce-cart.mg-cart-is-empty
	.woocommerce:not(.widget) {
		width: calc(100% - 20px) !important;
	}

	body.woocommerce-cart .woocommerce-cart-form,
	body.woocommerce-cart .cart_totals,
	body.woocommerce-cart .mg-empty-cart-products {
		padding: 16px !important;
		border-radius: 17px !important;
	}

	body.woocommerce-cart table.cart thead {
		display: none !important;
	}

	body.woocommerce-cart table.cart td {
		padding: 12px 7px !important;
	}

	body.woocommerce-cart
	table.cart td.actions .coupon {
		grid-template-columns: 1fr !important;
	}

	body.woocommerce-cart
	table.cart td.actions .coupon .button {
		width: 100% !important;
	}

	body.woocommerce-cart .mg-empty-cart-products__head {
		align-items: stretch !important;
		flex-direction: column !important;
	}

	body.woocommerce-cart
	.mg-empty-cart-products__head .mg-btn {
		width: 100% !important;
		text-align: center !important;
	}
}
/* =========================================================
   FIX 1 — محصولات پیشنهادی سبد خرید خالی
   ========================================================= */

body.woocommerce-cart
.mg-empty-cart-products ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: 22px !important;

	width: 100% !important;
	margin: 28px 0 0 !important;
	padding: 0 !important;
}

body.woocommerce-cart
.mg-empty-cart-products ul.products::before,
body.woocommerce-cart
.mg-empty-cart-products ul.products::after {
	display: none !important;
	content: none !important;
}

body.woocommerce-cart
.mg-empty-cart-products ul.products li.product {
	float: none !important;
	clear: none !important;

	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;

	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
}

body.woocommerce-cart
.mg-empty-cart-products ul.products li.product img {
	width: 100% !important;
	aspect-ratio: 1 / 1 !important;
	height: auto !important;
	margin: 0 0 12px !important;

	object-fit: cover !important;
	border-radius: 16px !important;
	background: #faf6ee !important;
}

body.woocommerce-cart
.mg-empty-cart-products ul.products li.product .woocommerce-loop-product__title {
	min-height: 44px !important;
	margin: 0 !important;
	padding: 0 4px !important;

	font-size: 14px !important;
	line-height: 1.7 !important;
}

body.woocommerce-cart
.mg-empty-cart-products ul.products li.product .price {
	min-height: 28px !important;
	margin: 5px 0 10px !important;

	color: #211d18 !important;
	font-weight: 900 !important;
}

body.woocommerce-cart
.mg-empty-cart-products ul.products li.product .mg-quickview-btn,
body.woocommerce-cart
.mg-empty-cart-products ul.products li.product .button {
	width: 100% !important;
	margin-right: 0 !important;
	margin-left: 0 !important;
	text-align: center !important;
}


/* =========================================================
   FIX 2 — طراحی حرفه‌ای صفحه پرداخت
   ========================================================= */

body.woocommerce-checkout {
	background:
		radial-gradient(
			circle at 82% 12%,
			rgba(212, 175, 55, 0.09),
			transparent 24%
		),
		#fcfaf6 !important;
}

/* کانتینر اصلی پرداخت */
body.woocommerce-checkout
.entry-content > .woocommerce,
body.woocommerce-checkout
main .woocommerce {
	width: min(1320px, calc(100% - 40px)) !important;
	max-width: 1320px !important;
	margin: 28px auto 90px !important;
}

/* ورود و کوپن بالای پرداخت */
body.woocommerce-checkout
.woocommerce-form-login-toggle,
body.woocommerce-checkout
.woocommerce-form-coupon-toggle {
	margin-bottom: 14px !important;
}

body.woocommerce-checkout
.woocommerce-form-login-toggle .woocommerce-info,
body.woocommerce-checkout
.woocommerce-form-coupon-toggle .woocommerce-info {
	margin: 0 !important;
	padding: 17px 20px !important;

	border: 1px solid rgba(212, 175, 55, 0.38) !important;
	border-right: 4px solid #d4af37 !important;
	border-radius: 15px !important;

	background: #fffaf0 !important;
	color: #514838 !important;
	box-shadow: none !important;
}

/* فرم بازشده کوپن */
body.woocommerce-checkout
form.checkout_coupon {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) auto !important;
	gap: 12px !important;

	max-width: 620px !important;
	margin: 0 0 24px !important;
	padding: 18px !important;

	border: 1px dashed rgba(193, 148, 37, 0.55) !important;
	border-radius: 17px !important;
	background: #fff !important;
}

body.woocommerce-checkout
form.checkout_coupon > p {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
}

body.woocommerce-checkout
form.checkout_coupon > p:first-child {
	grid-column: 1 / -1 !important;
	color: #766f66 !important;
}

body.woocommerce-checkout
form.checkout_coupon input {
	min-height: 48px !important;
	border-radius: 12px !important;
}

/* چیدمان فرم و خلاصه سفارش */
body.woocommerce-checkout
form.checkout {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) minmax(340px, 410px) !important;
	gap: 30px 38px !important;
	align-items: start !important;
}

/* فرم اطلاعات مشتری */
body.woocommerce-checkout
form.checkout > .col2-set {
	grid-column: 1 !important;
	grid-row: 1 / span 2 !important;

	float: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: clamp(22px, 3vw, 34px) !important;

	border: 1px solid #e6dfd2 !important;
	border-radius: 24px !important;
	background: #fff !important;

	box-shadow:
		0 18px 45px rgba(49, 39, 20, 0.08) !important;
}

/* جلوگیری از دو نیم‌شدن عجیب فرم */
body.woocommerce-checkout
form.checkout .col2-set .col-1,
body.woocommerce-checkout
form.checkout .col2-set .col-2 {
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
}

body.woocommerce-checkout
form.checkout .col2-set .col-2 {
	margin-top: 30px !important;
	padding-top: 25px !important;
	border-top: 1px solid #eee7dc !important;
}

/* عنوان قسمت‌های فرم */
body.woocommerce-checkout
.woocommerce-billing-fields > h3,
body.woocommerce-checkout
.woocommerce-additional-fields > h3,
body.woocommerce-checkout
#order_review_heading {
	margin: 0 0 22px !important;
	padding-bottom: 15px !important;

	border-bottom: 1px solid #eee7dc !important;
	color: #211d18 !important;

	font-size: clamp(20px, 2vw, 27px) !important;
	font-weight: 900 !important;
}

/* فیلدها */
body.woocommerce-checkout
.form-row {
	margin: 0 0 18px !important;
}

body.woocommerce-checkout
.form-row label {
	display: block !important;
	margin-bottom: 7px !important;

	color: #554d43 !important;
	font-size: 13px !important;
	font-weight: 800 !important;
}

body.woocommerce-checkout
.form-row .required {
	color: #a33b32 !important;
}

body.woocommerce-checkout
.form-row input.input-text,
body.woocommerce-checkout
.form-row textarea,
body.woocommerce-checkout
.form-row select,
body.woocommerce-checkout
.select2-container .select2-selection--single {
	width: 100% !important;
	min-height: 50px !important;
	padding: 11px 14px !important;

	border: 1px solid #ded6ca !important;
	border-radius: 12px !important;
	outline: none !important;

	background: #fffdfa !important;
	color: #211d18 !important;
	font-family: inherit !important;

	transition:
		border-color 180ms ease,
		box-shadow 180ms ease,
		background 180ms ease !important;
}

body.woocommerce-checkout
.form-row textarea {
	min-height: 125px !important;
	resize: vertical !important;
}

body.woocommerce-checkout
.select2-container .select2-selection--single {
	display: flex !important;
	align-items: center !important;
}

body.woocommerce-checkout
.select2-container
.select2-selection--single
.select2-selection__rendered {
	padding: 0 !important;
	line-height: normal !important;
}

body.woocommerce-checkout
.select2-container
.select2-selection--single
.select2-selection__arrow {
	top: 50% !important;
	left: 12px !important;
	right: auto !important;
	transform: translateY(-50%) !important;
}

body.woocommerce-checkout
.form-row input.input-text:focus,
body.woocommerce-checkout
.form-row textarea:focus,
body.woocommerce-checkout
.select2-container--focus .select2-selection--single {
	border-color: #c79c2c !important;
	background: #fff !important;

	box-shadow:
		0 0 0 4px rgba(212, 175, 55, 0.12) !important;
}

/* عنوان سفارش */
body.woocommerce-checkout
form.checkout > #order_review_heading {
	grid-column: 2 !important;
	grid-row: 1 !important;

	margin: 0 !important;
	padding: 22px 25px !important;

	border: 1px solid rgba(212, 175, 55, 0.38) !important;
	border-bottom: 0 !important;
	border-radius: 24px 24px 0 0 !important;

	background: #fff8e7 !important;
}

/* خلاصه سفارش */
body.woocommerce-checkout
form.checkout > #order_review {
	grid-column: 2 !important;
	grid-row: 2 !important;

	width: 100% !important;
	margin: -30px 0 0 !important;
	padding: 0 25px 26px !important;

	border: 1px solid rgba(212, 175, 55, 0.38) !important;
	border-top: 0 !important;
	border-radius: 0 0 24px 24px !important;

	background:
		linear-gradient(
			145deg,
			#fffaf0 0%,
			#f5e8c7 100%
		) !important;

	box-shadow:
		0 20px 45px rgba(128, 91, 15, 0.12) !important;
}

/* جدول سفارش */
body.woocommerce-checkout
#order_review table.shop_table {
	margin: 0 0 20px !important;
	border: 0 !important;
	border-collapse: collapse !important;
	background: transparent !important;
}

body.woocommerce-checkout
#order_review table.shop_table th,
body.woocommerce-checkout
#order_review table.shop_table td {
	padding: 15px 5px !important;
	border-top: 1px solid rgba(190, 148, 47, 0.22) !important;
	background: transparent !important;
}

body.woocommerce-checkout
#order_review table.shop_table thead th {
	color: #766f66 !important;
	font-size: 13px !important;
}

body.woocommerce-checkout
#order_review .order-total th,
body.woocommerce-checkout
#order_review .order-total td {
	font-size: 17px !important;
	font-weight: 900 !important;
}

body.woocommerce-checkout
#order_review .order-total .amount {
	color: #ae821b !important;
}

/* روش پرداخت */
body.woocommerce-checkout
#payment {
	border-radius: 18px !important;
	background: rgba(255, 255, 255, 0.72) !important;
}

body.woocommerce-checkout
#payment ul.payment_methods {
	padding: 18px !important;
	border-bottom: 1px solid rgba(190, 148, 47, 0.22) !important;
}

body.woocommerce-checkout
#payment .payment_box {
	border-radius: 12px !important;
	background: #fff !important;
}

body.woocommerce-checkout
#payment .place-order {
	padding: 18px !important;
}

/* دکمه ثبت سفارش */
body.woocommerce-checkout
#place_order {
	width: 100% !important;
	min-height: 54px !important;
	margin-top: 12px !important;

	border: 0 !important;
	border-radius: 999px !important;

	background: #292826 !important;
	color: #fff !important;

	font-family: inherit !important;
	font-size: 15px !important;
	font-weight: 900 !important;

	box-shadow:
		0 12px 25px rgba(32, 29, 23, 0.15) !important;
}

body.woocommerce-checkout
#place_order:hover {
	background: #d4af37 !important;
	color: #17130c !important;
	transform: translateY(-1px) !important;
}

/* خطاهای اعتبارسنجی */
body.woocommerce-checkout
.woocommerce-invalid input.input-text,
body.woocommerce-checkout
.woocommerce-invalid textarea,
body.woocommerce-checkout
.woocommerce-invalid .select2-selection {
	border-color: #b94a41 !important;
	background: #fff8f7 !important;
}

body.woocommerce-checkout
.woocommerce-validated input.input-text,
body.woocommerce-checkout
.woocommerce-validated .select2-selection {
	border-color: #82a47c !important;
}


/* =========================================================
   واکنش‌گرایی
   ========================================================= */

@media (max-width: 1050px) {
	body.woocommerce-checkout
	form.checkout {
		grid-template-columns: 1fr !important;
	}

	body.woocommerce-checkout
	form.checkout > .col2-set,
	body.woocommerce-checkout
	form.checkout > #order_review_heading,
	body.woocommerce-checkout
	form.checkout > #order_review {
		grid-column: 1 !important;
		grid-row: auto !important;
	}

	body.woocommerce-checkout
	form.checkout > #order_review {
		margin-top: -30px !important;
	}

	body.woocommerce-cart
	.mg-empty-cart-products ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 650px) {
	body.woocommerce-checkout
	.entry-content > .woocommerce,
	body.woocommerce-checkout
	main .woocommerce {
		width: calc(100% - 20px) !important;
	}

	body.woocommerce-checkout
	form.checkout > .col2-set {
		padding: 17px !important;
		border-radius: 18px !important;
	}

	body.woocommerce-checkout
	form.checkout > #order_review_heading {
		border-radius: 18px 18px 0 0 !important;
	}

	body.woocommerce-checkout
	form.checkout > #order_review {
		padding-right: 16px !important;
		padding-left: 16px !important;
		border-radius: 0 0 18px 18px !important;
	}

	body.woocommerce-checkout
	form.checkout_coupon {
		grid-template-columns: 1fr !important;
	}

	body.woocommerce-cart
	.mg-empty-cart-products ul.products {
		grid-template-columns: 1fr !important;
	}
}
/* =========================================================
   اصلاح قطعی شبکه محصولات فروشگاه
   حذف خانه‌های نامرئی ووکامرس
   ========================================================= */

body.woocommerce-shop ul.products::before,
body.woocommerce-shop ul.products::after,
body.tax-product_cat ul.products::before,
body.tax-product_cat ul.products::after,
body.tax-product_tag ul.products::before,
body.tax-product_tag ul.products::after,
body.post-type-archive-product ul.products::before,
body.post-type-archive-product ul.products::after {
	display: none !important;
	content: none !important;
}

/* چهار محصول مرتب در هر ردیف */
body.woocommerce-shop ul.products,
body.tax-product_cat ul.products,
body.tax-product_tag ul.products,
body.post-type-archive-product ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: 28px 22px !important;

	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* خنثی‌کردن float و clear قدیمی ووکامرس */
body.woocommerce-shop ul.products li.product,
body.tax-product_cat ul.products li.product,
body.tax-product_tag ul.products li.product,
body.post-type-archive-product ul.products li.product {
	float: none !important;
	clear: none !important;

	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* یک‌اندازه‌شدن کارت‌ها */
body.woocommerce-shop ul.products li.product,
body.tax-product_cat ul.products li.product,
body.tax-product_tag ul.products li.product {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
}

/* یک‌اندازه‌شدن تصاویر */
body.woocommerce-shop ul.products li.product img,
body.tax-product_cat ul.products li.product img,
body.tax-product_tag ul.products li.product img {
	width: 100% !important;
	aspect-ratio: 1 / 1 !important;
	height: auto !important;
	object-fit: cover !important;
}

/* عنوان‌ها ارتفاع منظم داشته باشند */
body.woocommerce-shop
ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat
ul.products li.product .woocommerce-loop-product__title,
body.tax-product_tag
ul.products li.product .woocommerce-loop-product__title {
	min-height: 54px !important;
	line-height: 1.7 !important;
}

/* ریسپانسیو */
@media (max-width: 1100px) {
	body.woocommerce-shop ul.products,
	body.tax-product_cat ul.products,
	body.tax-product_tag ul.products,
	body.post-type-archive-product ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 782px) {
	body.woocommerce-shop ul.products,
	body.tax-product_cat ul.products,
	body.tax-product_tag ul.products,
	body.post-type-archive-product ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 22px 14px !important;
	}
}
/* =========================================================
   شبکه‌های اجتماعی پیش از باشگاه مشتریان
   ========================================================= */
.mg-social-connect-section {
	padding-bottom: 0;
}

.mg-social-connect {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 32px;
	padding: clamp(24px, 4vw, 42px);
	border: 1px solid rgba(181, 145, 75, 0.32);
	border-radius: 24px;
	background: radial-gradient(circle at 10% 10%, rgba(181, 145, 75, 0.13), transparent 38%), #fff;
	box-shadow: 0 14px 38px rgba(41, 34, 24, 0.08);
}

.mg-social-connect__content h2 { margin: 8px 0 10px; }
.mg-social-connect__content p { max-width: 650px; margin: 0; color: var(--mg-muted); }

.mg-social-connect__links {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.mg-social-connect__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 150px;
	min-height: 52px;
	padding: 12px 20px;
	border: 1px solid rgba(181, 145, 75, 0.38);
	border-radius: 14px;
	background: #fff;
	color: var(--mg-ink);
	font-weight: 700;
	text-decoration: none;
	transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
}

.mg-social-connect__link:hover {
	transform: translateY(-2px);
	border-color: var(--mg-gold);
	box-shadow: 0 10px 24px rgba(181, 145, 75, 0.16);
	color: var(--mg-gold-dark);
}

.mg-social-connect__link svg {
	width: 24px;
	height: 24px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

@media (max-width: 767px) {
	.mg-social-connect {
		grid-template-columns: 1fr;
		gap: 22px;
		padding: 24px 18px;
		border-radius: 18px;
		text-align: center;
	}

	.mg-social-connect__links { justify-content: center; }
	.mg-social-connect__link { flex: 1 1 130px; min-width: 0; }
}

/* =========================================================
   پاپ‌آپ عضویت باشگاه مشتریان
   ========================================================= */
.mg-membership-popup {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 250ms ease, visibility 250ms ease;
}

.mg-membership-popup.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.mg-membership-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 14, 10, 0.72);
	-webkit-backdrop-filter: blur(5px);
	backdrop-filter: blur(5px);
}

.mg-membership-popup__dialog {
	position: relative;
	z-index: 1;
	overflow: hidden;
	width: min(520px, 100%);
	padding: clamp(28px, 5vw, 45px);
	border: 1px solid rgba(212, 175, 55, 0.48);
	border-radius: 28px;
	background:
		radial-gradient(circle at 12% 8%, rgba(212, 175, 55, 0.20), transparent 28%),
		linear-gradient(145deg, #fffdf8 0%, #f8edcf 100%);
	box-shadow: 0 35px 90px rgba(0, 0, 0, 0.30);
	text-align: center;
	transform: translateY(25px) scale(0.96);
	transition: transform 300ms ease;
}

.mg-membership-popup.is-open .mg-membership-popup__dialog {
	transform: none;
}

.mg-membership-popup__dialog::after {
	content: "MG";
	position: absolute;
	left: -12px;
	bottom: -60px;
	color: rgba(154, 110, 15, 0.06);
	font-family: serif;
	font-size: 170px;
	font-weight: 900;
	line-height: 1;
	pointer-events: none;
}

.mg-membership-popup__close {
	position: absolute;
	top: 15px;
	left: 15px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid rgba(41, 40, 38, 0.10);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.78);
	color: #292826;
	font-family: inherit;
	font-size: 25px;
	line-height: 1;
	cursor: pointer;
	transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.mg-membership-popup__close:hover {
	background: #292826;
	color: #fff;
	transform: rotate(90deg);
}

.mg-membership-popup__icon {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	margin: 0 auto 18px;
	border-radius: 50%;
	background: #292826;
	color: #d4af37;
	box-shadow: 0 14px 30px rgba(34, 30, 20, 0.18);
}

.mg-membership-popup .mg-eyebrow,
.mg-membership-popup h2,
.mg-membership-popup p,
.mg-membership-popup__benefits,
.mg-membership-popup__register,
.mg-membership-popup__later {
	position: relative;
	z-index: 1;
}

.mg-membership-popup h2 {
	margin: 8px 0 13px;
	color: #211d18;
	font-size: clamp(25px, 4vw, 36px);
	font-weight: 900;
}

.mg-membership-popup p {
	margin: 0;
	color: #665e52;
	line-height: 2;
}

.mg-membership-popup__benefits {
	display: grid;
	gap: 9px;
	margin: 22px 0;
	padding: 17px 20px;
	border: 1px solid rgba(190, 148, 47, 0.23);
	border-radius: 17px;
	background: rgba(255, 255, 255, 0.54);
	list-style: none;
	text-align: right;
}

.mg-membership-popup__benefits li {
	position: relative;
	padding-right: 24px;
	color: #443d33;
	font-size: 13px;
	font-weight: 800;
}

.mg-membership-popup__benefits li::before {
	content: "✓";
	position: absolute;
	right: 0;
	color: #ad821a;
	font-weight: 900;
}

.mg-membership-popup__register {
	width: 100%;
	padding: 15px 22px !important;
	text-align: center;
}

.mg-membership-popup__later {
	margin-top: 14px;
	padding: 5px;
	border: 0;
	background: transparent;
	color: #71685c;
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}

.mg-membership-popup__later:hover {
	color: #211d18;
	text-decoration: underline;
}

body.mg-popup-open {
	overflow: hidden;
}

.mg-triple-empty {
	display: grid;
	place-items: center;
	align-content: center;
	gap: 13px;

	min-height: 225px;
	padding: 25px;

	border: 1px dashed rgba(190, 148, 47, 0.4);
	border-radius: 18px;
	background: #fffaf0;

	text-align: center;
}

.mg-triple-empty > span {
	font-size: 30px;
}

.mg-triple-empty p {
	margin: 0;
	color: #6d6458;
	line-height: 1.9;
}

.mg-mini-card__view {
	display: inline-flex;
	margin-top: 8px;

	color: #a5770d;
	font-size: 12px;
	font-weight: 900;
}

@media (max-width: 600px) {
	.mg-membership-popup {
		padding: 12px;
	}

	.mg-membership-popup__dialog {
		max-height: calc(100vh - 24px);
		padding: 28px 20px 24px;
		border-radius: 21px;
		overflow-y: auto;
	}

	.mg-membership-popup__icon {
		width: 62px;
		height: 62px;
	}

	.mg-membership-popup h2 {
		font-size: 25px;
	}

	.mg-membership-popup__benefits {
		padding: 14px;
	}
}
/* تاریخ تولد شمسی در فرم ثبت‌نام */
.mg-birthday-field {
	width: 100%;
	margin: 0 0 18px;
	padding: 0;
	border: 0;
}

.mg-birthday-field legend {
	margin-bottom: 8px;
	color: var(--mg-text);
	font-size: 14px;
	font-weight: 800;
}

.mg-birthday-field .required {
	color: #a33b32;
}

.mg-birthday-selects {
	display: grid;
	grid-template-columns: 0.8fr 1.4fr 1fr;
	gap: 10px;
}

.mg-birthday-selects select {
	width: 100%;
	min-height: 48px;
	padding: 9px 12px;

	border: 1px solid var(--mg-line);
	border-radius: 11px;

	background: #fff;
	color: var(--mg-text);
	font-family: var(--mg-font);

	cursor: pointer;
}

.mg-birthday-selects select:focus {
	border-color: var(--mg-gold);
	outline: none;
	box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.12);
}

.mg-birthday-field .mg-form-note {
	display: block;
	margin-top: 7px;
	color: var(--mg-muted);
	font-size: 11px;
}

@media (max-width: 520px) {
	.mg-birthday-selects {
		grid-template-columns: 1fr;
	}
}
/* =========================================================
   تراز کامل دکمه‌های محصولات پیشنهادی سبد خرید خالی
   ========================================================= */

body.woocommerce-cart .mg-empty-cart-products ul.products li.product {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	height: 100% !important;
	box-sizing: border-box;
}

/* بخش تصویر، عنوان و قیمت */
body.woocommerce-cart .mg-empty-cart-products ul.products li.product
.woocommerce-LoopProduct-link {
	display: flex !important;
	flex: 1 1 auto !important;
	flex-direction: column !important;
	width: 100% !important;
}

/* عنوان تمام محصولات فضای یکسان داشته باشد */
body.woocommerce-cart .mg-empty-cart-products
.woocommerce-loop-product__title {
	display: -webkit-box !important;
	overflow: hidden !important;
	min-height: 56px !important;
	margin: 8px 0 !important;
	line-height: 1.8 !important;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

/* قیمت‌ها هم‌ردیف شوند */
body.woocommerce-cart .mg-empty-cart-products
ul.products li.product .price {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-height: 30px !important;
	margin: auto 0 10px !important;
}

/* هر دو دکمه دقیقاً هم‌اندازه */
body.woocommerce-cart .mg-empty-cart-products
ul.products li.product > .mg-quickview-btn,

body.woocommerce-cart .mg-empty-cart-products
ul.products li.product > a.button {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	align-self: stretch !important;

	width: 100% !important;
	max-width: none !important;
	min-width: 0 !important;
	height: 48px !important;
	min-height: 48px !important;

	margin: 7px 0 0 !important;
	padding: 8px 15px !important;
	box-sizing: border-box !important;

	border-radius: 999px !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-weight: 800 !important;
	line-height: 1.4 !important;
	text-align: center !important;
}

/* مشاهده سریع */
body.woocommerce-cart .mg-empty-cart-products
ul.products li.product > .mg-quickview-btn {
	border: 1px solid #d4a91f !important;
	background: #fff !important;
	color: #201c17 !important;
}

/* افزودن به سبد خرید */
body.woocommerce-cart .mg-empty-cart-products
ul.products li.product > a.button {
	border: 1px solid #d4af37 !important;
	background: #d4af37 !important;
	color: #201c17 !important;
}
/* =========================================================
   دیدگاه‌های نوشته‌ها
========================================================= */

.mg-comments {
	width: min(900px, calc(100% - 32px));
	margin: 56px auto;
	padding: clamp(24px, 4vw, 44px);
	border: 1px solid rgba(183, 138, 32, 0.25);
	border-radius: 26px;
	background: #fffdf9;
	box-shadow: 0 20px 55px rgba(55, 42, 20, 0.08);
	direction: rtl;
}

.mg-comments__head {
	margin-bottom: 28px;
	text-align: right;
}

.mg-comments__title,
.mg-comment-form__title {
	margin: 10px 0 8px;
	color: #241d16;
	font-size: clamp(24px, 3vw, 34px);
	font-weight: 900;
}

.mg-comments__list {
	display: grid;
	gap: 16px;
	margin: 24px 0 36px;
	padding: 0;
	list-style: none;
}

.mg-comments__list .comment {
	padding: 20px;
	border: 1px solid rgba(183, 138, 32, 0.18);
	border-radius: 18px;
	background: #fff;
	list-style: none;
}

.mg-comments__list .children {
	display: grid;
	gap: 14px;
	margin: 18px 28px 0 0;
	padding: 0;
	list-style: none;
}

.mg-comments__list .comment-body {
	position: relative;
}

.mg-comments__list .comment-author {
	display: flex;
	align-items: center;
	gap: 12px;
	font-weight: 900;
}

.mg-comments__list .avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
}

.mg-comments__list .comment-meta {
	margin: 8px 60px 12px 0;
	color: #857969;
	font-size: 13px;
}

.mg-comments__list .comment-content {
	color: #51483d;
	line-height: 2;
}

.mg-comments__list .reply a {
	display: inline-flex;
	margin-top: 10px;
	color: #a87b16;
	font-size: 13px;
	font-weight: 800;
	text-decoration: none;
}

.mg-comment-form {
	margin-top: 26px;
	padding-top: 28px;
	border-top: 1px solid rgba(183, 138, 32, 0.2);
}

.mg-comment-form__note,
.mg-comment-form .logged-in-as {
	margin: 0 0 22px;
	color: #766c5f;
	line-height: 1.9;
}

.mg-comment-form__form {
	display: grid;
	gap: 18px;
}

.mg-comment-form__form p {
	margin: 0;
}

.mg-comment-form__form label {
	display: block;
	margin-bottom: 8px;
	color: #352d24;
	font-size: 14px;
	font-weight: 800;
}

.mg-comment-form__form input:not([type="checkbox"]):not([type="submit"]),
.mg-comment-form__form textarea {
	width: 100%;
	padding: 14px 16px;
	border: 1px solid #e3d8c5;
	border-radius: 14px;
	outline: none;
	background: #fff;
	color: #29231c;
	font-family: inherit;
	font-size: 15px;
	transition:
		border-color 180ms ease,
		box-shadow 180ms ease;
}

.mg-comment-form__form textarea {
	min-height: 150px;
	resize: vertical;
}

.mg-comment-form__form input:focus,
.mg-comment-form__form textarea:focus {
	border-color: #b78a20;
	box-shadow: 0 0 0 4px rgba(183, 138, 32, 0.12);
}

.mg-comment-form__form .comment-form-author,
.mg-comment-form__form .comment-form-email {
	width: calc(50% - 9px);
}

.mg-comment-form__form .form-submit {
	margin-top: 4px;
}

.mg-comment-form__submit {
	min-width: 170px;
	border: 0;
	cursor: pointer;
}

.mg-comment-form .required {
	color: #bd2e2e;
}

.mg-comments__closed {
	padding: 16px;
	border-radius: 14px;
	background: #f8edd0;
	color: #655126;
}

@media (max-width: 767px) {
	.mg-comments {
		width: min(100% - 20px, 900px);
		margin: 32px auto;
		padding: 22px 16px;
		border-radius: 20px;
	}

	.mg-comment-form__form .comment-form-author,
	.mg-comment-form__form .comment-form-email {
		width: 100%;
	}

	.mg-comments__list .children {
		margin-right: 12px;
	}
}
/* =========================================================
   منوی اشتراک‌گذاری مقاله
========================================================= */

.mg-share {
	position: relative;
	display: flex;
	justify-content: center;
	width: fit-content;
	margin: 34px auto;
	direction: rtl;
}

.mg-share__trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 50px;
	padding: 11px 22px;
	border: 1px solid rgba(183, 138, 32, 0.42);
	border-radius: 999px;
	background: #fffdf8;
	color: #30271d;
	font-family: inherit;
	font-size: 14px;
	font-weight: 900;
	cursor: pointer;
	box-shadow: 0 10px 30px rgba(62, 46, 20, 0.07);
	transition:
		background 180ms ease,
		color 180ms ease,
		border-color 180ms ease,
		transform 180ms ease;
}

.mg-share__trigger:hover,
.mg-share.is-open .mg-share__trigger {
	border-color: #b78a20;
	background: #b78a20;
	color: #fff;
	transform: translateY(-2px);
}

.mg-share__icon {
	display: inline-flex;
}

.mg-share__arrow {
	font-size: 18px;
	line-height: 1;
	transition: transform 180ms ease;
}

.mg-share.is-open .mg-share__arrow {
	transform: rotate(180deg);
}

.mg-share__menu {
	position: absolute;
	z-index: 50;
	right: 50%;
	bottom: calc(100% + 12px);
	width: 230px;
	padding: 9px;
	border: 1px solid rgba(183, 138, 32, 0.25);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 20px 60px rgba(40, 31, 18, 0.18);
	transform: translateX(50%);
}

.mg-share__menu[hidden] {
	display: none;
}

.mg-share__option {
	display: flex;
	align-items: center;
	gap: 11px;
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: #342c22;
	font-family: inherit;
	font-size: 13px;
	font-weight: 800;
	text-align: right;
	text-decoration: none;
	cursor: pointer;
	transition:
		background 160ms ease,
		color 160ms ease;
}

.mg-share__option:hover {
	background: #f8edcf;
	color: #8e6814;
}

.mg-share__option span:first-child {
	display: grid;
	place-items: center;
	width: 25px;
	height: 25px;
	border-radius: 50%;
	background: #f3e3b8;
	color: #987018;
	font-size: 14px;
}

@media (max-width: 600px) {
	.mg-share {
		width: 100%;
	}

	.mg-share__trigger {
		width: 100%;
	}

	.mg-share__menu {
		width: min(100%, 280px);
	}
}
/* موجود شد خبرم کن */
.mg-stock-alert {
	display: flex;
	gap: 16px;
	margin: 22px 0;
	padding: 20px;
	border: 1px solid rgba(183, 138, 32, 0.35);
	border-radius: 18px;
	background: linear-gradient(135deg, #fffdf8, #fbf1d8);
	box-shadow: 0 16px 36px rgba(68, 50, 18, 0.08);
}
.mg-stock-alert.is-hidden { display: none; }
.mg-stock-alert__icon {
	display: grid;
	place-items: center;
	flex: 0 0 46px;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: #292826;
	color: var(--mg-gold, #d4af37);
	font-size: 20px;
}
.mg-stock-alert__content { flex: 1; min-width: 0; }
.mg-stock-alert h3 { margin: 0 0 5px; font-size: 18px; }
.mg-stock-alert p {
	margin: 0 0 14px;
	color: var(--mg-muted, #70685e);
	font-size: 13px;
	line-height: 1.9;
}
.mg-stock-alert__form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 9px;
}
.mg-stock-alert__form input[type="tel"] {
	width: 100%;
	min-height: 46px;
	padding: 10px 14px;
	border: 1px solid var(--mg-line, #e8dece);
	border-radius: 12px;
	background: #fff;
	font-family: inherit;
}
.mg-stock-alert__form .mg-btn { min-width: 120px; }
.mg-stock-alert__consent {
	display: flex;
	align-items: flex-start;
	gap: 7px;
	margin-top: 10px;
	color: var(--mg-muted, #70685e);
	font-size: 11px;
	line-height: 1.8;
}
.mg-stock-alert__consent input { margin-top: 5px; }
.mg-stock-alert__message { margin-top: 10px; font-size: 12px; font-weight: 800; }
.mg-stock-alert__message.is-success { color: #287a49; }
.mg-stock-alert__message.is-error { color: #b43f3f; }
@media (max-width: 560px) {
	.mg-stock-alert { padding: 16px; }
	.mg-stock-alert__form { grid-template-columns: 1fr; }
	.mg-stock-alert__form .mg-btn { width: 100%; }
}
/* =========================================================
   فرم اطلاع‌رسانی موجودشدن محصول
========================================================= */

/* جلوگیری از نمایش فیلدهای مخفی */
.mg-stock-alert input[type="hidden"] {
	display: none !important;
}

/* باکس اصلی */
.single-product .mg-stock-alert {
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr);
	gap: 16px;
	width: 100%;
	margin: 22px 0;
	padding: 22px;
	border: 1px solid rgba(212, 175, 55, 0.42);
	border-radius: 20px;
	background:
		linear-gradient(145deg, #fffdf8 0%, #fbf1d8 100%);
	box-shadow: 0 14px 36px rgba(65, 49, 20, 0.08);
}

.single-product .mg-stock-alert.is-hidden {
	display: none !important;
}

.mg-stock-alert__icon {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: #292826;
	color: #d9ae2f;
	font-size: 22px;
}

.mg-stock-alert__content {
	min-width: 0;
}

.mg-stock-alert__content h3 {
	margin: 0 0 7px;
	font-size: 18px;
	font-weight: 900;
	line-height: 1.6;
}

.mg-stock-alert__content > p {
	margin: 0 0 16px;
	color: var(--mg-muted, #70695f);
	font-size: 13px;
	line-height: 2;
}

.mg-stock-alert__form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 10px;
	align-items: stretch;
	width: 100%;
}

.mg-stock-alert__form input[type="tel"] {
	display: block;
	width: 100%;
	min-width: 0;
	height: 48px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid #dfd4c1;
	border-radius: 13px;
	background: #fff;
	font-family: inherit;
	font-size: 14px;
	text-align: left;
	direction: ltr;
	outline: none;
}

.mg-stock-alert__form input[type="tel"]:focus {
	border-color: #d4af37;
	box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.13);
}

.mg-stock-alert__form .mg-btn {
	min-width: 120px;
	height: 48px;
	margin: 0;
	padding: 0 22px;
	border: 0;
	border-radius: 13px;
	background: #d9ae2f;
	color: #191714;
	font-family: inherit;
	font-weight: 900;
	cursor: pointer;
}

.mg-stock-alert__consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-top: 13px;
	color: #6b645a;
	font-size: 12px;
	line-height: 1.8;
	cursor: pointer;
}

.mg-stock-alert__consent input {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin-top: 3px;
	accent-color: #d4af37;
}

.mg-stock-alert__message {
	margin-top: 10px;
	font-size: 13px;
	font-weight: 700;
}

@media (max-width: 600px) {
	.single-product .mg-stock-alert {
		grid-template-columns: 1fr;
		padding: 18px;
	}

	.mg-stock-alert__icon {
		width: 46px;
		height: 46px;
	}

	.mg-stock-alert__form {
		grid-template-columns: 1fr;
	}

	.mg-stock-alert__form .mg-btn {
		width: 100%;
	}
}
/* =========================================================
   کارت محصولات ناموجود
========================================================= */

.woocommerce ul.products li.product .mg-loop-media {
	position: relative;
	overflow: hidden;
}

.woocommerce ul.products li.product .mg-outofstock-badge {
	position: absolute;
	z-index: 8;
	top: 14px;
	right: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	padding: 6px 14px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	background: rgba(38, 38, 38, 0.9);
	color: #fff;
	font-size: 12px;
	font-weight: 900;
	line-height: 1;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.woocommerce ul.products li.product.mg-product-is-outofstock .mg-loop-media img {
	filter: grayscale(1);
	opacity: 0.6;
	transition:
		filter 250ms ease,
		opacity 250ms ease;
}

.woocommerce ul.products li.product.mg-product-is-outofstock:hover .mg-loop-media img {
	filter: grayscale(0.75);
	opacity: 0.72;
}

/* دکمه خرید ووکامرس برای محصول ناموجود نمایش داده نشود */
.woocommerce ul.products li.product.mg-product-is-outofstock
a.button:not(.mg-quickview-btn) {
	display: none;
}
.mg-stock-alert__message:empty {
	display: none;
}

.mg-stock-alert__message.is-warning,
.mg-stock-alert__message.is-error,
.mg-stock-alert__message.is-success {
	display: block;
	margin-top: 13px;
	padding: 11px 13px;
	border-radius: 12px;
	font-size: 12.5px;
	line-height: 1.9;
}

.mg-stock-alert__message.is-warning {
	border: 1px solid rgba(212, 175, 55, 0.4);
	background: rgba(212, 175, 55, 0.12);
	color: #67501b;
}

.mg-stock-alert__message.is-error {
	border: 1px solid rgba(183, 55, 55, 0.25);
	background: rgba(183, 55, 55, 0.08);
	color: #9f2f2f;
}

.mg-stock-alert__message.is-success {
	border: 1px solid rgba(40, 143, 80, 0.25);
	background: rgba(40, 143, 80, 0.08);
	color: #257246;
}

.mg-stock-alert__message a {
	color: inherit;
	font-weight: 900;
	text-decoration: underline;
	text-underline-offset: 3px;
}
/* =========================================================
   هماهنگ‌سازی سراسری تمام کارت‌های محصول ووکامرس
========================================================= */

.woocommerce ul.products li.product {
	display: flex !important;
	flex-direction: column;
	height: 100%;
}

/* لینکی که تصویر، عنوان و قیمت داخل آن است */
.woocommerce ul.products li.product
.woocommerce-LoopProduct-link {
	display: flex !important;
	flex: 1 1 auto;
	flex-direction: column;
	width: 100%;
}

/* عنوان محصول */
.woocommerce ul.products li.product
.woocommerce-loop-product__title {
	width: 100%;
	min-height: 4.8em;
	margin: 8px 0 6px !important;
	padding: 0 !important;
	line-height: 1.6 !important;
	text-align: right;
}

/* قیمت همیشه بعد از عنوان و در یک تراز */
.woocommerce ul.products li.product .price {
	display: flex !important;
	align-items: center;
	justify-content: flex-start;
	min-height: 32px;
	margin-top: auto !important;
	margin-bottom: 12px !important;
	text-align: right;
}

/* تمام دکمه‌های محصول */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product
.mg-quickview-btn {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	min-height: 46px;
	margin-right: 0 !important;
	margin-left: 0 !important;
	padding: 10px 14px !important;
	box-sizing: border-box;
	font-family: inherit !important;
	line-height: 1.4 !important;
	text-align: center !important;
	white-space: normal;
}

/* دکمه مشاهده سریع */
.woocommerce ul.products li.product
.mg-quickview-btn {
	margin-top: 0 !important;
	margin-bottom: 10px !important;
}

/* دکمه افزودن به سبد یا خبرم کن */
.woocommerce ul.products li.product
a.button {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

/* جلوگیری از تفاوت ارتفاع به‌خاطر متن دکمه */
.woocommerce ul.products li.product
a.button,
.woocommerce ul.products li.product
button.button,
.woocommerce ul.products li.product
.mg-quickview-btn {
	font-size: 14px !important;
	font-weight: 800 !important;
}

/* لینک مشاهده سبد که گاهی بعد از افزودن محصول می‌آید */
.woocommerce ul.products li.product
.added_to_cart {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 42px;
	margin-top: 8px;
	text-align: center;
}

@media (max-width: 600px) {
	.woocommerce ul.products li.product
	.woocommerce-loop-product__title {
		min-height: 4.5em;
		font-size: 13px !important;
	}

	.woocommerce ul.products li.product .button,
	.woocommerce ul.products li.product
	.mg-quickview-btn {
		min-height: 43px;
		padding: 9px 8px !important;
		font-size: 12px !important;
	}
}
.woocommerce ul.products li.product
.mg-notify-button {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	min-height: 46px;
	background: #292826 !important;
	border-color: #292826 !important;
	color: #fff !important;
	text-align: center !important;
}

.woocommerce ul.products li.product
.mg-notify-button:hover {
	background: #d4af37 !important;
	border-color: #d4af37 !important;
	color: #191714 !important;
}
.mg-footer .mg-social-link a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: inherit;
	transition: color 180ms ease;
}

.mg-footer .mg-social-link a::before {
	content: "↗";
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border: 1px solid rgba(212, 175, 55, 0.45);
	border-radius: 50%;
	color: var(--mg-gold);
	font-size: 12px;
}

.mg-footer .mg-social-link a:hover {
	color: var(--mg-gold);
}
/* بزرگ‌تر شدن دسته‌بندی‌های صفحه اصلی */
.mg-categories .mg-cat-item {
	flex: 0 0 150px;
}

.mg-categories .mg-cat-item img {
	width: 150px;
	height: 150px;
	object-fit: cover;
}

.mg-cat-item__title {
	font-size: 15px;
	font-weight: 800;
}

@media (min-width: 992px) {
	.mg-categories .mg-cat-item {
		flex-basis: 175px;
	}

	.mg-categories .mg-cat-item img {
		width: 175px;
		height: 175px;
	}
}

@media (max-width: 600px) {
	.mg-categories .mg-cat-item {
		flex-basis: 125px;
	}

	.mg-categories .mg-cat-item img {
		width: 125px;
		height: 125px;
	}
}
/* ریست محدود و امنِ قاب اصلی؛ بدون دست‌کاری اجزای داخلی ووکامرس */
html,
body {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

#page,
.site,
.site-content,
main {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

.mg-topbar,
.mg-header {
	width: 100%;
	max-width: none;
	margin: 0;
}
/* رفع قطعی مخفی‌ماندن بخش‌های صفحه */
.mg-reveal,
.mg-reveal.is-visible {
	opacity: 1 !important;
	visibility: visible !important;
	transform: none !important;
	animation: none !important;
}

/* اطمینان از نمایش هدر و فوتر */
.mg-header,
.mg-site-header,
.mg-footer {
	display: block !important;
	opacity: 1 !important;
	visibility: visible !important;
}
/* MissGallery — اصلاحات صفحه اصلی
 * این فایل را در انتهای style.css قرار دهید.
 */

/* متن و دکمه‌های بخش درباره فروشگاه */
.mg-about-box,
.mg-about-box > h2,
.mg-about-box > p {
	text-align: center;
}

.mg-about-box > p {
	max-width: 760px;
	margin-right: auto;
	margin-left: auto;
}

.mg-about-box__actions {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
}

/* چهار کارت مزیت در دسکتاپ */
.mg-grid.mg-grid--4 {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
	align-items: stretch;
}

.mg-grid.mg-grid--4 > .mg-benefit {
	height: 100%;
}

/* ستون‌های جدیدترین، پرفروش‌ترین و تخفیف‌ها */
.mg-triple-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 26px;
	align-items: stretch;
}

.mg-triple-col {
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.mg-triple-col__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.mg-triple-col__products {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	align-items: stretch;
	height: 100%;
}

.mg-mini-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-width: 0;
	overflow: hidden;
	border: 1px solid var(--mg-line, #eadfce);
	border-radius: 16px;
	background: #fff;
	color: inherit;
	text-decoration: none;
}

.mg-mini-card > img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.mg-mini-card__title {
	display: -webkit-box;
	min-height: 4.2em;
	padding: 12px 12px 4px;
	overflow: hidden;
	font-weight: 800;
	line-height: 2.1;
	text-align: center;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.mg-mini-card__price {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	padding: 2px 12px 10px;
	color: var(--mg-gold, #c89d2d);
	font-weight: 900;
	text-align: center;
}

.mg-mini-card__view {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 46px;
	margin-top: auto;
	padding: 10px 12px;
	border-top: 1px solid var(--mg-line, #eadfce);
	color: #a9790e;
	font-weight: 900;
	text-align: center;
}

.mg-mini-card:hover .mg-mini-card__view {
	background: var(--mg-gold, #d9ad32);
	color: #1f1d19;
}

@media (max-width: 1100px) {
	.mg-grid.mg-grid--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.mg-triple-grid {
		grid-template-columns: 1fr;
	}

	.mg-triple-col__products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 620px) {
	.mg-grid.mg-grid--4,
	.mg-triple-col__products {
		grid-template-columns: 1fr;
	}

	.mg-about-box__actions > a {
		width: 100%;
	}
}
/* =========================================================
   اصلاح نهایی باکس سفارش در صفحه پرداخت
   ========================================================= */

body.woocommerce-checkout #order_review,
body.woocommerce-checkout .woocommerce-checkout-review-order {
	display: flex !important;
	flex-direction: column !important;
	justify-content: flex-start !important;
	align-items: stretch !important;
	align-content: normal !important;

	width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;

	margin: 0 !important;
	padding: 0 !important;
	gap: 0 !important;
	position: static !important;
}

body.woocommerce-checkout #order_review > *,
body.woocommerce-checkout .woocommerce-checkout-review-order > * {
	position: static !important;
	inset: auto !important;
	transform: none !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

body.woocommerce-checkout #order_review_heading {
	height: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 25px 24px !important;

	background: #fff6df;
	border: 1px solid #ead29a;
	border-bottom: 0;
	border-radius: 24px 24px 0 0;

	text-align: center !important;
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table {
	display: table !important;
	width: 100% !important;
	height: auto !important;
	min-height: 0 !important;

	margin: 0 !important;
	padding: 0 !important;

	position: static !important;
	top: auto !important;
	bottom: auto !important;
	transform: none !important;

	border-collapse: collapse !important;
	background: #fffdf9;
}

body.woocommerce-checkout
table.woocommerce-checkout-review-order-table
tbody,
body.woocommerce-checkout
table.woocommerce-checkout-review-order-table
tfoot {
	height: auto !important;
	min-height: 0 !important;
}

body.woocommerce-checkout
table.woocommerce-checkout-review-order-table
tr,
body.woocommerce-checkout
table.woocommerce-checkout-review-order-table
th,
body.woocommerce-checkout
table.woocommerce-checkout-review-order-table
td {
	height: auto !important;
	min-height: 0 !important;
}

body.woocommerce-checkout #payment {
	margin: 20px 0 0 !important;
	padding: 22px !important;
	position: static !important;
	transform: none !important;
}

@media (max-width: 900px) {
	body.woocommerce-checkout #order_review_heading {
		padding: 20px 16px !important;
	}
}
/* =========================================================
   سبد خرید خالی
   ========================================================= */

body.mg-cart-is-empty .woocommerce-info,
body.mg-cart-is-empty .cart-empty {
	display: none !important;
}

.mg-empty-cart-v3 {
	width: min(1200px, calc(100% - 32px));
	margin: 20px auto 70px;
	padding: 44px;

	border: 1px solid #eadfca;
	border-radius: 28px;
	background: #fff;
	box-shadow: 0 18px 50px rgba(35, 29, 19, 0.08);

	text-align: center;
}

.mg-empty-cart-v3__icon {
	display: grid;
	place-items: center;

	width: 72px;
	height: 72px;
	margin: 0 auto 16px;

	border-radius: 50%;
	background: #2c2c2c;
	color: #d9b338;
}

.mg-empty-cart-v3 > h2 {
	margin: 0 0 10px;
	font-size: clamp(24px, 3vw, 36px);
}

.mg-empty-cart-v3 > p {
	max-width: 650px;
	margin: 0 auto 22px;
	color: var(--mg-muted);
	line-height: 2;
}

.mg-empty-cart-v3__products {
	margin-top: 48px;
	padding-top: 35px;
	border-top: 1px solid #eadfca;
	text-align: right;
}

.mg-empty-cart-v3__heading {
	margin-bottom: 25px;
	text-align: center;
}

/* مرتب‌شدن ارتفاع کارت‌ها و دکمه‌ها */
.mg-empty-cart-v3 ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: 20px !important;
}

.mg-empty-cart-v3 ul.products li.product {
	display: flex !important;
	flex-direction: column !important;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
}

.mg-empty-cart-v3 ul.products li.product .woocommerce-loop-product__title {
	min-height: 54px;
}

.mg-empty-cart-v3 ul.products li.product .price {
	margin-top: auto !important;
}

.mg-empty-cart-v3 ul.products li.product .mg-quickview-btn,
.mg-empty-cart-v3 ul.products li.product .button {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;

	width: 100% !important;
	min-height: 46px !important;
	margin: 10px 0 0 !important;

	text-align: center !important;
}

@media (max-width: 900px) {
	.mg-empty-cart-v3 {
		padding: 28px 18px;
	}

	.mg-empty-cart-v3 ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 520px) {
	.mg-empty-cart-v3 {
		width: calc(100% - 20px);
		padding: 24px 12px;
	}

	.mg-empty-cart-v3 ul.products {
		grid-template-columns: 1fr !important;
	}
}
/* ==========================================================================
   اصلاح قطعی چیدمان صفحه پرداخت
   ========================================================================== */

body.woocommerce-checkout form.checkout {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) minmax(340px, 410px) !important;
	grid-template-rows: auto !important;
	gap: 38px !important;
	align-items: start !important;
}

/* فرم مشخصات مشتری */
body.woocommerce-checkout form.checkout > .col2-set {
	grid-column: 1 !important;
	grid-row: 1 !important;
	width: 100% !important;
	min-width: 0 !important;
	margin: 0 !important;
}

/* عنوان اصلی را فقط برای صفحه‌خوان نگه می‌داریم */
body.woocommerce-checkout form.checkout > #order_review_heading {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* باکس سفارش دقیقاً کنار فرم قرار بگیرد */
body.woocommerce-checkout form.checkout > #order_review {
	grid-column: 2 !important;
	grid-row: 1 !important;
	align-self: start !important;

	display: block !important;
	width: 100% !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0 24px 24px !important;

	border: 1px solid #eadfc9 !important;
	border-radius: 24px !important;
	background: #fffdf9 !important;

	box-shadow:
		0 18px 45px rgba(42, 35, 27, 0.08) !important;

	overflow: hidden !important;
}

/* عنوان جدید داخل خود باکس سفارش */
body.woocommerce-checkout form.checkout > #order_review::before {
	content: "سفارش شما";
	display: block;

	margin: 0 -24px 20px !important;
	padding: 24px !important;

	border-bottom: 1px solid #eadfc9;
	background: linear-gradient(
		135deg,
		#fff9ec,
		#f7e8bf
	);

	color: #181818;
	font-size: clamp(24px, 3vw, 34px);
	font-weight: 900;
	line-height: 1.4;
	text-align: center;
}

/* جدول سفارش */
body.woocommerce-checkout #order_review table.shop_table {
	display: table !important;
	width: 100% !important;
	margin: 0 0 20px !important;
	padding: 0 !important;

	border: 0 !important;
	border-collapse: collapse !important;
	background: transparent !important;
}

body.woocommerce-checkout #order_review table.shop_table th,
body.woocommerce-checkout #order_review table.shop_table td {
	padding: 14px 8px !important;
	border-bottom: 1px solid #eee4d2 !important;
	background: transparent !important;
	vertical-align: middle !important;
}

/* بخش پرداخت */
body.woocommerce-checkout #payment {
	width: 100% !important;
	margin: 0 !important;
	padding: 18px !important;

	border: 1px solid #eadfc9 !important;
	border-radius: 18px !important;
	background: #fffaf0 !important;
}

/* دکمه ثبت سفارش */
body.woocommerce-checkout #place_order {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;

	width: 100% !important;
	min-height: 52px !important;
	margin-top: 14px !important;

	border: 0 !important;
	border-radius: 999px !important;
	background: #d7ad2f !important;
	color: #171717 !important;

	font-family: inherit !important;
	font-size: 15px !important;
	font-weight: 900 !important;
	text-align: center !important;
}

/* موبایل و تبلت */
@media (max-width: 1050px) {
	body.woocommerce-checkout form.checkout {
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 24px !important;
	}

	body.woocommerce-checkout form.checkout > .col2-set {
		grid-column: 1 !important;
		grid-row: 1 !important;
	}

	body.woocommerce-checkout form.checkout > #order_review {
		grid-column: 1 !important;
		grid-row: 2 !important;
	}
}

@media (max-width: 600px) {
	body.woocommerce-checkout form.checkout > #order_review {
		padding: 0 16px 18px !important;
		border-radius: 18px !important;
	}

	body.woocommerce-checkout form.checkout > #order_review::before {
		margin: 0 -16px 16px !important;
		padding: 20px 16px !important;
		font-size: 25px !important;
	}
}
/* =========================================================
   MISSGALLERY — FINAL BUTTON CONSISTENCY FIX
   ========================================================= */

/* دکمه‌های اصلی ووکامرس */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
    min-height: 46px !important;
    padding: 11px 22px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    border-radius: 999px !important;
    border: 0 !important;

    font-family: var(--mg-font) !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.5 !important;

    background: linear-gradient(
        135deg,
        var(--mg-gold),
        var(--mg-gold-deep)
    ) !important;

    color: var(--mg-text) !important;

    box-sizing: border-box !important;
    vertical-align: middle !important;
}

/* صفحه محصول: تعداد و افزودن به سبد کنار هم مرتب */
.single-product .woocommerce div.product form.cart {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.single-product .woocommerce div.product form.cart .quantity {
    margin: 0 !important;
    height: 46px !important;
}

.single-product .woocommerce div.product form.cart .quantity .qty {
    height: 46px !important;
    min-height: 46px !important;
    padding: 0 12px !important;
}

.single-product .woocommerce div.product form.cart .single_add_to_cart_button {
    height: 46px !important;
    min-height: 46px !important;
    margin: 0 !important;
}

/* هاور یکسان */
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}
/* =========================================================
   اصلاح نهایی هدر دسکتاپ، تبلت و موبایل
========================================================= */

/* لپ‌تاپ و تبلت افقی: نمایش منوی معمولی */
@media (min-width: 641px) {
	.mg-header {
		position: sticky !important;
		top: 0;
	}

	.mg-header__inner {
		display: flex !important;
		align-items: center !important;
		min-height: 78px !important;
		gap: 14px !important;
	}

	.mg-nav,
	.mg-nav.is-open {
		position: static !important;
		display: block !important;
		margin-inline-start: auto !important;
		padding: 0 !important;
		background: transparent !important;
	}

	.mg-nav ul {
		display: flex !important;
		flex-direction: row !important;
		align-items: center !important;
		gap: 2px !important;
	}

	.mg-nav a {
		padding: 9px 10px !important;
		font-size: 13px !important;
		white-space: nowrap !important;
	}

	.mg-burger {
		display: none !important;
	}
}

/* موبایل واقعی */
@media (max-width: 640px) {
	.mg-header {
		position: relative !important;
	}

	.mg-header__inner {
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
		min-height: 66px !important;
		gap: 8px !important;
	}

	.mg-logo {
		flex: 0 0 auto !important;
	}

	.mg-logo img,
	.mg-logo .custom-logo {
		width: auto !important;
		max-width: 92px !important;
		max-height: 66px !important;
		object-fit: contain !important;
	}

	.mg-header__actions {
		display: flex !important;
		align-items: center !important;
		gap: 4px !important;
	}

	.mg-icon-btn {
		width: 40px !important;
		height: 40px !important;
	}

	.mg-burger {
		display: grid !important;
	}

	.mg-nav {
		display: none !important;
		position: absolute !important;
		z-index: 9999 !important;
		top: 100% !important;
		right: 0 !important;
		left: 0 !important;
		width: 100% !important;
		max-height: calc(100vh - 110px) !important;
		margin: 0 !important;
		padding: 12px 20px 18px !important;
		overflow-y: auto !important;
		background: var(--mg-charcoal-2) !important;
		box-shadow: 0 18px 30px rgba(0, 0, 0, 0.25) !important;
	}

	.mg-nav.is-open {
		display: block !important;
	}

	.mg-nav ul {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 4px !important;
	}

	.mg-nav a {
		display: block !important;
		width: 100% !important;
		padding: 11px 14px !important;
		text-align: right !important;
	}

	.mg-nav .sub-menu {
		position: static !important;
		display: none !important;
		padding: 4px 15px !important;
		background: transparent !important;
	}

	.mg-nav li:hover > .sub-menu,
	.mg-nav li:focus-within > .sub-menu {
		display: flex !important;
	}
}
/* =========================================================
   اصلاح فوتر در موبایل
========================================================= */

@media (max-width: 640px) {
	.mg-footer {
		width: 100% !important;
		margin-top: 35px !important;
		overflow: hidden !important;
	}

	.mg-footer .mg-container {
		width: 100% !important;
		max-width: 100% !important;
		padding-right: 20px !important;
		padding-left: 20px !important;
	}

	.mg-footer__grid {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 32px !important;
		width: 100% !important;
		padding: 38px 0 !important;
	}

	.mg-footer__grid > * {
		width: 100% !important;
		min-width: 0 !important;
		margin: 0 !important;
	}

	.mg-footer h4 {
		margin: 0 0 14px !important;
		font-size: 16px !important;
		text-align: right !important;
	}

	.mg-footer p,
	.mg-footer li,
	.mg-footer a {
		max-width: 100% !important;
		overflow-wrap: anywhere !important;
		word-break: normal !important;
		text-align: right !important;
	}

	.mg-footer ul {
		width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
		gap: 9px !important;
	}

	.mg-footer__bar {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 14px !important;
		width: 100% !important;
		padding: 18px 0 !important;
		text-align: center !important;
	}

	.mg-badges {
		display: flex !important;
		flex-wrap: wrap !important;
		justify-content: flex-start !important;
		gap: 10px !important;
		width: 100% !important;
	}

	.mg-badges a,
	.mg-badges img {
		max-width: 130px !important;
		min-width: 0 !important;
	}

}
/* =========================================================
   نمایش و اصلاح خبرنامه کلکسیون در موبایل
========================================================= */

@media (max-width: 640px) {
	.mg-newsletter {
		display: grid !important;
		visibility: visible !important;
		opacity: 1 !important;
		transform: none !important;

		grid-template-columns: minmax(0, 1fr) !important;
		gap: 22px !important;

		width: 100% !important;
		max-width: 100% !important;
		margin: 0 auto !important;
		padding: 26px 18px !important;

		border-radius: 20px !important;
		overflow: hidden !important;
	}

	.mg-newsletter > * {
		width: 100% !important;
		min-width: 0 !important;
	}

	.mg-newsletter h2 {
		margin-bottom: 10px !important;
		font-size: 24px !important;
		line-height: 1.6 !important;
	}

	.mg-newsletter p {
		font-size: 14px !important;
		line-height: 2 !important;
	}

	.mg-newsletter form {
		display: flex !important;
		flex-direction: column !important;
		gap: 10px !important;
		width: 100% !important;
	}

	.mg-newsletter input[type="tel"] {
		display: block !important;
		width: 100% !important;
		min-width: 0 !important;
		min-height: 48px !important;
		margin: 0 !important;
		padding: 12px 16px !important;
	}

	.mg-newsletter .mg-btn,
	.mg-newsletter button[type="submit"] {
		display: flex !important;
		width: 100% !important;
		min-height: 48px !important;
		margin: 0 !important;
	}
}
/* =========================================================
   چیدمان عریض فروشگاه + پنج محصول در هر ردیف
========================================================= */

body.woocommerce-shop .mg-container,
body.tax-product_cat .mg-container,
body.tax-product_tag .mg-container,
body.post-type-archive-product .mg-container {
	max-width: 1480px !important;
	padding-right: 16px !important;
	padding-left: 16px !important;
}

/* در حالت RTL ستون اول، یعنی فیلترها، سمت راست قرار می‌گیرد */
body.woocommerce-shop .mg-shop-layout,
body.tax-product_cat .mg-shop-layout,
body.tax-product_tag .mg-shop-layout,
body.post-type-archive-product .mg-shop-layout {
	display: grid !important;
	grid-template-columns: 230px minmax(0, 1fr) !important;
	gap: 22px !important;
	align-items: start !important;
	width: 100% !important;
}

/* پنج محصول در دسکتاپ */
@media (min-width: 1200px) {
	body.woocommerce-shop ul.products,
	body.tax-product_cat ul.products,
	body.tax-product_tag ul.products,
	body.post-type-archive-product ul.products {
		display: grid !important;
		grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
		gap: 26px 18px !important;
	}
}

/* لپ‌تاپ کوچک */
@media (min-width: 901px) and (max-width: 1199px) {
	body.woocommerce-shop ul.products,
	body.tax-product_cat ul.products,
	body.tax-product_tag ul.products,
	body.post-type-archive-product ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
		gap: 24px 16px !important;
	}
}

/* تبلت و موبایل */
@media (max-width: 900px) {
	body.woocommerce-shop .mg-shop-layout,
	body.tax-product_cat .mg-shop-layout,
	body.tax-product_tag .mg-shop-layout,
	body.post-type-archive-product .mg-shop-layout {
		grid-template-columns: minmax(0, 1fr) !important;
	}

	body.woocommerce-shop ul.products,
	body.tax-product_cat ul.products,
	body.tax-product_tag ul.products,
	body.post-type-archive-product ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}
/* ==========================================================================
   MISSGALLERY — CANONICAL PRODUCT CARD & BUTTON SYSTEM
   این بخش مرجع نهایی کارت‌های محصول است و باید در انتهای فایل باقی بماند.
   ========================================================================== */

.woocommerce ul.products li.product {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	height: 100% !important;
	min-width: 0 !important;
}

.woocommerce ul.products li.product .woocommerce-LoopProduct-link {
	display: flex !important;
	flex: 1 1 auto !important;
	flex-direction: column !important;
	width: 100% !important;
	min-width: 0 !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	display: -webkit-box !important;
	overflow: hidden !important;
	width: 100% !important;
	min-height: 3.6em !important;
	margin: 10px 0 6px !important;
	padding: 0 !important;
	font-size: 14px !important;
	line-height: 1.8 !important;
	text-align: right !important;
	-webkit-box-orient: vertical !important;
	-webkit-line-clamp: 2 !important;
}

.woocommerce ul.products li.product .price {
	display: flex !important;
	align-items: center !important;
	justify-content: flex-start !important;
	min-height: 32px !important;
	margin: auto 0 10px !important;
	font-weight: 800 !important;
	text-align: right !important;
}

.woocommerce ul.products li.product .mg-quickview-btn,
.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product button.button,
.woocommerce ul.products li.product .added_to_cart {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	max-width: none !important;
	min-width: 0 !important;
	height: 46px !important;
	min-height: 46px !important;
	margin: 0 0 9px !important;
	padding: 9px 12px !important;
	box-sizing: border-box !important;
	border-radius: 999px !important;
	font-family: var(--mg-font) !important;
	font-size: 13px !important;
	font-weight: 800 !important;
	line-height: 1.35 !important;
	text-align: center !important;
	white-space: normal !important;
	box-shadow: none !important;
	transform: none !important;
	opacity: 1 !important;
	visibility: visible !important;
}

.woocommerce ul.products li.product .mg-quickview-btn {
	position: static !important;
	inset: auto !important;
	order: initial !important;
	border: 1px solid var(--mg-gold) !important;
	background: var(--mg-white) !important;
	color: var(--mg-text) !important;
	cursor: pointer !important;
}

.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product button.button {
	border: 1px solid var(--mg-gold) !important;
	background: linear-gradient(135deg, var(--mg-gold), var(--mg-gold-deep)) !important;
	color: var(--mg-text) !important;
}

.woocommerce ul.products li.product .mg-quickview-btn:hover,
.woocommerce ul.products li.product .mg-quickview-btn:focus-visible {
	background: var(--mg-gold) !important;
	color: var(--mg-text) !important;
}

.woocommerce ul.products li.product a.button:hover,
.woocommerce ul.products li.product button.button:hover {
	filter: brightness(1.04) !important;
	color: var(--mg-text) !important;
}

.woocommerce ul.products li.product .added_to_cart {
	height: auto !important;
	min-height: 40px !important;
	border: 1px solid var(--mg-line) !important;
	background: var(--mg-white) !important;
	color: var(--mg-text) !important;
}

.woocommerce ul.products li.product.mg-product-is-outofstock
a.button:not(.mg-quickview-btn) {
	display: none !important;
}

@media (max-width: 600px) {
	.woocommerce ul.products li.product .woocommerce-loop-product__title {
		min-height: 3.6em !important;
		font-size: 13px !important;
	}

	.woocommerce ul.products li.product .mg-quickview-btn,
	.woocommerce ul.products li.product a.button,
	.woocommerce ul.products li.product button.button {
		height: 44px !important;
		min-height: 44px !important;
		padding: 8px 9px !important;
		font-size: 12px !important;
	}
}
/* =========================================================
   جداسازی قطعی سایدبار از محصولات
   ========================================================= */

body.woocommerce-shop .mg-shop-layout,
body.post-type-archive-product .mg-shop-layout,
body.tax-product_cat .mg-shop-layout,
body.tax-product_tag .mg-shop-layout,
body.tax-product_attribute .mg-shop-layout {
	display: grid !important;
	grid-template-columns: 230px minmax(0, 1fr) !important;
	grid-template-areas: "filters products" !important;
	gap: 22px !important;
	align-items: start !important;
	direction: rtl !important;
	isolation: isolate;
}

/* ستون فیلتر */
body .mg-shop-layout > aside {
	grid-area: filters !important;
	grid-column: 1 !important;
	position: relative !important;
	z-index: 100 !important;
	width: 100% !important;
	min-width: 0 !important;
	pointer-events: auto !important;
}

/* ستون محصولات */
body .mg-shop-products {
	grid-area: products !important;
	grid-column: 2 !important;
	position: relative !important;
	z-index: 1 !important;
	width: 100% !important;
	min-width: 0 !important;
	overflow: hidden !important;
}

/* هیچ بخشی از کارت محصول حق ورود به ستون فیلتر را ندارد */
body .mg-shop-products ul.products {
	position: relative !important;
	width: 100% !important;
	min-width: 0 !important;
	overflow: hidden !important;
}

body .mg-filter-form {
	position: relative !important;
	z-index: 101 !important;
	width: 100% !important;
	pointer-events: auto !important;
}

body .mg-filter-form button[type="submit"] {
	position: relative !important;
	z-index: 102 !important;
	display: flex !important;
	width: 100% !important;
	pointer-events: auto !important;
	cursor: pointer !important;
}

/* موبایل */
@media (max-width: 900px) {
	body.woocommerce-shop .mg-shop-layout,
	body.post-type-archive-product .mg-shop-layout,
	body.tax-product_cat .mg-shop-layout,
	body.tax-product_tag .mg-shop-layout,
	body.tax-product_attribute .mg-shop-layout {
		grid-template-columns: minmax(0, 1fr) !important;
		grid-template-areas:
			"filters"
			"products" !important;
	}

	body .mg-shop-layout > aside,
	body .mg-shop-products {
		grid-column: 1 !important;
	}
}
.mg-header__actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}
.mg-icon-btn {
  display: grid !important;
  place-items: center !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 999px !important;
  color: var(--mg-gold) !important;
}
.mg-icon-btn * {
  color: inherit;
}

/* =========================================================
   اصلاح نهایی پنل فیلتر موبایل
   این بخش باید بعد از قوانین قدیمی سایدبار باقی بماند.
   ========================================================= */
@media (max-width: 900px) {
	body.woocommerce-shop .mg-shop-layout,
	body.post-type-archive-product .mg-shop-layout,
	body.tax-product_cat .mg-shop-layout,
	body.tax-product_tag .mg-shop-layout,
	body.tax-product_attribute .mg-shop-layout {
		display: block !important;
	}

	body .mg-shop-layout > aside.mg-shop-filters {
		position: fixed !important;
		z-index: 10001 !important;
		inset: auto 10px 10px 10px !important;
		width: auto !important;
		max-height: min(72dvh, 680px) !important;
		border: 1px solid var(--mg-line) !important;
		border-radius: 24px !important;
		box-shadow: 0 14px 45px rgba(0, 0, 0, 0.18) !important;
		visibility: hidden !important;
		transform: translateY(105%) !important;
	}

	body .mg-shop-layout > aside.mg-shop-filters.is-open {
		visibility: visible !important;
		transform: translateY(0) !important;
	}

	body .mg-shop-products {
		width: 100% !important;
	}

	.mg-filter-overlay {
		display: none !important;
		background: transparent !important;
		opacity: 0 !important;
		visibility: hidden !important;
	}

	body .mg-shop-filters .mg-mobile-filter-header {
		position: sticky !important;
		top: 0 !important;
		min-height: 72px !important;
		padding-top: 18px !important;
		border-radius: 24px 24px 0 0 !important;
	}

	body .mg-shop-filters .mg-mobile-filter-header::before {
		content: "";
		position: absolute;
		top: 7px;
		left: 50%;
		width: 44px;
		height: 4px;
		border-radius: 999px;
		background: var(--mg-line);
		transform: translateX(-50%);
	}
}

/* نوشته و آیکن‌های عملیات هدر */
.mg-header .mg-header__actions > .mg-header-action {
	display: inline-flex !important;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-width: 58px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	font-family: var(--mg-font);
	text-decoration: none;
	cursor: pointer;
}

.mg-header-action__label {
	display: block;
	color: #eee7d9;
	font-size: 10.5px;
	font-weight: 700;
	line-height: 1.25;
	white-space: nowrap;
}

.mg-header-action:hover .mg-icon-btn {
	background: rgba(212, 175, 55, 0.2) !important;
}

.mg-header-action:hover .mg-header-action__label {
	color: var(--mg-gold);
}

/* فیلم فقط در دسکتاپ؛ اسلایدر سه‌تایی فقط در موبایل و تبلت */
.mg-desktop-video-hero {
	display: none;
}

@media (min-width: 992px) {
	.mg-desktop-video-hero {
		display: block;
		position: relative;
		width: min(1440px, calc(100% - 48px));
		height: clamp(420px, 38vw, 610px);
		margin: 24px auto 34px;
		overflow: hidden;
		border: 1px solid rgba(212, 175, 55, 0.42);
		border-radius: 26px;
		background: #1f1e1c;
		box-shadow: 0 20px 55px rgba(35, 27, 15, 0.16);
	}

	.mg-desktop-video-hero__video {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center;
	}

	.mg-mobile-slider-hero {
		display: none;
	}
}

@media (max-width: 991px) {
	.mg-desktop-video-hero {
		display: none !important;
	}

	.mg-mobile-slider-hero {
		display: block;
	}

	.mg-header .mg-header__actions > .mg-header-action {
		min-width: 50px;
		gap: 3px;
	}

	.mg-header-action__label {
		font-size: 9px;
	}
}
/* کشور فروشگاه همیشه ایران است؛ کل ردیف کشور در پرداخت مخفی شود */
#billing_country_field,
#shipping_country_field {
	display: none !important;
}
/* حذف فرم قدیمی و تکراری اعلان موجودی */
.cwginstock-subscribe-form,
.cwginstock-panel-primary,
.cwginstock-subscribe-form-wrapper {
	display: none !important;
}
/* =========================================================
   گرید یکپارچه محصولات در کل فروشگاه
   ========================================================= */

.woocommerce ul.products,
.woocommerce-page ul.products,
.related.products ul.products,
.up-sells.products ul.products,
.cross-sells ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after {
	display: none !important;
	content: none !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.related.products ul.products li.product,
.up-sells.products ul.products li.product,
.cross-sells ul.products li.product {
	float: none !important;
	clear: none !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
}

/* تبلت: سه محصول در هر ردیف */
@media (max-width: 900px) {
	.woocommerce ul.products,
	.woocommerce-page ul.products,
	.related.products ul.products,
	.up-sells.products ul.products,
	.cross-sells ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
		gap: 12px !important;
	}
}

/* موبایل: سه محصول در هر ردیف */
@media (max-width: 600px) {
	.woocommerce ul.products,
	.woocommerce-page ul.products,
	.related.products ul.products,
	.up-sells.products ul.products,
	.cross-sells ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
		gap: 7px !important;
	}

	.woocommerce ul.products li.product,
	.woocommerce-page ul.products li.product {
		min-width: 0 !important;
		padding: 7px !important;
		border-radius: 10px !important;
	}

	.woocommerce ul.products li.product img {
		width: 100% !important;
		height: auto !important;
		aspect-ratio: 1 / 1;
		object-fit: cover;
		border-radius: 8px !important;
	}

	.woocommerce ul.products li.product
	.woocommerce-loop-product__title {
		min-height: 40px !important;
		margin: 6px 0 !important;
		padding: 0 !important;
		font-size: 10px !important;
		line-height: 1.55 !important;
	}

	.woocommerce ul.products li.product .price {
		min-height: 26px;
		font-size: 10px !important;
		line-height: 1.5 !important;
	}

	.woocommerce ul.products li.product .button,
	.woocommerce ul.products li.product .mg-quickview-btn {
		min-height: 31px !important;
		padding: 6px 3px !important;
		font-size: 9px !important;
		line-height: 1.3 !important;
		white-space: normal !important;
	}
}
/* =========================================================
   فرم اعلان موجودی Payamito Plus با ظاهر MissGallery
   ========================================================= */

.payamito-plus-instock-notify-form-container {
	display: block !important;
	margin: 22px 0 !important;
	padding: 22px !important;

	border: 1px solid rgba(212, 175, 55, 0.55) !important;
	border-radius: 18px !important;

	background:
		radial-gradient(
			circle at 10% 5%,
			rgba(212, 175, 55, 0.16),
			transparent 35%
		),
		linear-gradient(145deg, #fffdf8, #f9edce) !important;

	color: #211d18 !important;
	box-shadow: 0 14px 35px rgba(80, 58, 15, 0.10) !important;
}

.payamito-plus-instock-notify-form-container h3 {
	margin: 0 0 14px !important;
	color: #211d18 !important;
	font-family: inherit !important;
	font-size: 18px !important;
	font-weight: 900 !important;
	line-height: 1.7 !important;
	text-align: right !important;
}

.payamito-plus-instock-notify-form {
	align-items: stretch !important;
	gap: 9px !important;
	width: 100% !important;
}

.payamito-plus-instock-notify-form[style*="display: none"] {
	display: none !important;
}

.payamito-plus-instock-notify-form input {
	flex: 1 1 auto !important;
	width: 100% !important;
	min-width: 0 !important;
	height: 46px !important;
	padding: 10px 14px !important;

	border: 1px solid #e3d4af !important;
	border-radius: 12px !important;
	outline: none !important;

	background: rgba(255, 255, 255, 0.85) !important;
	color: #211d18 !important;

	font-family: inherit !important;
	font-size: 13px !important;
	text-align: right !important;
}

.payamito-plus-instock-notify-form input:focus {
	border-color: #d4af37 !important;
	box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.14) !important;
}

.payamito-plus-instock-notify-form button,
.payamito-plus-instock-notify-form-container button {
	flex: 0 0 auto !important;
	min-width: 90px !important;
	min-height: 46px !important;
	padding: 10px 18px !important;

	border: 0 !important;
	border-radius: 12px !important;

	background: linear-gradient(
		135deg,
		#d4af37,
		#e6c65d
	) !important;

	color: #211d18 !important;
	font-family: inherit !important;
	font-size: 13px !important;
	font-weight: 900 !important;
	cursor: pointer !important;
	box-shadow: 0 10px 22px rgba(180, 135, 25, 0.18) !important;
}

.payamito-plus-instock-notify-form-container button:hover {
	background: #292826 !important;
	color: #f6d66e !important;
}

.payamito-plus-instock-notify-response {
	margin-top: 12px !important;
	padding: 10px 12px !important;
	border-radius: 10px !important;
	font-size: 12px !important;
	line-height: 1.7 !important;
}

@media (max-width: 600px) {
	.payamito-plus-instock-notify-form-container {
		padding: 17px !important;
		border-radius: 15px !important;
	}

	.payamito-plus-instock-notify-form {
		flex-direction: column !important;
	}

	.payamito-plus-instock-notify-form button,
	.payamito-plus-instock-notify-form-container button {
		width: 100% !important;
	}
}
/* =========================================================
   مرجع نهایی گرید محصولات
   ========================================================= */

/* محصولات مرتبط دسکتاپ */
body.single-product .related.products ul.products,
body.single-product .up-sells.products ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: 18px !important;
	width: 100% !important;
}

/* تمام محصولات در موبایل: سه محصول در هر ردیف */
@media (max-width: 900px) {
	body.woocommerce-shop ul.products,
	body.post-type-archive-product ul.products,
	body.tax-product_cat ul.products,
	body.tax-product_tag ul.products,
	body.tax-product_attribute ul.products,
	body.single-product .related.products ul.products,
	body.single-product .up-sells.products ul.products,
	body.woocommerce-cart ul.products {
		display: grid !important;
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
		gap: 8px !important;
	}
}