/* Server-rendered browse and find pages (src/seo_views.py). Loaded after styles.css: they reuse its tokens,
   masthead, buttons, chips, cards, facts and offers, and only add the page layout around them. */

/* ---------- Site links under the masthead ---------- */

.seo-nav { border-bottom: 1px solid var(--rule); }
.seo-nav ul {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px;
  margin: 0; padding: 0 0 6px; list-style: none;
}
.seo-nav a {
  display: inline-flex; align-items: center; min-height: 36px;
  color: var(--graphite); font-size: var(--t-s); font-weight: 650; text-decoration: none;
}
.seo-nav a:hover { color: var(--ink); text-decoration: underline; }
.seo-nav a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; }

/* ---------- Page head ---------- */

.seo-main { padding-top: 6px; }
.seo-crumbs ol {
  display: flex; flex-wrap: wrap; align-items: baseline;
  margin: 12px 0 0; padding: 0; list-style: none;
  font-size: var(--t-s); color: var(--graphite);
}
.seo-crumbs li { min-width: 0; overflow-wrap: anywhere; }
.seo-crumbs li + li::before { content: '/'; margin: 0 8px; color: var(--line-soft); }
.seo-crumbs a { display: inline-block; padding: 4px 0; }
.seo-crumbs [aria-current] { color: var(--ink); font-weight: 600; }

.seo-head { margin-top: 14px; }
/* Same display face as a video title in the app: condensed, heavy, tight. */
.seo-title {
  margin: 0; font-size: clamp(2.25rem, 1.6rem + 3vw, 3.5rem); font-stretch: 62%; font-weight: 800;
  line-height: 0.95; overflow-wrap: anywhere;
}
.seo-intro { max-width: 65ch; margin: 10px 0 0; font-size: var(--t-m); }
.seo-head .fine { max-width: 65ch; }
.seo-cta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }

.seo-cats { margin-top: 16px; }
/* Chip counts carry visually hidden text (.vh, position: absolute). The list must be its containing block: on phones
   it is the horizontal scroller, and a scroller only clips absolute descendants it contains, so without this the
   hidden text keeps its place far right in the strip and widens the whole page. */
.seo-main .chips { position: relative; }
.seo-results { margin-top: 20px; }
.seo-empty { max-width: 60ch; margin: 20px 0 0; padding-top: 16px; border-top: 2px solid var(--ink); }
.seo-empty a, .seo-notes .fine a { font-weight: 650; }

/* ---------- Cards ---------- */

.seo-card-figure { position: relative; margin: 0; }
/* A photo with a preview copy is wrapped in <picture>; the <img> still fills the square as in the app. */
.card-media > picture { display: contents; }
/* Archive photos say so on the photo itself; a dark tag keeps it legible over any picture, in both themes. */
.seo-photo-tag {
  position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px);
  padding: 2px 6px; border-radius: 3px; background: rgb(0 0 0 / 0.72); color: #ffffff;
  font-size: 0.6875rem; font-weight: 650; line-height: 1.35; pointer-events: none;
}
.seo-badge {
  align-self: flex-start; margin: 10px 0 0; padding: 0 5px;
  border: 1px solid var(--line-soft); border-radius: 3px;
  font-size: var(--t-xs); font-weight: 650; line-height: 1.5;
}
.seo-badge + .card-title { margin-top: 6px; }
.seo-card .card-price { margin-top: 6px; }
/* As in the app, the whole card opens the find; the title is the link's text. */
.seo-card-link { color: inherit; text-decoration: none; }
.seo-card-link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius-media); }
.seo-card-link:focus-visible { outline: none; }
.seo-card-link:focus-visible::after { outline: 3px solid var(--ink); outline-offset: 4px; }

/* ---------- Pagination ---------- */

.seo-pager {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px;
  margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--rule);
}
.seo-pager-prev { justify-self: start; }
.seo-pager-next { justify-self: end; }
.seo-pager .icon { width: 16px; height: 16px; }
.seo-pager-status { margin: 0; font-size: var(--t-s); color: var(--graphite); font-variant-numeric: tabular-nums; text-align: center; }
@media (max-width: 379px) { .seo-pager .btn { padding: 0 10px; } }

/* ---------- Find page ---------- */

.seo-product { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.seo-product-media { width: 100%; max-width: 560px; }
@media (min-width: 760px) {
  .seo-product { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 32px; }
  /* The photo stays in view next to a long listing. */
  .seo-product-media { position: sticky; top: 16px; }
}
@media (min-width: 1200px) { .seo-product { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: 48px; } }
.seo-product-media .sheet-media { aspect-ratio: 1; }
.seo-product-media .sheet-media.is-empty { aspect-ratio: 5 / 2; }

.seo-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }
.seo-badges li {
  padding: 0 6px; border: 1px solid var(--line-soft); border-radius: 3px;
  font-size: var(--t-xs); font-weight: 650; line-height: 1.6;
}
.seo-product-title {
  margin: 0 0 8px; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); font-stretch: 100%; font-weight: 750;
  line-height: 1.12; letter-spacing: -0.01em;
}
.seo-product-body .sheet-price.is-unknown { font-size: var(--t-m); font-weight: 650; }
.seo-product-body .sheet-buy { margin-bottom: 6px; }
.seo-open-app { margin-top: 14px; }
.seo-facts { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: var(--t-s); }
.seo-description { max-width: 65ch; margin: 16px 0 0; white-space: pre-line; overflow-wrap: anywhere; }

.seo-section { margin-top: 36px; padding-top: 16px; border-top: 2px solid var(--ink); }
.seo-section-title { margin: 0 0 12px; font-size: var(--t-xl); font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; }
.seo-section > .fine:first-of-type { max-width: 65ch; margin-top: 0; }
.seo-section .chips { margin-top: 4px; }

@media (min-width: 760px) { .seo-section .offer-list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); } }
.seo-offer .offer-actions { display: flex; flex-wrap: wrap; }
.offer-price.is-unknown { font-size: var(--t-s); font-weight: 500; color: var(--graphite); }

.seo-videos .video-name { display: inline-flex; align-items: baseline; gap: 6px; color: var(--ink); overflow-wrap: anywhere; }
.seo-videos .icon { width: 0.6em; height: 0.6em; }

.seo-notes-list { display: grid; gap: 8px; max-width: 70ch; margin: 0 0 12px; padding: 0 0 0 1.1em; }
.seo-notes-list li::marker { color: var(--graphite); }

/* ---------- Missing page ---------- */

.seo-missing { padding-bottom: 8px; }
.seo-missing .seo-intro { color: var(--graphite); }
