/* ===================== استوک‌کالا — تم سبز ===================== */
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Variable.woff2") format("woff2-variations"), url("../fonts/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --g9: #053a28;
  --g8: #075238;
  --g7: #0b7a52;
  --g6: #0e8f60;
  --g5: #14a870;
  --g2: #c9ebda;
  --g1: #e6f5ed;
  --g0: #f4faf7;
  --ink: #17241e;
  --ink2: #4b5b53;
  --muted: #7d8b84;
  --line: #e1e9e4;
  --bg: #f6f8f7;
  --card: #fff;
  --red: #c8372d;
  --amber: #c27a0e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(10, 40, 28, .06), 0 4px 16px rgba(10, 40, 28, .05);
  --shadow-lg: 0 12px 40px rgba(10, 40, 28, .14);
  --header-h: 68px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: 15px;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.45; margin: 0 0 .5em; }
.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 1080px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.ic { flex-shrink: 0; }
[hidden] { display: none !important; }
.ltr-right { direction: ltr; text-align: right; }

@media (max-width: 991px) { .only-desktop { display: none !important; } }
@media (min-width: 992px) { .only-mobile { display: none !important; } }

/* ---------------- دکمه‌ها ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid transparent; border-radius: 11px; padding: 9px 18px;
  font-weight: 600; cursor: pointer; transition: .15s; white-space: nowrap; background: none;
}
.btn-primary { background: var(--g7); color: #fff; }
.btn-primary:hover { background: var(--g8); }
.btn-outline { border-color: var(--g7); color: var(--g7); background: #fff; }
.btn-ghost { background: var(--g1); color: var(--g8); }
.btn-ghost:hover { background: var(--g2); }
.btn-light { background: #fff; color: var(--g8); }
.btn-lg { padding: 12px 22px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 11px;
  border: 0; background: transparent; cursor: pointer; color: inherit; position: relative;
}
.icon-btn:hover { background: rgba(255,255,255,.12); }
.icon-btn.danger { color: var(--red); }
.icon-btn.danger:hover { background: #fdecea; }
.badge {
  position: absolute; top: 2px; left: 2px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px; background: #ff5a4e; color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; font-style: normal; line-height: 1;
}

/* ---------------- هدر ---------------- */
.notice { background: var(--g9); color: var(--g2); text-align: center; font-size: 13px; padding: 6px 12px; }
.header { position: sticky; top: 0; z-index: 50; background: var(--g7); color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.header-row { display: flex; align-items: center; gap: 14px; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; flex-shrink: 0; }
.logo-mark { width: 40px; height: 40px; border-radius: 11px; background: #fff; color: var(--g7); display: grid; place-items: center; }
.logo-text { display: flex; flex-direction: column; font-size: 20px; line-height: 1.2; letter-spacing: -.3px; }
.logo-text small { font-size: 11px; font-weight: 400; opacity: .8; letter-spacing: 0; }
.logo-light .logo-mark { background: var(--g6); color: #fff; }
.search { flex: 1; position: relative; display: flex; align-items: center; max-width: 640px; margin-inline: auto; }
.search > .ic { position: absolute; right: 14px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 44px; border-radius: 12px; border: 0; padding: 0 44px 0 14px;
  background: #fff; color: var(--ink); outline: none; font-size: 14px;
}
.search input:focus { box-shadow: 0 0 0 3px rgba(255,255,255,.35); }
.suggest {
  position: absolute; top: calc(100% + 6px); inset-inline: 0; background: #fff; color: var(--ink);
  border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; z-index: 60;
}
.suggest a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 14px; border-bottom: 1px solid var(--line); }
.suggest a:hover, .suggest a.active { background: var(--g0); }
.suggest a small { color: var(--g7); white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 6px; }
.call { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 11px; background: rgba(255,255,255,.12); font-weight: 600; font-size: 14px; }
.call:hover { background: rgba(255,255,255,.2); }

/* مگامنو دسکتاپ */
.megabar { background: var(--g8); position: relative; }
.mega-root { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.mega-item > a { display: flex; align-items: center; gap: 6px; padding: 10px 13px; font-size: 14px; font-weight: 500; color: #e3f4eb; white-space: nowrap; }
.mega-item:hover > a, .mega-item:focus-within > a { background: rgba(255,255,255,.1); color: #fff; }
.mega-panel {
  position: absolute; inset-inline: 0; top: 100%; background: #fff; color: var(--ink);
  box-shadow: var(--shadow-lg); border-top: 3px solid var(--g5);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .16s; padding: 22px 0 12px;
}
.mega-item:hover .mega-panel, .mega-item:focus-within .mega-panel { opacity: 1; visibility: visible; transform: none; }
.mega-cols { max-width: 1288px; margin: 0 auto; padding: 0 16px; columns: 4 220px; column-gap: 28px; }
.mega-col { break-inside: avoid; margin-bottom: 12px; }
.mega-sub { display: block; font-weight: 600; padding: 5px 10px; border-right: 3px solid var(--g2); }
.mega-sub:hover { color: var(--g7); border-color: var(--g7); background: var(--g0); }
.mega-leaf { display: block; padding: 3px 13px; font-size: 13.5px; color: var(--ink2); }
.mega-all { display: block; max-width: 1288px; margin: 6px auto 0; padding: 8px 26px; color: var(--g7); font-weight: 600; font-size: 14px; }

/* کشوی موبایل */
.drawer-overlay, .filters-overlay { position: fixed; inset: 0; background: rgba(5, 30, 20, .45); z-index: 90; backdrop-filter: blur(2px); }
.drawer {
  position: fixed; top: 0; bottom: 0; right: 0; width: min(86vw, 360px); background: #fff; z-index: 100;
  transform: translateX(100%); transition: transform .25s ease, visibility .25s; visibility: hidden; display: flex; flex-direction: column; overflow-y: auto;
}
.drawer.open { transform: none; visibility: visible; }
.drawer-list .leaf { padding: 3px 12px 3px 0; font-size: 13px; color: var(--muted); border: 0; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--g7); color: #fff; position: sticky; top: 0; }
.drawer-list, .drawer-list ul { list-style: none; margin: 0; padding: 0; }
.drawer-list > li { border-bottom: 1px solid var(--line); }
.drawer-list summary, .drawer-link { display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; font-weight: 600; list-style: none; }
.drawer-list summary::-webkit-details-marker { display: none; }
.drawer-list .ci { width: 36px; height: 36px; border-radius: 10px; background: var(--g1); color: var(--g7); display: grid; place-items: center; }
.drawer-list .chev { margin-inline-start: auto; transition: .2s; color: var(--muted); }
.drawer-list details[open] .chev { transform: rotate(-90deg); }
.drawer-list details[open] summary { color: var(--g7); }
.drawer-list details ul { padding: 0 64px 10px 16px; }
.drawer-list details a { display: block; padding: 7px 0; font-size: 14px; color: var(--ink2); border-bottom: 1px dashed var(--line); }
.drawer-list details li:last-child a { border: 0; }
.drawer-list .see-all { color: var(--g7); font-weight: 600; }
.drawer-foot { padding: 16px; display: grid; gap: 10px; font-size: 14px; color: var(--ink2); margin-top: auto; background: var(--g0); }
.drawer-call { color: var(--g7); font-weight: 700; display: flex; align-items: center; gap: 6px; }

/* ناوبری پایین موبایل */
.bottom-nav {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 16px rgba(0,0,0,.05);
}
.bottom-nav a, .bottom-nav button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; font-size: 11.5px;
  color: var(--ink2); border: 0; background: none; position: relative; cursor: pointer;
}
.bottom-nav .on { color: var(--g7); font-weight: 700; }
.bottom-nav .badge { top: 4px; left: calc(50% - 22px); }
@media (max-width: 991px) {
  body { padding-bottom: 64px; }
  :root { --header-h: auto; }
  .header-row { flex-wrap: wrap; padding: 10px 16px 12px; gap: 8px 6px; }
  .logo { order: 1; margin-inline-end: auto; }
  .logo-text small { display: none; }
  .logo-text { font-size: 18px; }
  .logo-mark { width: 34px; height: 34px; }
  .header-actions { order: 2; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .search input { height: 42px; }
}

/* ---------------- عمومی ---------------- */
.main { min-height: 50vh; padding-bottom: 32px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; margin: 28px 0 14px; }
.section-title .ic { color: var(--g7); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-head .section-title { margin-bottom: 10px; }
.more { color: var(--g7); font-weight: 600; font-size: 14px; white-space: nowrap; }
.box { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.page-title { font-size: 22px; margin: 22px 0 16px; }
.alert { padding: 12px 16px; border-radius: 12px; margin: 14px 0; font-weight: 500; }
.alert-success { background: var(--g1); color: var(--g8); border: 1px solid var(--g2); }
.alert-error { background: #fdecea; color: var(--red); border: 1px solid #f6c7c2; }
.alert-info, .alert-warning { background: #fff7e6; color: #8a5a00; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); padding: 14px 0 6px; }
.crumbs a:hover { color: var(--g7); }
.crumbs b { color: var(--ink2); font-weight: 500; }

/* ---------------- اسلایدر ---------------- */
.hero { margin-top: 18px; position: relative; }
.slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 18px; scrollbar-width: none; }
.slider::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 100%; scroll-snap-align: start; min-height: 400px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 36px; padding: 32px 56px;
  --s-bg: #064631; --s-fg: #fff; --s-sub: #C9EBDA; --s-chip: #0A5A3F; --s-chip-fg: #E6F5ED; --s-btn: #fff; --s-btn-fg: #075238;
  background: var(--s-bg); color: var(--s-fg);
}
.slide.theme-green { --s-bg: #0B7A52; --s-sub: #E6F5ED; --s-chip: #075238; --s-chip-fg: #fff; }
.slide.theme-light { --s-bg: #EEF7F2; --s-fg: #0B2E22; --s-sub: #3F5A4D; --s-chip: #D5EDDF; --s-chip-fg: #075238; --s-btn: #0B7A52; --s-btn-fg: #fff; }
.slide-text { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; max-width: 560px; }
.slide-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; }
.slide-logo { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--s-btn); color: var(--s-btn-fg); }
.slide-text h2 { font-size: clamp(22px, 3vw, 38px); font-weight: 900; margin: 0; line-height: 1.35; }
.slide-text p { margin: 0; font-size: clamp(14px, 1.5vw, 18px); color: var(--s-sub); line-height: 1.85; }
.slide-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.slide-chips li { padding: 4px 14px; border-radius: 999px; background: var(--s-chip); color: var(--s-chip-fg); font-size: 14px; font-weight: 600; }
.slide-btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 24px; border-radius: 12px; background: var(--s-btn); color: var(--s-btn-fg); font-weight: 800; font-size: 16px; margin-top: 4px; }
.slide-photo { flex: 0 0 auto; width: min(44%, 500px); aspect-ratio: 10 / 7; border-radius: 22px; overflow: hidden; background: #fff; }
.slide-photo img { width: 100%; height: 100%; object-fit: cover; }
.slide-photo.fit-contain { padding: 14px; }
.slide-photo.fit-contain img { object-fit: contain; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.dots button { width: 8px; height: 8px; border-radius: 4px; border: 0; background: var(--g2); cursor: pointer; padding: 0; transition: .2s; }
.dots button.on { width: 24px; background: var(--g7); }
@media (max-width: 640px) {
  .slide { flex-direction: column-reverse; align-items: stretch; justify-content: center; gap: 16px; padding: 16px 18px 22px; min-height: 0; }
  .slide-photo { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; }
  .slide-brand, .slide-chips li:nth-child(n+3) { display: none; }
  .slide-text { gap: 10px; }
  .slide-chips li { font-size: 12.5px; padding: 3px 11px; }
  .slide-btn { min-height: 42px; font-size: 15px; }
}

/* ---------------- دسته‌ها ---------------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.cat-tile {
  background: #fff; border-radius: var(--radius); padding: 16px 10px; display: flex; flex-direction: column; align-items: center;
  gap: 10px; text-align: center; font-weight: 600; font-size: 13.5px; line-height: 1.5; box-shadow: var(--shadow);
  border: 1.5px solid transparent; transition: .15s;
}
.cat-tile:hover { border-color: var(--g5); transform: translateY(-2px); }
.cat-ic { width: 58px; height: 58px; border-radius: 16px; background: var(--g1); color: var(--g7); display: grid; place-items: center; }
@media (max-width: 640px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cat-tile { padding: 12px 6px; font-size: 12px; }
  .cat-ic { width: 48px; height: 48px; }
}
.pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 4px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pills a { white-space: nowrap; padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid var(--line); font-size: 13px; }
.pills a:hover { border-color: var(--g7); color: var(--g7); }
.sub-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sub-tile { display: flex; align-items: center; gap: 8px; background: #fff; padding: 9px 14px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow); border: 1.5px solid transparent; }
.sub-tile .ic { color: var(--g7); }
.sub-tile:hover { border-color: var(--g5); }
@media (max-width: 640px) {
  .sub-grid { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 0 16px 4px; }
  .sub-tile { white-space: nowrap; }
}
.brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.brands a { background: #fff; border-radius: 12px; height: 64px; display: grid; place-items: center; font-weight: 800; color: var(--ink2); box-shadow: var(--shadow); font-size: 16px; }
.brands a:hover { color: var(--g7); }
.brands img { max-height: 36px; width: auto; }

/* ---------------- کارت محصول ---------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card, .list-main { min-width: 0; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 232px; gap: 14px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.rail > .card { scroll-snap-align: start; }
.card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
  border: 1.5px solid transparent; transition: .15s;
}
.card:hover { border-color: var(--g2); box-shadow: var(--shadow-lg); }
.card-media { position: relative; aspect-ratio: 4/3; background: #F1F8F4; display: grid; place-items: center; }
.card-media img { width: 100%; height: 100%; object-fit: contain; padding: 12px; mix-blend-mode: multiply; }
.ph { color: var(--g6); display: grid; place-items: center; }
.tag { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 6px; background: var(--g7); color: #fff; }
.pd-meta .tag { position: static; }
.tag-new { background: #1f6fd1; }
.tag-open { background: #7a4fc9; }
.tag-refurb { background: var(--amber); }
.off { position: absolute; top: 10px; left: 10px; background: #ff5a4e; color: #fff; font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 10px; }
.buy-price .off { position: static; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-model { font-size: 12px; color: var(--g7); font-weight: 600; text-align: right; }
.card-title { font-size: 14.5px; font-weight: 700; margin: 0; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.2em; }
.card-title a:hover { color: var(--g7); }
.chips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5px; }
.chips li { background: var(--g0); border: 1px solid var(--g1); border-radius: 8px; padding: 3px 7px; display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.chips b { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.chips small { font-size: 10.5px; color: var(--muted); }
.card-foot { margin-top: auto; padding-top: 6px; border-top: 1px dashed var(--line); display: flex; justify-content: flex-end; }
.price { font-weight: 800; font-size: 17px; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.price small { font-size: 11px; font-weight: 400; color: var(--muted); }
.price del { width: 100%; text-align: left; font-size: 12px; color: var(--muted); font-weight: 400; }
.price.ask, .ask { color: var(--g7); font-size: 15px; }
.price.out, .out { color: var(--muted); font-size: 15px; }
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .rail { grid-auto-columns: 170px; gap: 8px; }
  .card-body { padding: 10px; gap: 6px; }
  .card-title { font-size: 13px; }
  .chips { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .chips b { font-size: 11px; }
  .price { font-size: 15px; }
}

/* ---------------- لیست و فیلتر ---------------- */
.list-head { display: flex; align-items: baseline; gap: 12px; margin: 8px 0 14px; }
.list-head h1 { font-size: 22px; margin: 0; }
.list-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.filters { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; position: sticky; top: 130px; display: grid; gap: 14px; }
.filters fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 4px; }
.filters legend { font-weight: 700; margin-bottom: 6px; font-size: 14px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; padding: 3px 0; }
.check input, .switch input { width: 18px; height: 18px; accent-color: var(--g7); }
.switch { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; padding: 10px 12px; background: var(--g0); border-radius: 10px; cursor: pointer; }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.range input, .field input, .field textarea, .field select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; outline: none; transition: .15s;
}
.range input:focus, .field input:focus, .field textarea:focus { border-color: var(--g5); box-shadow: 0 0 0 3px var(--g1); }
.filters-actions { display: grid; gap: 8px; }
.filters-head { display: flex; justify-content: space-between; align-items: center; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sorts { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; background: #fff; padding: 4px; border-radius: 12px; box-shadow: var(--shadow); }
.sorts::-webkit-scrollbar { display: none; }
.sorts a { white-space: nowrap; padding: 6px 12px; border-radius: 9px; font-size: 13.5px; color: var(--ink2); }
.sorts a.on { background: var(--g7); color: #fff; font-weight: 600; }
.toolbar .count { background: var(--g7); color: #fff; border-radius: 9px; padding: 0 7px; font-size: 12px; }
.empty { text-align: center; padding: 60px 20px; color: var(--ink2); display: grid; justify-items: center; gap: 4px; }
.empty .ic { color: var(--g6); opacity: .6; }
.pager { display: flex; justify-content: center; gap: 6px; margin: 26px 0 10px; flex-wrap: wrap; }
.pager a, .pager b { min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px; display: grid; place-items: center; background: #fff; box-shadow: var(--shadow); font-size: 14px; }
.pager b { background: var(--g7); color: #fff; }
@media (max-width: 991px) {
  .list-layout { grid-template-columns: minmax(0, 1fr); }
  .filters {
    position: fixed; inset: auto 0 0 0; top: auto; z-index: 100; max-height: 85vh; overflow-y: auto;
    border-radius: 20px 20px 0 0; transform: translateY(105%); transition: transform .25s; padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  }
  .filters.open { transform: none; }
  .filters:not(.open) { visibility: hidden; }
  .toolbar { position: sticky; top: 108px; z-index: 5; background: var(--bg); padding: 6px 0; }
  .list-head h1 { font-size: 18px; }
}

/* ---------------- صفحه محصول ---------------- */
.pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; margin-top: 8px; }
.pd-gallery, .pd-info { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 20px; }
.pd-gallery { position: sticky; top: 130px; align-self: start; }
.pd-main { aspect-ratio: 1; background: #F1F8F4; border-radius: 14px; display: grid; place-items: center; overflow: hidden; }
.pd-main img { width: 100%; height: 100%; object-fit: contain; padding: 18px; mix-blend-mode: multiply; }
.pd-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.pd-thumbs button { width: 70px; height: 70px; flex-shrink: 0; border-radius: 10px; border: 2px solid var(--line); background: #fff; padding: 4px; cursor: pointer; }
.pd-thumbs button.on { border-color: var(--g7); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pd-meta { display: flex; gap: 10px; align-items: center; font-size: 13px; font-weight: 600; color: var(--g7); margin-bottom: 6px; }
.pd-info h1 { font-size: 22px; font-weight: 800; }
.pd-model { font-size: 14px; color: var(--ink2); margin-bottom: 10px; }
.pd-short { color: var(--ink2); }
.chips-lg { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 14px 0; }
.chips-lg li { padding: 8px 12px; }
.chips-lg b { font-size: 14px; }
.chips-lg small { font-size: 12px; }
.buybox { border: 1.5px solid var(--g2); background: var(--g0); border-radius: 14px; padding: 18px; display: grid; gap: 12px; margin-top: 16px; }
.buy-price strong { font-size: 26px; font-weight: 900; color: var(--ink); }
.buy-price del { color: var(--muted); }
.buy-price .ask { font-size: 20px; color: var(--g7); }
.buy-price .out { font-size: 20px; }
.buy-form { display: flex; gap: 10px; flex-wrap: wrap; }
.buy-form .btn { flex: 1; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 11px; background: #fff; overflow: hidden; height: 46px; }
.qty button { width: 40px; height: 100%; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--g7); }
.qty input { width: 46px; text-align: center; border: 0; outline: none; -moz-appearance: textfield; font-weight: 700; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stock-line { color: var(--g7); font-size: 14px; display: flex; gap: 6px; align-items: center; font-weight: 600; }
.warranty { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink2); }
.warranty .ic { color: var(--g7); }
.pd-tabs { margin-top: 20px; }
.pd-tabs h2 { font-size: 18px; border-right: 4px solid var(--g7); padding-right: 10px; }
.spec { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: 14px; }
.spec caption { text-align: right; font-weight: 700; color: var(--g7); padding: 6px 0; }
.spec th, .spec td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
.spec th { width: 34%; background: var(--g0); font-weight: 500; color: var(--ink2); }
.prose { line-height: 2; }
@media (max-width: 860px) {
  .pd { grid-template-columns: 1fr; gap: 12px; }
  .pd-gallery { position: static; padding: 12px; }
  .pd-main { aspect-ratio: 4/3; }
  .pd-info { padding: 16px; }
  .pd-info h1 { font-size: 18px; }
  .buy-price strong { font-size: 22px; }
}

/* ---------------- فرم و سبد ---------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.form-grid .wide, .form-grid > button { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
.field textarea { resize: vertical; }
.err { color: var(--red); font-size: 12.5px; font-style: normal; }
.req { color: var(--red); font-style: normal; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.cart-items { display: grid; gap: 10px; }
.cart-row { display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; align-items: center; background: #fff; padding: 12px; border-radius: var(--radius); box-shadow: var(--shadow); }
.cart-img { width: 84px; height: 84px; border-radius: 10px; background: var(--g0); display: grid; place-items: center; color: var(--g6); overflow: hidden; }
.cart-img img { width: 100%; height: 100%; object-fit: contain; }
.cart-title { font-weight: 700; font-size: 14.5px; }
.cart-price { font-weight: 800; margin-top: 4px; }
.cart-ctl { display: flex; align-items: center; gap: 6px; }
.summary { position: sticky; top: 130px; display: grid; gap: 10px; }
.summary h3 { font-size: 16px; }
.sum-item { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.sum-line { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; }
.sum-line strong { font-size: 20px; }
@media (max-width: 860px) {
  .cart-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .cart-row { grid-template-columns: 64px 1fr; }
  .cart-img { width: 64px; height: 64px; }
  .cart-ctl { grid-column: 1 / -1; justify-content: space-between; }
}
.done { text-align: center; padding: 40px 20px; display: grid; justify-items: center; gap: 6px; margin-top: 28px; }
.done-ic { width: 76px; height: 76px; border-radius: 50%; background: var(--g1); color: var(--g7); display: grid; place-items: center; }
.done h1 { font-size: 21px; }
.code { font-size: 22px; letter-spacing: 2px; color: var(--g7); }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.steps { list-style: none; padding: 0; margin: 12px 0 18px; display: flex; gap: 4px; flex-wrap: wrap; counter-reset: s; }
.steps li { flex: 1; min-width: 90px; text-align: center; font-size: 13px; padding: 8px 4px; border-radius: 9px; background: var(--g0); color: var(--muted); }
.steps li.on { background: var(--g7); color: #fff; font-weight: 700; }

/* ---------------- اعتماد و فوتر ---------------- */
.trust { background: #fff; border-top: 1px solid var(--line); margin-top: 30px; padding: 26px 0; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.trust-grid div { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.trust-grid .ic { grid-row: span 2; color: var(--g7); width: 46px; height: 46px; padding: 10px; border-radius: 14px; background: var(--g1); }
.trust-grid b { font-size: 14.5px; }
.trust-grid span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 760px) { .trust-grid { grid-template-columns: 1fr 1fr; } .trust-grid b { font-size: 13px; } }
.footer { background: var(--g9); color: #bfd9cb; padding-top: 34px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 28px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer-grid a { display: block; padding: 3px 0; }
.footer-grid a:hover { color: #fff; }
.footer .logo { color: #fff; margin-bottom: 12px; }
.footer .muted { color: #8fb3a1; }
.socials { display: flex; gap: 8px; }
.socials a { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.08); display: grid; place-items: center; }
.copy { text-align: center; padding: 16px; margin-top: 26px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12.5px; color: #8fb3a1; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* ---------------- منو با تصویر (کادر ۴۰×۴۰) ---------------- */
.mega-cols { columns: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 28px; align-items: start; }
.mega-col { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.mega-sub { margin-bottom: 6px; border-right-color: var(--g7); color: var(--ink); }
.mega-leaves { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 28px; }
.mega-col.wide { grid-column: span 2; }
.mega-col.wide .mega-leaves { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: column; grid-template-rows: repeat(6, auto); }
.mega-it { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 10px; font-size: 14px; color: var(--ink2); }
.mega-it:hover { background: var(--g0); color: var(--g7); }
.cat-ic40 { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; background: #f1f8f4; border: 1px solid #e1efe7; display: grid; place-items: center; color: var(--g7); overflow: hidden; }
.cat-ic40 img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.drawer-list details .sub-title { font-weight: 700; color: var(--ink); border: 0; padding-top: 10px; }
.drawer-list details a.leaf { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; color: var(--ink2); border: 0; }
.drawer-list details a.leaf .cat-ic40 { width: 34px; height: 34px; border-radius: 9px; }
.drawer-list details a.leaf .cat-ic40 .ic { width: 20px; height: 20px; }
.drawer-list details ul { padding: 0 16px 10px 16px; }

/* ---------------- دکمه واتس‌اپ ---------------- */
.wa-float { position: fixed; left: 20px; bottom: 20px; z-index: 45; display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 18px 0 13px; border-radius: 28px; background: #25d366; color: #fff; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.18); transition: transform .15s; }
.wa-float:hover { transform: translateY(-2px); background: #1fbe5b; }
.btn-wa { background: #e9fbef; color: #128c4a; border-color: #25d366; }
.btn-wa:hover { background: #d6f7e2; }
@media (max-width: 991px) {
  .wa-float { bottom: calc(76px + env(safe-area-inset-bottom)); left: 14px; width: 54px; height: 54px; padding: 0; justify-content: center; border-radius: 50%; }
  .wa-label { display: none; }
}

/* نوار مزایای خرید در صفحه کالا */
.trust-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 0 6px; padding: 22px 8px; background: var(--g0); border: 1px solid var(--line); border-radius: var(--radius); }
.trust-strip div { display: grid; justify-items: center; gap: 10px; text-align: center; }
.trust-strip svg { width: 52px; height: 52px; color: var(--g7); }
.trust-strip b { font-size: 14.5px; color: var(--ink); }
@media (max-width: 760px) { .trust-strip { grid-template-columns: 1fr 1fr; row-gap: 20px; } .trust-strip svg { width: 44px; height: 44px; } .trust-strip b { font-size: 13px; } }

/* نوار اطلاع‌رسانی بالای سایت */
.notice { display: block; text-align: center; background: var(--g9); color: #fff; font-size: 13.5px; font-weight: 500; line-height: 1.8; padding: 7px 16px; }
.notice .ic { color: var(--g2); vertical-align: -3px; margin-left: 6px; }
.notice a { color: #ffd76a; font-weight: 700; white-space: nowrap; margin-right: 4px; }
@media (max-width: 760px) { .notice { font-size: 12.5px; padding: 6px 12px; } }

/* بنرهای کناری صفحه اول */
.hero { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.hero.no-slider { grid-template-columns: 1fr; }
.hero.no-slider .hero-side { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
.hero-main { min-width: 0; }
.hero-main .slide { padding: 32px 40px; }
.hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; }
.promo { position: relative; border-radius: 18px; overflow: hidden; color: #fff; padding: 18px 18px 16px; display: grid; align-content: space-between; gap: 10px; min-height: 0; isolation: isolate; transition: transform .15s, box-shadow .15s; }
.promo:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.promo-txt { position: relative; z-index: 2; display: grid; gap: 8px; max-width: 64%; }
.promo h3 { margin: 0; font-weight: 900; font-size: clamp(18px, 1.8vw, 24px); line-height: 1.3; }
.promo h3 em { font-style: normal; color: #ffe08a; }
.promo ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.promo li { display: flex; align-items: center; gap: 6px; font-size: 12px; background: rgba(255, 255, 255, .14); border-radius: 8px; padding: 3px 8px; }
.promo li svg { width: 14px; height: 14px; flex: none; }
.promo-art { position: absolute; left: -6px; bottom: -4px; width: 44%; max-width: 170px; z-index: 1; }
.promo-btn { position: relative; z-index: 2; justify-self: start; display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; border-radius: 999px; padding: 6px 8px 6px 16px; }
.promo-btn i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-style: normal; }
.promo-warranty { background: radial-gradient(120% 90% at 10% 100%, #1fb37a 0%, transparent 55%), linear-gradient(135deg, #0b7a52, #053a28); }
.promo-warranty .promo-btn { background: #f2b632; color: #053a28; }
.promo-warranty .promo-btn i { background: #053a28; color: #f2b632; }
.promo-quote { background: radial-gradient(110% 90% at 0% 0%, #5fd9a6 0%, transparent 50%), linear-gradient(135deg, #14a870, #0b7a52); }
.promo-quote .promo-btn { background: #fff; color: #075238; }
.promo-quote .promo-btn i { background: #0b7a52; color: #fff; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .promo { min-height: 190px; }
}
@media (max-width: 640px) {
  .hero-main .slide { padding: 16px 18px 22px; }
  .hero-side, .hero.no-slider .hero-side { grid-template-columns: 1fr; }
  .promo-txt { max-width: 66%; }
  .promo-art { width: 34%; max-width: 130px; }
}

/* صفحه پیش‌فاکتور */
.quote-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.quote-aside h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--g7); font-size: 16px; }
.quote-aside ol { margin: 0 0 12px; padding-right: 20px; line-height: 2; list-style: persian; }
@media (max-width: 760px) { .quote-layout { grid-template-columns: 1fr; } }
