/* ANAAR storefront.
   A working Pakistani apparel and student supply shop. White ground, photography
   first, commercial density. The walkthrough is an overlay and lives in
   guide.css; nothing in this file knows it exists. */

:root {
  --bg: #FFFFFF;
  --bg-alt: #F7F4EF;
  --bg-deep: #141412;

  --ink: #141412;
  --ink-2: #55504A;
  --ink-3: #6B6660;
  --ink-4: #938D84;

  --line: #E4DED5;
  --line-soft: #F0ECE5;

  --brand: #FF5C26;
  --brand-dark: #C93F12;
  --brand-tint: #FFF3EC;

  --sale: #C0362C;
  --ok: #1E7D46;
  --warn: #8F5A00;

  --font: 'Outfit', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-num: 'SpaceGrotesk', ui-monospace, SFMono-Regular, monospace;

  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-16: 64px;
  --sp-20: 80px;

  --r-xs: 2px; --r-sm: 4px; --r-pill: 999px;

  --dur-fast: 140ms; --dur-base: 220ms; --dur-slow: 320ms;
  --ease: cubic-bezier(.2, 0, 0, 1);

  --wrap: 1360px;
  --wrap-read: 720px;
  --gutter: clamp(16px, 3.2vw, 44px);
  --header-h: 64px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol, fieldset { margin: 0; }
fieldset { border: 0; padding: 0; min-inline-size: 0; }
legend { padding: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, svg, video { max-width: 100%; }
img { display: block; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }

/* ---------- browser surfaces ---------- */
::selection { background: var(--brand-tint); color: var(--ink); }
:root { caret-color: var(--brand); accent-color: var(--brand); }
* { scrollbar-color: var(--ink-4) var(--bg-alt); scrollbar-width: thin; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--ink-4); border: 3px solid var(--bg-alt); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-2); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: var(--r-xs); }
:where(a) { text-underline-offset: 0.16em; text-decoration-thickness: from-font; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
}

/* ---------- layout ---------- */
.ps-wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.ps-wrap--read { max-width: var(--wrap-read); }
.ps-section { padding-block: clamp(40px, 5.5vw, 76px); }
.ps-section--tight { padding-block: clamp(28px, 3.5vw, 48px); }
.ps-section--alt { background: var(--bg-alt); }
.ps-stack > * + * { margin-top: var(--sp-4); }

.ps-section__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: var(--sp-3) var(--sp-6); margin-bottom: var(--sp-6);
}

/* ---------- type ---------- */
.ps-h1 { font-size: clamp(1.75rem, 3.2vw, 2.75rem); line-height: 1.1; font-weight: 600; letter-spacing: -0.028em; text-wrap: balance; }
.ps-h2 { font-size: clamp(1.375rem, 2.1vw, 1.875rem); line-height: 1.16; font-weight: 600; letter-spacing: -0.022em; text-wrap: balance; }
.ps-h3 { font-size: 1.0625rem; line-height: 1.3; font-weight: 600; letter-spacing: -0.012em; }
.ps-display { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.04; font-weight: 600; letter-spacing: -0.035em; text-wrap: balance; }
.ps-lede { font-size: clamp(1rem, 1.3vw, 1.125rem); line-height: 1.5; color: var(--ink-2); max-width: 52ch; }
.ps-body { max-width: 68ch; color: var(--ink-2); }
.ps-body p + p { margin-top: var(--sp-4); }
.ps-note { font-size: 13px; line-height: 1.5; color: var(--ink-3); }
.ps-rule { border: 0; border-top: 1px solid var(--line); margin-block: var(--sp-8); }
.ps-num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.ps-readout { font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }

a { color: inherit; }
.ps-link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); transition: text-decoration-color var(--dur-fast) var(--ease); }
.ps-link:hover { text-decoration-color: var(--brand); }
.ps-link--quiet { text-decoration: none; }
.ps-link--quiet:hover { text-decoration: underline; }

/* ---------- buttons ----------
   `.button` and `.button--secondary` are the class names Shopify theme app
   blocks reach for when a merchant picks "Theme primary button". Defining them
   here is what lets an installed app wear this shop's own design. */
.ps-btn, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 14px 28px;
  font-family: var(--font); font-size: 14px; font-weight: 600; line-height: 1.2;
  letter-spacing: .01em;
  border: 1px solid var(--ink); border-radius: var(--r-xs);
  background: var(--ink); color: #FFFFFF;
  cursor: pointer; text-decoration: none; text-align: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.ps-btn:hover, .button:hover { background: #2E2B27; border-color: #2E2B27; color: #FFFFFF; }
.ps-btn--outline, .button--secondary {
  background: transparent; color: var(--ink); border-color: var(--ink);
}
.ps-btn--outline:hover, .button--secondary:hover { background: var(--ink); color: #FFFFFF; }
.ps-btn--brand { background: var(--brand); border-color: var(--brand); color: var(--ink); }
.ps-btn--brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #FFFFFF; }
.ps-btn--quiet { background: transparent; color: var(--ink-2); border-color: var(--line); }
.ps-btn--quiet:hover { background: transparent; color: var(--ink); border-color: var(--ink); }
.ps-btn--sm { padding: 9px 16px; font-size: 13px; }
.ps-btn--wide, .button--wide { width: 100%; }
.ps-btn[disabled], .button[disabled], .ps-btn[aria-disabled="true"] {
  background: var(--line-soft); border-color: var(--line); color: var(--ink-4); cursor: not-allowed;
}
.ps-btn[disabled]:hover { background: var(--line-soft); border-color: var(--line); color: var(--ink-4); }

/* ---------- forms ---------- */
.ps-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-5); }
.ps-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.ps-input, .ps-select, .ps-textarea {
  width: 100%; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-xs);
  color: var(--ink);
  transition: border-color var(--dur-fast) var(--ease);
}
.ps-input::placeholder, .ps-textarea::placeholder { color: var(--ink-4); }
.ps-input:hover, .ps-select:hover, .ps-textarea:hover { border-color: var(--ink-4); }
.ps-input:focus, .ps-select:focus, .ps-textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 1px var(--ink); }
.ps-input[aria-invalid="true"] { border-color: var(--sale); }
.ps-error { color: var(--sale); font-size: 13px; }
.ps-empty { padding-block: var(--sp-16); max-width: 46ch; }

/* ---------- announcement + header ---------- */
.ps-announce {
  background: var(--bg-deep); color: #FFFFFF;
  font-size: 12.5px; letter-spacing: .01em;
  text-align: center; padding: 9px var(--gutter);
  text-wrap: balance;
}
/* Two messages on one line wrap mid-figure at phone width, which splits
   "Rs 3,000" across lines and strands the separator. Stack them instead. */
@media (max-width: 719px) {
  .ps-announce { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; line-height: 1.35; }
  .ps-announce__sep { display: none; }
}
.ps-announce a { color: #FFFFFF; text-underline-offset: .2em; }
.ps-announce__sep { opacity: .4; padding-inline: var(--sp-3); }

.ps-header { position: sticky; top: 0; z-index: 60; background: var(--bg); border-bottom: 1px solid var(--line); }
.ps-header__bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--sp-4); min-height: var(--header-h); }
.ps-logo { justify-self: center; font-size: 22px; font-weight: 700; letter-spacing: .3em; text-indent: .3em; text-decoration: none; color: var(--ink); white-space: nowrap; }
.ps-nav { display: flex; align-items: center; gap: clamp(14px, 1.8vw, 28px); }
.ps-nav a { font-size: 13.5px; font-weight: 500; letter-spacing: .02em; text-decoration: none; color: var(--ink); padding-block: 6px; position: relative; }
.ps-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-base) var(--ease);
}
.ps-nav a:hover::after, .ps-nav a[aria-current="page"]::after { transform: scaleX(1); }
.ps-nav a[data-sale] { color: var(--sale); }
.ps-utils { display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-4); }
.ps-iconbtn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px; cursor: pointer; color: var(--ink); text-decoration: none; }
.ps-iconbtn:hover { color: var(--brand-dark); }
.ps-cart-count { font-family: var(--font-num); font-size: 12px; font-weight: 500; }
.ps-burger { display: none; }

.ps-search { border-bottom: 1px solid var(--line); background: var(--bg); padding-block: var(--sp-4); }
.ps-search[hidden] { display: none; }
.ps-search form { display: flex; gap: var(--sp-2); max-width: 620px; margin-inline: auto; }

@media (max-width: 899px) {
  .ps-header__bar { grid-template-columns: auto 1fr auto; }
  .ps-nav { display: none; }
  .ps-nav[data-open="true"] {
    display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-4);
    position: absolute; inset: var(--header-h) 0 auto; padding: var(--sp-5) var(--gutter);
    background: var(--bg); border-bottom: 1px solid var(--line); z-index: 5;
  }
  .ps-burger { display: inline-flex; }
  .ps-logo { justify-self: start; font-size: 19px; }
}

/* ---------- hero ----------
   A split, not a full-bleed banner. A merchant's product photography is shot
   on white at portrait crops, and stretching one of those across a wide banner
   under a scrim turns it into grey mush. The type gets its own ground, the
   photograph keeps its own frame, and neither has to rescue the other. */
.ps-hero { background: var(--bg-alt); }
.ps-hero__in { display: grid; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 860px) { .ps-hero__in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); } }

.ps-hero__say {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: var(--sp-5);
  padding: clamp(36px, 5vw, 88px) var(--gutter);
  order: 2;
}
@media (min-width: 860px) { .ps-hero__say { order: 1; padding-inline: clamp(32px, 5vw, 96px); } }
.ps-hero__say .ps-lede { max-width: 38ch; }

.ps-hero__media { position: relative; order: 1; background: var(--bg); }
@media (min-width: 860px) { .ps-hero__media { order: 2; } }
.ps-hero__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5; }
@media (min-width: 860px) { .ps-hero__media img { aspect-ratio: auto; min-height: 440px; max-height: 64vh; } }

/* ---------- category tiles ---------- */
.ps-tiles { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.ps-tile { position: relative; display: block; overflow: hidden; background: var(--bg-alt); text-decoration: none; }
.ps-tile img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.ps-tile:hover img { transform: scale(1.03); }
.ps-tile__label {
  position: absolute; left: var(--sp-4); bottom: var(--sp-4); z-index: 2;
  background: #FFFFFF; color: var(--ink);
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  padding: 9px 16px;
}

/* ---------- product grid ---------- */
.ps-grid { display: grid; gap: var(--sp-6) var(--sp-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .ps-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .ps-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.ps-card { position: relative; display: flex; flex-direction: column; }
.ps-card__media { position: relative; display: block; overflow: hidden; background: var(--bg-alt); }
.ps-card__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.ps-card:hover .ps-card__media img { transform: scale(1.035); }
.ps-card__badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--sale); color: #FFFFFF;
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  padding: 4px 8px;
}
.ps-card__badge--student { background: var(--brand); color: var(--ink); }
.ps-card__body { padding-top: var(--sp-3); display: flex; flex-direction: column; gap: 4px; }
.ps-card__vendor { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); }
.ps-card__title { font-size: 14px; font-weight: 500; line-height: 1.35; }
.ps-card__title a { text-decoration: none; }
.ps-card__title a::after { content: ""; position: absolute; inset: 0; }
.ps-card__price { display: flex; align-items: baseline; gap: var(--sp-2); font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 14px; }
.ps-was { color: var(--ink-4); text-decoration: line-through; font-size: 12.5px; }
.ps-off { color: var(--sale); font-size: 12.5px; font-weight: 500; }
.ps-card__sizes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.ps-card__sizes span { font-size: 11px; color: var(--ink-4); letter-spacing: .04em; }
.ps-soldout { font-size: 12px; color: var(--ink-4); }

/* ---------- product page ---------- */
.ps-crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--ink-3); padding-block: var(--sp-4); }
.ps-crumbs a { text-decoration: none; }
.ps-crumbs a:hover { text-decoration: underline; }
.ps-crumbs span[aria-hidden] { color: var(--ink-4); }

.ps-pdp { display: grid; gap: clamp(24px, 4vw, 64px); grid-template-columns: 1fr; align-items: start; padding-bottom: var(--sp-16); }
@media (min-width: 960px) { .ps-pdp { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }

.ps-gallery { display: flex; flex-direction: column; gap: var(--sp-3); }
.ps-gallery__main { background: var(--bg-alt); position: relative; }
.ps-gallery__main img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.ps-gallery__thumbs { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.ps-gallery__thumbs button { width: 68px; padding: 0; border: 1px solid transparent; background: var(--bg-alt); cursor: pointer; }
.ps-gallery__thumbs button[aria-current="true"] { border-color: var(--ink); }
.ps-gallery__thumbs img { aspect-ratio: 1; object-fit: cover; }

.ps-pdp__info { display: flex; flex-direction: column; gap: var(--sp-4); }
@media (min-width: 960px) { .ps-pdp__info { position: sticky; top: calc(var(--header-h) + 20px); } }
.ps-pdp__vendor { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); }
.ps-pdp__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--sp-3); font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 500; }
.ps-pdp__tax { font-size: 12.5px; color: var(--ink-3); }

.ps-opt { display: flex; flex-direction: column; gap: var(--sp-2); }
.ps-opt__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }
.ps-opt__head .ps-label span { font-weight: 400; color: var(--ink-3); }
.ps-swatches { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.ps-swatch { position: relative; }
.ps-swatch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ps-swatch span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 48px; height: 42px; padding-inline: 12px;
  border: 1px solid var(--line); font-size: 13.5px; font-weight: 500;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.ps-swatch input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ps-swatch input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.ps-swatch input:disabled + span { color: var(--ink-4); border-color: var(--line-soft); text-decoration: line-through; }

.ps-buy { display: flex; flex-direction: column; gap: var(--sp-3); }
.ps-qtyrow { display: flex; gap: var(--sp-2); }
.ps-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); }
.ps-qty button { border: 0; background: none; padding: 0 12px; height: 46px; cursor: pointer; color: var(--ink-2); display: inline-flex; align-items: center; }
.ps-qty button:hover { color: var(--ink); }
.ps-qty input { width: 44px; border: 0; background: none; text-align: center; font-family: var(--font-num); font-variant-numeric: tabular-nums; height: 46px; }
.ps-qty input::-webkit-outer-spin-button, .ps-qty input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.ps-qtyrow .ps-btn { flex: 1; }

.ps-stock { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); }
.ps-stock__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.ps-stock--low .ps-stock__dot { background: var(--warn); }
.ps-stock--out .ps-stock__dot { background: var(--ink-4); }

/* The slot the student pricing app block drops into. */
.ps-appslot:empty { display: none; }

.ps-acc { border-top: 1px solid var(--line); }
.ps-acc details { border-bottom: 1px solid var(--line); }
.ps-acc summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding-block: var(--sp-4); font-size: 14px; font-weight: 600; }
.ps-acc summary svg { transition: transform var(--dur-base) var(--ease); flex: none; }
.ps-acc details[open] summary svg { transform: rotate(180deg); }
.ps-acc__body { padding-bottom: var(--sp-5); color: var(--ink-2); font-size: 14px; }
.ps-acc__body p + p { margin-top: var(--sp-3); }

/* ---------- promises ---------- */
.ps-promises { display: grid; gap: var(--sp-6); grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.ps-promise { display: flex; gap: var(--sp-3); align-items: flex-start; }
.ps-promise svg { flex: none; color: var(--ink); margin-top: 1px; }
.ps-promise strong { display: block; font-size: 14px; font-weight: 600; }
.ps-promise span { font-size: 13px; color: var(--ink-3); }

/* ---------- student band ---------- */
.ps-student {
  display: grid; gap: var(--sp-5) var(--sp-8); align-items: center;
  grid-template-columns: 1fr;
  background: var(--brand-tint);
  border: 1px solid #FFD9C4;
  padding: clamp(24px, 3.4vw, 44px);
}
@media (min-width: 860px) { .ps-student { grid-template-columns: minmax(0, 1fr) auto; } }
.ps-student__say { display: flex; flex-direction: column; gap: var(--sp-2); }
.ps-student h2 { font-size: clamp(1.25rem, 1.9vw, 1.6rem); font-weight: 600; letter-spacing: -0.02em; }
.ps-student p { color: var(--ink-2); max-width: 56ch; font-size: 14.5px; }

/* ---------- cart ---------- */
.ps-cartrow { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: var(--sp-4); align-items: start; padding-block: var(--sp-5); border-bottom: 1px solid var(--line-soft); }
.ps-cartrow__media { background: var(--bg-alt); }
.ps-cartrow__media img { aspect-ratio: 4 / 5; object-fit: cover; }
.ps-totals { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-6); margin-left: auto; width: min(360px, 100%); }
.ps-totals__row { display: flex; justify-content: space-between; gap: var(--sp-6); font-size: 14px; }
.ps-totals__row--sum { border-top: 1px solid var(--line); padding-top: var(--sp-3); font-size: 17px; font-weight: 600; }
.ps-discount { color: var(--ok); }
@media (max-width: 599px) { .ps-cartrow { grid-template-columns: 72px minmax(0, 1fr); } .ps-cartrow__end { grid-column: 2; } }

/* ---------- newsletter ---------- */
.ps-news { background: var(--bg-deep); color: #FFFFFF; }
.ps-news__in { display: grid; gap: var(--sp-6) var(--sp-10); grid-template-columns: 1fr; align-items: center; padding-block: clamp(36px, 4.5vw, 64px); }
@media (min-width: 860px) { .ps-news__in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.ps-news h2 { font-size: clamp(1.25rem, 2vw, 1.75rem); font-weight: 600; letter-spacing: -0.02em; }
.ps-news p { color: rgba(255,255,255,.72); font-size: 14px; margin-top: var(--sp-2); }
.ps-news form { display: flex; gap: var(--sp-2); }
.ps-news .ps-input { background: transparent; border-color: rgba(255,255,255,.3); color: #FFFFFF; }
.ps-news .ps-input::placeholder { color: rgba(255,255,255,.5); }
.ps-news .ps-input:hover { border-color: rgba(255,255,255,.6); }
.ps-news .ps-input:focus { border-color: #FFFFFF; box-shadow: 0 0 0 1px #FFFFFF; }
.ps-news .ps-btn { background: #FFFFFF; border-color: #FFFFFF; color: var(--ink); }
.ps-news .ps-btn:hover { background: var(--brand); border-color: var(--brand); color: var(--ink); }

/* ---------- footer ---------- */
.ps-footer { border-top: 1px solid var(--line); padding-block: clamp(40px, 5vw, 64px) var(--sp-8); }
.ps-footer__grid { display: grid; gap: var(--sp-8); grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.ps-footer h3 { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin-bottom: var(--sp-4); }
.ps-footer__list { display: flex; flex-direction: column; gap: var(--sp-2); }
.ps-footer__list a { font-size: 13.5px; color: var(--ink-2); text-decoration: none; }
.ps-footer__list a:hover { color: var(--ink); text-decoration: underline; }
.ps-colophon {
  display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-6); justify-content: space-between; align-items: center;
  margin-top: var(--sp-12); padding-top: var(--sp-5); border-top: 1px solid var(--line-soft);
  font-size: 12.5px; color: var(--ink-3);
}
.ps-pay { display: flex; gap: var(--sp-2); align-items: center; }
.ps-pay span {
  font-size: 10px; font-weight: 600; letter-spacing: .06em;
  border: 1px solid var(--line); color: var(--ink-3);
  padding: 4px 7px; border-radius: var(--r-xs);
}

/* ---------- pagination ---------- */
.ps-pagination { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-top: var(--sp-12); padding-top: var(--sp-6); border-top: 1px solid var(--line); }

/* ---------- utility ---------- */
.ps-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ps-skip { position: absolute; left: var(--sp-4); top: -100px; z-index: 100; background: var(--ink); color: #FFF; padding: 12px 20px; text-decoration: none; transition: top var(--dur-fast) var(--ease); }
.ps-skip:focus { top: var(--sp-4); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- containers the secondary templates reach for ---------- */
/* `.ps-btn--primary` is the filled button, which is what `.ps-btn` already is.
   The modifier is kept so the templates that name it keep reading clearly. */
.ps-btn--primary { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.ps-btn--primary:hover { background: #2E2B27; border-color: #2E2B27; }

/* A list with rules instead of card chrome. Rows whose child link already
   carries its own padding are not padded again, or the two stack into a row
   twice as tall as it should be. */
.ps-card-less { display: flex; flex-direction: column; }
.ps-card-less > li,
.ps-card-less > article,
.ps-card-less > div { padding-block: var(--sp-4); border-bottom: 1px solid var(--line-soft); }
.ps-card-less > :first-child { border-top: 1px solid var(--line); }
.ps-card-less > :has(> a[class*="__link"]) { padding-block: 0; }

.ps-page { max-width: var(--wrap-read); }
.ps-page__content { margin-top: var(--sp-5); }

/* Standalone documents: the password gate and the printable gift card have
   their own layout file and never see the shop's header or footer. */
.ps-live,
.ps-password-page,
.ps-gift-card-page {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-6);
  padding: var(--sp-10) var(--gutter);
  text-align: center;
}
.ps-gift-card-page { background: var(--bg-alt); }

/* The hero with no photograph anywhere in the shop. One column, full measure,
   rather than a headline next to an empty white half. */
.ps-hero--flat .ps-hero__in { grid-template-columns: 1fr; }
.ps-hero--flat .ps-hero__say { align-items: flex-start; padding-block: clamp(56px, 8vw, 128px); max-width: var(--wrap); margin-inline: auto; width: 100%; }
.ps-hero--flat .ps-hero__say .ps-lede { max-width: 46ch; }

/* A collection with no image of its own and no products to borrow one from. */
.ps-tile__blank { display: block; aspect-ratio: 4 / 5; background: var(--bg-alt); }

/* ---------- the block showroom ---------- */
/* The SDK swaps these elements with the native hidden property. */
[data-tud-trigger][hidden], .tud-applied[hidden] { display: none !important; }
.ps-showcase { --ways-gap: clamp(24px, 3vw, 48px); }
.ps-showcase [id^="ways-"] { scroll-margin-top: calc(var(--header-h) + var(--sp-6)); }
.ps-ways-hero { background: var(--bg-alt); }
.ps-ways-hero__in { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ways-gap); align-items: center; }
.ps-ways-hero__say { padding-block: var(--sp-12); }
.ps-ways-hero h1 { max-width: 17ch; }
.ps-ways-hero .ps-lede { margin-top: var(--sp-5); max-width: 45ch; }
.ps-ways-hero__media { align-self: stretch; min-width: 0; }
.ps-ways-hero__media > img { width: 100%; height: 100%; max-height: 680px; object-fit: cover; object-position: center 40%; }
.ps-ways-product { display: grid; gap: var(--sp-3); margin-top: var(--sp-8); max-width: 400px; }
.ps-ways-product h2 a { text-decoration: none; }
.ps-ways-product__form { margin-top: var(--sp-2); }
.ps-ways-product .ps-note { font-size: 13px; }
.ps-ways-nav { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-8); padding-block: var(--sp-4); border-bottom: 1px solid var(--line); }
.ps-ways-nav a { display: inline-flex; align-items: center; gap: var(--sp-2); padding-block: var(--sp-2); color: var(--ink-2); font-size: 14px; text-decoration: none; }
.ps-ways-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .25em; }
.ps-ways-chapter { padding-block: var(--sp-12); }
.ps-ways-heading { margin-bottom: var(--sp-6); }
.ps-ways-heading .ps-note { max-width: 70ch; margin-top: var(--sp-3); }
.ps-ways { display: grid; gap: var(--sp-6); }
.ps-ways--buttons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ps-way { min-width: 0; }
.ps-way__stage { display: flex; flex-direction: column; justify-content: center; min-height: 112px; padding-block: var(--sp-5); }
.ps-ways--buttons .ps-way__stage { background: var(--bg-alt); padding: var(--sp-4); min-height: 132px; }
.ps-ways--buttons [data-tud-trigger] { max-width: 100%; }
.ps-way__say { display: flex; flex-direction: column; gap: var(--sp-2); padding-top: var(--sp-4); }
.ps-way__say .ps-note { font-size: 14px; }
.ps-way__set { font-family: var(--font-num); font-size: 12px; line-height: 1.65; color: var(--ink-2); overflow-wrap: anywhere; }
.ps-way__say .ps-way__set { margin-top: var(--sp-2); }
.ps-ways-defaults { margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; max-width: 100ch; }
.ps-ways-band { background: var(--bg-alt); }
.ps-ways--alignment { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ps-ways--alignment .ps-way, .ps-ways--branding .ps-way { background: var(--bg); padding: var(--sp-5); }
.ps-way--full { grid-column: 1 / -1; }
.ps-way--full .ps-way__stage { min-height: 100px; }
.ps-ways--banners, .ps-ways--branding { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ps-ways--banners .ps-way > [data-tud-widget] > div { min-height: 218px; }
.ps-ways-recipe { border-top: 1px solid var(--line); margin-top: var(--sp-3); font-size: 13px; }
.ps-ways-recipe summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding-block: var(--sp-3); }
.ps-ways-recipe dl { display: grid; grid-template-columns: 140px 1fr; gap: var(--sp-2) var(--sp-4); padding-bottom: var(--sp-4); }
.ps-ways-recipe dt { color: var(--ink-3); }
.ps-showcase code, .ps-showcase pre { font-family: var(--font-num); }
.ps-ways-applied { display: grid; grid-template-columns: .85fr 1fr 1fr; gap: var(--sp-6); padding-top: var(--sp-8); margin-top: var(--sp-8); border-top: 1px solid var(--line); }
.ps-ways-applied > div .ps-note { margin-top: var(--sp-3); }
.ps-ways-state { min-width: 0; }
.ps-ways-state .ps-way__stage { min-height: 108px; }
.ps-ways-state .ps-way__set { margin-top: var(--sp-4); }
/* A two-state preview switch.

   Both states are named and one is selected, because the reader's question in
   front of a demo is "what else could this look like", and a single button
   that flips answers it only after they press it. Set in the numeral face,
   which is what this system uses for machine state, so it reads as a readout
   and never as a call to action. It sits flush under the stage it belongs to,
   borders merged, so there is no doubt what it controls. */
.ps-statepick {
  display: inline-flex;
  margin-top: -1px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  overflow: hidden;
}
.ps-statepick__opt {
  appearance: none;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: var(--ink-4);
  font-family: var(--font-num);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.ps-statepick__opt + .ps-statepick__opt { border-left: 1px solid var(--line); }
.ps-statepick__opt:hover { color: var(--ink-2); }
.ps-statepick__opt[aria-pressed="true"] {
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
}
.ps-statepick__opt:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

/* The applied message is a line the widget renders, so it needs a surface to
   render on. Left on the band it floats directly under the real heading and
   reads as a second one. */
.ps-ways-state .ps-way__stage {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: var(--sp-5);
  justify-content: center;
}
.ps-ways-state .tud-applied { font-size: 15px; }

/* ---------- what custom CSS can reach ---------- */
.ps-cssgrid { display: grid; gap: var(--sp-5); grid-template-columns: 1fr; }
@media (min-width: 860px) { .ps-cssgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ps-cssdemo { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--bg); }
.ps-cssdemo__stage {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 116px; padding: var(--sp-5);
  border-bottom: 1px solid var(--line);
}
.ps-cssdemo__code {
  /* Grows to fill, so three rules of different lengths still leave their
     captions on one line across the row. */
  flex: 1;
  margin: 0; padding: var(--sp-4) var(--sp-5);
  background: var(--bg-deep); color: #FFFFFF;
  font-family: var(--font-num); font-size: 11.5px; line-height: 1.65;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.ps-cssdemo__say { padding: var(--sp-4) var(--sp-5) var(--sp-5); display: flex; flex-direction: column; gap: 4px; }
.ps-ways-code { display: grid; grid-template-columns: .85fr 1.15fr; }
.ps-ways-code__preview { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-6); padding: var(--sp-8); background: var(--bg-alt); }
.ps-ways-code__preview > [data-tud-widget] { margin-block: var(--sp-6); font-size: 20px; line-height: 1.5; }
.ps-ways-code__source { background: var(--bg-deep); color: var(--bg); padding: var(--sp-8); min-width: 0; }
.ps-ways-code__source pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.65; margin-block: var(--sp-4) var(--sp-6); }
.ps-ways-code__source pre:last-child { margin-bottom: 0; }
.ps-ways-code__source .ps-h3 { color: var(--brand); }
.ps-ways-placements { padding-top: var(--sp-5); }
.ps-where { display: grid; grid-template-columns: .7fr 1.3fr; gap: var(--ways-gap); border-top: 1px solid var(--line); padding-block: var(--sp-8); align-items: center; }
.ps-where__say { display: grid; gap: var(--sp-3); max-width: 38ch; }
.ps-where__stage { display: grid; gap: var(--sp-4); padding: var(--sp-6); background: var(--bg-alt); min-width: 0; }
.ps-where__stage--home { background: var(--bg); border: 1px solid var(--line); }
.ps-where__stage--home > .ps-note { margin-top: calc(-1 * var(--sp-2)); }
.ps-ways-products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
.ps-ways-products a { text-decoration: none; min-width: 0; font-size: 13px; }
.ps-ways-products img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: var(--sp-2); }
.ps-ways-products span { display: block; }
.ps-ways-products .ps-num { font-size: 12px; margin-top: var(--sp-1); }
.ps-where__stage--cart { grid-template-columns: 1fr 1fr; align-items: center; gap: var(--sp-6); }
.ps-where__stage--cart .ps-note { margin-top: var(--sp-3); }
.ps-ways-cart-actions { display: grid; gap: var(--sp-4); }
.ps-ways-footnote { margin-top: var(--sp-4); padding-top: var(--sp-6); border-top: 1px solid var(--line); max-width: 75ch; color: var(--ink-2); }
@media (max-width: 1099px) {
  .ps-ways--buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-ways-applied { grid-template-columns: 1fr 1fr; }
  .ps-ways-applied > div { grid-column: 1 / -1; max-width: 65ch; }
  .ps-where__stage--cart { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  .ps-ways-hero__in { grid-template-columns: 1fr; gap: 0; }
  .ps-ways-hero__say { padding-block: var(--sp-8); }
  .ps-ways-hero h1 { max-width: 22ch; }
  .ps-ways-hero__media { max-height: 340px; overflow: hidden; }
  .ps-ways-hero__media > img { height: 340px; object-position: center 35%; }
  .ps-ways--alignment { grid-template-columns: 1fr; }
  .ps-ways--alignment .ps-way { padding-block: var(--sp-4); }
  .ps-ways-code, .ps-where { grid-template-columns: 1fr; }
  .ps-where__say { max-width: 65ch; }
}
@media (max-width: 599px) {
  .ps-ways-chapter { padding-block: var(--sp-8); }
  .ps-ways--buttons, .ps-ways--banners, .ps-ways--branding, .ps-ways-applied { grid-template-columns: 1fr; }
  .ps-ways-nav { gap: 0 var(--sp-5); }
  .ps-ways-nav a { min-height: 44px; font-size: 13px; }
  .ps-ways--buttons { gap: var(--sp-6); }
  .ps-ways--buttons .ps-way__stage { min-height: 108px; }
  .ps-ways-recipe dl { grid-template-columns: 1fr; }
  .ps-ways-recipe dd { margin-bottom: var(--sp-2); }
  .ps-ways-code__preview, .ps-ways-code__source, .ps-where__stage { padding: var(--sp-5); }
  .ps-ways-hero__media { display: none; }
  .ps-ways-product { max-width: none; }
  .ps-ways-products { gap: var(--sp-2); }
  .ps-ways-products a { font-size: 12px; }
}

/* A way home from a page that wears someone else's shopfront. Same corner the
   walkthrough switch uses elsewhere, because only one of them is ever present. */
.ps-backlink {
  position: fixed;
  right: clamp(14px, 2.4vw, 26px);
  bottom: clamp(14px, 2.4vw, 26px);
  z-index: 70;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  background: var(--ink); color: #FFFFFF;
  border-radius: var(--r-pill);
  box-shadow: 0 6px 20px rgba(20, 20, 18, .24);
  font-size: 13.5px; font-weight: 600;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.ps-backlink:hover { background: var(--brand); color: var(--ink); transform: translateY(-1px); }
.ps-backlink svg { flex: none; }
