/* ==========================================================================
   PayCard — shop (phase 2)
   Loaded on /shop/* only. Kept out of pages.css so phase-1 styling and the
   shop can be reasoned about, and cache-busted, independently.
   RTL-first: logical properties throughout, no left/right.
   ========================================================================== */

/* ---------- section rhythm helpers ---------- */
.section--top-tight { padding-block-start: 0; }

/* ---------- availability pill ----------
   State is carried by an icon + a word, never colour alone. */
.stock {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  font-size: var(--fs-xs); font-weight: 700; white-space: nowrap;
  padding: 5px var(--sp-3); border-radius: var(--r-pill);
  border: 1px solid transparent;
}
.stock svg { inline-size: 14px; block-size: 14px; flex: none; }
.stock--ok   { background: var(--verified-wash); border-color: #C9E4D8; color: var(--green-700); }
.stock--off  { background: var(--bone-200);      border-color: var(--bone-300); color: var(--slate-600); }
.stock--soon { background: var(--accent-wash);   border-color: var(--gold-200);  color: var(--gold-700); }

/* On inverse surfaces the light washes disappear; restate with borders. */
.on-inverse .stock--ok   { background: rgba(30,127,90,.22);  border-color: rgba(160,220,195,.5); color: #BFE9D6; }
.on-inverse .stock--off  { background: rgba(238,242,247,.10); border-color: var(--border-on-inverse); color: var(--text-on-inverse-muted); }
.on-inverse .stock--soon { background: rgba(201,162,39,.18); border-color: rgba(220,187,78,.45); color: var(--gold-200); }

/* ---------- rate bar: the one number the shop derives from ---------- */
.ratebar {
  display: grid; gap: var(--sp-4);
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: var(--sp-5);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
.ratebar__main { display: grid; gap: 2px; }
.ratebar__label {
  display: flex; align-items: center; gap: var(--sp-2);
  margin: 0; font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .06em; color: var(--text-muted);
}
.ratebar__label svg { inline-size: 16px; block-size: 16px; color: var(--gold-700); }
.ratebar__value {
  margin: 0; font-family: var(--font-head); font-weight: 800;
  font-size: clamp(1.375rem, 2.6vw, 1.75rem); color: var(--text-strong);
  line-height: 1.2; white-space: nowrap;
}
.ratebar__note {
  margin: 0; font-size: var(--fs-xs); color: var(--text-muted);
  line-height: 1.7; border-inline-start: 2px solid var(--border-subtle);
  padding-inline-start: var(--sp-4);
}
.ratebar__stat {
  margin: 0; font-size: var(--fs-sm); font-weight: 700; white-space: nowrap;
  color: var(--text-strong); background: var(--bone-100);
  border: 1px solid var(--border-subtle); border-radius: var(--r-pill);
  padding: var(--sp-2) var(--sp-4);
}
@media (max-width: 900px) {
  .ratebar { grid-template-columns: 1fr; }
  .ratebar__note {
    border-inline-start: 0; padding-inline-start: 0;
    border-block-start: 1px solid var(--border-subtle); padding-block-start: var(--sp-4);
  }
  .ratebar__stat { justify-self: start; }
}

/* ---------- category cards ---------- */
.catgrid {
  display: grid; gap: var(--sp-5);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) { .catgrid { grid-template-columns: 1fr; } }

.catcard {
  display: grid; gap: var(--sp-3);
  align-content: start;
  text-decoration: none; color: inherit;
  position: relative; padding-block-end: calc(var(--card-pad) + var(--sp-5));
}
.catcard__name { margin: 0; font-size: var(--fs-h3); color: var(--text-strong); }
.catcard__lead { margin: 0; font-size: var(--fs-sm); color: var(--text-body); line-height: 1.75; }
.catgrid .catcard {
  background: #fff; border: 1px solid var(--border-hairline); border-radius: 16px;
  padding: 16px; gap: 8px;
}
.catgrid .catcard:hover { border-color: rgba(201,162,39,.45); box-shadow: var(--sh-2); }
.catgrid .catcard .icon-tile {
  inline-size: 40px; block-size: 40px; border-radius: 10px;
  background: var(--accent-wash); border: 1px solid #EDE0B8; color: var(--gold-700);
}
.catcard__count {
  margin: 0; font-size: var(--fs-xs); font-weight: 700; color: var(--text-strong);
}
.catcard__rest { font-weight: 400; color: var(--text-muted); }
.catcard__go {
  position: absolute; inset-block-end: 16px; inset-inline-start: 16px;
  display: inline-flex; color: var(--gold-700);
  transition: transform var(--dur-base) var(--ease-out);
}
.catcard__go svg { inline-size: 20px; block-size: 20px; }
/* RTL: the arrow points inline-start, so "forward" is a negative X shift. */
.catcard:hover .catcard__go { transform: translateX(-4px); }

/* ---------- item grid ---------- */
.shopgrid {
  display: grid; gap: var(--sp-5);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1000px) { .shopgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .shopgrid { grid-template-columns: 1fr; gap: var(--sp-4); } }

/* merch polish: tighter price/action rhythm on narrow, crisper card head */
@media (max-width: 640px) {
  .shopcard { padding: 16px; }
  .shopcard__visual { block-size: 104px; }
  .shopcard__flag { inline-size: 52px; block-size: 52px; }
  .shopcard__flag img { inline-size: 28px; block-size: 28px; }
  .shopcard__short { font-size: .78rem; line-height: 1.65; }
  .shopcard__foot { padding-block-start: var(--sp-2); }
  .shopcard__btn { min-block-size: 44px; } /* touch */
}

/* ═══════ shopcard — merch style (vercel: dot-grid + flag + badge + price row) ═══
   Feels like a store, not a doc card. Same data (16/23 avail, rate-derived
   price, real stock badge) — entirely different depth and affordance.       */
.shopcard {
  position: relative;
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--border-hairline);
  border-radius: 16px;
  padding: 20px;
  gap: 0;
  transition: border-color .28s var(--ease-soft), box-shadow .28s var(--ease-soft), transform .28s var(--ease-soft);
}
.shopcard:hover {
  border-color: rgba(201,162,39,.5);
  box-shadow: 0 24px 50px -24px rgba(11,31,58,.28);
  transform: translateY(-2px);
}
.shopcard--out { background: var(--bg-sunken); }
.shopcard__tag {
  position: absolute; top: 16px; inset-inline-start: 16px; z-index: 1;
  font-size: .65rem; font-weight: 900; letter-spacing: .02em;
  background: var(--ink-700); color: var(--gold-400);
  border-radius: 6px; padding: 3px 8px; line-height: 1.4;
}
.shopcard__visual {
  display: flex; align-items: center; justify-content: center;
  block-size: 116px; margin: 0 -2px;
  background: linear-gradient(180deg, var(--bone-100) 0%, var(--bone-050) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 12px; overflow: hidden; position: relative; text-decoration: none;
}
.shopcard__visual::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .45;
  background-image:
    linear-gradient(to right, rgba(11,31,58,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11,31,58,.06) 1px, transparent 1px);
  background-size: 18px 18px;
}
.shopcard__flag {
  position: relative; z-index: 1;
  inline-size: 56px; block-size: 56px;
  display: grid; place-items: center;
  background: #fff; border: 1px solid var(--border-hairline);
  border-radius: 14px; box-shadow: 0 10px 24px -8px rgba(11,31,58,.45);
  overflow: hidden; flex: none;
}
.shopcard__flag img { inline-size: 30px; block-size: 30px; object-fit: contain; display: block; }
.shopcard__flag--text { background: var(--tile, var(--ink-700)); border-color: transparent; }
.shopcard__initial { font-weight: 900; font-size: 22px; color: #fff; line-height: 1; }

/* stock seal sits where "اصل✓" used to — same spot, real meaning. Smaller pill, glass bg. */
.shopcard__seal {
  position: absolute; inset-block-end: 8px; inset-inline-end: 8px; z-index: 1;
  display: inline-flex; pointer-events: none;
}
.shopcard__seal .stock {
  font-size: .68rem; padding: 3px 8px;
  box-shadow: 0 4px 12px rgba(11,31,58,.12);
  backdrop-filter: blur(6px);
}
.shopcard__seal .stock svg { inline-size: 12px; block-size: 12px; }

.shopcard__meta {
  display: flex; align-items: center; gap: 6px;
  margin-block-start: var(--sp-3); font-size: .7rem; font-weight: 700;
}
.shopcard__cat { color: var(--gold-700); }
.shopcard__dot { inline-size: 4px; block-size: 4px; border-radius: 50%; background: var(--border-hairline); flex: none; }
.shopcard__platform { color: var(--text-muted); font-weight: 500; direction: ltr; }
.shopcard__name { margin: var(--sp-2) 0 0; font-size: 1rem; line-height: 1.45; }
.shopcard__link { color: var(--text-strong); text-decoration: none; }
.shopcard__link:hover { color: var(--gold-700); text-decoration: underline; text-underline-offset: 3px; }
.shopcard__short { margin: var(--sp-2) 0 0; font-size: .82rem; color: var(--text-body); line-height: 1.75; flex: 1; }
.shopcard__foot {
  margin-block-start: var(--sp-3); padding-block-start: var(--sp-3);
  border-block-start: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-2); flex-wrap: wrap;
}
.shopcard__price { margin: 0; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.shopcard__from { font-size: var(--fs-xs); color: var(--text-muted); font-weight: 600; }
.shopcard__amount { font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; color: var(--text-strong); line-height: 1; }
.shopcard__unit { font-size: var(--fs-xs); color: var(--text-muted); }
.shopcard__price--muted { font-size: var(--fs-sm); color: var(--text-muted); font-weight: 600; }
.shopcard__actions { display: flex; align-items: center; gap: 6px; flex: none; }
.shopcard__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-block-size: 36px; border-radius: 10px; font-size: var(--fs-xs); font-weight: 800;
  text-decoration: none; padding: 0 12px; border: 1px solid transparent;
  transition: background .2s var(--ease-soft), color .2s, border-color .2s, transform .2s;
}
.shopcard__btn--ghost { background: #fff; border-color: var(--border-hairline); color: var(--text-body); }
.shopcard__btn--ghost:hover { border-color: rgba(11,31,58,.3); color: var(--text-strong); }
.shopcard__btn--primary { background: var(--ink-700); border-color: var(--ink-700); color: var(--text-on-inverse); }
.shopcard__btn--primary:hover { background: var(--ink-800); border-color: var(--ink-800); }
.shopcard__btn svg { inline-size: 14px; block-size: 14px; transition: transform .2s var(--ease-soft); }
.shopcard__btn:hover svg { transform: translateX(-2px); }

/* stock-based flag fade — logo itself desats when unavailable */
.shopcard--out .shopcard__flag, .shopcard--soon .shopcard__flag { filter: saturate(.35); opacity: .88; }
.shopcard--out .shopcard__visual { background: var(--bone-050); }

/* itembar flag — keep in sync with card flag but slightly larger */
.itembar__tile {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--tile, var(--ink-700)); color: #fff;
  font-size: 1rem; padding: var(--sp-4) var(--sp-5);
  min-inline-size: 8rem; direction: ltr; border-radius: var(--r-md);
  font-weight: 700; letter-spacing: .01em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
/* the branded logo panel is defined once, further down (deep-ink + gold aura).
   This spot intentionally left without an override so it doesn't clobber it. */

/* ---------- category meta (count + rate) — now a quiet slip under the toolbar, not a big card */
.catbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: 10px 14px;
  background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  box-shadow: var(--sh-1);
  flex-wrap: wrap;
}
.catbar__count { margin: 0; font-size: var(--fs-sm); font-weight: 800; color: var(--text-strong); white-space: nowrap; }
.catbar__rest { font-weight: 500; color: var(--text-muted); }
.catbar__rate { margin: 0; font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; }
.catbar__rateSmall { font-size: .72rem; color: var(--text-muted); }

/* ---------- shop toolbar (vercel: sticky pills + search + sort, merch) ---------- */
.shoptoolbar-wrap {
  position: sticky; top: var(--header-h, 72px); z-index: 20;
  background: color-mix(in srgb, var(--bg-page) 88%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  border-block-end: 1px solid var(--border-hairline);
}
.shoptoolbar { padding: 10px 0 10px; display: grid; gap: 8px; }
.shoptoolbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.shoptoolbar__pills {
  display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; flex: 1 1 auto; min-inline-size: 0;
  scroll-snap-type: x proximity;
  padding-inline: 6px; padding-block: 2px;
  margin-inline: -6px; /* allow first/last pill shadows to breathe on 390 */
  scroll-padding-inline: 6px;
}
.shoptoolbar__pills::-webkit-scrollbar { display: none; }
.shoptoolbar__pill {
  flex: 0 0 auto; scroll-snap-align: start;
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  min-block-size: 40px; padding: 0 14px; border-radius: 999px;
  font-size: .82rem; font-weight: 800; text-decoration: none; white-space: nowrap;
  background: #fff; border: 1px solid var(--border-hairline); color: var(--text-body);
  transition: background .22s var(--ease-soft), color .22s, border-color .22s, box-shadow .22s, transform .22s;
}
.shoptoolbar__pill:hover { border-color: rgba(11,31,58,.35); color: var(--text-strong); }
.shoptoolbar__pill.is-on { background: var(--ink-700); border-color: var(--ink-700); color: #fff; box-shadow: 0 8px 20px -8px rgba(11,31,58,.5); }
.shoptoolbar__search { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; }
.shoptoolbar__field {
  position: relative; display: flex; align-items: center;
  inline-size: 220px; max-inline-size: 52vw; flex: none; min-inline-size: 0;
}
.shoptoolbar__icon { position: absolute; inset-inline-end: 10px; color: var(--text-muted); pointer-events: none; display: inline-flex; }
.shoptoolbar__input {
  inline-size: 100%; min-block-size: 38px; padding-block: 7px; padding-inline: 32px 10px;
  border-radius: 12px; border: 1px solid var(--border-hairline);
  background: #fff; font-size: .82rem; color: var(--text-strong);
  transition: border-color .2s, box-shadow .2s;
}
.shoptoolbar__input::placeholder { color: var(--text-muted); }
.shoptoolbar__input:focus { outline: none; border-color: rgba(201,162,39,.55); box-shadow: 0 0 0 4px rgba(201,162,39,.18); }
.shoptoolbar__sort { position: relative; display: inline-flex; align-items: center; }
.shoptoolbar__sort .shoptoolbar__icon { inset-inline-start: 8px; }
.shoptoolbar__select {
  min-block-size: 38px; padding: 8px 10px 8px 28px; border-radius: 12px;
  border: 1px solid var(--border-hairline); background: #fff;
  font-size: .82rem; font-weight: 700; color: var(--text-body);
}
.shoptoolbar__submit {
  min-block-size: 38px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--ink-700); background: var(--ink-700); color: #fff;
  font-size: .82rem; font-weight: 800;
}
.shoptoolbar__count { margin: 0; font-size: var(--fs-xs); color: var(--text-muted); }
@media (max-width: 640px) {
  .shoptoolbar__field { inline-size: 0; flex: 1 1 152px; min-inline-size: 140px; }
  .shoptoolbar__input { font-size: .78rem; }
  .shoptoolbar__input::placeholder { font-size: .74rem; }
  .shoptoolbar__pill { min-block-size: 44px; font-size: .78rem; padding: 0 13px; }
  .shoptoolbar__pills { gap: 6px; }
  .shoptoolbar__inner { gap: 10px; }
  .shoptoolbar__search { flex: 1 1 100%; }
}

.emptynote {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  margin-block-start: var(--sp-6);
  padding: var(--sp-5); border-radius: var(--r-md);
  background: var(--accent-wash); border: 1px solid var(--gold-200);
  font-size: var(--fs-sm); color: var(--text-body); line-height: 1.8;
}
.emptynote svg { inline-size: 20px; block-size: 20px; flex: none; color: var(--gold-700); margin-block-start: 3px; }
.emptynote a { color: var(--gold-700); font-weight: 700; }

/* ---------- item page: status strip ---------- */
.itembar {
  display: grid; gap: var(--sp-5);
  grid-template-columns: auto 1fr; align-items: stretch;
  padding: var(--sp-5);
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
.itembar__tile {
  font-size: 1rem; padding: var(--sp-4) var(--sp-5);
  min-inline-size: 8rem; direction: ltr; border-radius: var(--r-md);
}
/* brand logo tile: a real branded panel, not a big empty white box. Deep-ink
   ground with a soft gold aura so the platform logo reads as a "seal". */
.itembar__tile--logo {
  display: grid; place-items: center;
  min-inline-size: 88px; inline-size: 88px; padding: 0;
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(201,162,39,.16), transparent 60%),
    linear-gradient(155deg, var(--ink-700), var(--ink-800));
  border: 1px solid rgba(201,162,39,.28);
  border-radius: var(--r-md);
}
.itembar__tile--logo img {
  inline-size: 40px; block-size: 40px; object-fit: contain; display: block;
  filter: brightness(0) invert(1); opacity: .95;
}
.itembar__facts {
  display: grid; gap: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.itembar__fact {
  display: grid; gap: 6px; align-content: start;
  padding-inline: var(--sp-4);
  position: relative;
}
/* hairline separators between the three facts */
.itembar__fact + .itembar__fact::before {
  content: ''; position: absolute; inset-block: 4px; inset-inline-start: 0;
  inline-size: 1px; background: var(--border-subtle);
}
.itembar__label {
  margin: 0; font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .04em; color: var(--text-muted);
}
.itembar__val {
  margin: 0; display: flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-strong);
  line-height: 1.6;
}
.itembar__val svg { inline-size: 17px; block-size: 17px; flex: none; color: var(--gold-700); }
@media (max-width: 900px) {
  .itembar { grid-template-columns: auto 1fr; gap: var(--sp-4); }
  .itembar__facts { grid-template-columns: 1fr; gap: var(--sp-3); }
  .itembar__fact { padding-inline: 0; }
  .itembar__fact + .itembar__fact { padding-block-start: var(--sp-3); }
  .itembar__fact + .itembar__fact::before {
    inset: 0 0 auto 0; inline-size: auto; block-size: 1px;
  }
}
@media (max-width: 560px) {
  .itembar { grid-template-columns: 1fr; text-align: start; }
  .itembar__tile--logo { justify-self: start; }
}

/* ---------- price table ----------
   NOTE the class name: `.pricetable` already exists in pages.css as the /pricing/
   comparison table and carries `min-width: 780px`. Reusing that name here silently
   forced this table 780px wide on every viewport and gave every item page a
   horizontal scrollbar. Component classes are global — the prefix has to be
   unique across all stylesheets, not just within one. */
.ptablewrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  /* clip so the rounded corners actually cut the first/last row */
  overflow: hidden;
}
.ptable { inline-size: 100%; border-collapse: collapse; text-align: start; }
.ptable thead th {
  text-align: start; font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .05em; color: var(--text-muted);
  padding: var(--sp-4) var(--sp-5);
  background: var(--bone-050);
  border-block-end: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.ptable td, .ptable tbody th {
  padding: var(--sp-4) var(--sp-5);
  border-block-end: 1px solid var(--border-subtle);
  font-size: var(--fs-sm); text-align: start; vertical-align: middle;
}
.ptable tbody tr:last-child td,
.ptable tbody tr:last-child th { border-block-end: 0; }
.ptable__label { font-weight: 700; color: var(--text-strong); white-space: nowrap; }
.ptable__price { font-weight: 700; color: var(--text-strong); white-space: nowrap; }
.ptable__price .tnum { font-size: 1.0625rem; }
/* The unit is redundant beside the "(تومان)" column header on wide layouts;
   it is revealed only in the stacked layout below, where that header is hidden. */
.ptable__unit { display: none; }
.ptable__act { text-align: end; white-space: nowrap; }
.ptable__row--out, .ptable__row--soon { background: var(--bone-050); }
.ptable__row--out .ptable__label,
.ptable__row--soon .ptable__label { color: var(--text-muted); }
.ptable .muted { color: var(--text-muted); font-weight: 400; }

/* Below 720px a 5-column table cannot be read without horizontal scrolling,
   so each row becomes a proper CARD — plan name + USD chip on one line, a big
   toman price, the stock pill, then the qty + add controls. Semantics are
   untouched (still a table for AT); this is presentation only. */
@media (max-width: 720px) {
  /* Clip the <thead> AND each <th> inside it. Absolutely positioning only the
     thead leaves its cells participating in layout, so they stick out past the
     viewport edge and drag a horizontal scrollbar with them. */
  .ptable thead,
  .ptable thead th {
    position: absolute; inline-size: 1px; block-size: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
    padding: 0; margin: -1px; border: 0;
  }
  /* the wrap loses its own border/round so each row-card owns the frame */
  .ptablewrap { background: transparent; border: 0; overflow: visible; }
  .ptable, .ptable tbody, .ptable tr, .ptable td, .ptable tbody th { display: block; inline-size: auto; }

  .ptable tbody tr {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-1);
    padding: var(--sp-5);
    margin-block-end: var(--sp-4);
    display: grid; gap: var(--sp-3);
    /* a thin gold spine on the reading edge signals "a choice you can make" */
    overflow: hidden;
  }
  .ptable tbody tr::before {
    content: ''; position: absolute; inset-block: 0; inset-inline-start: 0;
    inline-size: 3px; background: linear-gradient(var(--ink-700), var(--gold-500));
  }
  .ptable tbody tr:last-child { margin-block-end: 0; }
  .ptable tbody tr.ptable__row--out,
  .ptable tbody tr.ptable__row--soon { background: var(--bone-050); box-shadow: none; }
  .ptable tbody tr.ptable__row--out::before,
  .ptable tbody tr.ptable__row--soon::before { background: var(--border-subtle); }
  .ptable td, .ptable tbody th { padding: 0; border: 0; }

  /* plan title + USD chip share the top line */
  .ptable__label {
    font-size: 1.15rem; font-weight: 800; color: var(--text-strong);
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  }
  .ptable td[dir="ltr"], .ptable__usd-cell {
    /* the USD value cell becomes a subtle chip next to the price */
    display: inline-flex;
  }
  .ptable__price {
    font-size: 1.5rem; line-height: 1.1;
    display: flex; align-items: baseline; gap: 6px;
  }
  .ptable__price .tnum { font-size: 1.5rem; font-weight: 800; color: var(--text-strong); }
  .ptable__unit { display: inline; font-size: var(--fs-xs); font-weight: 500; color: var(--text-muted); }
  /* USD becomes a small chip that rides beside the plan title */
  .ptable__usd { text-align: start; }
  .ptable__usd-chip {
    display: inline-flex; align-items: center;
    font-size: var(--fs-xs); font-weight: 700; color: var(--gold-700);
    background: var(--accent-wash); border: 1px solid var(--gold-200);
    border-radius: var(--r-pill); padding: 2px 10px;
  }

  .ptable__act { text-align: start; margin-block-start: var(--sp-2); }
  .ptable__act .ptable__form { gap: var(--sp-3); }
  .ptable__act .ptable__qty { order: 2; }
  .ptable__act .ptable__form .btn { order: 1; flex: 1; min-block-size: 46px; }
  /* "یا تیکت" is a fallback, not a peer of the gold CTA — demote to a quiet
     text link so the primary action reads unambiguously. */
  .ptable__contact {
    background: transparent !important; border: 0 !important;
    color: var(--text-muted) !important; text-decoration: underline;
    text-underline-offset: 3px; padding: 0 !important; min-block-size: auto !important;
    inline-size: auto !important; margin-block-start: 4px; font-weight: 600;
  }
  .ptable__contact:hover { color: var(--text-strong) !important; }
}

.ptablewrap__note {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  margin-block-start: var(--sp-5); font-size: var(--fs-xs);
  color: var(--text-muted); line-height: 1.8;
}
.ptablewrap__note svg { inline-size: 16px; block-size: 16px; flex: none; color: var(--gold-700); margin-block-start: 3px; }

/* ---------- honest-notes list ---------- */
.notelist { display: grid; gap: var(--sp-4); margin: 0; padding: 0; list-style: none; }
.notelist li {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  font-size: var(--fs-sm); color: var(--text-body); line-height: 1.85;
  padding-block-end: var(--sp-4); border-block-end: 1px solid var(--border-subtle);
}
.notelist li:last-child { padding-block-end: 0; border-block-end: 0; }
.notelist svg {
  inline-size: 18px; block-size: 18px; flex: none;
  color: var(--verified); margin-block-start: 5px;
}

/* ---------- three-up explanatory notes (shop landing) ---------- */
.notegrid {
  display: grid; gap: var(--sp-5);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) { .notegrid { grid-template-columns: 1fr; } }
.note { display: grid; gap: var(--sp-3); align-content: start; }
.note h3 {
  display: flex; align-items: center; gap: var(--sp-2);
  margin: 0; font-size: 1.0625rem; color: var(--text-strong);
}
.note h3 svg { inline-size: 20px; block-size: 20px; flex: none; color: var(--gold-700); }
.note p { margin: 0; font-size: var(--fs-sm); color: var(--text-body); line-height: 1.8; }

/* ---------- wide variant of the phase-1 docbox ---------- */
.docbox--wide { position: static; }
.docbox--wide h2 {
  display: flex; align-items: center; gap: var(--sp-3);
  margin: 0 0 var(--sp-5); font-size: var(--fs-h3);
}
.docbox--wide h2 svg { inline-size: 22px; block-size: 22px; color: var(--gold-700); flex: none; }



/* ---------- shoptoolbar counts ---------- */
.shoptoolbar__pillcnt { font-size:.78em; opacity:.7; margin-inline-start:4px; }

/* ---------- pager (scales to 300+ items: wraps, no layout break) ---------- */
.pager { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; align-items:center; }
.pager__link {
  min-inline-size:40px; block-size:40px; display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--border-subtle); border-radius:10px; background:#fff; color:var(--text-strong);
  font-weight:700; text-decoration:none; padding:0 10px;
}
.pager__link.is-on { background:var(--ink-700,#12202F); color:#fff; border-color:var(--ink-700,#12202F); }

/* ---------- cart ---------- */
.cartlayout { display:grid; grid-template-columns:1fr 380px; gap:var(--sp-6); align-items:start; }
@media (max-width:900px){ .cartlayout{ grid-template-columns:1fr; } }
.cartitems__head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-block-end:var(--sp-5); }
.cartitems__head h2 { margin:0; font-size:1.125rem; }
.cartline {
  display:grid; grid-template-columns:44px 1fr auto auto auto; gap:12px; align-items:center;
  padding:14px 16px; background:#fff; border:1px solid var(--border-subtle); border-radius:14px;
}
.cartline + .cartline { margin-block-start:10px; }
.cartline__media img{ border-radius:8px; }
.cartline__initial{ inline-size:36px; block-size:36px; display:grid; place-items:center; border-radius:8px; background:var(--bone-100,#F0EDE8); font-weight:800; }
.cartline__name{ font-weight:700; color:var(--text-strong); text-decoration:none; }
.cartline__variant{ margin:2px 0 0; font-size:var(--fs-xs); color:var(--text-muted); }
.cartline__price{ margin:4px 0 0; font-size:var(--fs-sm); color:var(--text-body); }
.cartline__qty{ display:flex; align-items:center; gap:4px; border:1px solid var(--border-subtle); border-radius:10px; padding:4px; background:var(--bone-050); }
.cartline__input{ inline-size:44px; text-align:center; border:0; background:transparent; font-weight:700; }
.cartline__step{ inline-size:30px; block-size:30px; border-radius:8px; border:1px solid var(--border-subtle); background:#fff; cursor:pointer; }
.cartline__sub{ font-weight:800; white-space:nowrap; min-inline-size:110px; text-align:end; }
.cartline__remove{ inline-size:32px; block-size:32px; border-radius:50%; border:1px solid var(--border-subtle); background:#fff; cursor:pointer; }
@media (max-width:640px){
  .cartline{ grid-template-columns:44px 1fr auto; }
  .cartline__sub{ grid-column:2 / 4; text-align:start; }
}
.cartsummary__card{ position:sticky; inset-block-start:88px; }
.cartsummary__rows{ display:grid; gap:10px; margin:var(--sp-4) 0; }
.cartsummary__rows > div{ display:flex; justify-content:space-between; gap:12px; font-size:var(--fs-sm); }
.cartsummary__total{ border-block-start:1px solid var(--border-subtle); padding-block-start:10px; font-weight:800; }
.cartsummary__note{ margin-block-start:var(--sp-4); padding-block-start:var(--sp-4); border-block-start:1px solid var(--border-subtle); display:flex; flex-direction:column; gap:8px; }
.cartsummary__rate{ margin:0; font-size:var(--fs-sm); color:var(--text-body); line-height:1.7; }
.cartsummary__rate .tnum{ font-weight:800; color:var(--text-strong); }
.cartsummary__rate-date{ display:block; font-size:var(--fs-xs); color:var(--text-muted); margin-block-start:2px; }
.cartsummary__reassure{ margin:0; display:flex; gap:6px; align-items:flex-start; font-size:var(--fs-xs); color:var(--green-700); line-height:1.6; }
.cartsummary__reassure svg{ inline-size:15px; block-size:15px; flex:none; margin-block-start:1px; color:var(--verified); }
.cartsummary__fine{ font-size:var(--fs-xs); color:var(--text-muted); line-height:1.7; margin-block-start:8px; }
.shopcard__form{ display:inline-flex; }

/* ptable add-to-cart stepper */
.ptable__form{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.ptable__qty{ display:inline-flex; align-items:center; gap:2px; border:1px solid var(--border-subtle); border-radius:9px; padding:2px; background:var(--bone-050); }
.ptable__input{ inline-size:40px; text-align:center; border:0; background:transparent; font-weight:700; -moz-appearance:textfield; }
.ptable__input::-webkit-outer-spin-button, .ptable__input::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
.ptable__step{ inline-size:26px; block-size:26px; border-radius:7px; border:1px solid var(--border-subtle); background:#fff; cursor:pointer; font-weight:700; line-height:1; }
.ptable__contact{ margin-block-start:6px; }
@media (max-width:720px){ .ptable__form{ justify-content:stretch; } .ptable__form .btn{ flex:1; } }

/* header cart badge — visible pill */
.pc-actions__btn--cart{ position:relative; }
.pc-actions__badge{
  position:absolute; inset-block-start:-6px; inset-inline-end:-8px;
  min-inline-size:18px; block-size:18px; padding:0 5px; border-radius:999px;
  background:#C41E3A; color:#fff; font-size:11px; font-weight:800; line-height:18px; text-align:center;
}
.pc-actions__badge[hidden]{ display:none !important; }

/* ---------- header dropdown: availability count ---------- */
/* NOTE: .subnav__meta and .alert--info live in pages.css, not here. The header
   dropdown renders on every page and the order-prefill alert appears on
   /contact/, neither of which loads this stylesheet. */

/* item page · price breakdown — quiet, editorial, not a promo box */
.ratebreak{ margin-block-start:.75rem; border:1px solid var(--border-hairline); border-radius:.75rem; background:color-mix(in srgb, var(--bg-page) 88%, transparent); padding:.625rem .875rem; }
.ratebreak > summary{ cursor:pointer; font-size:var(--fs-xs); font-weight:700; color:var(--text-muted); list-style:none; }
.ratebreak > summary::-webkit-details-marker{ display:none; }
.ratebreak[open] > summary{ color:var(--text-strong); margin-block-end:.375rem; }
.ratebreak > p{ margin:0; font-size:var(--fs-xs); line-height:1.7; color:var(--text-body); }
