/* =========================================================
   Multi-page layout: top bar, nav, eBay trust panels, set
   themes, shop filters, reviews, bulk builder, footer.
   ========================================================= */

/* Top bar */
.top-bar { background: var(--brand); color: #fff; font-size: .86rem; }
.top-bar-inner { display: flex; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; }
.top-bar a { color: #fff; text-decoration: none; }
.top-bar a:hover { text-decoration: underline; }
.top-bulk strong { color: #f1d9a6; }
.stars, .stars-sm { color: #f5b301; letter-spacing: 1px; }
.stars-sm { font-size: .8em; }

/* Header nav with Sets dropdown */
.nav { align-items: center; }
.nav a[aria-current="page"], .nav-drop-btn[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav-drop { position: relative; }
.nav-drop-btn { background: none; border: 0; padding: 0; font: 500 .95rem var(--sans); color: var(--ink-2); cursor: pointer; }
.nav-drop-btn:hover { color: var(--ink); }
.nav-drop-menu {
  position: absolute; top: calc(100% + 12px); left: -14px; min-width: 210px; display: none; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 30;
}
.nav-drop-menu::before { content: ""; position: absolute; inset: -14px 0 auto; height: 14px; }
.nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu { display: flex; }
.nav-drop-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.nav-drop-menu a:hover { background: var(--tint); }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--set-accent, var(--brand)); flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.menu-set { justify-content: flex-start !important; }

/* Hero with eBay panel */
.hero { padding: 64px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { max-width: 16ch; }

/* eBay trust panel */
.ebay-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); color: var(--ink); }
.ebay-score { display: flex; align-items: center; gap: 18px; }
.ebay-logo { font: 700 2.1rem/1 var(--sans); letter-spacing: -2px; flex: none; }
.ebay-logo .e1 { color: #e53238; } .ebay-logo .e2 { color: #0064d2; } .ebay-logo .e3 { color: #f5af02; } .ebay-logo .e4 { color: #86b817; }
.ebay-rating { font-family: var(--serif); font-size: 2.4rem; font-weight: 600; margin: 0; line-height: 1; color: var(--ok); }
.ebay-rating span { font-family: var(--sans); font-size: 1rem; font-weight: 500; color: var(--ink); }
.ebay-meta { margin: 6px 0 0; font-size: .9rem; color: var(--ink-2); }
.ebay-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.ebay-actions .btn { flex: 1 1 200px; }
.ebay-note { margin: 14px 0 0; }
.ebay-compact { padding: 20px; }
.ebay-compact .ebay-rating { font-size: 1.9rem; }

/* Section helpers */
.section-tight { padding: 36px 0 64px; }
.row-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; max-width: none; flex-wrap: wrap; }
.row-head > div { max-width: 640px; }
.see-all { margin-top: 30px; }
.page-head { padding: 48px 0 28px; border-bottom: 1px solid var(--line); background: radial-gradient(900px 300px at 90% -20%, #e6dcc8 0%, transparent 60%), var(--bg); }
.page-head h1 { max-width: none; }
.page-head .ebay-panel { margin-top: 26px; max-width: 720px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink-2); }
.prose li { margin: 6px 0; }
.center-row { justify-content: center; }

/* Set tiles */
.set-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.set-tile {
  display: flex; flex-direction: column; gap: 8px; padding: 30px; min-height: 210px; border-radius: 18px; text-decoration: none;
  background: linear-gradient(135deg, var(--set-bg), var(--set-bg2)); color: var(--set-ink);
  border: 1px solid rgba(0,0,0,.06); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.set-tile:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,.12); }
.set-tile-kicker { font-size: .74rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 700; color: var(--set-sub); }
.set-tile-name { font-family: var(--serif); font-size: 2rem; font-weight: 600; line-height: 1.1; }
.set-tile-tag { color: var(--set-sub); flex: 1; }
.set-tile-cta { align-self: flex-start; background: var(--set-accent); color: var(--set-accent-ink); padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: .9rem; }

/* Themed set pages: the whole page takes the set's colours */
body.themed { background: var(--set-bg); }
body.themed .site-header { background: color-mix(in srgb, var(--set-bg) 88%, transparent); border-bottom-color: color-mix(in srgb, var(--set-accent) 35%, transparent); }
body.themed .site-header .logo, body.themed .nav > a, body.themed .nav-drop-btn { color: var(--set-ink); }
body.themed .site-header .logo span { color: var(--set-ink); border-bottom-color: var(--set-accent); }
body.themed .icon-round, body.themed .cart-btn:not(.has-items) { background: color-mix(in srgb, var(--set-bg) 70%, #fff); border-color: color-mix(in srgb, var(--set-accent) 40%, transparent); color: var(--set-ink); }
body.themed .nav-drop-menu a { color: var(--ink); }
.set-hero { padding: 54px 0 46px; background: radial-gradient(1000px 420px at 85% 0%, var(--set-bg2), transparent 70%), linear-gradient(180deg, var(--set-bg), var(--set-bg)); color: var(--set-ink); border-bottom: 4px solid var(--set-accent); }
.set-hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); max-width: none; color: var(--set-ink); }
.set-hero .lede, .set-hero .crumbs, .set-hero .crumbs a { color: var(--set-sub); }
.set-kicker { text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; font-weight: 700; color: var(--set-sub); margin: 0 0 8px; }
.set-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.set-stats span { background: var(--set-accent); color: var(--set-accent-ink); padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: .88rem; }
body.themed .section-tight, body.themed main { color: var(--ink); }
body.themed .filters { background: color-mix(in srgb, var(--set-bg) 55%, #fff); }
body.themed .btn-small:not(:disabled) { background: var(--set-accent); color: var(--set-accent-ink); }
body.themed .btn-small:not(:disabled):hover { filter: brightness(1.08); }
body.themed .filter-label, body.themed .filter-count { color: var(--set-sub); }
body.themed .filter-empty, body.themed .filter-empty .muted { color: var(--set-ink); }
body.themed .filters .filter-label, body.themed .filters .filter-count { color: color-mix(in srgb, var(--set-sub) 40%, #333); }
body.themed .set-foot .filter-label { color: var(--set-sub); }
body.themed .card { border-color: color-mix(in srgb, var(--set-accent) 45%, transparent); }
.set-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.other-sets { display: grid; gap: 12px; }

/* Shop filters */
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-bottom: 26px; display: grid; gap: 14px; }
.filter-search { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; background: #fff; color: var(--muted); }
.filter-search input { border: 0; padding: 11px 0; box-shadow: none !important; }
.filter-group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; min-width: 44px; }
.filter-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.chip { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-set { border-left: 6px solid var(--set-accent); }
.chip-set.is-on { background: var(--set-accent); border-color: var(--set-accent); color: var(--set-accent-ink); }
.sort { flex-direction: row; align-items: center; gap: 8px; font-size: .85rem; }
.sort select { width: auto; padding: 8px 10px; }
.filter-count { margin: 0; font-size: .85rem; color: var(--muted); }
.filter-empty { text-align: center; padding: 40px 0; }
.card[hidden] { display: none !important; }
.card-set { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 4px; text-decoration: none; font-weight: 600; }
.card-set:hover { color: var(--brand); text-decoration: underline; }
.card.flash { animation: flash 1.8s ease; }

/* Reviews */
.review { gap: 14px; }
.review-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.review-source { font-size: .72rem; font-weight: 700; color: var(--ok); background: #e8f3ec; padding: 3px 9px; border-radius: 999px; }
.page-head-ebay { background: radial-gradient(900px 340px at 90% -10%, #dff0e5 0%, transparent 60%), var(--bg); }

/* References gallery */
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.ref { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ref-img { display: block; width: 100%; border: 0; padding: 0; background: #f2f2f2; cursor: zoom-in; aspect-ratio: 3 / 4; }
.ref-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ref figcaption { padding: 12px 14px; display: flex; flex-direction: column; font-size: .88rem; }
.ref figcaption span { color: var(--muted); }
dialog.lightbox { border: 0; padding: 16px; border-radius: 16px; max-width: min(92vw, 720px); max-height: 92dvh; background: var(--surface); }
dialog.lightbox::backdrop { background: rgba(10,12,16,.75); }
dialog.lightbox img { max-height: 78dvh; width: auto; margin: 0 auto; border-radius: 8px; }
dialog.lightbox p { margin: 10px 0 0; text-align: center; color: var(--ink-2); }
dialog.lightbox .icon-btn { position: absolute; top: 8px; right: 8px; background: var(--surface); }

/* Promo cards on home */
.promo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.promo { display: flex; flex-direction: column; gap: 8px; padding: 28px; border-radius: 18px; text-decoration: none; color: #fff; box-shadow: var(--shadow); }
.promo strong { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; line-height: 1.15; }
.promo span:last-child { opacity: .85; }
.promo-bulk { background: var(--brand); }
.promo-bulk .eyebrow { color: #e3c27f; }
.promo-local { background: linear-gradient(135deg, #fff1c2, #ffe08a); color: #2b2100; }
.promo-local .eyebrow { color: #8a6400; }
.promo:hover { transform: translateY(-2px); }

/* Bulk page */
.bulk-head { background: var(--brand); color: #fff; border-bottom: 0; }
.bulk-head h1 { color: #fff; }
.bulk-head .lede, .bulk-head .crumbs, .bulk-head .crumbs a { color: #d6dde6; }
.bulk-head .eyebrow { color: #e3c27f; }
.bulk-head .bulk-points { color: #d6dde6; margin-top: 16px; }
.bulk-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: start; }
.bulk-builder { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); }
.bulk-builder h2 { font-size: 1.6rem; }
.bulk-list { list-style: none; padding: 0; margin: 18px 0; }
.bulk-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border-left: 4px solid var(--set-accent); border-bottom: 1px solid var(--line); }
.bulk-row.is-on { background: #f3f6f9; }
.bulk-name { display: flex; flex-direction: column; font-size: .95rem; }
.bulk-name .muted { font-size: .82rem; }
.bulk-qty input { width: 84px; text-align: center; }
.bulk-notes textarea { font: 16px var(--sans); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; resize: vertical; }
.bulk-summary { margin: 16px 0 0; padding: 12px 14px; background: var(--tint); border-radius: 10px; }
.bulk-side { display: grid; gap: 18px; }
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.info-card p { margin: 6px 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.contact-card { display: flex; flex-direction: column; gap: 6px; padding: 24px; border: 1px solid var(--line); background: var(--surface); border-radius: 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.contact-card:hover { border-color: var(--brand); }
.contact-card strong { font-size: 1.1rem; word-break: break-word; }
.contact-k { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; }
.contact-meta { margin-top: 28px; }

/* Cart line thumbnails */
.line-img { width: 54px; height: 42px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; flex: none; align-self: center; }
.line { align-items: center; }
.line-info { flex: 1; }
.search-all { float: right; text-transform: none; letter-spacing: 0; font-weight: 600; }
.search-main { text-decoration: none; }

/* Footer */
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.footer-grid > div { display: flex; flex-direction: column; gap: 8px; }
.footer-grid a { color: var(--ink-2); text-decoration: none; font-size: .92rem; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; }
.footer-h { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; margin: 0 0 4px; }
.footer-brand p { margin: 0; font-size: .9rem; }
.footer-ebay { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--ok) !important; }
.footer-base { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.footer-base p { margin: 0 0 6px; font-size: .85rem; }

@media (max-width: 1080px) {
  .nav { gap: 16px; }
  .nav a, .nav-drop-btn { font-size: .9rem; }
}
@media (max-width: 960px) {
  .hero-grid, .bulk-layout, .set-foot { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .promo-grid, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .top-bar-inner { flex-direction: column; gap: 2px; text-align: center; font-size: .8rem; }
  .hero { padding: 40px 0 40px; }
  .ebay-rating { font-size: 2rem; }
  .ebay-logo { font-size: 1.7rem; }
  .set-tile-name { font-size: 1.6rem; }
  .filters { padding: 14px; }
  .filter-group { gap: 8px; }
  .footer-grid { grid-template-columns: 1fr; }
}
