/* The public website. Same navy and yellow as the post graphics; each deal card takes its category's accent colour. */

/* Bebas Neue (SIL Open Font License, see assets/fonts/OFL.txt), for the big "% off". */
@font-face {
  font-family: "Bebas Neue";
  src: url("fonts/BebasNeue-Regular.ttf") format("truetype");
  font-display: swap;
}
:root {
  --navy: #111827;
  --navy-2: #1f2937;
  --yellow: #fccd34;
  --ink: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f1f5f9;
  --card: #fff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

.hero { background: var(--navy); color: #cbd5e1; padding: 28px 0 32px; }
.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: clamp(28px, 6vw, 44px);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.brand span { color: var(--yellow); }
.hero p { margin: 8px 0 0; max-width: 640px; }

/* The Associates disclosure, right under the header on every page. */
.disclosure { margin: 0; background: var(--yellow); color: var(--navy); font-size: 14px; font-weight: 600; padding: 8px 0; }
.disclosure .wrap { display: block; }

.stores { display: flex; gap: 8px; margin: 20px 0 0; flex-wrap: wrap; }
.stores a {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.stores a[aria-current] { background: var(--navy); border-color: var(--navy); color: #fff; }

.empty { margin: 48px 0; text-align: center; color: var(--muted); font-size: 18px; }

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

.finder { display: flex; gap: 8px; margin: 20px 0 0; flex-wrap: wrap; }
.finder input, .finder button {
  font: inherit;
  font-size: 15px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  min-width: 0;
}
.finder input { flex: 1 1 220px; }
.finder input:focus { outline: 2px solid var(--yellow); outline-offset: 1px; }
.finder button { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; cursor: pointer; }

/* Category tabs: one row that scrolls sideways on a phone when there are more than fit. */
.cats {
  display: flex;
  gap: 8px;
  margin: 14px 0 0;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.cats a {
  flex: none;
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.cats a span { color: var(--muted); font-weight: 500; margin-left: 2px; }
.cats a:hover { border-color: var(--navy); }
.cats a[aria-current] { background: var(--navy); border-color: var(--navy); color: #fff; }
.cats a[aria-current] span { color: var(--yellow); }

.found { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.found a { color: var(--ink); font-weight: 600; }

/* The filter sidebar beside the deals on wide screens; above them, folded into "Filters", on phones. */
.shop { margin-top: 20px; }
.results { min-width: 0; }
.results .found { margin-top: 0; }
@media (min-width: 900px) {
  .shop { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
  .shop aside { position: sticky; top: 16px; }
}
.filters { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; }
.filters summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 16px;
  padding: 12px 0;
  list-style-position: inside;
}
.filters fieldset { border: 0; margin: 0 0 14px; padding: 0; }
.filters legend { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 6px; padding: 0; }
.filters label { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; cursor: pointer; }
.filters input[type=radio] { accent-color: var(--navy); width: 16px; height: 16px; margin: 0; }
.filter-actions { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-size: 14px; }
.filter-actions .apply {
  font: inherit;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 10px;
  border: 0;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
}
.filter-actions a { color: var(--ink); font-weight: 600; }
.filter-actions a[hidden] { display: none; }
/* With scripts the filters apply as you pick, so the Apply button is not needed. */
.js .filter-actions .apply { display: none; }

.deals {
  list-style: none;
  margin: 16px 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.deal[hidden], .found[hidden], .empty[hidden] { display: none; }

/* The deal opened by its short address (realpricedrops.com/12): first, larger on wide screens, outlined in its colour. */
.deal.featured { box-shadow: 0 0 0 3px var(--accent), 0 10px 30px rgb(17 24 39 / 0.18); }
@media (min-width: 560px) {
  .deal.featured { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; }
  .deal.featured .featured-label { grid-column: 1 / -1; }
  .deal.featured .photo { border-right: 1px solid var(--line); }
  .deal.featured .body { border-top: 0; }
}
.featured-label {
  margin: 0;
  padding: 8px 16px;
  background: var(--navy);
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ended { margin: 20px 0 0; padding: 12px 16px; border-radius: 10px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }

.deal {
  --accent: var(--yellow);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
}

.photo { position: relative; display: block; aspect-ratio: 1; background: #fff; padding: 20px; }
.photo img { width: 100%; height: 100%; object-fit: contain; }
/* The big "% off", in the same tall font as the post graphics. */
.off {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--navy);
  color: var(--accent);
  font: 400 34px/1 "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 8px 14px 5px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.2);
}

.body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; border-top: 1px solid var(--line); }
.added { margin: 0; text-align: center; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

.body h2 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; }
.body h2 a {
  color: inherit;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.body h2 a:hover { text-decoration: underline; }

/* The product's highlights from Amazon, the first three, each cut to two lines. */
.highlights { margin: 0; padding-left: 16px; color: #475569; font-size: 13px; line-height: 1.4; }
.highlights li { margin: 0 0 4px; }
.highlights li::marker { color: var(--accent); }
.highlights span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price { margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; position: relative; }

/* Amazon's price disclaimer: shown on hover, and on tap or keyboard focus (phones have no hover). */
.info { align-self: center; }
.info button {
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--muted);
  background: none;
  color: var(--muted);
  font: italic 700 12px/18px Georgia, serif;
  cursor: help;
}
.info .tip {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 2;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--navy);
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.25);
}
.info:hover .tip, .info:focus-within .tip, .info.open .tip { display: block; }
.price strong { font-size: 24px; }

.when { margin: 0; color: var(--muted); font-size: 12px; }

.buy {
  margin-top: auto;
  display: block;
  text-align: center;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  padding: 10px;
  border-radius: 10px;
}
.buy:hover { filter: brightness(0.95); }

.foot { color: var(--muted); font-size: 13px; padding-top: 8px; padding-bottom: 40px; border-top: 1px solid var(--line); }
.foot a { color: var(--ink); }

/* The privacy policy and other pages of plain text. */
.page { max-width: 760px; padding-top: 8px; padding-bottom: 32px; }
.page h1 { font-size: 28px; margin: 24px 0 4px; }
.page h2 { font-size: 18px; margin: 28px 0 6px; }
.page p, .page li { color: #334155; }
.page a { color: var(--ink); font-weight: 600; }
