/* Ball Prices (Golf) — Fairway design. Mobile-first, vanilla CSS. */

:root {
  --paper: #FFFFFF;
  --wash: #F1F5F1;
  --ink: #1C2A1F;
  --muted: #6E7A6E;
  --hairline: #E4EAE4;
  --accent: #1F9D63;
  --accent-press: #187A4C;
  --card-border: #E1E8E1;
  --disclosure: #F1F7F3;

  --badge-new-text: #1F7A4D;
  --badge-new-bg: #E7F4EC;
  --badge-lake-text: #1E5F9E;
  --badge-lake-bg: #E7F0F8;
  --badge-refurb-text: #9A6212;
  --badge-refurb-bg: #F7EFDC;
  --badge-used-text: #6B6B62;
  --badge-used-bg: #EFEFEA;

  --banner-bg: #FFF7E6;
  --banner-border: #F0DFB0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background: var(--wash);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 500;
}

.site-header {
  background: var(--paper);
  color: var(--ink);
  padding: 14px max(20px, calc((100vw - 1160px) / 2)) 12px;
  border-bottom: 1px solid #EEF3EE;
  display: flex;
  align-items: center;
  gap: 9px;
}
.site-logo {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}
.site-header h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.site-header .sport-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 4px;
}
.site-header .flag { display: none; }

.site-header + .disclosure-strip {
  padding: 8px max(20px, calc((100vw - 1160px) / 2));
  background: var(--disclosure);
  font-size: 11px;
  color: #4E594E;
  border-bottom: 1px solid #EEF3EE;
}

.tagline {
  margin: 0;
  padding: 12px max(20px, calc((100vw - 1160px) / 2));
  font-size: 16px;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid #EEF3EE;
}

.notice {
  margin: 12px auto 0;
  padding: 12px 20px;
  max-width: 1160px;
  font-size: 14px;
  color: var(--ink);
  background: var(--banner-bg);
  border: 1px solid var(--banner-border);
  border-radius: 10px;
  font-weight: 500;
}
.notice strong {
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}
.notice p {
  margin: 0;
}
.notice ~ .filters {
  margin-top: 16px;
}

.filters {
  padding: 0;
  background: var(--paper);
  border-bottom: 1px solid #EEF3EE;
  position: sticky;
  top: 0;
  z-index: 2;
}
.filter-row {
  display: flex;
  gap: 8px;
  padding: 12px max(20px, calc((100vw - 1160px) / 2));
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid #EEF3EE;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-row { -ms-overflow-style: none; scrollbar-width: none; }

.filter-row label {
  display: contents;
}
.filter-row select {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px 6px 12px;
  border: 1px solid #DBE4DB;
  border-radius: 100px;
  background-color: var(--paper);
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236E7A6E' d='M1 1 L6 6 L11 1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 12px 8px;
  padding-right: 20px;
}
.filter-row select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
#f-sort {
  background-color: var(--accent);
  color: white;
  border-color: var(--accent);
  margin-left: auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='white' d='M1 1 L6 6 L11 1'/%3E%3C/svg%3E");
}

.active-filters {
  padding: 8px max(20px, calc((100vw - 1160px) / 2));
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid #EEF3EE;
  align-items: center;
}
.active-filters.empty {
  display: none;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: white;
  padding: 5px 10px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
}
.filter-chip button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  line-height: 1;
  font-weight: 700;
}
.filter-chip button:hover {
  opacity: 0.8;
}
.clear-all-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  text-decoration: underline;
}
.clear-all-btn:hover {
  color: var(--ink);
}

.result-count {
  margin: 0;
  padding: 8px max(20px, calc((100vw - 1160px) / 2));
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

main {
  padding: 12px max(20px, calc((100vw - 1160px) / 2)) 32px;
}

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

.offers tbody tr {
  display: block;
  padding: 15px 20px;
  border-bottom: 1px solid #F2F6F2;
  background: var(--paper);
}

.offers td { display: none; border: 0; padding: 0; }

/* Top line: ball name + condition badge */
.offers td.td-ball {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 5px;
  width: auto;
}
.offers td.td-ball .type-tag { display: none; }

.offers td.td-cond {
  display: inline-flex;
  float: right;
}

.offers td.td-cond .badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}
.offers td.td-cond .badge.badge-new { background: var(--badge-new-bg); color: var(--badge-new-text); }
.offers td.td-cond .badge.badge-lake { background: var(--badge-lake-bg); color: var(--badge-lake-text); }
.offers td.td-cond .badge.badge-refurb { background: var(--badge-refurb-bg); color: var(--badge-refurb-text); }
.offers td.td-cond .badge.badge-used { background: var(--badge-used-bg); color: var(--badge-used-text); }

/* Meta line */
.offers td.td-meta {
  display: block;
  clear: both;
  font-size: 11px;
  color: #8A968A;
  margin: 5px 0 10px;
}

/* Bottom line: price + button */
.offers td.td-price { display: none; }
.offers td.td-ppb {
  display: inline-block;
  font-size: 11px;
  color: var(--muted);
}
.offers td.td-ppb .ppb {
  font-size: 23px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.offers td.td-ppb .ppb-label { display: inline; }

.offers td.td-retailer { display: none; }
.offers td.td-cta {
  display: inline-block;
  float: right;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 10px;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
}
.cta:hover, .cta:focus { background: var(--accent-press); }
.cta .retailer-name { display: none; }

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

.empty {
  margin: 32px 20px;
  padding: 24px;
  border: 1px dashed var(--hairline);
  border-radius: 10px;
  text-align: center;
}
.empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
}
.empty-text {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 16px;
}
.empty .clear-all-btn {
  background: var(--accent);
  color: white;
  padding: 9px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
}
.empty .clear-all-btn:hover {
  background: var(--accent-press);
}

.page {
  padding: 24px 20px;
  max-width: 42rem;
  margin: 0 auto;
}
.page a { color: var(--accent); }

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 16px 20px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  font-weight: 500;
}
.site-footer a { color: var(--accent); }
.site-footer .meta { margin-top: 8px; }

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

/* Subpage headers (privacy, disclosure) */
.page-header {
  background: var(--paper);
  color: var(--ink);
  padding: 24px 20px;
  border-bottom: 1px solid #EEF3EE;
}
.page-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Desktop: 1024px+ real table layout */
@media (min-width: 1024px) {
  .site-header {
    padding: 14px max(20px, calc((100vw - 1160px) / 2)) 12px;
  }
  .filter-row {
    display: flex;
    gap: 12px;
    padding: 12px max(20px, calc((100vw - 1160px) / 2));
    overflow: visible;
    flex-wrap: nowrap;
  }
  .filter-row select {
    border: 1px solid #DBE4DB;
    /* Keep right padding clear of the chevron (positioned 6px from the right,
       12px wide) so the label never collides with it on narrow pills. */
    padding: 8px 20px 8px 12px;
    font-size: 13px;
  }
  #f-sort {
    margin-left: auto;
  }

  .offers thead { display: table-header-group; }
  .offers thead th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    padding: 12px 16px;
    border-bottom: 1px solid var(--hairline);
    background: var(--wash);
  }
  .offers thead th.ppb-col { text-align: right; }

  .offers tbody tr {
    display: table-row;
    padding: 0;
    border-bottom: 1px solid var(--hairline);
    background: var(--paper);
  }

  .offers td {
    display: table-cell;
    padding: 12px 16px;
    border: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    vertical-align: middle;
  }

  .offers td.td-ball {
    display: table-cell;
    font-size: 14px;
    font-weight: 700;
  }
  .offers td.td-cond {
    display: table-cell;
    float: none;
  }
  .offers td.td-cond .badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
  }
  .offers td.td-meta { display: none; }
  .offers td.td-pack { display: table-cell; font-size: 13px; color: var(--muted); font-weight: 500; }
  .offers td.td-price { display: table-cell; font-size: 13px; color: var(--ink); font-weight: 500; }
  .offers td.td-ppb {
    display: table-cell;
    text-align: right;
    font-size: 13px;
    font-weight: 500;
  }
  .offers td.td-ppb .ppb {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
  }
  .offers td.td-ppb .ppb-label { display: none; }
  .offers td.td-retailer { display: table-cell; font-size: 13px; font-weight: 500; }
  .offers td.td-cta { display: table-cell; text-align: right; float: none; }

  .cta {
    font-size: 12px;
    padding: 8px 16px;
    border-radius: 8px;
  }
}
