/* ==================================================================
   کاتالوگ عمومی — سیستم طراحی
   رنگ‌ها از تنظیمات برند (متغیرهای CSS) تزریق می‌شوند.
   ================================================================== */

:root {
  --primary: #0f766e;
  --accent: #e4572e;
  --footer: #0d1b18;
  --surface: #fbfaf8;
  --font-family: Vazirmatn, Tahoma, sans-serif;

  --primary-dark: color-mix(in srgb, var(--primary) 82%, #000);
  --primary-soft: color-mix(in srgb, var(--primary) 12%, #fff);
  --ink: #10201d;
  --ink-2: #3c4f4b;
  --muted: #7d8b87;
  --line: #e6e4df;
  --line-2: #f1efeb;
  --card: #fff;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --container: 1320px;
  --shadow-1: 0 1px 2px rgba(16, 32, 29, .05);
  --shadow-2: 0 10px 30px -12px rgba(16, 32, 29, .22);
  --shadow-3: 0 24px 48px -20px rgba(16, 32, 29, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-family);
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.5; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .9em; }
pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: inherit; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); font-size: 13.5px; }
.block { display: block; }

/* ------------------------------ دکمه ------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding-inline: 20px; border-radius: 999px;
  font-weight: 600; font-size: 14px; white-space: nowrap; cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s, transform .18s, border-color .18s;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); box-shadow: var(--shadow-2); }
.btn--ghost { border: 1.5px solid var(--primary); color: var(--primary); background: transparent; }
.btn--ghost:hover { background: var(--primary); color: #fff; }
.btn--danger { background: #fff; border: 1.5px solid #e0574b; color: #c5392d; }
.btn--danger:hover { background: #e0574b; color: #fff; }
.btn--sm { height: 36px; padding-inline: 16px; font-size: 13px; }
.btn--xs { height: 28px; padding-inline: 11px; font-size: 12px; border-radius: 9px; }
.btn--block { width: 100%; }
.btn:active { transform: translateY(1px); }

/* ------------------------------ لوگو ------------------------------ */

.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo__mark {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 65%, #4fd1c5));
  color: #fff; font-weight: 800; font-size: 20px;
  box-shadow: 0 6px 16px -8px var(--primary);
  overflow: hidden;
}
.logo__mark--img { background: #fff; border: 1px solid var(--line); }
.logo__mark--img img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.logo__text { display: flex; flex-direction: column; line-height: 1.35; }
.logo__text strong { font-size: 17px; font-weight: 800; }
.logo__text small { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.logo--light .logo__text strong { color: #fff; }
.logo--light .logo__text small { color: rgba(255,255,255,.55); }
.logo--light .logo__mark--img { background: #fff; }

/* ------------------------------ هِدر ------------------------------ */

.header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header__top { display: flex; align-items: center; gap: 24px; height: 74px; }

.searchbox { position: relative; flex: 1; max-width: 620px; }
.searchbox input {
  width: 100%; height: 46px; border-radius: 999px;
  border: 1.5px solid var(--line); background: #fff;
  padding-inline: 48px 20px; outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.searchbox input::placeholder { color: var(--muted); }
.searchbox input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.searchbox button {
  position: absolute; top: 50%; inset-inline-end: 6px; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--primary);
}
.searchbox button:hover { background: var(--primary-soft); }

.header__actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }

.header__nav { background: #fff; border-top: 1px solid var(--line-2); }
.nav { display: flex; align-items: center; gap: 6px; height: 54px; }
.nav__link {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  height: 54px; padding-inline: 16px; font-size: 14.5px; font-weight: 600;
  color: var(--ink-2); transition: color .18s;
}
.nav__link:hover, .nav__item:hover > .nav__link, .nav__link.is-active { color: var(--primary); }
.nav__link::after {
  content: ''; position: absolute; inset-inline: 16px; bottom: 0; height: 3px;
  background: var(--primary); border-radius: 3px 3px 0 0;
  transform: scaleX(0); transition: transform .25s;
}
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__link svg { transition: transform .25s; }
.nav__item { position: relative; }
.nav__item:hover .nav__link svg { transform: rotate(180deg); }
.nav__dropdown {
  position: absolute; top: 100%; inset-inline-start: 0; min-width: 210px;
  background: #fff; border: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r);
  box-shadow: var(--shadow-3); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s; z-index: 70;
}
.nav__item:hover .nav__dropdown, .nav__item:focus-within .nav__dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav__dropdown::before { content: ''; position: absolute; inset: -14px 0 auto 0; height: 14px; }
.nav__sub { display: block; padding: 9px 14px; border-radius: var(--r-sm); font-size: 14px; color: var(--ink-2); }
.nav__sub:hover { background: var(--primary-soft); color: var(--primary); }
.nav__phone {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding-inline: 16px;
  border-radius: 999px; border: 1.5px solid var(--primary); color: var(--primary);
  font-weight: 700; font-size: 14px; margin-inline-start: auto;
}
.nav__phone:hover { background: var(--primary); color: #fff; }

/* --------------------------- هِدر موبایل --------------------------- */

.mheader {
  display: none; position: sticky; top: 0; z-index: 60; height: 58px;
  align-items: center; justify-content: space-between; padding-inline: 14px;
  background: #fff; border-bottom: 1px solid var(--line);
}
.mheader__burger, .mheader__action {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  color: var(--ink); background: var(--line-2);
}
.mheader__brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; }
.mheader__brand .logo__mark { width: 32px; height: 32px; border-radius: 10px; font-size: 15px; }

.drawerscrim { position: fixed; inset: 0; background: rgba(13,27,24,.45); opacity: 0; visibility: hidden; transition: .25s; z-index: 90; }
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: min(320px, 86vw);
  background: #fff; z-index: 91; padding: 18px; overflow-y: auto;
  transform: translateX(-100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow-3);
}
[dir="rtl"] .drawer { transform: translateX(100%); }
.drawer-open .drawerscrim { opacity: 1; visibility: visible; }
.drawer-open .drawer { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.drawer__link { display: block; padding: 11px 8px; border-radius: var(--r-sm); font-weight: 600; }
.drawer__link:hover { background: var(--primary-soft); color: var(--primary); }
.drawer__group { padding: 6px 0 10px; }
.drawer__group > span { display: block; padding: 8px; font-size: 12px; color: var(--muted); font-weight: 700; }
.drawer__link--sub { padding-inline-start: 22px; font-weight: 500; font-size: 14px; }
.drawer__phone { display: block; margin-top: 14px; padding: 12px; border-radius: var(--r); background: var(--primary-soft); color: var(--primary); font-weight: 700; text-align: center; }

.welcome { padding-block: 16px 0; }
.welcome > span {
  display: block; padding: 11px 20px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-size: 13.5px; font-weight: 600;
}
.welcome b { font-weight: 800; }

/* ------------------------------ بخش‌ها ------------------------------ */

.section { padding-block: 34px 10px; }
.section__head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.section__title { font-size: 20px; font-weight: 800; position: relative; padding-inline-start: 14px; }
.section__title::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 20%; bottom: 20%;
  width: 4px; border-radius: 4px; background: linear-gradient(var(--primary), var(--accent));
}
.section__more {
  margin-inline-start: auto; font-size: 13.5px; font-weight: 700; color: var(--primary);
  display: inline-flex; align-items: center; gap: 5px; transition: gap .2s;
}
.section__more:hover { gap: 9px; }

.page-h1 { font-size: 24px; font-weight: 800; margin-block: 8px 4px; }
.page-lead { color: var(--ink-2); font-size: 14.5px; margin-bottom: 6px; }

.carousel { position: relative; }
.carousel__track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { scroll-snap-align: start; flex: 0 0 auto; }
.carousel--cards .card { flex: 0 0 208px; }
@media (min-width: 768px) { .carousel--cards .card { flex-basis: 244px; } }
.carousel__btn {
  position: absolute; top: 42%; z-index: 5; width: 42px; height: 42px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line); display: grid; place-items: center;
  color: var(--primary); box-shadow: var(--shadow-2);
}
/* فلش از دو ضلعِ سمت چپ و پایینِ یک مربع ساخته می‌شود (گوشه‌ی «└») و بعد می‌چرخد.
   ضلع‌ها عمداً فیزیکی‌اند نه منطقی، چون زاویه‌ی چرخش به جهتِ فلش بستگی دارد.
   translate هم آفستِ بصریِ گوشه را در دایره جبران می‌کند. */
.carousel__btn::before {
  content: ''; width: 10px; height: 10px;
  border-left: 2.4px solid currentColor;
  border-bottom: 2.4px solid currentColor;
}
.carousel__btn--prev { inset-inline-end: -14px; }
.carousel__btn--next { inset-inline-start: -14px; }
/* چیدمان برای هر دو جهت برعکس است؛ در هر حالت دکمه‌ی سمت چپ ‹ و سمت راست › نشان می‌دهد. */
.carousel__btn--prev::before { transform: translateX(-2.7px) rotate(-135deg); }
.carousel__btn--next::before { transform: translateX(2.7px) rotate(45deg); }
[dir="rtl"] .carousel__btn--prev::before { transform: translateX(2.7px) rotate(45deg); }
[dir="rtl"] .carousel__btn--next::before { transform: translateX(-2.7px) rotate(-135deg); }
.carousel__btn:disabled { opacity: .35; cursor: default; }

/* -------------------------- اسلایدر بنر (هیرو) -------------------------- */

.hero { padding-block: 30px 6px; }
.hero__stage {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 6;
  border-radius: var(--r-lg);
  background: var(--line-2);
  box-shadow: var(--shadow-2);
}
/* اسلایدها روی هم پشته می‌شوند؛ visibility هم لازم است تا اسلایدِ غیرفعال
   نه دیده شود و نه لینک/فوکوس‌پذیرش را بتوان گرفت (opacity به‌تنهایی کافی نیست). */
.hero__slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .7s ease, visibility .7s;
}
.hero__slide.is-active { opacity: 1; visibility: visible; }
.hero__frame { display: block; width: 100%; height: 100%; }
.hero__img { width: 100%; height: 100%; object-fit: cover; }
.hero__cap {
  position: absolute; inset-inline: 0; bottom: 0;
  padding: 44px 22px 18px;
  color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
  background: linear-gradient(to top, rgba(6, 18, 16, .74), rgba(6, 18, 16, 0));
  pointer-events: none;
}
.hero__cap b { display: block; font-size: 16px; font-weight: 800; line-height: 1.7; }
.hero__cap small { display: block; font-size: 13px; opacity: .93; }

/* نقطه‌ها بیرونِ قاب‌اند تا روی تصویرِ روشن خوانای بمانند */
.hero__dots { display: flex; justify-content: center; gap: 8px; margin-top: 13px; }
.hero__dot {
  width: 8px; height: 8px; padding: 0; border-radius: 999px;
  background: var(--line);
  transition: width .25s, background-color .25s;
}
.hero__dot.is-active { width: 24px; background: var(--primary); }
.hero__dot:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

@media (max-width: 767px) {
  .hero { padding-block: 22px 4px; }
  .hero__stage { aspect-ratio: 16 / 9; border-radius: var(--r); }
  .hero__cap { padding: 34px 16px 14px; }
  .hero__cap b { font-size: 14.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__slide { transition: none; }
  .hero__dot { transition: none; }
}

/* --------------------------- دسته‌بندی‌ها --------------------------- */

.catgrid { gap: 22px; }
.catcard { text-align: center; width: 132px; }
.catcard__img {
  width: 116px; height: 116px; margin-inline: auto; border-radius: 50%; overflow: hidden;
  background: var(--line-2); display: grid; place-items: center;
  border: 3px solid transparent; transition: transform .25s, border-color .25s, box-shadow .25s;
}
.catcard__img img { width: 100%; height: 100%; object-fit: cover; }
.catcard__letter {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 55%, var(--accent)));
  color: #fff; font-size: 40px; font-weight: 800;
}
.catcard:hover .catcard__img { transform: translateY(-6px); border-color: var(--primary); box-shadow: var(--shadow-2); }
.catcard__name { display: block; margin-top: 11px; font-size: 13.5px; font-weight: 700; }
.catcard__count { display: block; font-size: 11.5px; color: var(--muted); }

/* ---------------------------- کارت محصول ---------------------------- */

.grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (min-width: 1280px) { .grid { grid-template-columns: repeat(5, minmax(0,1fr)); } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--primary) 22%, var(--line)); }
.card__media { position: relative; display: block; aspect-ratio: 1/1; background: var(--line-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__placeholder {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 85%, #fff), color-mix(in srgb, var(--primary) 55%, var(--accent)));
  color: rgba(255,255,255,.92); font-size: 62px; font-weight: 800;
}
.card__chips { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #fff; color: var(--ink-2); box-shadow: var(--shadow-1); }
.chip--off { background: var(--accent); color: #fff; }
.chip--new { background: var(--primary); color: #fff; }
.chip--out { background: #efe9e6; color: #8a6f63; }
.chip--vip { background: var(--accent); color: #fff; }

.card__body { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card__price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-height: 26px; }
.price { font-size: 15.5px; font-weight: 800; color: var(--primary); }
.price--old { font-size: 12.5px; color: var(--muted); text-decoration: line-through; font-weight: 500; }
.price--call { font-size: 13.5px; color: var(--accent); }
.card__meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); gap: 8px; }
.meta__code { font-size: 11.5px; opacity: .85; }
.meta__unit { background: var(--primary-soft); color: var(--primary); padding: 2px 9px; border-radius: 999px; font-weight: 700; }
.card__title { font-size: 14px; font-weight: 700; line-height: 1.7; }
.card__title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__title a:hover { color: var(--primary); }
.card__desc { font-size: 12.5px; color: var(--muted); line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 4px; }
.stock { font-size: 11.5px; color: var(--primary); font-weight: 700; }
.stock.is-out, .stock--muted { color: var(--muted); font-weight: 500; }
.card.is-out .card__media img { filter: grayscale(.8); opacity: .75; }

/* --------------------------- چیپ دسته‌بندی --------------------------- */

.chiprow { display: flex; gap: 18px; overflow-x: auto; padding-block: 16px 6px; scrollbar-width: none; }
.chiprow::-webkit-scrollbar { display: none; }
.gchip { flex: none; width: 92px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px; border-radius: var(--r); }
.gchip:hover { background: var(--line-2); }
.gchip__img {
  width: 68px; height: 68px; border-radius: 18px; overflow: hidden; border: 2.5px solid transparent;
  display: grid; place-items: center; transition: border-color .2s, transform .2s; background: var(--line-2);
}
.gchip__img img { width: 100%; height: 100%; object-fit: cover; }
.gchip__letter, .gchip__img--all {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 55%, var(--accent)));
  color: #fff; font-weight: 800; font-size: 15px;
}
.gchip:hover .gchip__img, .gchip.is-active .gchip__img { border-color: var(--primary); transform: translateY(-3px); }
.gchip__label { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.gchip.is-active .gchip__label { color: var(--primary); }

/* ------------------------------ نوار ابزار ------------------------------ */

.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 14px 16px; margin-block: 4px 20px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
}
.toolbar__count { font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.toolbar__count b { color: var(--primary); }
.toolbar__spacer { flex: 1; }
.field { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.field input, .field select {
  height: 38px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  padding-inline: 12px; outline: none; font-size: 13.5px;
}
.field input { width: 120px; }
.field input:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field--check { color: var(--ink-2); font-weight: 600; }
.field--check input { width: auto; height: auto; accent-color: var(--primary); }

.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding-block: 18px 6px; flex-wrap: wrap; }
.crumb a:hover { color: var(--primary); }
.crumb span { opacity: .5; }
.crumb b { color: var(--ink-2); }

/* --------------------------- صفحه‌بندی --------------------------- */

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-block: 30px 10px; }
.pagination__info { width: 100%; text-align: center; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.pagination__info span { opacity: .7; }
.pagebtn {
  min-width: 40px; height: 40px; padding-inline: 12px; border-radius: 11px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-2);
  font-size: 14px; font-weight: 700; display: grid; place-items: center;
}
a.pagebtn:hover { border-color: var(--primary); color: var(--primary); }
.pagebtn.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagebtn.is-disabled { opacity: .4; pointer-events: none; }
.pagebtn--gap { border: 0; background: none; pointer-events: none; }

/* ------------------------------ حالت خالی ------------------------------ */

.empty { text-align: center; padding: 70px 20px; background: #fff; border: 1px dashed var(--line); border-radius: var(--r-lg); }
.empty--sm { padding: 44px 20px; }
.empty__icon { font-size: 42px; opacity: .55; }
.empty h3 { margin-block: 12px 6px; font-size: 18px; }
.empty p { color: var(--muted); font-size: 14px; }
.empty__cta { margin-top: 18px; }
.empty-line { padding: 18px; text-align: center; }

/* ---------------------------- صفحه‌ی محصول ---------------------------- */

.pdp { display: grid; gap: 30px; padding-block: 14px 30px; }
@media (min-width: 900px) { .pdp { grid-template-columns: minmax(0,460px) minmax(0,1fr); } }

.pdp__gallery { position: relative; }
.pdp__info { min-width: 0; }
.pdp__main {
  border-radius: var(--r-lg); overflow: hidden; background: var(--line-2);
  border: 1px solid var(--line); aspect-ratio: 1/1; display: grid; place-items: center;
}
.pdp__main img { width: 100%; height: 100%; object-fit: cover; }
.pdp__placeholder {
  font-size: 120px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  width: 100%; height: 100%; display: grid; place-items: center;
}
.pdp__badges { position: absolute; top: 14px; inset-inline-start: 14px; display: flex; gap: 8px; z-index: 2; }
.pdp__thumbs { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.pdp__thumb { width: 70px; height: 70px; border-radius: 12px; overflow: hidden; border: 2px solid var(--line); background: var(--line-2); padding: 0; }
.pdp__thumb.is-active, .pdp__thumb:hover { border-color: var(--primary); }
.pdp__thumb img { width: 100%; height: 100%; object-fit: cover; }

.pdp__group { display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--primary); background: var(--primary-soft); padding: 3px 12px; border-radius: 999px; }
.pdp__title { font-size: 25px; font-weight: 800; margin-block: 12px 8px; line-height: 1.6; }
.pdp__rating { display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }

.pdp__pricebox {
  margin-block: 20px; padding: 18px 20px; border-radius: var(--r);
  background: linear-gradient(135deg, var(--primary-soft), #fff);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--line));
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.pdp__price { font-size: 27px; font-weight: 800; color: var(--primary); }
.pdp__price--call { color: var(--accent); font-size: 20px; }
.pdp__price--old { font-size: 15px; color: var(--muted); text-decoration: line-through; }
.pdp__off { background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.pdp__stock { margin-inline-start: auto; font-size: 13.5px; font-weight: 700; color: var(--primary); }
.pdp__stock.is-out { color: var(--muted); }
.pdp__custom { background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 11px; border-radius: 999px; }
.pdp__lead { color: var(--ink-2); font-size: 14.5px; line-height: 2; margin-bottom: 10px; }
.pdp__desc { color: var(--ink-2); font-size: 14.5px; line-height: 2.1; margin-bottom: 20px; }
.pdp__desc p { margin-bottom: 10px; }
.pdp__desc ul, .pdp__desc ol { padding-inline-start: 22px; margin-bottom: 10px; }
.pdp__desc ul { list-style: disc; }
.pdp__desc ol { list-style: decimal; }
.pdp__desc table { border-collapse: collapse; width: 100%; margin-bottom: 12px; }
.pdp__desc td, .pdp__desc th { border: 1px solid var(--line); padding: 8px 10px; }

.spec { width: 100%; border-collapse: collapse; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.spec th, .spec td { padding: 12px 16px; font-size: 13.5px; text-align: start; }
.spec th { background: var(--line-2); color: var(--ink-2); font-weight: 700; width: 42%; }
.spec td { background: #fff; }
.spec tr + tr th, .spec tr + tr td { border-top: 1px solid var(--line-2); }

.pdp__notes { display: grid; gap: 10px; margin-top: 18px; }
.notes-grid { grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); margin-top: 0; }
.pdp__note { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; font-size: 13.5px; color: var(--ink-2); }
.pdp__note b { color: var(--primary); font-weight: 800; }
.pdp__note a { color: var(--primary); font-weight: 700; }

/* ---------------- نوارِ سفارشِ چسبیده‌ی پایین (فقط موبایل) ----------------
   در دسکتاپ پنهان است؛ در موبایل دکمه‌ی تماس/واتس‌اپ را همیشه در دسترسِ
   شست نگه می‌دارد. ارتفاعش به body به‌عنوان padding-bottom اضافه می‌شود
   تا آخرین خطِ صفحه زیرش پنهان نماند. */

.orderbar { display: none; }

@media (max-width: 767px) {
  body.has-orderbar { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }

  .orderbar {
    display: flex; gap: 9px; align-items: stretch;
    position: fixed; inset-inline: 0; bottom: 0; z-index: 80;
    background: rgba(255,255,255,.97);
    backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--line);
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 22px -14px rgba(16,32,29,.4);
  }
  .orderbar .btn { flex: 1 1 0; min-width: 0; }
  .orderbar__price {
    flex: 0 0 auto; display: grid; align-content: center; line-height: 1.35;
    padding-inline-end: 4px; max-width: 42%;
  }
  .orderbar__price strong { font-size: 14.5px; font-weight: 800; color: var(--primary); white-space: nowrap; }
  .orderbar__price small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
  .orderbar__price--call strong { color: var(--accent); font-size: 13px; }
}

/* ------------------------------- تُست ------------------------------- */

.toast {
  position: fixed; bottom: 26px; inset-inline: 0; margin-inline: auto; width: fit-content; max-width: 90vw;
  z-index: 200; background: var(--footer); color: #fff; font-size: 14px; font-weight: 600;
  padding: 12px 22px; border-radius: 999px; box-shadow: var(--shadow-3);
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .25s, transform .25s;
}
.toast--show { opacity: 1; transform: translateY(0); }

/* ------------------------------- فوتر ------------------------------- */

.footer { background: var(--footer); color: rgba(255,255,255,.78); margin-top: 60px; }
.footer__grid { display: grid; gap: 34px; padding-block: 48px; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); }
.footer__col h4 { color: #fff; font-size: 15px; margin-bottom: 16px; position: relative; padding-bottom: 10px; }
.footer__col h4::after { content: ''; position: absolute; bottom: 0; inset-inline-start: 0; width: 34px; height: 3px; border-radius: 3px; background: var(--primary); }
.footer__col--brand { max-width: 420px; }
.footer__made { opacity: .75; }
.footer__about { font-size: 13.5px; line-height: 2.1; margin-block: 16px; }
.footer__links { display: grid; gap: 9px; font-size: 13.5px; }
.footer__links a:hover { color: #fff; padding-inline-start: 6px; transition: .18s; }
.footer__contact { display: grid; gap: 13px; font-size: 13.5px; }
.footer__contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer__contact .i { flex: none; min-width: 54px; color: var(--primary); font-weight: 700; }
.footer__contact a:hover { color: #fff; }
.footer__social { display: flex; gap: 9px; flex-wrap: wrap; }
.footer__social a {
  padding: 8px 14px; border-radius: 11px; background: rgba(255,255,255,.08);
  color: #fff; font-size: 12.5px; font-weight: 700; transition: background .18s, transform .18s;
}
.footer__social a:hover { background: var(--primary); transform: translateY(-3px); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.09); background: rgba(0,0,0,.25); }
.footer__bottom-in { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; padding-block: 18px; font-size: 12.5px; color: rgba(255,255,255,.55); }

/* ------------------------------- هشدار ------------------------------- */

.alert {
  padding: 12px 18px; border-radius: var(--r); font-size: 13.5px; font-weight: 600;
  border: 1px solid; display: flex; gap: 12px; align-items: flex-start;
}
.alert--ok { background: color-mix(in srgb, var(--primary) 9%, #fff); border-color: color-mix(in srgb, var(--primary) 26%, var(--line)); color: var(--primary); }
.alert--err { background: color-mix(in srgb, #c5392d 8%, #fff); border-color: color-mix(in srgb, #c5392d 26%, var(--line)); color: #c5392d; }
.alert--warn { background: color-mix(in srgb, #b7791f 10%, #fff); border-color: color-mix(in srgb, #b7791f 28%, var(--line)); color: #b7791f; }

/* ---------------------------- صفحه‌ی ورود ---------------------------- */

.unlockbox {
  max-width: 420px; margin: 56px auto 20px; text-align: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 34px 28px 28px; box-shadow: var(--shadow-2);
}
.unlockbox__ico {
  width: 60px; height: 60px; margin-inline: auto; border-radius: 18px;
  display: grid; place-items: center; color: var(--primary); background: var(--primary-soft);
}
.unlockbox__title { font-size: 20px; font-weight: 800; margin-block: 16px 6px; }
.unlockbox__lead { color: var(--muted); font-size: 14px; margin-bottom: 20px; line-height: 2; }
.unlockbox .alert { margin-bottom: 16px; text-align: start; }
.unlockbox__form { display: grid; gap: 12px; }
.unlockbox__form input {
  height: 46px; border: 1.5px solid var(--line); border-radius: 12px;
  padding-inline: 16px; text-align: center; font-size: 15px; letter-spacing: .06em;
  outline: none; transition: border-color .18s, box-shadow .18s;
}
.unlockbox__form input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.unlockbox__hint { margin-top: 18px; font-size: 12.5px; color: var(--muted); }
.unlockbox__hint a { color: var(--primary); font-weight: 700; }

/* ---------------------------- ریسپانسیو ---------------------------- */

@media (max-width: 1023px) {
  .header { display: none; }
  .mheader { display: flex; }
  .section { padding-block: 26px 6px; }
  .pdp { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  body { font-size: 14px; }
  .container { padding-inline: 14px; }
  .section { padding-block: 26px 6px; }
  .section__head { gap: 12px; margin-bottom: 15px; }
  .section__title { font-size: 17px; }
  .page-h1 { font-size: 20px; }
  .catcard { width: 110px; }
  .catcard__img { width: 94px; height: 94px; }
  .carousel__btn { display: none; }
  .grid { gap: 12px; }
  .card__body { padding: 10px 11px 12px; }
  .price { font-size: 14px; }
  .pdp__title { font-size: 20px; }
  .pdp__price { font-size: 22px; }
  .pdp__stock { margin-inline-start: 0; width: 100%; }
  .footer { margin-top: 40px; }
  .footer__grid { padding-block: 34px; gap: 26px; }
  .pagebtn { min-width: 36px; height: 36px; font-size: 13px; }

  /* هدفِ لمسی: ۴۴px کمینه‌ی راحت برای انگشت است */
  .btn { height: 44px; }
  .btn--sm { height: 38px; }
  .btn--xs { height: 34px; }

  /* ورودی‌های زیر ۱۶px در iOS باعث زومِ خودکارِ صفحه می‌شوند */
  .searchbox input, .unlockbox__form input,
  .toolbar input, .toolbar select, .field input, .field select { font-size: 16px; }

  /* ---------------- نوارِ ابزارِ فیلتر ----------------
     چیدمانِ دسکتاپ (همه در یک ردیف) در موبایل به هم می‌ریخت:
     «قیمت از» و «تا» جدا می‌افتادند و دو برچسبِ تیتر/مقدار
     قاطی می‌شد. اینجا هر کنترل یک ردیفِ کامل می‌گیرد. */
  .toolbar { padding: 12px; gap: 10px; }
  .toolbar__count { width: 100%; font-size: 13px; }
  .toolbar__spacer { display: none; }
  .toolbar .field {
    flex: 1 1 100%; width: 100%; justify-content: space-between; gap: 10px;
  }
  .toolbar .field input, .toolbar .field select { width: auto; flex: 1; min-width: 0; height: 42px; }
  .toolbar .field--check { justify-content: flex-start; gap: 9px; font-weight: 600; }
  .toolbar .field--check input { width: 20px; height: 20px; flex: none; }
  .toolbar .btn { flex: 1 1 0; min-width: 0; }

  /* دو فیلدِ «قیمت از / تا» کنار هم، بقیه تمام‌عرض.
     min-width:0 حیاتی است: پیش‌فرضِ flex، min-width:auto است و برچسب
     زیرِ محتوایش کوچک نمی‌شود ⇒ هر دو فیلد کنارِ هم از قاب بیرون می‌زدند. */
  .toolbar__range { display: flex; gap: 10px; width: 100%; min-width: 0; }
  .toolbar__range .field { flex: 1 1 0; min-width: 0; }
  .toolbar__range .field input { min-width: 0; }

  /* ---------------- نوارِ سفارشِ صفحه‌ی محصول ---------------- */

  .pdp__thumbs { gap: 8px; }
  .pdp__thumb { width: 58px; height: 58px; }
  .pdp__pricebox { padding: 15px 16px; gap: 12px; }
  .pdp__desc, .pdp__lead { font-size: 14px; line-height: 2; }
  .spec th, .spec td { padding: 10px 13px; font-size: 13px; }
  .spec th { width: 40%; }
  .pdp__note { font-size: 13px; padding: 11px 12px; }
  .notes-grid { grid-template-columns: 1fr; }
  .crumb { font-size: 12.5px; padding-block: 13px 4px; }

  /* ---------------- چیپ دسته‌ها ---------------- */

  .chiprow { gap: 12px; padding-block: 12px 4px; }
  .gchip { width: 80px; }
  .gchip__img { width: 60px; height: 60px; border-radius: 16px; }
  .gchip__label { font-size: 11.5px; }

  /* ---------------- هِدر موبایل + ناحیه‌ی امن ---------------- */

  .mheader { padding-inline: 12px; padding-top: env(safe-area-inset-top, 0px); }
  .drawer { padding-top: calc(18px + env(safe-area-inset-top, 0px)); }
  .drawer__phone { margin-bottom: env(safe-area-inset-bottom, 0px); }
  .toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  .empty { padding: 46px 18px; }
  .pagination { gap: 6px; margin-block: 24px 8px; }
}

/* ==================================================================
   لوگوموشن ابتدای ورود
   فقط وقتی ادمین «لوگوموشن ورود» را روشن کرده باشد، public.js این
   المان را می‌سازد. بدون جاوااسکریپت یا بدون تنظیم، چیزی نمایش داده
   نمی‌شود و بازدیدکننده سریع به صفحه می‌رسد.
   ================================================================== */

body.intro-lock { overflow: hidden; }

.intro {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  background: var(--surface);
  opacity: 0;
  transition: opacity .55s ease;
}

/* المان از ابتدا «hidden» است و فقط جاوااسکریپت آن را برمی‌دارد.
   استایل نویسنده بر UA مقدم است، پس بدون این خط، hidden کار نمی‌کرد. */
.intro[hidden] { display: none !important; }

.intro__inner {
  display: grid;
  justify-items: center;
  gap: 26px;
  padding: 24px;
  transform: translateY(10px);
  transition: transform .8s cubic-bezier(.2, .8, .2, 1);
}

/* لوگو: ورود نرم با کمی بزرگ‌نمایی و وضوح‌یابی */
.intro__logo {
  display: block;
  width: clamp(160px, 34vw, 288px);
  height: auto;
  opacity: 0;
  transform: scale(.9);
  filter: blur(9px);
  transition: opacity .9s ease, transform 1.05s cubic-bezier(.2, .8, .2, 1), filter .9s ease;
}

/* خط نازک که از وسط به دو طرف باز می‌شود — حس «بارگذاری» بی‌سروصدا */
.intro__line {
  position: relative;
  width: clamp(64px, 20vw, 100px);
  height: 1px;
  background: var(--line);
  overflow: hidden;
}

.intro__line i {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  transform: scaleX(0);
  transform-origin: center;
  animation: intro-line 1.6s cubic-bezier(.4, 0, .2, 1) .2s forwards;
}

@keyframes intro-line {
  to { transform: scaleX(1); }
}

/* حالت روشن: لوگو سر جای خود می‌نشیند */
.intro.is-on { opacity: 1; }

.intro.is-on .intro__inner { transform: none; }

.intro.is-on .intro__logo {
  opacity: 1;
  transform: none;
  filter: none;
}

/* حالت خروج: کمی بزرگ‌تر و محو می‌شود تا صفحه «باز شود» */
.intro.is-off {
  opacity: 0;
  pointer-events: none;
  transition-duration: .55s;
}

.intro.is-off .intro__inner {
  transform: translateY(-16px);
  transition-duration: .55s;
}

.intro.is-off .intro__logo {
  opacity: 0;
  transform: scale(1.05);
  filter: blur(5px);
  transition-duration: .5s;
}

/* ---------------- گذارِ کوتاه بین صفحات ----------------
   همان پوشش، ولی سریع: نیم‌ثانیه‌ای که کاربر می‌بیند باید «جاری» باشد،
   نه یک معرفیِ دوباره. حالت is-instant برای صفحهٔ مقصد است تا پوشش
   از همان لحظهٔ اول کامل باشد و محتوا از زیرش پیدا نشود. */

.intro--fast .intro__inner { transition-duration: .25s; }

.intro--fast .intro__logo {
  transform: scale(.985);
  filter: blur(4px);
  transition-duration: .28s;
}

.intro--fast .intro__line i {
  animation-duration: .55s;
  animation-delay: 0s;
}

.intro--fast.is-off { transition-duration: .28s; }

.intro--fast.is-off .intro__inner { transition-duration: .25s; }

.intro--fast.is-off .intro__logo { transition-duration: .25s; }

.intro.is-instant,
.intro.is-instant .intro__inner,
.intro.is-instant .intro__logo {
  transition: none;
  opacity: 1;
  transform: none;
  filter: none;
}

/* برای کسانی که حرکت کم را ترجیح می‌دهند، اصلاً ساخته نمی‌شود؛
   اینجا هم یک قفل ایمنی داریم تا حتی اگر المان ساخته شد، دیده نشود. */
@media (prefers-reduced-motion: reduce) {
  .intro { display: none !important; }
}
