/* Ball Prices (Golf) — mobile-first, minimal weight. */

:root {
  --green: #1c6b3c;
  --green-dark: #14512c;
  --ink: #1a1d1a;
  --muted: #5c665e;
  --line: #dde4de;
  --bg: #fafcfa;
  --card: #ffffff;
  --accent: #d97b1c;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.45;
}

.site-header {
  background: var(--green);
  color: #fff;
  padding: 1.1rem 1rem 1.2rem;
}
.site-header h1 { margin: 0; font-size: 1.35rem; }
.site-header .flag { font-size: 1rem; }
.sport-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
  font-size: 0.85rem;
  font-weight: 600;
  vertical-align: 3px;
}
.tagline { margin: 0.3rem 0 0; opacity: 0.92; font-size: 0.92rem; max-width: 42rem; }

.filters {
  padding: 0.75rem 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 2;
}
.filter-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
.filter-row label {
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  color: var(--muted);
  gap: 0.15rem;
}
.filter-row select {
  font-size: 0.9rem;
  padding: 0.45rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  min-width: 0;
}
.result-count { margin: 0.5rem 0 0; font-size: 0.8rem; color: var(--muted); }

.notice {
  margin: 0;
  padding: 0.55rem 1.5rem;
  font-size: 0.85rem;
  color: var(--ink);
  background: #fdf3e6;
  border-bottom: 1px solid var(--accent);
}

main { padding: 0 0 2rem; max-width: 1100px; margin: 0 auto; }

.offers { width: 100%; border-collapse: collapse; }
.offers thead { display: none; }

.offers tbody tr {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "ball  ppb"
    "cond  ppb"
    "price cta";
  gap: 0.1rem 0.75rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.offers td { border: 0; padding: 0; }
.td-ball { grid-area: ball; font-weight: 600; }
.td-ball .type-tag {
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 0.4rem;
  margin-left: 0.3rem;
  vertical-align: 1px;
}
.td-cond { grid-area: cond; font-size: 0.82rem; color: var(--muted); }
.td-cond .badge-used { color: var(--accent); font-weight: 600; }
.td-pack { display: none; }
.td-price { grid-area: price; font-size: 0.88rem; color: var(--muted); align-self: center; }
.td-ppb { grid-area: ppb; text-align: right; align-self: start; }
.td-ppb .ppb { font-size: 1.15rem; font-weight: 700; color: var(--green-dark); }
.td-ppb .ppb-label { display: block; font-size: 0.68rem; color: var(--muted); }
.td-retailer { display: none; }
.td-cta { grid-area: cta; text-align: right; align-self: center; }

.cta {
  display: inline-block;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius);
  white-space: nowrap;
}
.cta:hover, .cta:focus { background: var(--green-dark); }
.cta .retailer-name { font-weight: 400; opacity: 0.9; }

.oos { opacity: 0.55; }
.oos .cta { background: var(--muted); pointer-events: none; }

.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); }

.page { padding: 1rem; max-width: 42rem; margin: 0 auto; }
.page a { color: var(--green-dark); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}
.site-footer a { color: var(--green-dark); }
.site-footer .meta { margin-top: 0.4rem; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Wider screens: real table layout. */
@media (min-width: 720px) {
  .site-header, .filters, .notice { padding-left: max(1rem, calc((100vw - 1100px) / 2)); padding-right: max(1rem, calc((100vw - 1100px) / 2)); }
  .filter-row { grid-template-columns: repeat(6, 1fr); max-width: 1100px; }

  .offers thead { display: table-header-group; }
  .offers thead th {
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    padding: 0.6rem 0.75rem;
    border-bottom: 2px solid var(--line);
  }
  .offers thead th.ppb-col { text-align: right; }

  .offers tbody tr { display: table-row; }
  .offers td { display: table-cell; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
  .td-pack { display: table-cell; font-size: 0.88rem; color: var(--muted); white-space: nowrap; }
  .td-price { font-size: 0.95rem; color: var(--ink); }
  .td-price .pack-inline { display: none; }
  .td-ppb { text-align: right; }
  .td-ppb .ppb { font-size: 1rem; }
  .td-ppb .ppb-label { display: none; }
  .td-retailer { display: table-cell; font-size: 0.88rem; }
  .td-cta { text-align: right; }
  .cta .retailer-name { display: none; }
}
