/* Shop — Inkforge field (aligned with a61-style / catalog / help) */

.page-shop {
  --tf-ink: var(--ink, #0A0A0A);
  --tf-mute: var(--muted, #5C6478);
  --tf-ivory: var(--paper, #F4F5F8);
  --tf-paper: var(--white, #FFFFFF);
  --tf-cobalt: var(--cobalt, #1B4DFF);
  --tf-volt: var(--volt, #C8FF00);
  --tf-signal: var(--signal, #FF3D00);
  --tf-moss: var(--cobalt, #1B4DFF);
  --tf-moss-soft: rgba(27, 77, 255, 0.12);
  --tf-mango: var(--signal, #FF3D00);
  --tf-mango-soft: rgba(255, 61, 0, 0.12);
  --tf-lagoon: var(--cobalt, #1B4DFF);
  --tf-lagoon-soft: rgba(200, 255, 0, 0.18);
  --tf-clay: var(--ink, #0A0A0A);
  --tf-clay-soft: rgba(10, 10, 10, 0.06);
  --tf-line: var(--ink, #0A0A0A);
  --tf-display: var(--display, "Bricolage Grotesque", "Arial Black", sans-serif);
  --tf-sans: var(--sans, "IBM Plex Sans", "Segoe UI", sans-serif);
  --tf-mono: var(--mono, "IBM Plex Mono", ui-monospace, monospace);
  --tf-ease: var(--ease, cubic-bezier(0.2, 0.85, 0.25, 1));
  --tf-border: var(--border, 3px solid #0A0A0A);
  --tf-border-thin: var(--border-thin, 2px solid #0A0A0A);
  --tf-shadow: var(--shadow, 6px 6px 0 #0A0A0A);
  --tf-shadow-sm: var(--shadow-sm, 3px 3px 0 #0A0A0A);
  --tf-sticky-top: calc(var(--ticker-h, 34px) + var(--mast-h, 76px) + 0.55rem);
}

.page-shop .a61-stage,
.page-shop .page-main {
  background: transparent !important;
  color: var(--tf-ink) !important;
  font-family: var(--tf-sans);
}

.page-shop .page-main {
  max-width: none;
  padding: 0;
}

.page-shop .a61-aisle-rail,
.page-shop .a61-mob-bar {
  display: none !important;
}

.page-shop .page-main h1,
.page-shop .page-main h2,
.page-shop .page-main p,
.page-shop .page-main span,
.page-shop .page-main a,
.page-shop .page-main strong,
.page-shop .page-main em,
.page-shop .page-main button {
  color: inherit;
}

.page-shop .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;
}

.tf-market {
  position: relative;
  isolation: isolate;
  padding: clamp(1.15rem, 3vw, 2.25rem) clamp(1rem, 3.2vw, 2.75rem) 3.5rem;
  overflow-x: clip;
  background:
    linear-gradient(90deg, transparent 79px, rgba(10, 10, 10, 0.04) 79px, rgba(10, 10, 10, 0.04) 80px, transparent 80px),
    linear-gradient(0deg, transparent 79px, rgba(10, 10, 10, 0.04) 79px, rgba(10, 10, 10, 0.04) 80px, transparent 80px),
    radial-gradient(ellipse 42% 28% at 100% 0%, rgba(27, 77, 255, 0.12), transparent 55%),
    radial-gradient(ellipse 36% 26% at 0% 8%, rgba(200, 255, 0, 0.16), transparent 50%),
    var(--tf-ivory);
  background-size: 80px 80px, 80px 80px, auto, auto, auto;
}

.tf-wash {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.tf-blob {
  display: none;
}

.tf-market > *:not(.tf-wash) {
  position: relative;
  z-index: 1;
}

.tf-board {
  display: grid;
  grid-template-columns: minmax(11rem, 14rem) minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  grid-template-areas:
    "hero hero"
    "dial seek"
    "dial field";
  gap: 1rem 1.15rem;
  align-items: start;
  width: min(1240px, 100%);
  margin-inline: auto;
}

.tf-hero { grid-area: hero; }
.tf-seek { grid-area: seek; }
.tf-dial { grid-area: dial; }
.tf-field { grid-area: field; min-width: 0; }

.tf-eyebrow {
  margin: 0 0 0.4rem;
  font-family: var(--tf-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tf-cobalt);
}

.tf-hero h1 {
  margin: 0 0 0.55rem;
  font-family: var(--tf-display);
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
  max-width: 14ch;
  text-transform: uppercase;
}

.tf-dek {
  margin: 0;
  color: var(--tf-mute);
  font-size: 1.02rem;
  line-height: 1.5;
  max-width: 38rem;
}

.tf-dek strong {
  color: var(--tf-ink);
  font-variant-numeric: tabular-nums;
  background: var(--tf-volt);
  padding: 0 0.18em;
}

/* Search */
.tf-seek {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  background: var(--tf-paper);
  border: var(--tf-border);
  box-shadow: var(--tf-shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s var(--tf-ease);
}

.tf-seek:focus-within {
  box-shadow: var(--tf-shadow);
  transform: translate(-1px, -1px);
}

.tf-seek input {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0.95rem 1.1rem !important;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--tf-ink) !important;
  outline: none;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.tf-seek input::placeholder {
  color: var(--tf-mute);
  opacity: 0.85;
}

.tf-seek button {
  border: 0;
  border-left: var(--tf-border-thin);
  background: var(--tf-cobalt);
  color: #fff;
  padding: 0 1.35rem;
  font-family: var(--tf-mono);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.tf-seek button:hover {
  background: var(--tf-ink);
  color: #fff;
}

/* Aisle dial */
.tf-dial {
  position: sticky;
  top: var(--tf-sticky-top);
  align-self: start;
  max-height: calc(100vh - var(--tf-sticky-top) - 1rem);
  overflow: auto;
  scrollbar-width: thin;
  padding-bottom: 0.25rem;
}

.tf-dial-label {
  margin: 0 0 0.65rem;
  font-family: var(--tf-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tf-mute);
}

.tf-dial-stack {
  display: grid;
  gap: 0.45rem;
}

.tf-slab {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: center;
  padding: 0.8rem 0.9rem;
  background: var(--tf-paper);
  border: var(--tf-border);
  color: var(--tf-ink);
  box-shadow: var(--tf-shadow-sm);
  transition: transform 0.2s var(--tf-ease), background 0.2s, color 0.2s, box-shadow 0.2s;
  animation: tf-slab-in 0.4s var(--tf-ease) both;
  animation-delay: calc(var(--slab, 0) * 40ms);
}

.tf-slab em {
  font-style: normal;
  font-family: var(--tf-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--tf-mute);
}

.tf-slab strong {
  font-family: var(--tf-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tf-slab:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--tf-shadow);
  background: #fff;
}

.tf-slab,
.tf-page,
.tf-reset,
.tf-tile-media {
  text-decoration: none;
  color: inherit;
}

.tf-slab.is-on {
  background: var(--tf-ink);
  color: #fff;
  box-shadow: var(--tf-shadow);
}

.tf-slab.is-on em { color: var(--tf-volt); }

@keyframes tf-slab-in {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: none; }
}

/* Product mosaic */
.tf-mosaic {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: stretch;
}

.tf-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  grid-column: span 1;
  grid-row: span 1;
  background: var(--tf-paper);
  border: var(--tf-border);
  box-shadow: var(--tf-shadow-sm);
  overflow: hidden;
  transition: transform 0.2s var(--tf-ease), box-shadow 0.2s;
  animation: tf-tile-in 0.45s var(--tf-ease) both;
  animation-delay: calc(min(var(--ti, 0), 12) * 30ms);
}

@keyframes tf-tile-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.tf-tile--lead {
  grid-column: span 2;
  grid-row: span 1;
}

.tf-tile--tall,
.tf-tile--std {
  grid-column: span 1;
  grid-row: span 1;
}

.tf-tile:hover {
  z-index: 2;
  transform: translate(-3px, -3px);
  box-shadow: var(--tf-shadow);
}

.tf-tile-media {
  position: relative;
  display: block;
  aspect-ratio: 1;
  width: 100%;
  overflow: hidden;
  background: var(--tf-moss-soft);
  border-bottom: var(--tf-border-thin);
}

.tf-tile--lead .tf-tile-media {
  aspect-ratio: 16 / 11;
}

.tf-tile--tall .tf-tile-media {
  aspect-ratio: 4 / 5;
}

.tf-tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--tf-ease);
}

.tf-tile:hover .tf-tile-media img {
  transform: scale(1.05);
}

.tf-tile-flag {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  padding: 0.3rem 0.55rem;
  background: var(--tf-volt);
  color: var(--tf-ink);
  border: var(--tf-border-thin);
  font-family: var(--tf-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tf-tile-meta {
  padding: 0.9rem 1rem 1.05rem;
  display: grid;
  gap: 0.3rem;
  background: var(--tf-paper);
}

.tf-tile-aisle {
  font-family: var(--tf-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tf-cobalt);
}

.tf-tile-meta h2 {
  margin: 0;
  font-family: var(--tf-display);
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-transform: uppercase;
}

.tf-tile-meta h2 a {
  color: inherit;
  text-decoration: none;
}

.tf-tile-meta h2 a:hover {
  color: var(--tf-cobalt);
}

.tf-tile--lead .tf-tile-meta h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
}

.tf-tile-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-top: 0.35rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(10, 10, 10, 0.12);
}

.tf-tile-bar strong {
  font-family: var(--tf-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.tf-tile-bar span {
  font-family: var(--tf-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--tf-mute);
}

.tf-tone-moss .tf-tile-media { background: var(--tf-moss-soft); }
.tf-tone-mango .tf-tile-media { background: var(--tf-mango-soft); }
.tf-tone-lagoon .tf-tile-media { background: var(--tf-lagoon-soft); }
.tf-tone-clay .tf-tile-media { background: var(--tf-clay-soft); }

.tf-empty {
  display: grid;
  gap: 1rem;
  justify-items: start;
  padding: 2rem 1.35rem;
  background: var(--tf-paper);
  border: var(--tf-border);
  box-shadow: var(--tf-shadow-sm);
}

.tf-empty strong {
  font-family: var(--tf-display);
  font-size: 1.35rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--tf-ink);
}

.tf-reset {
  display: inline-flex;
  padding: 0.7rem 1.15rem;
  background: var(--tf-cobalt);
  color: #fff;
  border: var(--tf-border);
  box-shadow: var(--tf-shadow-sm);
  font-family: var(--tf-sans);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.2s var(--tf-ease), background 0.2s, box-shadow 0.2s;
}

.tf-reset:hover {
  background: var(--tf-ink);
  color: #fff;
  transform: translate(-2px, -2px);
  box-shadow: var(--tf-shadow);
}

/* Pagination */
.tf-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.75rem;
}

.tf-page {
  min-width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  background: var(--tf-paper);
  border: var(--tf-border);
  box-shadow: var(--tf-shadow-sm);
  font-family: var(--tf-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: transform 0.2s var(--tf-ease), background 0.2s, color 0.2s, box-shadow 0.2s;
  animation: tf-slab-in 0.35s var(--tf-ease) both;
  animation-delay: calc(var(--pi, 1) * 18ms);
}

.tf-page:hover {
  transform: translate(-2px, -2px);
  background: var(--tf-volt);
  box-shadow: var(--tf-shadow);
}

.tf-page.is-on {
  background: var(--tf-ink);
  color: #fff;
  border-color: var(--tf-ink);
  box-shadow: var(--tf-shadow);
}

@media (max-width: 980px) {
  .tf-board {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "seek"
      "dial"
      "field";
  }

  .tf-dial {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .tf-dial-stack {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.35rem;
    scroll-snap-type: x proximity;
  }

  .tf-slab {
    flex: 0 0 auto;
    min-width: 8.5rem;
    scroll-snap-align: start;
  }

  .tf-slab:hover {
    transform: none;
  }

  .tf-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tf-tile--lead {
    grid-column: span 2;
  }

  .tf-tile--tall,
  .tf-tile--std {
    grid-column: span 1;
  }

  .tf-tile--lead .tf-tile-media {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 560px) {
  .tf-hero h1 {
    max-width: none;
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .tf-mosaic {
    grid-template-columns: 1fr;
  }

  .tf-tile--lead,
  .tf-tile--tall,
  .tf-tile--std {
    grid-column: span 1;
  }

  .tf-tile--lead .tf-tile-media,
  .tf-tile--tall .tf-tile-media {
    aspect-ratio: 1;
  }

  .tf-tile:hover {
    transform: none;
  }

  .tf-pager {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tf-slab,
  .tf-tile,
  .tf-page {
    animation: none !important;
  }

  .tf-tile,
  .tf-slab,
  .tf-page,
  .tf-reset {
    opacity: 1;
    transform: none !important;
  }

  .tf-tile:hover {
    transform: none;
  }
}
