/* ================================================================
   PRODUCT LIST PAGE (PLP)
   ================================================================ */
:root {
  --primary-deep: #0D3F87;
  --success: #15803D;
  --warning: #A35A00;
  --warning-soft: #FFF6E5;
  --warning-line: #F6D9A8;
  --danger: #D42A2A;
  --line-strong: #CBD5E1;
}
[hidden] { display: none !important; }
h1, h2, h3, h4, address { margin: 0; font-style: normal; }
ol { margin: 0; padding: 0; }
select, textarea { font: inherit; color: inherit; }

.page { padding-block: 12px 64px; }

/* ---------- Breadcrumb ---------- */
.crumbs ol {
  display: flex; align-items: center; list-style: none;
  overflow-x: auto; scrollbar-width: none; white-space: nowrap;
  margin-inline: -4px;
}
.crumbs ol::-webkit-scrollbar { display: none; }
.crumbs li { display: flex; align-items: center; font-size: 14px; color: var(--fg-subtle); }
.crumbs li + li::before {
  content: ""; width: 16px; height: 16px; margin-inline: 2px; flex-shrink: 0;
  background: #94A3B8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.crumbs a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding-inline: 4px; color: var(--fg-muted); border-radius: 6px; }
.crumbs a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }
.crumbs [aria-current] { padding-inline: 4px; font-weight: 500; color: var(--fg); }

/* ---------- Category head ---------- */
.cat-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding-block: 8px 20px; }
.cat-head h1 { font-size: 30px; font-weight: 800; line-height: 1.45; }

/* ---------- Layout: filters sidebar + results ---------- */
.plp { display: grid; grid-template-columns: 288px minmax(0, 1fr); gap: 28px; align-items: start; }

/* ---------- Sidebar (desktop) ---------- */
/* Sticky with no inner scrollbar. When the panel is taller than the screen, JS moves its sticky
   "top" with the scroll so it rides along until its bottom (or top, when scrolling up) is in view. */
.sidebar { align-self: stretch; } /* full row height, so the panel has room to stick */
.sidebar__in { position: sticky; top: 144px; }
.sidebar__in > .fp { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; overflow: clip; }

.fp__head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 60px; padding-inline: 20px 12px;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.fp__title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; }
.fp__title .i { color: var(--fg-subtle); }
.link-btn {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 40px; padding-inline: 10px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--primary);
}
.link-btn:hover { background: var(--primary-soft); }
.link-btn:disabled { color: var(--fg-subtle); cursor: default; background: none; opacity: .7; }

/* Filter group */
.fg { border-bottom: 1px solid var(--border); }
.fg:last-of-type { border-bottom: 0; }
.fg > summary {
  display: flex; align-items: center; gap: 8px;
  min-height: 52px; padding-inline: 20px 16px;
  cursor: pointer; list-style: none;
}
.fg > summary::-webkit-details-marker { display: none; }
.fg > summary:hover { background: var(--muted-2); }
.fg > summary:focus-visible { outline-offset: -3px; border-radius: 0; }
.fg h3 { font-size: 15px; font-weight: 700; }
.fg__n {
  min-width: 22px; height: 22px; padding-inline: 6px; display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff; background: var(--primary); border-radius: 999px;
}
.fg .chev { margin-inline-start: auto; color: var(--fg-subtle); transition: transform .2s var(--ease); }
.fg[open] .chev { transform: rotate(180deg); }
.fg__body { padding: 0 20px 14px; }
.fg__hint { display: flex; gap: 8px; margin-bottom: 8px; font-size: 13px; line-height: 1.8; color: var(--fg-subtle); }
.fg__help {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin-bottom: 4px;
  font-size: 14px; font-weight: 500; color: var(--primary);
}
.fg__help:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Checkbox option */
.opt {
  display: flex; align-items: center; gap: 12px;
  min-height: 40px; margin-inline: -8px; padding-inline: 8px; border-radius: 8px;
  font-size: 15px; cursor: pointer;
}
.opt:hover { background: var(--muted-2); }
.cb {
  appearance: none; margin: 0; flex-shrink: 0;
  width: 22px; height: 22px; border: 1.5px solid #8A97A8; border-radius: 6px; background: var(--bg);
  display: grid; place-items: center; cursor: pointer;
  transition: background-color .12s, border-color .12s;
}
.cb:checked {
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 15px no-repeat;
  border-color: var(--primary);
}
.cb:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.opt:has(.cb:checked) { font-weight: 500; }
.swatch { width: 20px; height: 20px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .18); flex-shrink: 0; margin-inline-start: auto; }

/* Switch option */
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; font-size: 15px; cursor: pointer; }
.sw {
  appearance: none; position: relative; margin: 0; flex-shrink: 0; cursor: pointer;
  width: 46px; height: 28px; border-radius: 999px; background: #B6C0CD;
  transition: background-color .15s;
}
.sw::before {
  content: ""; position: absolute; top: 3px; inset-inline-start: 3px;
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .25);
  transition: transform .2s var(--ease);
}
.sw:checked { background: var(--primary); }
.sw:checked::before { transform: translateX(-18px); } /* RTL: slide toward the end (left) */
.sw:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* Shape tiles (visual choice: straight / curved) */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 8px 10px; cursor: pointer;
  font-size: 14px; font-weight: 500;
  border: 1.5px solid var(--border); border-radius: 12px; background: var(--bg);
  transition: border-color .12s, background-color .12s, color .12s;
}
.tile:hover { border-color: var(--line-strong); }
.tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tile > svg { width: 72px; height: 44px; color: var(--fg-muted); }
.tile small { font-size: 12px; font-weight: 400; color: var(--fg-subtle); }
.tile__tick {
  position: absolute; top: 6px; inset-inline-end: 6px;
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: #fff; opacity: 0; transform: scale(.6);
  transition: opacity .12s, transform .12s;
}
.tile__tick .i { width: 13px; height: 13px; stroke-width: 3; }
.tile:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.tile:has(input:checked) > svg { color: var(--primary); }
.tile:has(input:checked) .tile__tick { opacity: 1; transform: none; }
.tile:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }

/* Price range */
.range { position: relative; height: 32px; margin: 4px 12px 8px; --a: 0; --b: 100; }
.range__track { position: absolute; inset-inline: -12px; top: 50%; height: 4px; translate: 0 -50%; background: var(--border); border-radius: 4px; }
.range__fill { position: absolute; top: 50%; height: 4px; translate: 0 -50%; inset-inline-start: calc(var(--a) * 1%); inset-inline-end: calc((100 - var(--b)) * 1%); background: var(--primary); border-radius: 4px; }
.range input {
  position: absolute; inset-inline: -12px; top: 0; width: calc(100% + 24px); height: 100%; margin: 0;
  appearance: none; background: none; pointer-events: none;
}
.range input::-webkit-slider-runnable-track { height: 32px; background: none; }
.range input::-moz-range-track { background: none; }
.range input::-webkit-slider-thumb {
  appearance: none; pointer-events: auto; cursor: grab;
  width: 26px; height: 26px; margin-top: 3px; border-radius: 50%;
  background: #fff; border: 2px solid var(--primary); box-shadow: 0 1px 4px rgba(15, 23, 42, .25);
}
.range input::-moz-range-thumb {
  pointer-events: auto; cursor: grab;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 2px solid var(--primary); box-shadow: 0 1px 4px rgba(15, 23, 42, .25);
}
.range input:focus-visible { outline: none; }
.range input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px var(--primary-soft-2); }
.range input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 5px var(--primary-soft-2); }
.price-in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.price-in label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--fg-subtle); }
.price-in .field { position: relative; }
.price-in input {
  width: 100%; height: 44px; padding-inline: 10px 44px;
  font-size: 16px; font-weight: 500; color: var(--fg);
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg);
  outline: none; text-align: start;
}
.price-in input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft-2); }
.price-in .unit { position: absolute; inset-inline-end: 10px; top: 50%; translate: 0 -50%; font-size: 12px; color: var(--fg-subtle); pointer-events: none; }

.fp__nojs { padding: 16px 20px 20px; }
html.js .fp__nojs { display: none; }

/* ---------- Results column ---------- */
.results { min-width: 0; scroll-margin-top: 140px; }

/* Desktop toolbar: sort + count */
.toolbar {
  display: flex; align-items: center; gap: 16px;
  min-height: 56px; padding: 6px 8px 6px 16px; margin-bottom: 12px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--bg);
}
.sort { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.sort__label { display: inline-flex; align-items: center; gap: 6px; margin-inline-end: 6px; font-size: 14px; font-weight: 700; color: var(--fg); }
.sort__label .i { color: var(--fg-subtle); }
.sort__opt { position: relative; }
.sort__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sort__opt span {
  display: inline-flex; align-items: center; min-height: 40px; padding-inline: 12px; border-radius: 10px;
  font-size: 14px; color: var(--fg-muted); cursor: pointer;
  transition: background-color .12s, color .12s;
}
.sort__opt span:hover { background: var(--muted); color: var(--fg); }
.sort__opt input:checked + span { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.sort__opt input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 1px; }
.res-count { margin-inline-start: auto; font-size: 14px; color: var(--fg-subtle); white-space: nowrap; }
.res-count b { font-weight: 700; color: var(--fg); }

/* Phone/tablet toolbar */
.mbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.mbar__btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding-inline: 12px; border-radius: 12px;
  font-size: 15px; font-weight: 500;
  border: 1px solid var(--line-strong); background: var(--bg);
  min-width: 0;
}
.mbar__btn:active { background: var(--muted); }
.mbar__btn .i { color: var(--fg-muted); }
.mbar__btn .trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbar__btn b { font-weight: 700; }
.nbadge {
  min-width: 22px; height: 22px; padding-inline: 6px; display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 700; line-height: 1; color: #fff; background: var(--primary); border-radius: 999px;
}

/* Quick filter chips (phone/tablet) */
.quick {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin-inline: -16px; padding: 2px 16px 12px;
  scroll-padding-inline: 16px;
}
.quick::-webkit-scrollbar { display: none; }
.qchip {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  min-height: 40px; padding-inline: 14px; border-radius: 999px;
  font-size: 14px; white-space: nowrap;
  border: 1px solid var(--border); background: var(--muted-2); color: var(--fg-muted);
  transition: background-color .12s, border-color .12s, color .12s;
}
.qchip .i { display: none; }
.qchip[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 500; }
.qchip[aria-pressed="true"] .i { display: block; }

/* Applied filters */
.applied { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.achip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding-inline: 12px 8px; border-radius: 999px;
  font-size: 14px; color: var(--primary); background: var(--primary-soft); border: 1px solid var(--primary-soft-2);
}
.achip .i { width: 16px; height: 16px; }
.achip:hover { background: var(--primary-soft-2); }
.applied .link-btn { min-height: 36px; color: var(--fg-muted); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 20px; list-style: none; margin: 0; padding: 0; }

.pc { position: relative; display: flex; flex-direction: column; }
.pc:has(.pc__title a:focus-visible) { outline: 3px solid var(--primary); outline-offset: 6px; border-radius: 16px; }

.pc__media {
  position: relative; aspect-ratio: 1; overflow: hidden;
  background: var(--muted-2); border-radius: 14px;
}
.pc__media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .35s var(--ease); }
.pc.is-out .pc__media img { filter: grayscale(1); opacity: .5; }
/* Hover: the photo zooms a little, the name turns brand blue */
@media (hover: hover) {
  .pc:hover .pc__media img { transform: scale(1.05); }
  .pc:hover .pc__title { color: var(--primary); }
}

.pc__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 4px 0; }
.pc__title { font-size: 15px; font-weight: 500; line-height: 1.8; transition: color .15s; }
.pc__title a {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(1.8em * 2);
}
.pc__title a:focus-visible { outline: none; }
/* the whole card opens the product */
.pc__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }

.pc__foot { padding: 8px 4px 0; }
.price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.price__now { display: flex; align-items: center; gap: 4px; }
.price__now strong { font-size: 19px; font-weight: 800; letter-spacing: -.2px; }
.price__now .cur { font-size: 13px; color: var(--fg-muted); }
.pct {
  display: inline-flex; align-items: center; height: 20px; padding-inline: 6px;
  border-radius: 6px; font-size: 12px; font-weight: 700; line-height: 1;
  color: #fff; background: var(--danger);
}
.price__old { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--fg-subtle); }
.price__old del { text-decoration-thickness: 1px; }
.price__na { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: 15px; font-weight: 700; color: var(--fg-subtle); }
.price__na .i { width: 18px; height: 18px; }

/* Empty state */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 48px 20px; border: 1px dashed var(--line-strong); border-radius: 16px; background: var(--muted-2);
}
.empty__icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: var(--bg); color: var(--fg-subtle); }
.empty h3 { font-size: 18px; font-weight: 700; }
.empty p { max-width: 44ch; font-size: 15px; line-height: 1.9; color: var(--fg-muted); }
.empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }

/* ---------- Pagination ---------- */
.pager { margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pager__info { font-size: 14px; color: var(--fg-subtle); }
.pager__list { display: flex; align-items: center; gap: 6px; }
.pager__num, .pager__edge, .pager__gap {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 44px; height: 44px; padding-inline: 8px; border-radius: 10px;
  font-size: 15px; font-weight: 500;
}
.pager__num { border: 1px solid var(--border); background: var(--bg); color: var(--fg); transition: border-color .12s, background-color .12s; }
.pager__num:hover { border-color: var(--primary); color: var(--primary); }
.pager__num[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.pager__edge { padding-inline: 14px; border: 1px solid var(--border); background: var(--bg); }
a.pager__edge:hover { border-color: var(--primary); color: var(--primary); }
.pager__edge[aria-disabled="true"] { color: #A3AEBD; background: var(--muted-2); }
.pager__gap { min-width: 24px; padding: 0; color: var(--fg-subtle); }

/* ---------- SEO / buying guide (only on the unfiltered first page) ---------- */
.seo {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 32px; align-items: start;
  margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--border);
}
.seo__article { position: relative; }
.seo__body { position: relative; max-height: 440px; overflow: hidden; transition: max-height .35s var(--ease); }
.seo__body::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 120px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--bg));
  pointer-events: none; transition: opacity .2s;
}
.seo__body.is-open { max-height: none; }
.seo__body.is-open::after { opacity: 0; }
.seo h2 { font-size: 22px; font-weight: 800; line-height: 1.6; margin-bottom: 12px; }
.seo h3 { font-size: 18px; font-weight: 700; line-height: 1.7; margin: 28px 0 8px; scroll-margin-top: 150px; }
.seo p, .seo li { font-size: 16px; line-height: 2.1; color: #334155; }
.seo p + p { margin-top: 10px; }
.seo a:not(.btn):not(.rchip) { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.steps { list-style: none; counter-reset: s; display: grid; gap: 10px; margin: 14px 0; }
.steps li { counter-increment: s; position: relative; padding: 12px 56px 12px 16px; background: var(--muted-2); border: 1px solid var(--border); border-radius: 12px; line-height: 1.9; }
.steps li::before {
  content: counter(s, persian); position: absolute; inset-inline-start: 14px; top: 12px;
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
  font-weight: 700; font-size: 15px; color: #fff; background: var(--primary);
}
.shapes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0 4px; }
.shapes figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 12px 12px; background: var(--muted-2); border: 1px solid var(--border); border-radius: 14px; }
.shapes svg { width: 120px; height: 72px; color: var(--fg-muted); }
.shapes figcaption { font-size: 14px; text-align: center; color: var(--fg-muted); line-height: 1.8; }
.shapes figcaption b { display: block; font-size: 15px; color: var(--fg); }
.seo__more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  min-height: 44px; padding-inline: 16px; border-radius: 10px;
  font-weight: 500; color: var(--primary); border: 1px solid var(--primary-soft-2);
}
.seo__more:hover { background: var(--primary-soft); }
.seo__more .i { transition: transform .2s var(--ease); }
.seo__more[aria-expanded="true"] .i { transform: rotate(180deg); }

.faq h2 { font-size: 20px; }
.faq details { border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.faq details + details { margin-top: 8px; }
.faq summary {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 10px 16px; cursor: pointer; list-style: none;
  font-weight: 500; line-height: 1.8;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { margin-inline-start: auto; color: var(--fg-subtle); transition: transform .2s var(--ease); }
.faq details[open] summary { color: var(--primary); }
.faq details[open] summary .i { transform: rotate(180deg); color: var(--primary); }
.faq details p { padding: 0 16px 16px; font-size: 15px; }

.related { grid-column: 1 / -1; }
.related h2 { font-size: 18px; margin-bottom: 12px; }
.related ul { display: flex; flex-wrap: wrap; gap: 8px; }
.rchip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding-inline: 16px; border-radius: 12px;
  font-size: 15px; border: 1px solid var(--border); background: var(--bg);
  transition: border-color .12s, color .12s, background-color .12s;
}
.rchip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.rchip .i { color: var(--fg-subtle); }

/* ---------- Phone sheets (filters + sort) ---------- */
.sheet {
  position: fixed; inset: auto 0 0; margin: 0;
  width: 100%; max-width: none; max-height: 88dvh;
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-lg);
}
.sheet[open] { animation: sheet-in .28s var(--ease); }
.sheet[open]::backdrop { animation: fade-in .28s var(--ease); }
@keyframes sheet-in { from { transform: translateY(100%); } }
.sheet--full { height: 100dvh; max-height: none; border-radius: 0; inset: 0; }
.sheet__inner { display: flex; flex-direction: column; height: 100%; max-height: inherit; }
.sheet__grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 8px auto 0; flex-shrink: 0; }
.sheet__head {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
  min-height: 60px; padding-inline: 8px;
  border-bottom: 1px solid var(--border);
}
.sheet__head h2 { font-size: 17px; font-weight: 800; }
.sheet__head .link-btn { margin-inline-start: auto; }
.sheet__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.sheet__foot {
  flex-shrink: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border); background: var(--bg);
  box-shadow: 0 -8px 20px -16px rgba(15, 23, 42, .3);
}
.sheet__foot .btn { width: 100%; min-height: 52px; font-size: 16px; font-weight: 700; border-radius: 12px; }
/* inside the phone sheet the panel loses its own desktop title row */
.sheet .fp__head { display: none; }
.sheet .fg > summary { min-height: 60px; padding-inline: 16px; }
.sheet .fg h3 { font-size: 16px; }
.sheet .fg__body { padding: 0 16px 20px; }
.sheet .opt { min-height: 52px; font-size: 16px; }
.sheet .sw-row { min-height: 52px; font-size: 16px; }

.sort-list { padding: 8px 8px calc(16px + env(safe-area-inset-bottom)); }
.sort-list label {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding-inline: 12px; border-radius: 12px;
  font-size: 16px; cursor: pointer;
}
.sort-list label:active { background: var(--muted); }
.sort-list input {
  appearance: none; margin: 0; width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid #8A97A8; display: grid; place-items: center; flex-shrink: 0;
}
.sort-list input:checked { border: 7px solid var(--primary); }
.sort-list input:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.sort-list label:has(input:checked) { color: var(--primary); font-weight: 700; background: var(--primary-soft); }

/* Floating filter/sort pill (phone), shown once the toolbar scrolls away */
.fab {
  position: fixed; z-index: 30; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex; align-items: center;
  padding: 4px; border-radius: 999px;
  background: var(--fg); color: #fff;
  box-shadow: 0 10px 30px -8px rgba(15, 23, 42, .5);
  transform: translate(-50%, 140%); transition: transform .28s var(--ease);
}
.fab.is-on { transform: translate(-50%, 0); }
.fab button { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding-inline: 18px; border-radius: 999px; font-size: 15px; font-weight: 500; }
.fab button:active { background: rgba(255, 255, 255, .12); }
.fab .nbadge { background: #fff; color: var(--fg); }
.fab__sep { width: 1px; height: 22px; background: rgba(255, 255, 255, .25); }
.fab :focus-visible { outline-color: #fff; }

/* ================================================================
   PLP breakpoints
   ================================================================ */
@media (max-width: 1279.98px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .toolbar { flex-wrap: wrap; }
}
@media (max-width: 1023.98px) {
  .plp { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  html:not(.js) .sidebar { display: block; } /* no JS: show the filter form in the page */
  .seo { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}

/* Phone: list rows instead of a tiny grid, so names, sizes and prices stay readable */
@media (max-width: 639.98px) {
  .page { padding-top: 4px; }
  .cat-head { padding-bottom: 14px; }
  .cat-head h1 { font-size: 23px; }

  .grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  /* phone: list rows with a light border so rows stay separate */
  .pc {
    display: grid; grid-template-columns: 112px minmax(0, 1fr);
    grid-template-areas: "media body" "media foot"; grid-template-rows: auto 1fr;
    column-gap: 14px; padding: 12px; border: 1px solid var(--border); border-radius: 14px;
  }
  .pc__media { grid-area: media; align-self: start; border-radius: 10px; }
  .pc__body { grid-area: body; padding: 0; }
  .pc__title { font-size: 15px; line-height: 1.75; }
  .pc__title a { min-height: 0; }
  .pc__title a::after { border-radius: 14px; }
  .pc__foot { grid-area: foot; align-self: end; padding: 6px 0 0; } /* price sits in the bottom-left corner */
  .price__now strong { font-size: 18px; }
  .price__old { order: -1; } /* phone: old price + discount above the current price */

  .pager { margin-top: 24px; }
  .pager__list { gap: 4px; }
  .pager__edge .txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pager__edge { padding-inline: 0; min-width: 44px; }

  .seo { margin-top: 40px; padding-top: 28px; }
  .seo h2 { font-size: 19px; }
  .seo h3 { font-size: 17px; }
  .seo p, .seo li { font-size: 15.5px; line-height: 2.05; }
  .seo__body { max-height: 380px; }
  .steps li { padding-inline: 52px 14px; }
  .shapes svg { width: 96px; height: 60px; }
  .related ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .related ul::-webkit-scrollbar { display: none; }
  .rchip { white-space: nowrap; }
}
@media (min-width: 640px) and (max-width: 1023.98px) {
  .sheet:not(.sheet--full) { max-width: 520px; inset-inline: 0; margin-inline: auto; }
}
