/* =========================================================================
   base.css — پایه‌ی سراسری چایلد تم ریحانه‌استور
   ---------------------------------------------------------------------------
   • توکن‌های طراحی (رنگ‌ها) از روی ui/style.css
   • ریست سبک، container، یوتیلیتی‌ها و دکمه‌های عمومی
   • همه‌چیز زیر اسکوپ .rey-ui (کلاس body) تا با تم مادر وودمارت تداخل نکند
   • فونت: از var(--rey-font) (یکان‌بخ محلی) استفاده می‌شود، نه Vazirmatn
   ========================================================================= */

/* ---------- توکن‌های طراحی ----------
   این مقادیر پیش‌فرض‌اند. سفارشی‌ساز (نمایش → سفارشی‌سازی → رنگ‌های پوسته)
   همه‌ی توکن‌های زیر را در <head> بازنویسی می‌کند، پس برای تغییر رنگ سایت
   نیازی به دست‌زدن به این فایل نیست.
   ------------------------------------------------------------------ */
:root {
  /* رنگ اصلی و مشتق‌هایش */
  --green: #005f36;
  --green-dark: #004326;
  --green-light: #0b8f57;
  --green-bright: #4bbf87;   /* روشن‌ترین حالت (گرادیان آواتار) */
  --green-mint: #bfe6d2;     /* متن روشن روی پس‌زمینه‌ی تیره‌ی اصلی */

  /* طیف تینت‌های رنگ اصلی — از روشن به تیره */
  --green-050: #f6faf8;      /* پس‌زمینه‌ی هاور خیلی ملایم */
  --green-100: #eaf3ee;      /* پس‌زمینه‌ی چیپ/آیکون */
  --green-200: #dff0e7;      /* حالت فعال ملایم */
  --green-300: #bcd9c9;      /* بوردر و خط‌چین */

  /* رنگ‌های ثابت رابط */
  --navy: #12303f;
  --yellow: #ffd43b;
  --red: #e11d48;
  --bg: #fbfbfc;
  --surface: #fff;
  --border: #eef0f2;
  --border-2: #f2f4f6;
  --gray-1: #f4f5f7;
  --text: #1a2431;
  --text-2: #4b5563;
  --text-3: #6b7280;
  --muted: #9aa0a8;
}

/* ---------- فونت و اندازه‌ی پایه ----------
   --rey-font و --rey-fs از سفارشی‌ساز در <head> ست می‌شوند؛
   مقادیر زیر فقط فالبک‌اند.
   ------------------------------------------------------------------ */
:root {
  --rey-font: 'Yekan Bakh', Tahoma, sans-serif;
  --rey-fs: 14px;
  --rey-r: 1;               /* ضریب گردیِ گوشه‌ها */
}

body,
button,
input,
select,
textarea,
.woodmart-title,
h1, h2, h3, h4, h5, h6 {
  font-family: var(--rey-font) !important;
}

/* اندازه‌ی پایه فقط روی متنِ بدنه اثر دارد؛ تیترها و اجزای رابط
   اندازه‌ی طراحی‌شده‌ی خودشان را نگه می‌دارند. */
.rey-ui body,
.rey-ui .post-body,
.rey-ui .pd-article,
.rey-ui .article-body,
.rey-ui .rey-catseo__body { font-size: var(--rey-fs); }

/* ---------- ریست (اسکوپ‌شده) ---------- */
.rey-ui * { box-sizing: border-box; }

.rey-ui,
.rey-ui.rey-body {
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  overflow-x: hidden;
  overflow-x: clip;
}

.rey-ui img { display: block; max-width: 100%; }
.rey-ui a { text-decoration: none; color: inherit; cursor: pointer; }
.rey-ui button { font-family: inherit; cursor: pointer; }

/* متنِ فقط برای موتور جستجو و اسکرین‌ریدر (بصری مخفی، ولی حذف‌نشده) */
.rey-ui .rey-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Container ---------- */
.rey-ui .container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* جلوگیری از بلواوت گرید/فلکس در موبایل (min-width:auto پیش‌فرض) */
.rey-ui .acc-layout > *, .rey-ui .cart-layout > *, .rey-ui .cat-layout > *,
.rey-ui .article-layout > *, .rey-ui .pd-grid > *, .rey-ui .rev-grid > *,
.rey-ui .contact-grid > *, .rey-ui .branch > *, .rey-ui .brand-story > *,
.rey-ui .cmp-head-cards > *, .rey-ui .stat-cards > *, .rey-ui .cart-item > *,
.rey-ui .order-card > *, .rey-ui .track-card > *, .rey-ui .acc-panel,
.rey-ui .acc-side, .rey-ui .suggest-band, .rey-ui .points-hero > *,
.rey-ui .about-hero > *, .rey-ui .form-card, .rey-ui .office-card { min-width: 0; }

/* پنهان‌کردن اسکرول‌بار افقی کاروسل‌ها */
.rey-ui .hide-sb { scrollbar-width: none; -ms-overflow-style: none; }
.rey-ui .hide-sb::-webkit-scrollbar { display: none; }

/* ---------- بردکرامب عمومی ---------- */
.rey-ui .breadcrumb { display: flex; align-items: center; gap: 8px; padding-top: 22px;
  font: 400 11px var(--rey-font); color: var(--muted); flex-wrap: wrap; }
.rey-ui .breadcrumb a { color: var(--muted); transition: color .2s; }
.rey-ui .breadcrumb a:hover { color: var(--green); }
.rey-ui .breadcrumb .sep { opacity: .5; }
.rey-ui .breadcrumb .current { color: var(--text-2); font-weight: 500; }

/* ---------- آیکون‌های عمومی ---------- */
.rey-ui .f-ico { color: var(--green); }
.rey-ui .f-ico svg { width: 20px; height: 20px; }
.rey-ui .amazing-link { display: inline-flex; align-items: center; gap: 6px; }
.rey-ui .amazing-link svg { width: 14px; height: 14px; }

/* ---------- دکمه‌های عمومی ---------- */
.rey-ui .btn-primary {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: var(--green); color: #fff; border: none;
  font: 700 13px var(--rey-font);
  padding: 12px 26px; border-radius: 99px; cursor: pointer;
  transition: background .2s;
}
.rey-ui .btn-primary:hover { background: var(--green-dark); }
.rey-ui .btn-primary svg { width: 16px; height: 16px; }
.rey-ui .btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: transparent; color: var(--navy);
  border: 1.5px solid #d7dce0; font: 700 13px var(--rey-font);
  padding: 12px 26px; border-radius: 99px; transition: border-color .2s, color .2s;
}
.rey-ui .btn-ghost:hover { border-color: var(--green); color: var(--green); }
.rey-ui .btn-ghost svg { width: 16px; height: 16px; }

/* ===========================================================
   کارت محصول (.pcard) — سراسری: صفحه اول، فروشگاه، محصول، سبد
   پورت مستقیم از ui/style.css
   =========================================================== */
.rey-ui /* ---------- Product card ---------- */
.pcard { display: flex; flex-direction: column; width: 100%;
  background: #fff; border-radius: calc(16px * var(--rey-r)); padding: 8px; }
.rey-ui .pcard .img-wrap { position: relative; width: 100%;
  aspect-ratio: 1500 / 1820;
  border-radius: calc(12px * var(--rey-r)); overflow: hidden; background: #f0f1f3; }
.rey-ui .pcard .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.rey-ui .pcard .off { position: absolute; top: 8px; right: 8px;
  background: var(--green); color: #fff;
  font: 700 12px var(--rey-font);
  padding: 3px 9px; border-radius: calc(20px * var(--rey-r)); }
/* حالت ناموجود */
.rey-ui .pcard.oos .img-wrap img { filter: grayscale(1); opacity: .55; }
.rey-ui .pcard .oos-badge { position: absolute; top: 8px; right: 8px;
  background: var(--red); color: #fff;
  font: 700 12px var(--rey-font);
  padding: 3px 10px; border-radius: calc(20px * var(--rey-r)); }
.rey-ui .pcard .oos-text { font: 700 13px var(--rey-font); color: var(--red); }
.rey-ui .pcard .add { position: absolute; bottom: 8px; left: 8px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid #e5e7eb; background: #fff; color: var(--green);
  font: 700 21px var(--rey-font); line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; }
.rey-ui .pcard .add:hover { background: var(--green); color: #fff; }
.rey-ui .pcard .title { font: 500 13px/1.6 var(--rey-font); color: var(--text);
  margin-top: 12px; padding: 0 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 42px; }
.rey-ui .pcard .rating { display: flex; align-items: center; gap: 5px; margin-top: 6px; padding: 0 2px; }
.rey-ui .pcard .rating .star { color: #f5a623; font-size: 13px; }
.rey-ui .pcard .rating .val { font: 600 12px var(--rey-font); color: var(--text-2); }
.rey-ui .pcard .rating .cnt { font: 400 11px var(--rey-font); color: var(--muted); }
.rey-ui .pcard .price-row { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; padding: 0 2px; }
.rey-ui .pcard .price { font: 700 15px var(--rey-font); color: var(--text); }
.rey-ui .pcard .unit { font: 400 12px var(--rey-font); color: var(--text-3); }
.rey-ui .pcard .old { font: 400 12px var(--rey-font); color: #c0c4ca; text-decoration: line-through; margin-right: auto; }
.rey-ui .pcard .stock { margin-top: 10px; padding: 0 2px; }
.rey-ui .pcard .stock .bar { height: 5px; border-radius: 99px; background: var(--border); overflow: hidden; }
.rey-ui .pcard .stock .bar i { display: block; height: 100%; border-radius: 99px; background: var(--green); }
.rey-ui .pcard .stock .lbl { font: 500 10px var(--rey-font); color: var(--red); margin-top: 5px; }
.rey-ui .pcard .rating .star svg { width: 13px; height: 13px; display: block; }
.rey-ui /* (11) قیمت پلکانی: نهایی بالا، اصلی خط‌خورده پایین */
.pcard .price-row { flex-wrap: wrap; row-gap: 2px; }
.rey-ui .pcard .price-row .old { flex-basis: 100%; order: 3; margin-right: 0; font-size: 11.5px; }
.rey-ui /* دکمه افزودن به سبد در کارت محصول */
.pcard .add-btn { margin-top: 10px; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 1.5px solid var(--green); background: #fff; color: var(--green);
  font: 700 12px var(--rey-font); border-radius: calc(11px * var(--rey-r)); padding: 9px 8px;
  cursor: pointer; transition: all .2s; }
.rey-ui .pcard .add-btn svg { width: 15px; height: 15px; }
.rey-ui .pcard .add-btn:hover, .rey-ui .pcard .add-btn.added { background: var(--green); color: #fff; }
.rey-ui /* (1+3) کارت کاروسل: قیمت چپ و بالاتر، دکمه‌ها هم‌سطح */
.pcard { height: 100%; }
.rey-ui .pcard .price-row { justify-content: flex-end; margin-top: 6px; }
.rey-ui .pcard .price-row .old { text-align: left; }
.rey-ui .pcard .price-row, .rey-ui .pcard .stock { margin-bottom: 6px; }
.rey-ui .pcard .stock { margin-top: 0; }
.rey-ui .pcard .title { min-height: 42px; }

/* ===========================================================
   کاروسل محصولات (.prow) — گام‌به‌گام، هر کلیک دقیقاً یک کارت
   ریلِ پایه اینجا (سراسری) تعریف می‌شود چون .prow در صفحه‌ی اصلی،
   سبد خرید و «محصول یافت نشد» استفاده می‌شود.
   =========================================================== */
.rey-ui .prow {
  display: flex; gap: 16px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
  padding-bottom: 2px;
}
.rey-ui .prow::-webkit-scrollbar { display: none; }
.rey-ui .prow > * { flex: 0 0 210px; scroll-snap-align: start; scroll-snap-stop: always; }
/* آخرین کارت با لبه‌ی پایان هم‌تراز شود تا انتهای ریل قابل‌دسترس بماند */
.rey-ui .prow > *:last-child { scroll-snap-align: end; }

/* کشیدن با ماوس (drag-to-scroll) — با JS کلاس می‌گیرد.
   هنگام کشیدن، snap و انتخابِ متن باید خاموش باشند وگرنه ریل برمی‌گردد. */
.rey-ui .rey-drag { cursor: grab; }
.rey-ui .rey-drag.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none !important;
  scroll-behavior: auto !important;
  user-select: none; -webkit-user-select: none;
}
.rey-ui .rey-drag.is-dragging a,
.rey-ui .rey-drag.is-dragging img { pointer-events: none; }
/* روی لمسی نشانگرِ «دست» معنا ندارد */
@media (hover: none) {
  .rey-ui .rey-drag { cursor: auto; }
}

/* رَپرِ کاروسل + فلش‌ها (با JS ساخته می‌شود) */
.rey-ui .prow-shell { position: relative; }
.rey-ui .amazing .prow-shell { z-index: 1; }

.rey-ui .prow-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--border); border-radius: 50%;
  background: #fff; color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(15, 27, 45, .16);
  opacity: 0; visibility: hidden; z-index: 4;
  transition: opacity .22s ease, visibility .22s ease, background .2s, color .2s, border-color .2s;
}
.rey-ui .prow-nav svg { width: 18px; height: 18px; }
.rey-ui .prow-shell.is-scrollable:hover .prow-nav,
.rey-ui .prow-nav:focus-visible { opacity: 1; visibility: visible; }
.rey-ui .prow-nav:hover { background: var(--green); color: #fff; border-color: var(--green); }
.rey-ui .prow-nav[disabled] { opacity: 0 !important; visibility: hidden !important; pointer-events: none; }
.rey-ui .prow-nav--prev { inset-inline-start: auto; inset-inline-end: -14px; }
.rey-ui .prow-nav--next { inset-inline-end: auto; inset-inline-start: -14px; }

/* روی صفحه‌های باریک‌تر، فلش‌ها را داخل ریل بیاور تا از container بیرون نزنند */
@media (max-width: 1320px) {
  .rey-ui .prow-nav--prev { inset-inline-end: 2px; }
  .rey-ui .prow-nav--next { inset-inline-start: 2px; }
}
/* موبایل/لمسی: فقط سوایپ (فلش‌ها حذف) */
@media (max-width: 860px), (hover: none) {
  .rey-ui .prow-nav { display: none !important; }
}

/* ===========================================================
   پیام شناور (Toast) — سراسری، بالای همه‌چیز
   =========================================================== */
.rey-toasts { position: fixed; top: 16px; right: 16px; left: auto; transform: none;
  z-index: 2000; display: flex; flex-direction: column; gap: 8px;
  align-items: flex-end; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.rey-toast { display: flex; align-items: center; gap: 10px;
  background: var(--green); color: #fff;
  font: 600 13px var(--rey-font); line-height: 1.9;
  padding: 12px 18px; border-radius: calc(14px * var(--rey-r));
  box-shadow: 0 12px 30px rgba(0, 95, 54, .28);
  opacity: 0; transform: translateX(24px); transition: opacity .28s, transform .28s; }
.rey-toast.in { opacity: 1; transform: none; }
.rey-toast--error { background: var(--red); box-shadow: 0 12px 30px rgba(225, 29, 72, .28); }
.rey-toast__ico { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  display: flex; align-items: center; justify-content: center; }
.rey-toast__ico svg { width: 13px; height: 13px; }
.rey-toast__txt { min-width: 0; }
@media (max-width: 860px) { .rey-toasts { top: 12px; right: 12px; left: 12px;
  width: auto; max-width: none; align-items: stretch; } }

/* ===========================================================
   دکمه‌های سبز — رنگ متن در هر حالتی سفید می‌ماند.

   دلیل !important: قالب مادر (وودمارت) روی a:hover و button:hover
   رنگ متن ست می‌کند و روی دکمه‌های سبزِ ما می‌افتد؛ نتیجه‌اش متنِ
   سبز یا تیره روی پس‌زمینه‌ی سبز است که اصلاً خوانا نیست.
   =========================================================== */
.rey-ui .btn-primary,
.rey-ui .btn-primary:hover,
.rey-ui .btn-primary:focus,
.rey-ui .btn-primary:active,
.rey-ui .btn-primary:visited,
.rey-ui .cats-btn,
.rey-ui .cats-btn:hover,
.rey-ui .cats-btn:focus,
.rey-ui .search-box button,
.rey-ui .search-box button:hover,
.rey-ui .search-box button:focus,
.rey-ui .coupon .copy,
.rey-ui .coupon .copy:hover,
.rey-ui .mag-card2.cta a,
.rey-ui .mag-card2.cta a:hover,
.rey-ui .mag-pager .page-numbers.current,
.rey-ui .mag-pager .page-numbers.current:hover,
.rey-ui .mag-cats a.active,
.rey-ui .mag-cats a.active:hover,
.rey-ui .comment-respond .submit,
.rey-ui .comment-respond .submit:hover,
.rey-ui .acc-panel button[type="submit"],
.rey-ui .acc-panel button[type="submit"]:hover,
.rey-ui .acc-panel input[type="submit"],
.rey-ui .acc-panel input[type="submit"]:hover,
.rey-ui .acc-panel .woocommerce-Button,
.rey-ui .acc-panel .woocommerce-Button:hover,
.rey-ui .acc-nav a.active,
.rey-ui .bb-variable .single_add_to_cart_button,
.rey-ui .bb-variable .single_add_to_cart_button:hover,
.rey-ui .rey-buybar__cta,
.rey-ui .rey-buybar__cta:hover,
.rey-ui .prow-nav:hover,
.rey-ui .copy-mini:hover,
.rey-ui .copy-mini.copied,
.woocommerce a.button,
.woocommerce a.button:hover,
.woocommerce a.button:focus,
.woocommerce button.button,
.woocommerce button.button:hover,
.woocommerce button.button:focus,
.woocommerce .button,
.woocommerce .button:hover,
.woocommerce #respond input#submit,
.woocommerce #respond input#submit:hover,
.woocommerce #place_order,
.woocommerce #place_order:hover,
.wc-proceed-to-checkout a.checkout-button,
.wc-proceed-to-checkout a.checkout-button:hover,
.rey-cart-empty__btn,
.rey-cart-empty__btn:hover { color: #fff !important; }

/* آیکون‌های داخل همین دکمه‌ها هم سفید بمانند */
.rey-ui .btn-primary:hover svg,
.rey-ui .cats-btn:hover svg,
.rey-ui .rey-buybar__cta:hover svg,
.rey-ui .prow-nav:hover svg,
.rey-ui .copy-mini:hover svg { stroke: currentColor; color: #fff; }

/* استثنا: دکمه‌ی روشن (پس‌زمینه سفید، متن سبز) نباید سفید شود */
.rey-ui .btn-light,
.rey-ui .btn-light:hover { color: var(--green) !important; }
