/* components.css — shared cards, tables, tags, galleries, FAQ, related. */
/* ---- Standard product photo box ---- */
.img-std {
  display: flex;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: var(--r-line);
  overflow: hidden;
  align-items: center;
  justify-content: center;
}
.img-std img { width: 100%; height: 100%; object-fit: contain; margin: 0; }
.img-std-empty { border: 1px dashed var(--hairline); background: var(--surface-2); }

/* ---- Product photo gallery (article pages) ---- */
.p-gallery { margin: 0.4rem 0 0.8rem; }
.gallery-main-box { width: 100%; max-width: 420px; }
.gallery-main-box img { padding: 0.5rem; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.gallery-thumb {
  width: 64px;
  padding: 0;
  border: 2px solid var(--hairline);
  border-radius: var(--r-line);
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}
.gallery-thumb img { display: block; }
.gallery-thumb:hover { border-color: var(--brand); }
.gallery-thumb.is-active { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }

/* ---- Commerce card (canonical deal card; the homepage uses the
       .deal-card--home modifier from home.css, never a redefinition) ---- */
.deal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.deal-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t-fast) ease-out, box-shadow var(--t-med) ease-out;
}
.deal-card:hover { border-color: var(--brand); box-shadow: var(--shadow-pop); text-decoration: none; }
.deal-card img { transition: transform var(--t-med) ease-out; }
.deal-card:hover img { transform: scale(1.015); }
.deal-card strong { font-size: 15.5px; line-height: 1.35; }
.deal-card .meta { font-size: 13px; color: var(--muted); }
.deal-price { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 16px; color: var(--ink); }
.deal-cover { width: 100%; margin-bottom: 4px; }

/* ---- Tag / chip ---- */
.standout-tag, .deal-card-tag {
  display: inline-block;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--mint-ink);
  background: var(--mint);
  border-radius: var(--r-chip);
  align-self: flex-start;
}

/* ---- Visual tile (category tiles, bento cards) ---- */
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 220px;
  background: var(--surface-2);
  border-radius: var(--r-tile);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 24px; transition: transform var(--t-med) ease-out; }
.tile:hover img { transform: scale(1.015); }
.tile .tile-label {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 14px 18px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(4px);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.tile .tile-count { font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--muted); }
.tile:hover { text-decoration: none; }

/* ---- Section head (label + optional link) ---- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 56px 0 20px; }
.section-head:first-child { margin-top: 24px; }
.section-head h2 { margin: 0; font-size: 28px; }
.section-sub { font-size: 15px; color: var(--muted); margin: -12px 0 20px; }

/* ---- Related articles ---- */
.related-articles {
  margin: 40px 0 8px;
  padding: 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: var(--surface);
}
.related-articles h2 { margin: 0 0 12px; font-size: 20px; }
.related-articles ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 24px; }
.related-articles a { font-weight: 600; font-size: 15px; }

/* ---- FAQ ---- */
.faq-section { margin: 40px 0; }
.faq-section h2 { font-size: 28px; margin-bottom: 12px; }
.faq-section details p { margin: 0; color: var(--ink-soft); }

/* ---- Also considered ---- */
.also-considered { margin: 40px 0; }
.also-considered h2 { font-size: 22px; margin: 0 0 10px; }
.also-considered p { color: var(--ink-soft); margin: 0 0 10px; }

/* ---- Article list (recently updated) ---- */
.article-list { list-style: none; margin: 0; padding: 0; }
.article-list li { border-bottom: 1px solid var(--hairline); padding: 14px 0; }
.article-list li:first-child { padding-top: 0; }
.article-list a { font-weight: 600; color: var(--ink); font-size: 16.5px; }
.article-list a:hover { color: var(--brand); }
.article-list .meta { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }

/* ---- Freshness mono ---- */
.freshness { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--muted); }
.freshness::before { content: "\2713\00a0"; color: var(--brand); }

/* ---- Pending notice ---- */
.pending { color: var(--warn); font-size: 14px; }

/* ---- Quiet reading column (methodology page) ---- */
.reading-col { max-width: 760px; }
.reading-col p { color: var(--ink-soft); }

/* ---- Methodology accordion (article pages) ---- */
.methodology-note {
  margin: 0 0 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-line);
  background: var(--surface);
  padding: 10px 16px;
}
.methodology-note summary {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
}
.methodology-note p { color: var(--ink-soft); font-size: 15px; margin: 10px 0 0; }

/* ---- Decision chips: `Choose by what matters` jump links ---- */
.decision-chips { margin: 32px 0 8px; }
.decision-chips h2 { font-size: 24px; margin: 0 0 6px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-chip);
  font-size: 14px;
  color: var(--ink-soft);
  transition: border-color var(--t-fast) ease-out;
}
.chip:hover { border-color: var(--brand); color: var(--ink); text-decoration: none; }
.chip strong { color: var(--brand); font-weight: 600; }

/* ---- First-hand owner/editorial note ---- */
.owner-note {
  margin: 18px 0 26px;
  padding: 20px 22px;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--hairline));
  border-left: 4px solid var(--brand);
  border-radius: 12px;
  background: color-mix(in srgb, var(--mint) 44%, var(--surface));
}
.owner-note-label {
  display: block;
  margin-bottom: 7px;
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.owner-note h2 { font-size: 21px; margin: 0 0 8px; }
.owner-note p { color: var(--ink-soft); margin: 0; line-height: 1.55; }
.owner-note-author { display: block; margin-top: 10px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.hub-owner-note { margin-top: 28px; }

/* ---- Category hub hero: text + product photo, stacked on mobile ---- */
.hub-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 340px); gap: 40px; align-items: center; margin: 4px 0 28px; }
.hub-hero .hub-hero-media { margin: 0; }
.hub-hero .hub-hero-media .img-std { max-width: 340px; }
@media (max-width: 768px) {
  .hub-hero { grid-template-columns: 1fr; gap: 20px; margin-bottom: 20px; }
}

/* ---- Category-specific buyer checklist ---- */
.hub-what-matters {
  margin: 40px 0;
  padding: 28px 30px;
  border-radius: var(--r-card);
  background: var(--surface-soft);
  border: 1px solid var(--hairline-soft);
}
.hub-what-matters h2 { font-size: 28px; margin: 0 0 8px; }
.hub-what-matters .section-sub { margin: 0 0 16px; max-width: 780px; }
.hub-what-matters ul { margin: 0; padding-left: 20px; display: grid; gap: 7px; }
.hub-what-matters li { color: var(--ink-soft); }

/* Category product roster: sparse categories must never stretch 2-3 cards
   across the fluid-wide shell. Keep the real product image/data; constrain the card. */
.gp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 220px));
  gap: 16px;
  justify-content: start;
  align-items: stretch;
}
.gp-card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--hairline-soft);
  border-radius: var(--r-card); padding: 12px; color: inherit; text-decoration: none;
  transition: border-color var(--t-fast) ease-out, box-shadow var(--t-fast) ease-out, transform var(--t-fast) ease-out;
}
.gp-card:hover { text-decoration: none; border-color: rgba(11,107,73,.32); box-shadow: var(--shadow-pop); transform: translateY(-1px); }
.gp-card .img-std { width: 100%; max-width: 196px; margin: 0 auto 12px; }
@media (max-width: 520px) {
  .gp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gp-card { padding: 10px; }
}

/* Language dropdown (header) + full language list (footer). The word
   "Language" stays untranslated on purpose -- owner spec 2026-09-23. */
.lang-drop { position: relative; }
.lang-drop summary {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 8px 12px; border-radius: var(--r-line); border: 1px solid var(--hairline);
  font-size: 13.5px; font-weight: 600; color: var(--ink); background: var(--surface);
  list-style: none; white-space: nowrap;
}
.lang-drop summary::-webkit-details-marker { display: none; }
.lang-drop[open] summary { border-color: var(--brand); }
.lang-drop .caret { transition: transform 0.15s ease; }
.lang-drop[open] .caret { transform: rotate(180deg); }
.lang-drop-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 70;
  min-width: 168px; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px;
  box-shadow: var(--shadow-pop);
}
.lang-drop-list li + li { margin-top: 2px; }
.lang-drop-list a, .lang-drop-list strong {
  display: block; padding: 8px 12px; border-radius: 8px;
  font-size: 14px; color: var(--ink); text-decoration: none;
}
.lang-drop-list a:hover { background: var(--surface-soft); }
.lang-drop-list strong { background: var(--surface-soft); }
.footer-lang-list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.footer-lang-list a, .footer-lang-list strong { color: var(--dark-muted); font-size: 14px; text-decoration: none; }
.footer-lang-list a:hover { color: #fff; }
.footer-lang-list strong { color: var(--dark-ink); }
.footer-lang-label {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--dark-muted); margin: 0 0 8px;
}

/* ---- Deep-review catalog (/products/, 2026-09-23): one card per
   dossiered product -- hero photo or initial-letter tile, category label,
   name, current price; sorted by category. ---- */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; }
.review-card {
  display: flex; flex-direction: column; gap: 8px; padding: 18px;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-card); color: var(--ink); text-decoration: none;
  transition: border-color var(--t-fast) ease-out, box-shadow var(--t-fast) ease-out;
}
.review-card:hover { border-color: var(--brand); box-shadow: var(--shadow-pop); text-decoration: none; }
.review-card-media { display: block; }
.review-card-media .img-std { width: 100%; height: auto; }
.review-card-initial {
  display: flex; align-items: center; justify-content: center;
  width: 100%; aspect-ratio: 1 / 1;
  background: var(--surface-2); border-radius: var(--r-chip);
  font-family: var(--font-mono); font-size: 44px; font-weight: 700; color: var(--brand);
}
.review-card-cat {
  font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand);
}
.review-card-name { font-size: 15.5px; line-height: 1.35; }
.review-card-price { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 14px; color: var(--ink-soft); }

/* "Where to buy / check price" merchant buttons (2026-09-28, README UI
   contract): compact merchant-neutral group on deep-review pages. No
   price claims, no paid-link styling -- every link here is a plain
   no-opener link (monetized=false today). */
.where-to-buy {
  margin: 26px 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
}
.where-to-buy h2 { margin: 0 0 12px; font-size: 17px; }
.wtb-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.where-to-buy .cta { width: auto; min-height: 40px; padding: 8px 16px; font-size: 14px; }
.wtb-note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
@media (max-width: 768px) {
  .where-to-buy { padding: 14px; }
  .where-to-buy .cta { width: 100%; justify-content: center; min-height: 44px; }
}
