/*
 * Product, intent and guide pages (templates in app/product/templates/site/seo/).
 * Loaded after site.css, which owns the shell, the home page and the shared components (.steps, .keepsakes,
 * .button-cta, the sample pair). Every rule here is scoped to .seo-page (set by site/seo/base.html), so the home,
 * information and studio pages are untouched.
 *
 * Layout language: a hero that pairs the heading and one action with a large image; then full-width bands separated
 * by a hairline, each either a split heading, a text-and-image row, two or three text columns, an image gallery or
 * a closing call to action. Art is 4:5, scenes 4:3, always object-fit: cover with a 4px radius.
 */

.seo-page {
  --seo-gap: clamp(2.5rem, 6vw, 4.5rem);
  --seo-col-gap: clamp(1.75rem, 4.5vw, 4rem);
}
.seo-page h2 { color: var(--brand); }
.seo-page p.seo-copy { margin: 0 0 1rem; max-width: 66ch; }
.seo-page p.seo-copy:last-child { margin-bottom: 0; }

/* ---------- Breadcrumbs ---------- */
.seo-page .seo-crumbs { margin: -1rem 0 0.25rem; }
.seo-page .seo-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0; margin: 0; padding: 0; list-style: none; font-size: 0.875rem; color: var(--ink-muted); }
.seo-page .seo-crumbs li { display: inline-flex; align-items: center; min-height: 44px; }
.seo-page .seo-crumbs li + li::before { content: "/"; margin: 0 0.6rem; color: var(--border-strong); }
.seo-page .seo-crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-muted); text-underline-offset: 0.2em; }
.seo-page .seo-crumbs a:hover { color: var(--ink); }

/* ---------- Intent and guide hero ---------- */
.seo-hero { display: grid; gap: 2rem var(--seo-col-gap); align-items: center; margin: 0.5rem 0 0; }
.seo-hero h1 { margin: 0 0 1rem; font-size: clamp(2.1rem, 1.5rem + 2.1vw, 3.1rem); }
.seo-hero .lead { margin: 0 0 1.75rem; max-width: 34rem; }
.seo-hero-text > :last-child { margin-bottom: 0; }
.seo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin: 0; }
.seo-hero .notice { margin: 1.5rem 0 0; max-width: 34rem; }
.seo-hero-media { margin: 0; }
.seo-hero-media > img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; max-height: 36rem; object-fit: cover; border-radius: 4px; background: var(--paper-deep); }
.seo-hero-media--landscape > img { aspect-ratio: 5 / 4; }
.seo-hero-media > figcaption { margin-top: 0.65rem; font-size: 0.9rem; color: var(--ink-muted); }
@media (min-width: 56rem) {
  .seo-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .seo-hero--pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
}

/* ---------- Product hero: image and buy box ---------- */
.pdp { display: grid; gap: 1.75rem var(--seo-col-gap); align-items: start; margin: 0.5rem 0 0; }
.pdp-media { margin: 0; }
.pdp-media img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 4px; }
/* The ornament photos are square: show the whole disc, name and year. */
.pdp-media--ornament img { aspect-ratio: 1 / 1; object-fit: cover; }
@media (min-width: 56rem) {
  .pdp { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .pdp-media img { aspect-ratio: 4 / 5; max-height: 44rem; }
  .pdp-media--ornament img { aspect-ratio: 1 / 1; }
  .pdp-buy { position: sticky; top: 1.5rem; padding-top: 0.5rem; }
}
.pdp-buy h1 { font-size: clamp(2.1rem, 1.6rem + 1.8vw, 3rem); margin: 0 0 0.75rem; }
.pdp-buy .lead { margin: 0 0 1.5rem; max-width: 30rem; }
.seo-page .seo-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.75rem; margin: 0 0 0.3rem; font-size: 1.05rem; color: var(--ink-muted); }
.seo-page .seo-price .price { font-family: var(--font-display); font-weight: 400; font-size: 2.1rem; line-height: 1.1; color: var(--ink); }
.pdp-includes { margin: 0 0 1.5rem; font-size: 1rem; color: var(--ink-muted); }
.pdp-cta { width: 100%; }
.pdp-next { margin: 0.75rem 0 0; font-size: 1rem; color: var(--ink-muted); }
.pdp-buy .notice { margin: 1.25rem 0 0; }

/* Option chips: real links to each variant; the current one is filled. */
.seo-page .seo-options { margin: 0 0 1.5rem; }
.seo-page .seo-options-label { margin: 0 0 0.5rem; font-size: 1rem; font-weight: 600; color: var(--ink); }
.seo-page .seo-options ul { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.seo-page .seo-options a {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 48px; padding: 0.55rem 1.1rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-button); background: var(--surface);
  color: var(--ink); font-weight: 600; text-decoration: none; transition: border-color 0.15s, background-color 0.15s;
}
.seo-page .seo-options a:hover { border-color: var(--ink); color: var(--ink); }
.seo-page .seo-options a[aria-current] { border-color: var(--brand); background: var(--brand); color: var(--brand-contrast); }
.seo-option-price { font-weight: 400; color: var(--ink-muted); }
.seo-page .seo-options a[aria-current] .seo-option-price { color: var(--on-deep-muted); }
.seo-swatch { flex: none; width: 1.1rem; height: 1.1rem; border-radius: 1px; border: 1px solid rgb(43 36 32 / 35%); }
.seo-swatch--black { background: #1f1b19; }
.seo-swatch--white { background: #ffffff; }
.seo-swatch--oak { background: #b98b5c; }
.seo-page .seo-options a[aria-current] .seo-swatch { border-color: rgb(246 238 230 / 65%); }

/* ---------- Bands ---------- */
.seo-band { margin-top: var(--seo-gap); padding-top: var(--seo-gap); border-top: 1px solid var(--border); }
.seo-band h2 { margin: 0 0 0.9rem; }
.seo-band > h2:first-child { margin-bottom: 0; }

/* Split heading: the heading on the left, its short paragraph on the right */
.seo-head { display: grid; gap: 0.25rem var(--seo-col-gap); margin: 0 0 clamp(1.75rem, 4vw, 2.5rem); }
@media (min-width: 52rem) {
  .seo-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: start; }
  .seo-head h2 { margin: 0; }
}

/* Text beside an image */
.seo-row { display: grid; gap: 1.75rem var(--seo-col-gap); align-items: center; }
.seo-row-text h2 { margin-top: 0; }
@media (min-width: 52rem) {
  .seo-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .seo-row--media-first { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .seo-row--media-first > .seo-row-media { order: -1; }
}
.seo-media { margin: 0; }
.seo-media > img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; background: var(--paper-deep); }
.seo-media--portrait > img { aspect-ratio: 4 / 5; max-height: 34rem; }
.seo-media--hand > img { aspect-ratio: 1 / 1; }
.seo-media--ornament > img { aspect-ratio: 1 / 1; }

/* The product cards (macro in _parts.html) sit inside a band, so the band sets their spacing */
.seo-page .seo-keepsakes { margin: 0; }

/* The photo-to-portrait pair (macro in _parts.html), wherever it sits on these pages */
.seo-page .seo-example { margin: 0; max-width: none; }
.seo-page .seo-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.seo-page .seo-pair img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
.seo-page .seo-example figcaption { margin-top: 0.65rem; font-size: 0.9rem; color: var(--ink-muted); }

/* Two images side by side, each with a short caption */
.seo-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin: 0; }
.seo-duo figure { margin: 0; }
.seo-duo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; background: var(--paper-deep); }
.seo-duo figcaption { margin-top: 0.65rem; font-size: 0.9rem; line-height: 1.4; color: var(--ink-muted); }

/* A row of art at 4:5 (frames, sizes, styles) */
.seo-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.seo-gallery--scale { grid-template-columns: minmax(0, 8fr) minmax(0, 11fr); align-items: end; }
.seo-gallery--scale img { object-fit: contain; background: none; }
@media (min-width: 48rem) { .seo-gallery { gap: 1.5rem; } .seo-gallery--scale { gap: 1rem; } }
.seo-gallery a, .seo-gallery figure { display: grid; align-content: start; margin: 0; color: var(--ink); text-decoration: none; }
.seo-gallery img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; margin-bottom: 0.6rem; background: var(--paper-deep); }
.seo-gallery-name { display: block; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.25; color: var(--ink); }
.seo-gallery-meta { display: block; margin-top: 0.15rem; font-size: 0.95rem; color: var(--ink-muted); }
.seo-gallery a:hover .seo-gallery-name { color: var(--brand); text-decoration: underline; text-underline-offset: 0.2em; }
@media (max-width: 40rem) { .seo-gallery-name { font-size: 1.05rem; } }

/* Link tiles: browse by pet, breed, coat or occasion */
.seo-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 0.75rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.seo-head + .seo-tiles { margin-top: 0; }
@media (min-width: 48rem) {
  .seo-tiles { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 2rem 1.5rem; }
  .seo-tiles--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.seo-tile { display: grid; align-content: start; color: var(--ink); text-decoration: none; }
.seo-tile img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; margin-bottom: 0.7rem; background: var(--paper-deep); }
.seo-tile-name { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.25; }
.seo-tile-meta { margin-top: 0.2rem; font-size: 0.95rem; color: var(--ink-muted); }
.seo-tile:hover { color: var(--ink); }
.seo-tile:hover .seo-tile-name { color: var(--brand); text-decoration: underline; text-underline-offset: 0.2em; }
@media (max-width: 40rem) { .seo-tile-name { font-size: 1.08rem; } }

/* Text columns */
.seo-cols { display: grid; gap: 2rem var(--seo-col-gap); }
@media (min-width: 52rem) {
  .seo-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seo-cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.seo-cols h2 { font-size: clamp(1.4rem, 1.25rem + 0.6vw, 1.75rem); margin: 0 0 0.75rem; }
.seo-page .seo-cols p.seo-copy { max-width: none; }

/* Steps (shared .steps component) and the line under them */
.seo-page .steps { margin: 1.75rem 0 0; }
.seo-page ol.steps.seo-copy { max-width: none; }
.seo-help { margin: 1.75rem 0 0; font-size: 1rem; color: var(--ink-muted); }
.seo-more { margin: 1rem 0 0; color: var(--ink-muted); }

/* Closing call to action */
.seo-close { display: grid; gap: 1.5rem var(--seo-col-gap); align-items: center; }
.seo-close h2 { margin: 0 0 0.75rem; }
.seo-close-action { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.75rem; margin: 0; }
.seo-close-alt { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-underline-offset: 0.2em; }
@media (min-width: 52rem) { .seo-close { grid-template-columns: minmax(0, 1fr) auto; } }

/* Related links at the foot of product pages */
.seo-related-nav h2 { font-size: 1.4rem; margin: 0 0 0.5rem; }
.seo-related { display: flex; flex-wrap: wrap; gap: 0 1.75rem; margin: 0; padding: 0; list-style: none; }
.seo-related a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-underline-offset: 0.2em; }

/* Size guide hero: the two prints side by side at their relative widths (8 to 11) */
.seo-scale-row { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 11fr); gap: 1rem; align-items: end; }
.seo-scale-row img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: contain; margin-bottom: 0.5rem; }

/* ---------- Size table: a table on wide screens, one card per row on phones ---------- */
.seo-page .seo-table { margin: 1.5rem 0 0; overflow-x: auto; }
.seo-page .seo-table table { width: 100%; border-collapse: collapse; }
.seo-page .seo-table th, .seo-page .seo-table td { text-align: left; vertical-align: baseline; padding: 1rem 1.25rem 1rem 0; border-bottom: 1px solid var(--border); background: none; white-space: normal; font-size: 1rem; }
.seo-page .seo-table thead th { padding-top: 0; font-size: 0.9rem; font-weight: 600; color: var(--ink-muted); }
.seo-page .seo-table tbody th { font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; }
.seo-page .seo-table td:last-child { color: var(--ink-muted); }
@media (max-width: 40rem) {
  .seo-page .seo-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .seo-page .seo-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name price" "size size" "use use"; gap: 0.15rem 1rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
  .seo-page .seo-table tbody tr:first-child { border-top: 1px solid var(--border); }
  .seo-page .seo-table th, .seo-page .seo-table td { padding: 0; border: 0; }
  .seo-page .seo-table tbody th { grid-area: name; }
  .seo-page .seo-table td:nth-child(2) { grid-area: size; color: var(--ink-muted); }
  .seo-page .seo-table td:nth-child(3) { grid-area: price; }
  .seo-page .seo-table td:nth-child(4) { grid-area: use; }
}

/* ---------- Phones ---------- */
@media (max-width: 40rem) {
  .seo-page { --seo-gap: 2.5rem; }
  .seo-hero .seo-actions .button, .seo-close-action .button { width: 100%; }
}
