/* allsalestoday.com — brand tokens */
:root {
  --ink: #1b1d3a;          /* deep navy: text, wordmark "allsales" */
  --ink-2: #4a4d6b;
  --muted: #6e7190;
  --sale: #e8412c;         /* sale red: "today", discount badges */
  --sale-dark: #c22f1c;
  --sale-soft: #fdebe7;
  --code: #146c52;         /* coupon-code green */
  --code-soft: #e3f4ee;
  --cream: #fff8f1;        /* page background */
  --paper: #ffffff;
  --line: #ece4da;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(27, 29, 58, .06), 0 6px 18px rgba(27, 29, 58, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.55 var(--font); }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 750; }
h3 { font-size: 1rem; font-weight: 650; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--sale); margin: 0 0 .6em; }
.lede { font-size: 1.1rem; color: var(--ink-2); max-width: 46ch; }

/* wordmark */
.wordmark { display: inline-flex; align-items: center; gap: .15em; font-weight: 800; font-size: 1.45rem; letter-spacing: -.03em; text-decoration: none; }
.wordmark .tag { width: 1.05em; height: 1.05em; fill: var(--sale); margin-right: .2em; }
.wordmark .tag circle { fill: var(--cream); }
.wordmark .w1 { color: var(--ink); }
.wordmark .w2 { color: var(--sale); }
.wordmark.small { font-size: 1.15rem; margin-bottom: .5em; }

/* header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { text-decoration: none; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a { text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { background: var(--cream); }
.nav .nav-cta { background: var(--ink); color: #fff; }
.nav .nav-cta:hover { background: var(--sale); }

/* hero */
.hero { background: linear-gradient(180deg, var(--paper), var(--cream)); border-bottom: 1px solid var(--line); padding: 44px 0 36px; margin-bottom: 28px; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } }

/* subscribe */
.subscribe { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.subscribe .sub-title { display: block; font-weight: 750; font-size: 1.1rem; margin: 0 0 12px; }
.subscribe .muted, .subscribe .fine { color: #c9cae0; }
.subscribe .fine { font-size: .8rem; margin: 10px 0 0; }
.sub-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sub-row input[type=email] { flex: 1 1 200px; min-width: 0; padding: 12px 14px; border-radius: 10px; border: 0; font: inherit; }
.sub-row button, .btn { background: var(--sale); color: #fff; border: 0; border-radius: 10px; padding: 12px 18px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block; }
.sub-row button:hover, .btn:hover { background: var(--sale-dark); }
.subscribe.inline, .subscribe.page { margin: 40px 0; }

/* sections + grids */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 28px 0 14px; }
.section-head h2 { margin: 0; }
.more { font-weight: 600; text-decoration: none; color: var(--sale); }
.grid { display: grid; gap: 16px; }
.grid.campaigns { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid.products { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

/* cards */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(27,29,58,.08), 0 12px 28px rgba(27,29,58,.10); }
.campaign-card .thumb { aspect-ratio: 16 / 9; background: var(--sale-soft); position: relative; overflow: hidden; }
.campaign-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.campaign-card .thumb-fallback { display: none; }
.campaign-card .thumb.no-img { display: grid; place-items: center; background: repeating-linear-gradient(135deg, var(--sale-soft) 0 14px, #fbe1db 14px 28px); }
.campaign-card .thumb.no-img .thumb-fallback { display: block; font-weight: 800; font-size: 1.5rem; color: var(--sale); letter-spacing: -.02em; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-meta { display: flex; justify-content: space-between; gap: 8px; font-size: .8rem; }
.card-meta .retailer { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.card-body h3 { margin: 0; }
.card-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.badge { background: var(--sale); color: #fff; font-weight: 700; font-size: .8rem; padding: 3px 9px; border-radius: 999px; }
.code { background: var(--code-soft); color: var(--code); font-size: .8rem; padding: 3px 9px; border-radius: 999px; }
.ends { color: var(--ink-2); }
.ends.ended { color: var(--sale); font-weight: 700; }
.is-ended { opacity: .65; }

.product-card { padding: 10px; gap: 6px; }
.pthumb { aspect-ratio: 1; background: #fff; border-radius: 10px; position: relative; overflow: hidden; }
.pthumb img { width: 100%; height: 100%; object-fit: contain; }
.pct { position: absolute; top: 8px; left: 8px; background: var(--sale); color: #fff; font-weight: 800; font-size: .8rem; padding: 3px 8px; border-radius: 999px; }
.pname { margin: 0; font-size: .88rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.plabel { margin: 0; font-size: .75rem; color: var(--code); font-weight: 600; }

/* campaign page */
.page { padding: 24px 16px 20px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 16px; overflow-wrap: anywhere; }
.crumbs a { color: var(--muted); }
.campaign-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
@media (max-width: 820px) { .campaign-head { grid-template-columns: 1fr; } }
.hero-img img { border-radius: 10px; width: 100%; }
.facts { list-style: none; padding: 0; margin: 12px 0 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.facts li { background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; min-width: 120px; }
.facts span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.facts b { font-size: 1rem; }
.copy { margin-left: 6px; font: inherit; font-size: .75rem; font-weight: 700; border: 1px solid var(--code); color: var(--code); background: var(--code-soft); border-radius: 6px; padding: 1px 8px; cursor: pointer; }
.summary { font-size: 1.05rem; color: var(--ink-2); max-width: 60ch; }
.ended-banner { background: var(--sale-soft); border: 1px solid #f6c3b9; color: var(--sale-dark); padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; }
.guide { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 32px 0; }
.guide ul { padding-left: 1.2em; }
.guide li { margin: .35em 0; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; }
.empty { padding: 40px 0; color: var(--muted); }
.ad { margin: 24px 0; min-height: 90px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--paper); margin-top: 48px; padding: 32px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { text-decoration: none; font-weight: 600; }
.copyright { margin-top: 16px; }

.more-sales { margin-top: 40px; }
@media (max-width: 600px) {
  .grid.campaigns { grid-template-columns: 1fr 1fr; gap: 10px; }
  .campaign-card .thumb { aspect-ratio: 4 / 3; }
  .campaign-card .thumb.no-img .thumb-fallback { font-size: 1.05rem; text-align: center; padding: 0 6px; }
  .card-body { padding: 10px 10px 12px; }
  .card-meta { flex-direction: column; gap: 2px; font-size: .72rem; }
  .card-body h3 { font-size: .9rem; }
  .grid.products { grid-template-columns: 1fr 1fr; gap: 10px; }
  .header-row { padding: 8px 0; }
}
.pthumb { background: #f6f1ea; }
@media (max-width: 600px) {
  .header-row { flex-wrap: nowrap; min-height: 56px; }
  .wordmark { font-size: 1.2rem; }
  .nav a:not(.nav-cta) { display: none; }
  .nav .nav-cta { padding: 7px 12px; font-size: .85rem; }
}
.store-pills { display: flex; gap: 8px; flex-wrap: wrap; margin: -8px 0 8px; }
.store-pills a { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: .9rem; text-decoration: none; }
.store-pills a:hover { border-color: var(--sale); color: var(--sale); }
