/* EdsBargains — dense deal-list UI inspired by classic bargain boards (bensbargains-like). */
:root {
  --bg: #f5f6f8;
  --bg-panel: #ffffff;
  --ink: #1c1f24;
  --muted: #5b6570;
  --line: #d9dee5;
  --accent: #e85d04;
  --accent-hover: #d04f00;
  --price: #0b7a3e;
  --badge-bg: #e8f6ee;
  --header: #1f2933;
  --radius: 4px;
  --font: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.45;
  font-size: 15px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #0b5cab; text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(1080px, calc(100% - 1.5rem)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 0; background: #000; color: #fff; padding: .5rem 1rem; z-index: 99; }
.skip:focus { left: 1rem; top: 1rem; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header);
  border-bottom: 3px solid var(--accent);
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .65rem 1rem;
  align-items: center;
  padding: .65rem 0;
}
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 1.75rem; height: 1.75rem; border-radius: 3px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 700; font-size: .95rem;
}
.brand-text { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.brand-text span { color: var(--accent); }
.search { display: flex; gap: .35rem; }
.search input {
  flex: 1; min-width: 0; border: 1px solid #3a4652; border-radius: var(--radius);
  padding: .45rem .7rem; background: #fff; font: inherit;
}
.search button, .btn {
  border: 0; border-radius: var(--radius); padding: .5rem .9rem; font: inherit; font-weight: 700;
  cursor: pointer; text-transform: uppercase; letter-spacing: .02em; font-size: .82rem;
}
.search button, .btn.primary {
  background: var(--accent); color: #fff; text-decoration: none; display: inline-block; text-align: center;
}
.search button:hover, .btn.primary:hover { background: var(--accent-hover); text-decoration: none; color: #fff; }
.btn.ghost {
  background: var(--bg-panel); border: 1px solid var(--line); color: var(--ink);
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; text-align: center;
}
.btn.ghost:hover { border-color: #b8c0ca; text-decoration: none; }
.btn.lg { padding: .75rem 1.2rem; font-size: .9rem; }
.nav { display: flex; gap: .75rem; flex-wrap: wrap; }
.nav a { color: #d7dde5; text-decoration: none; font-weight: 600; font-size: .9rem; }
.nav a.is-active, .nav a:hover { color: #fff; }

.hero {
  padding: 1.25rem 0 0.75rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: .5rem;
}
.hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  line-height: 1.15;
  margin: 0 0 .35rem;
  font-weight: 700;
}
.lede { max-width: 42rem; color: var(--muted); margin: 0 0 .75rem; font-size: .98rem; }
.hero-cta { display: flex; gap: .55rem; flex-wrap: wrap; }

.filters { display: flex; gap: .35rem; flex-wrap: wrap; padding: .65rem 0 .85rem; }
.pill {
  text-decoration: none; color: var(--ink);
  background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: 999px; padding: .25rem .65rem; font-size: .82rem; font-weight: 600;
}
.pill:hover { text-decoration: none; border-color: #b8c0ca; }
.pill span { color: var(--muted); margin-left: .2rem; font-weight: 500; }
.pill.is-active { background: var(--header); color: #fff; border-color: var(--header); }
.pill.is-active span { color: #c5ced8; }

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin: 1rem 0 .55rem; }
.section-head h2 { font-size: 1.15rem; margin: 0; font-weight: 700; }
.section-head p { margin: 0; color: var(--muted); font-size: .88rem; }

.deal-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--line);
}
.deal-row {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: .85rem;
  align-items: center;
  padding: .7rem .85rem;
  border-bottom: 1px solid var(--line);
}
.deal-row:last-child { border-bottom: 0; }
.deal-row:hover { background: #fafbfc; }
.deal-thumb {
  width: 88px; height: 88px; background: #fff; border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden;
}
.deal-thumb img { max-width: 80px; max-height: 80px; object-fit: contain; }
.deal-main { min-width: 0; }
.deal-meta { font-size: .75rem; color: var(--muted); margin-bottom: .15rem; }
.deal-title { font-size: .98rem; margin: 0 0 .25rem; line-height: 1.3; font-weight: 600; }
.deal-title a { color: inherit; }
.deal-title .title-price, .title-price { color: var(--price); font-weight: 700; }
.deal-price { margin: 0; display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; }
.deal-price .now { font-size: 1.2rem; font-weight: 700; color: var(--price); }
.deal-price.lg .now { font-size: 1.75rem; }
.deal-price .was { color: var(--muted); font-size: .88rem; }
.deal-price .was s, .deal-price .was { text-decoration: none; }
.deal-price-link { color: inherit; text-decoration: none; display: inline-flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; }
.deal-price-link:hover { text-decoration: none; }
.deal-heading-link { color: inherit; text-decoration: none; }
.deal-heading-link:hover { text-decoration: underline; }
.badge { background: var(--badge-bg); color: var(--price); font-weight: 700; font-size: .75rem; padding: .1rem .4rem; border-radius: 3px; }
.deal-side { display: flex; flex-direction: column; gap: .35rem; align-items: stretch; min-width: 11rem; }

.deal-detail {
  display: grid;
  grid-template-columns: minmax(200px, 320px) 1fr;
  gap: 1.25rem;
  padding: 1.1rem 0 1.5rem;
}
.deal-detail-media {
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; display: grid; place-items: center; text-decoration: none; color: inherit;
}
.deal-detail-media:hover { text-decoration: none; border-color: #b8c0ca; }
.bounty-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.bounty-row .deal-thumb { background: #fff; }
.bounty-row .deal-thumb img { max-width: 80px; max-height: 80px; object-fit: contain; }
.deal-detail-copy h1 { font-size: clamp(1.25rem, 3vw, 1.7rem); margin: 0 0 .5rem; line-height: 1.25; }
.crumb { color: var(--muted); font-size: .85rem; margin: 0 0 .4rem; }
.coupon-box {
  display: inline-flex; align-items: center; gap: .5rem;
  background: #fff8e8; border: 1px dashed #e0b35a; padding: .45rem .7rem;
  border-radius: var(--radius); font-weight: 700; margin: .5rem 0;
}
.coupon-note { color: var(--muted); font-size: .85rem; font-style: italic; margin: .35rem 0 .75rem; }
.facts { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin: .75rem 0; }
.facts li { background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .45rem .6rem; font-size: .9rem; }
.facts span { display: block; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.fine { color: var(--muted); font-size: .82rem; }
.deal-actions {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
  margin: .85rem 0 0;
  align-items: stretch;
}
.deal-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: .75rem 1.2rem;
  font-size: .9rem;
  line-height: 1.2;
  box-sizing: border-box;
}
.bounty-detail .deal-detail-media img {
  width: min(100%, 280px);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.prose { padding: 1.1rem 0 .85rem; max-width: 42rem; }
.prose h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 .55rem; }
.page-label { color: var(--muted); font-weight: 600; font-size: .85em; }

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem .65rem;
  margin: 1.1rem 0 1.5rem;
  padding: .75rem 0;
  border-top: 1px solid var(--line);
}
.page-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.page-btn, .page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: .35rem .65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: .88rem;
  text-decoration: none;
}
.page-btn:hover, .page-num:hover { border-color: #b8c0ca; text-decoration: none; }
.page-num.is-current {
  background: var(--header);
  color: #fff;
  border-color: var(--header);
  pointer-events: none;
}
.page-btn.is-disabled {
  opacity: .45;
  cursor: not-allowed;
}
.page-gap {
  padding: 0 .2rem;
  color: var(--muted);
  font-weight: 600;
}
.page-status {
  margin: 0 0 0 auto;
  color: var(--muted);
  font-size: .85rem;
}

.cat-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .55rem; }
.cat-list > li { min-width: 0; }
.cat-list a {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem;
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .75rem .85rem; text-decoration: none; color: inherit; font-weight: 600;
  min-height: 3rem; box-sizing: border-box;
}
.cat-list a strong,
.cat-list a > :first-child {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cat-list a span {
  color: var(--muted); font-weight: 500; flex-shrink: 0; white-space: nowrap;
}
.bounty-teaser a {
  gap: .5rem;
}
.bounty-teaser a .teaser-thumb {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: 3px; object-fit: contain;
  background: #fff; border: 1px solid var(--line);
}
.bounty-teaser a .teaser-label {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.site-footer {
  margin-top: 2rem; padding: 1.5rem 0 1.75rem;
  border-top: 1px solid var(--line);
  background: #eef1f4;
  color: var(--muted);
}
.site-footer a { color: #0b5cab; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1.25rem; margin-bottom: .75rem;
}
.footer-grid strong { color: var(--ink); display: block; margin-bottom: .25rem; }
.footer-grid a { display: block; margin-top: .3rem; }
.fineprint { opacity: .9; font-size: .8rem; }

@media (max-width: 860px) {
  .header-inner { grid-template-columns: 1fr; }
  .deal-row { grid-template-columns: 72px 1fr; }
  .deal-thumb { width: 72px; height: 72px; }
  .deal-side { grid-column: 1 / -1; flex-direction: row; min-width: 0; }
  .deal-detail { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav { order: 3; }
}
