:root {
  /* Cactus Sports Cards AZ palette — pulled from the eBay banner/logo */
  --green: #1d4a34;        /* deep saguaro green (logo linework) */
  --green-dark: #143726;
  --green-light: #2c6a4b;
  --cream: #faf6ec;        /* banner sky */
  --sand: #f0e6d2;         /* desert floor */
  --sand-deep: #e2d3b4;
  --orange: #d97b3f;       /* sunset mountains */
  --orange-deep: #b85f28;
  --red: #b3392b;          /* grade-badge red */
  --ink: #26241e;
  --ink-dim: #6d675c;
  --white: #ffffff;
  --line: #ddd2ba;
  --radius: 10px;
  font-size: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
button { font-family: inherit; }

/* ---------- top strips ---------- */
.shipping-bar {
  text-align: center; background: var(--green-dark); color: #cfe3d3;
  font-size: .82rem; padding: 6px; letter-spacing: .5px;
}

/* ---------- header ---------- */
.site-header { background: var(--white); border-bottom: 3px solid var(--green); position: sticky; top: 0; z-index: 50; }
.header-inner {
  max-width: 1400px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { width: 54px; height: 54px; border-radius: 50%; }
.brand-name {
  color: var(--green); font-weight: 800; font-size: 1.25rem; letter-spacing: 2px;
  line-height: 1.1; display: flex; flex-direction: column;
}
.brand-sub { font-size: .82rem; letter-spacing: 6px; color: var(--orange-deep); }
.header-search { flex: 1; display: flex; justify-content: flex-end; }
.header-search input {
  background: var(--cream); border: 2px solid var(--sand-deep); color: var(--ink);
  padding: 10px 16px; border-radius: 22px; width: min(340px, 100%); font-size: .9rem; outline: none;
}
.header-search input:focus { border-color: var(--green); }

/* ---------- nav + dropdowns ---------- */
.main-nav { background: var(--green); }
.nav-inner {
  max-width: 1400px; margin: 0 auto; padding: 0 16px;
  display: flex; flex-wrap: wrap;
}
.nav-link {
  background: none; border: none; color: #e9f2ea; cursor: pointer;
  padding: 12px 18px; font-size: .92rem; font-weight: 600; letter-spacing: .3px;
}
.nav-link:hover { background: var(--green-dark); color: #fff; }
.nav-deals { color: #ffd9a8; }
.caret { font-size: .7rem; opacity: .8; }
.nav-drop { position: relative; }
.drop-menu {
  position: absolute; top: 100%; left: 0; min-width: 200px; z-index: 60;
  background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--orange);
  border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 10px 24px rgba(38,36,30,.18);
  display: none; flex-direction: column; padding: 6px 0;
}
.nav-drop:hover .drop-menu, .nav-drop:focus-within .drop-menu { display: flex; }
.drop-menu button {
  background: none; border: none; text-align: left; cursor: pointer;
  padding: 10px 18px; font-size: .9rem; color: var(--ink);
}
.drop-menu button:hover { background: var(--sand); color: var(--green); font-weight: 600; }

/* ---------- hero ---------- */
.hero { max-width: 1400px; margin: 18px auto 0; padding: 0 24px; width: 100%; }
.hero-banner {
  width: 100%; border-radius: 14px; display: block;
  box-shadow: 0 10px 30px rgba(38,36,30,.15);
}

/* ---------- home sections / carousels ---------- */
.home-sections { max-width: 1400px; margin: 0 auto; padding: 10px 24px 30px; width: 100%; }
.hrow { margin-top: 34px; }
.hrow-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.hrow-head h2 {
  font-size: 1.35rem; color: var(--green); letter-spacing: 1px; text-transform: uppercase;
  border-bottom: 3px solid var(--orange); padding-bottom: 4px;
}
.hrow-head .view-all {
  background: none; border: none; color: var(--orange-deep); cursor: pointer;
  font-size: .88rem; font-weight: 700;
}
.hrow-head .view-all:hover { text-decoration: underline; }
.hrow-head .spacer { flex: 1; }
.caro-btn {
  background: var(--white); border: 2px solid var(--sand-deep); color: var(--green);
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1rem; font-weight: 700;
}
.caro-btn:hover { border-color: var(--green); }
.caro {
  display: flex; gap: 16px; overflow-x: auto; scroll-behavior: smooth;
  padding: 4px 2px 12px; scrollbar-width: thin;
}
.caro .card { flex: 0 0 210px; }

.deals-strip {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  border-radius: 14px; padding: 22px; margin-top: 34px;
}
.deals-strip .hrow-head h2 { color: #ffd9a8; border-color: var(--orange); }
.deals-strip .hrow-head .view-all { color: #f5c689; }
.deals-strip .caro-btn { background: var(--green-dark); border-color: var(--green-light); color: #e9f2ea; }

/* ---------- signup strip ---------- */
.signup-strip { background: var(--sand); border-top: 1px solid var(--line); margin-top: 20px; }
.signup-inner { max-width: 700px; margin: 0 auto; padding: 40px 24px; text-align: center; }
.signup-inner h2 { color: var(--green); margin-bottom: 6px; }
.signup-inner p { color: var(--ink-dim); font-size: .92rem; }
.signup-inner form { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.signup-inner input {
  background: var(--white); border: 2px solid var(--sand-deep); border-radius: 8px;
  padding: 11px 14px; width: min(320px, 100%); font-size: .92rem; outline: none;
}
.signup-inner input:focus { border-color: var(--green); }
.signup-inner button {
  background: var(--orange); color: #fff; border: none; border-radius: 8px;
  padding: 11px 24px; font-weight: 700; cursor: pointer;
}
.signup-inner button:hover { background: var(--orange-deep); }
.signup-done { color: var(--green); font-weight: 700; margin-top: 12px; }

/* ---------- browse view ---------- */
.browse-head { max-width: 1400px; margin: 0 auto; padding: 22px 24px 0; width: 100%; }
.browse-head h1 { color: var(--green); font-size: 1.5rem; letter-spacing: 1px; margin-bottom: 12px; }
.sport-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.sport-pills button {
  background: var(--white); border: 2px solid var(--sand-deep); color: var(--ink-dim);
  padding: 6px 16px; border-radius: 18px; cursor: pointer; font-size: .88rem;
}
.sport-pills button:hover { color: var(--green); border-color: var(--green); }
.sport-pills button.active {
  background: var(--green); border-color: var(--green); color: #fff; font-weight: 700;
}
.layout {
  max-width: 1400px; margin: 0 auto; padding: 20px 24px; width: 100%;
  display: grid; grid-template-columns: 220px 1fr; gap: 28px; flex: 1;
}
.filters h2 { font-size: .95rem; letter-spacing: 1px; margin-bottom: 12px; color: var(--ink-dim); text-transform: uppercase; }
.filters fieldset {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 14px; background: var(--white);
}
.filters legend { padding: 0 6px; font-size: .78rem; color: var(--orange-deep); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.filters label { display: block; padding: 4px 0; font-size: .9rem; cursor: pointer; }
.filters input[type=checkbox] { accent-color: var(--green); margin-right: 8px; }
.price-inputs { display: flex; align-items: center; gap: 8px; }
.price-inputs input {
  width: 70px; background: var(--cream); border: 1px solid var(--line);
  color: var(--ink); padding: 6px 8px; border-radius: 6px;
}
.btn-ghost {
  background: none; border: 1px solid var(--line); color: var(--ink-dim);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; width: 100%;
}
.btn-ghost:hover { color: var(--green); border-color: var(--green); }
.results-bar {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;
  color: var(--ink-dim); font-size: .9rem;
}
.results-bar select {
  background: var(--white); color: var(--ink); border: 1px solid var(--line);
  padding: 7px 10px; border-radius: 8px;
}

/* ---------- card tiles ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 18px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(38,36,30,.14); }
.card-img {
  aspect-ratio: 5 / 6; background: var(--sand); display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.card-img img { max-width: 88%; max-height: 92%; object-fit: contain; filter: drop-shadow(0 5px 10px rgba(38,36,30,.28)); }
.card-img .noimg { color: var(--ink-dim); font-size: .8rem; }
.sale-flag {
  position: absolute; top: 10px; left: 0; background: var(--red); color: #fff;
  font-size: .7rem; font-weight: 800; padding: 4px 10px 4px 8px; letter-spacing: .5px;
  border-radius: 0 4px 4px 0;
}
.card.sold .card-img::after {
  content: "SOLD"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(38,36,30,.62); color: #ffb4a8; font-weight: 800; font-size: 1.6rem; letter-spacing: 4px;
}
.badges { display: flex; gap: 5px; flex-wrap: wrap; }
.card .badges { padding: 10px 12px 0; }
.badge {
  font-size: .66rem; font-weight: 700; letter-spacing: .5px; padding: 3px 7px;
  border-radius: 4px; text-transform: uppercase; color: #fff;
}
.badge.grade { background: var(--red); }
.badge.rc { background: #2f5f8f; }
.badge.auto { background: var(--green-light); }
.badge.serial { background: #6a4fa3; }
.badge.mem { background: #8a6a30; }
.card-title { padding: 8px 12px 4px; font-size: .86rem; line-height: 1.35; flex: 1; }
.card-price { padding: 4px 12px 12px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card-price .amt { color: var(--green); font-weight: 800; font-size: 1.05rem; }
.card-price .amt.sale { color: var(--red); }
.card-price .was { color: var(--ink-dim); font-size: .8rem; text-decoration: line-through; }
.card-price .pct { color: var(--red); font-size: .74rem; font-weight: 800; }
.card-price .obo { color: var(--ink-dim); font-size: .72rem; }
.empty { color: var(--ink-dim); padding: 40px; text-align: center; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20,25,20,.72); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--cream); border-radius: 14px;
  max-width: 900px; width: 100%; max-height: 92vh; overflow: auto; position: relative;
}
.modal-close {
  position: absolute; top: 10px; right: 14px; background: none; border: none;
  color: var(--ink-dim); font-size: 1.8rem; cursor: pointer; z-index: 2;
}
.modal-close:hover { color: var(--ink); }
.modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 28px; }
.modal-img { display: flex; align-items: center; justify-content: center; background: var(--sand); border-radius: 10px; padding: 16px; }
.modal-img img { max-width: 100%; max-height: 60vh; object-fit: contain; }
.modal-info h2 { font-size: 1.15rem; line-height: 1.4; margin: 10px 0 12px; color: var(--ink); }
.modal-price { font-size: 1.7rem; font-weight: 800; color: var(--green); margin-bottom: 14px; }
.modal-price .was { color: var(--ink-dim); font-size: 1rem; text-decoration: line-through; font-weight: 400; margin-left: 10px; }
.modal-price.sale { color: var(--red); }
.modal-meta { font-size: .88rem; color: var(--ink-dim); margin-bottom: 18px; line-height: 1.7; }
.modal-meta b { color: var(--ink); font-weight: 600; }
.modal-actions { display: flex; gap: 10px; margin-bottom: 14px; }
.btn-buy {
  background: var(--green); color: #fff; border: none; font-weight: 800;
  padding: 12px 26px; border-radius: 8px; cursor: pointer; font-size: .95rem;
}
.btn-buy:hover { background: var(--green-light); }
.btn-buy:disabled { background: var(--ink-dim); cursor: default; }
.btn-offer {
  background: none; border: 2px solid var(--orange); color: var(--orange-deep);
  padding: 11px 22px; border-radius: 8px; cursor: pointer; font-size: .95rem; font-weight: 700;
}
.btn-offer:hover { background: rgba(217,123,63,.1); }
.offer-form { border: 1px solid var(--line); background: var(--white); border-radius: 10px; padding: 16px; margin-bottom: 12px; }
.offer-form label { display: block; font-size: .85rem; color: var(--ink-dim); margin-bottom: 10px; }
.offer-form input {
  display: block; width: 100%; margin-top: 4px; background: var(--cream);
  border: 1px solid var(--line); color: var(--ink); padding: 9px 10px; border-radius: 6px;
}
.offer-note { font-size: .75rem; color: var(--ink-dim); margin-top: 10px; }
.sku-line { font-size: .75rem; color: var(--ink-dim); }

/* ---------- footer ---------- */
.site-footer { background: var(--green-dark); color: #cfe3d3; margin-top: auto; }
.footer-cols {
  max-width: 1400px; margin: 0 auto; padding: 36px 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px;
}
.footer-col h3 { color: #ffd9a8; font-size: .85rem; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 10px; }
.footer-col button, .footer-col a, .footer-col span {
  display: block; background: none; border: none; color: #cfe3d3; text-align: left;
  font-size: .88rem; padding: 3px 0; cursor: pointer; text-decoration: none;
}
.footer-col button:hover, .footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-col span { cursor: default; }
.footer-logo { width: 64px; height: 64px; border-radius: 50%; background: #fff; margin-bottom: 10px; }
.footer-base {
  border-top: 1px solid rgba(255,255,255,.14); text-align: center;
  padding: 14px; font-size: .8rem; color: #9dbfa6;
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .modal-body { grid-template-columns: 1fr; }
  .brand-name { font-size: 1rem; }
  .caro .card { flex-basis: 175px; }
}
