/* ============================================================
   BourbonBuddy — batch-family page (/v2/family/<id>). The
   "silent batch family" surface: a family parent's batch
   children, each its own bottle, linking to its detail page.
   Shares the brand palette + card system (warm-editorial).
   ============================================================ */
:root{
  --bg:var(--sk-q-bg); --bg-tint:var(--sk-lg-bg-tint); --card:var(--sk-lg-card);
  --ink:var(--sk-q-shadow); --ink-soft:var(--sk-lg-ink-soft); --muted:var(--sk-lg-muted);
  --line:var(--sk-lg-line); --line-soft:var(--sk-lg-line-soft); --soft:var(--sk-lg-soft);
  --accent:var(--sk-q-accent); --accent-2:var(--sk-lg-accent-2); --accent-bg:var(--sk-q-accent-bg); --accent-line:var(--sk-lg-accent-line);
  --gold:var(--sk-lg-gold); --green:#2f7a44; --red:#b23b27;
  --focus:#c98736;
  --round:'Space Grotesk','Inter',system-ui,sans-serif;
  --sans:-apple-system,system-ui,'Segoe UI',Roboto,'Helvetica Neue',sans-serif;
  --shadow:0 10px 30px rgba(var(--sk-q-ink-rgb),.10);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{font:15px/1.5 var(--sans);margin:0;color:var(--ink);background:var(--bg);-webkit-font-smoothing:antialiased}
.wrap{max-width:1180px;margin:0 auto;padding:0 1.4rem 3rem}
h1{font-family:Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;font-weight:700;letter-spacing:-.02em;margin:0;font-size:2rem;line-height:1.12}
h3{font-family:var(--round);letter-spacing:-.01em;margin:0}
a{color:var(--accent);text-decoration:none}
a:focus-visible{outline:2px solid var(--focus);outline-offset:2px;border-radius:6px}
.crumb{margin:1rem 0 .6rem;font-size:.9rem}
.crumb a{color:var(--ink-soft)}
.muted{color:var(--muted)}

/* --- Family header: hero image + name + summary line --- */
.fam-head{display:flex;gap:1.4rem;align-items:center;
  background:linear-gradient(180deg,var(--bg-tint),var(--card));
  border:1px solid var(--line);border-radius:18px;padding:1.3rem 1.5rem;
  box-shadow:var(--shadow);margin:.4rem 0 1.6rem}
.fam-hero-img{flex:0 0 auto;width:96px;height:128px;display:flex;
  align-items:center;justify-content:center}
.fam-hero-img img{max-width:100%;max-height:100%;object-fit:contain;
  filter:drop-shadow(0 8px 16px rgba(var(--sk-q-ink-rgb),.18))}
.fam-hero-img.fam-hero-photo{width:120px;height:160px;border-radius:12px;overflow:hidden;
  box-shadow:0 8px 16px rgba(var(--sk-q-ink-rgb),.22)}
.fam-hero-img.fam-hero-photo img{width:100%;height:100%;max-width:none;max-height:none;
  object-fit:cover;filter:none}
@media(max-width:640px){.fam-hero-img.fam-hero-photo{width:84px;height:112px}}
.fam-head-text{min-width:0}
/* T1531 (Robert 18 Oct): desktop = wide rickhouse banner with the name on
   its dark left side; phone = the tall photo full width above the name. */
@media(min-width:641px){
.fam-head--banner{position:relative;display:block;padding:0;overflow:hidden}
.fam-head--banner .fam-hero-img.fam-hero-photo{width:100%;height:auto;aspect-ratio:16/9;
  max-height:460px;border-radius:0;box-shadow:none}
.fam-head--banner .fam-hero-img.fam-hero-photo img{object-position:60% 50%}
.fam-head--banner .fam-head-text{position:absolute;left:0;top:0;bottom:0;width:46%;
  display:flex;flex-direction:column;justify-content:center;padding:1.6rem 2rem;
  background:linear-gradient(90deg,rgba(15,9,4,.85),rgba(15,9,4,0))}
.fam-head--banner h1{color:#fff;-webkit-text-fill-color:#fff;font-size:2.4rem}
.fam-head--banner .fam-sub{color:#f3c98b}
.fam-head--banner .fam-note{color:#eee}
}
@media(max-width:640px){
.fam-head.fam-head--banner{flex-direction:column;align-items:stretch}
.fam-head.fam-head--banner .fam-hero-img.fam-hero-photo{width:100%;height:auto;aspect-ratio:3/4}
}
.fam-head--banner picture{display:block;width:100%;height:100%}
.fam-sub{margin:.35rem 0 0;font-family:var(--round);font-weight:600;
  color:var(--accent);font-size:.95rem}
.fam-note{margin:.5rem 0 0;color:var(--ink-soft);font-size:.9rem;max-width:54ch}

/* --- Child grid: each batch is its own card → its bottle page --- */
.fam-grid{display:grid;gap:1rem;
  grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
.fam-card{display:flex;flex-direction:column;background:var(--card);
  border:1px solid var(--line);border-radius:16px;overflow:hidden;
  color:var(--ink);transition:transform .12s ease,box-shadow .12s ease,border-color .12s ease}
.fam-card:hover{transform:translateY(-2px);box-shadow:var(--shadow);
  border-color:var(--accent-line);text-decoration:none}
.fam-card.is-oos{opacity:.72}
.fam-card-img{height:150px;display:flex;align-items:center;justify-content:center;
  padding:.9rem;background:linear-gradient(180deg,#fff,var(--bg-tint))}
.fam-card-img img{max-width:100%;max-height:100%;object-fit:contain}
.fam-card-img img.is-placeholder{opacity:.5;max-height:64px}
.fam-card-body{padding:.75rem .85rem .9rem;display:flex;flex-direction:column;gap:.45rem;flex:1}
.fam-card-name{font-size:1rem;color:var(--ink);line-height:1.22}
.fam-card-meta{display:flex;flex-wrap:wrap;gap:.35rem;margin-top:-.1rem}
.fam-chip{font-size:.72rem;font-family:var(--round);font-weight:600;
  padding:.1rem .45rem;border-radius:999px;border:1px solid var(--line);
  background:var(--soft);color:var(--ink-soft);line-height:1.5}
.fam-abv{color:var(--accent);background:var(--accent-bg);border-color:var(--accent-line)}
/* EW-190: every price block holds two lines (price, then shop), so the price
   line starts at one height across a row. Nothing is hidden. */
.fam-card-price{margin-top:auto;display:flex;align-items:baseline;flex-wrap:wrap;gap:.3rem;
  min-height:calc(2 * 1.2rem * 1.25 + .3rem);align-content:flex-start}
.fam-price{font-family:var(--round);font-weight:700;font-size:1.2rem;color:var(--ink);
  font-variant-numeric:tabular-nums}
.fam-cur{font-size:.7rem;color:var(--muted);font-weight:600}
.fam-ret{font-size:.78rem;color:var(--ink-soft)}
.fam-oos{font-family:var(--round);font-weight:600;font-size:.9rem;color:var(--red)}
.fam-lastprice{font-size:.78rem;color:var(--muted)}

@media (max-width:560px){
  .fam-head{flex-direction:row;padding:1rem 1.1rem;gap:1rem}
  .fam-hero-img{width:64px;height:88px}
  h1{font-size:1.55rem}
  .fam-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.7rem}
  .fam-card-img{height:120px}
}

/* --- ask #2467: "Other listings" (batch-not-stated catch-all) section ---
   Muted look only: opacity/background. NEVER pointer-events or an overlay —
   the cards stay fully clickable links (Robert 2026-10-20). */
.fam-other{margin:2rem 0 0;padding-top:1.2rem;border-top:2px dashed var(--line)}
.fam-other h2{font-size:.8rem;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:0 0 .3rem}
.fam-other p{margin:0 0 .9rem;color:var(--ink-soft);font-size:.9rem}
.fam-card.is-other{opacity:.82;background:var(--soft)}
.fam-card.is-other .fam-card-name{color:var(--ink-soft)}

/* Bottle card photo box (Robert, 6 Nov 2026, T2953): same 3:4 box as the home
   cards; a bench or family photo fills it, any other picture stays whole. Website
   only; the app's card rules (html.wb-app) are left as they are. */
html:not(.wb-app):not(#_) .fam-card .fam-card-img{height:auto;aspect-ratio:3/4}
html:not(.wb-app):not(#_) .fam-card .fam-card-img:has(>:is(img[src*="/img/bottle-bartop"],img[src*="/img/bottle-card/"],img[src*="/img/family-hero/"])){
  padding:0;overflow:hidden;background:var(--sk-ink);
}
html:not(.wb-app):not(#_) .fam-card .fam-card-img>:is(img[src*="/img/bottle-bartop"],img[src*="/img/bottle-card/"],img[src*="/img/family-hero/"]){
  width:100%;height:100%;max-width:none;max-height:none;object-fit:cover;object-position:center;
}
