/* Powder Sky catalogue; values come from the shared design tokens. */
.shop {
  padding-block-start: 36px;
  padding-block-end: 96px;
  gap: 28px;
}

.shop-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-8);
  flex-wrap: wrap;
}
.shop-header-txt { display: grid; gap: 10px; }
.shop-kicker {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.shop-h {
  margin: 0;
  font: 400 44px/1.02 var(--font-marketing);
  letter-spacing: -.04em;
}
.shop-count {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  padding: 12px 20px;
  border: 1px solid var(--border-frost);
  border-radius: var(--radius-pill);
  background: var(--surface-frost-soft);
  color: var(--text-secondary);
  font-size: 13.5px;
}
.shop-count strong { color: var(--text-primary); font-size: 14.5px; }

.shop-layout { display: flex; flex-direction: column; gap: var(--space-5); }
.shop-side { display: none; }
.shop-main { display: flex; flex-direction: column; gap: 36px; min-width: 0; }
.shop-head { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.filter-sheet summary { list-style: none; cursor: pointer; width: fit-content; }
.filter-sheet summary::-webkit-details-marker { display: none; }
.filter-sheet[open] summary {
  color: var(--action-ink);
  background: var(--action-primary);
  border-color: var(--action-primary);
}
.filter-sheet .filters-form {
  margin-block-start: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border-frost);
  border-radius: var(--radius-card);
  background: var(--surface-card);
}
.filters-form { display: flex; flex-direction: column; gap: var(--space-5); }
.filters-form label {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 13px;
  font-weight: 600;
}
.filters-form label.check { flex-direction: row; gap: var(--space-3); }
.filters-form input,
.filters-form select { background: color-mix(in srgb, var(--surface-card) 90%, transparent); }
.filter-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}
.filter-actions { display: flex; gap: 10px; }
.filter-actions .btn:first-child { flex: 1; padding-inline: 14px; white-space: nowrap; }
.filter-actions .btn:last-child { padding-inline: 18px; }

.cat-tree { display: flex; flex-direction: column; gap: 5px; }
.cat-label {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.cat-root {
  min-height: 42px;
  padding-inline: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14.5px;
  list-style: none;
}
.cat-root::-webkit-details-marker { display: none; }
.cat-root:hover { background: var(--surface-frost); }
/* The category that is on is coral — the tree is a filter, not an action, and
   the violet is reserved for the two buttons that do something (#372). */
.cat-root.on { color: var(--text-primary); background: var(--surface-coral); font-weight: 600; }
.cat-count { color: var(--text-muted); font-size: 12.5px; font-weight: 400; }
.cat-children { display: flex; flex-direction: column; padding-inline-start: 18px; }
.cat-children a {
  min-height: 36px;
  padding: 7px 18px;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  font-size: 13px;
}
.cat-children a:hover,
.cat-children a.on { color: var(--text-primary); background: var(--surface-frost); }
.side-filters { padding-block-start: var(--space-6); border-top: 1px solid var(--border-subtle); }
.side-filters .side-h { display: none; }
.shop-shortcuts {
  display: grid; gap: var(--space-2);
  padding-block-start: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}
.shop-shortcuts a {
  min-height: 44px; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-radius: var(--radius-pill); background: var(--surface-frost);
  color: var(--action-primary); font-size: 13.5px; font-weight: 600;
}
.shop-shortcuts a:hover { background: var(--surface-card); }

.sort-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sort-label { margin-inline-end: 4px; color: var(--text-muted); font-size: 12.5px; }
.sort-row .chip { min-height: 38px; padding: 8px 18px; }
/* Ink, not violet: the order that is on and the page that is open are places
   the reader already is, not buttons offering to take them somewhere. */
.sort-row .chip.on { color: var(--action-ink); background: var(--text-primary); border-color: transparent; }
.sort-row .chip.disabled { border-style: dashed; color: var(--text-muted); cursor: default; }
.register-head { display: flex; flex-direction: column; gap: var(--space-5); }
.register-head .section-header { align-items: flex-end; }
.register-head .section-summary { max-width: 56ch; font-size: 13px; }
.register-head .section-h { font: 400 30px/1.08 var(--font-marketing); letter-spacing: -.03em; }

/* The register sets the block's own spacing; the ring's two radii stay paired in
   card.css, so this never names an inner radius of its own again. */
.shop-main .paid-surface,
#polecane-shop {
  margin: 0;
  padding: var(--ring);
  border: 0;
  border-radius: var(--radius-surface);
}
.shop-main .paid-inner { padding: 30px 30px 34px; }
.shop-main .paid-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  margin-block-end: var(--space-5);
}
.shop-main .paid-title { grid-column: 1; grid-row: 1; }
.shop-main .paid-actions { grid-column: 2; grid-row: 1; }
.shop-main .paid-actions .btn {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--action-primary);
  font-size: 13.5px;
}
.shop-main .paid-title .section-h { font-size: 27px; }
.shop-main .paid-rail { grid-template-columns: repeat(auto-fill, minmax(224px, 1fr)); gap: var(--space-4); }

.filter-dialog { display: none; }
.filter-dialog[open] {
  inset: auto 0 0;
  width: 100%; max-width: none; max-height: min(88dvh, 760px);
  margin: 0; padding: 12px 18px 18px;
  display: block; overflow: auto;
  border-radius: var(--radius-panel) var(--radius-panel) 0 0;
}
.filter-dialog::backdrop { background: color-mix(in srgb, var(--overlay-ink) 42%, transparent); }
.filter-dialog-handle { display: block; width: 44px; height: 4px; margin: 0 auto 14px; border-radius: var(--radius-pill); background: var(--border-strong); }
.filter-dialog-head { display: flex; align-items: center; gap: var(--space-3); }
.filter-dialog-head h2 { flex: 1; margin: 0; font-size: 18px; }
.filter-dialog-body { display: grid; gap: var(--space-6); margin-block-start: var(--space-4); }

.pager { display: flex; justify-content: center; gap: var(--space-2); flex-wrap: wrap; }
.page-n,
.page-next {
  min-width: 44px;
  height: 44px;
  padding-inline: 16px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-frost);
  border-radius: var(--radius-pill);
  background: var(--surface-frost);
  font-size: 14.5px;
}
.page-n { padding-inline: 8px; }
.page-n:hover,
.page-next:hover { background: var(--surface-card); }
.page-n.on { color: var(--action-ink); background: var(--text-primary); border-color: transparent; font-weight: 700; }

@media (min-width: 900px) {
  .shop { padding-inline: 0; }
  .shop-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
  .shop-side {
    position: relative; z-index: 2;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    border: 1px solid var(--border-frost);
    border-radius: var(--radius-panel);
    background: color-mix(in srgb, var(--surface-card) 82%, var(--surface-page));
    box-shadow: var(--shadow-card);
  }
  .shop-side .cat-tree { padding: 0; border: 0; background: transparent; box-shadow: none; }
  .shop-side .side-filters { padding: 24px 0 0; border: 0; border-top: 1px solid var(--border-subtle); border-radius: 0; background: transparent; box-shadow: none; }
}

@media (max-width: 899px) {
  .shop { padding-block-start: var(--space-4); gap: var(--space-5); }
  .shop-h { font-size: 36px; }
  .shop-main { gap: var(--space-6); }
  .shop-main .paid-inner { padding: var(--space-5); }
  .shop-main .paid-head { grid-template-columns: 1fr; }
  .shop-main .paid-title,
  .shop-main .paid-actions { grid-column: 1; grid-row: auto; }
}

@media (max-width: 559px) {
  .shop-header { align-items: flex-start; gap: var(--space-4); }
  .shop-count { padding: 9px 14px; }
  .shop-main .paid-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-main .card .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (prefers-reduced-transparency: reduce) {
  .shop-count,
  .shop-side { background: var(--surface-card); }
}
