/*
Theme Name: TheGuySee
Theme URI: https://theguysee.com/
Author: TheGuySee
Description: A modern coupon & deals theme for TheGuySee. Adds a Deals post type with stores, categories, coupon codes, expiry dates, automatic expiry clean-up, tracked /go/ affiliate links, CSV import and live deal blocks inside blog posts.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: theguysee
*/

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --font-display: 'Cabinet Grotesk', 'Satoshi', system-ui, sans-serif;
  --font-body: 'Satoshi', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --bg: #f6f3ee;
  --surface: #ffffff;
  --surface-2: #efeae1;
  --ink: #17150f;
  --ink-2: #3a362e;
  --muted: #6b665c;
  --line: #e4ded3;
  --line-2: #d4ccbf;

  --accent: #ff5a1f;           /* brand tangerine: dots, hovers, highlights */
  --accent-text: #c2410c;      /* accessible accent for text on light */
  --pop: #dcf65a;              /* lime sticker */
  --pop-ink: #17150f;
  --ok: #17784a;
  --ok-bg: #e3f3e9;
  --urgent: #c2331b;
  --urgent-bg: #fde8e2;

  --btn-bg: var(--ink);
  --btn-ink: #fbf9f5;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(23, 21, 15, .06);
  --shadow: 0 1px 2px rgba(23, 21, 15, .05), 0 10px 30px -14px rgba(23, 21, 15, .22);
  --shadow-lg: 0 30px 60px -20px rgba(23, 21, 15, .35);

  --container: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);

  --text-xs: .75rem;
  --text-sm: .875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: clamp(1.4rem, 1.1rem + 1vw, 1.75rem);
  --text-2xl: clamp(1.9rem, 1.3rem + 2.2vw, 2.75rem);
  --text-hero: clamp(2.6rem, 1.4rem + 5vw, 5rem);

  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12110e;
    --surface: #1b1a16;
    --surface-2: #24221d;
    --ink: #f3efe7;
    --ink-2: #d8d2c6;
    --muted: #a19a8c;
    --line: #2d2a24;
    --line-2: #3b372f;
    --accent-text: #ff8a5c;
    --ok: #5fd39a;
    --ok-bg: #16301f;
    --urgent: #ff8f78;
    --urgent-bg: #3a1a12;
    --btn-bg: #f3efe7;
    --btn-ink: #17150f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -14px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-text); }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--pop); color: var(--pop-ink); }
[hidden] { display: none !important; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link { position: absolute; left: -999px; top: 1rem; z-index: 100; background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: 999px; }
.skip-link:focus { left: 1rem; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--prose { max-width: 780px; }
.stack-lg > * + * { margin-top: 3rem; }

/* ==========================================================================
   Buttons, chips, flags
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .65rem 1.2rem; border-radius: 999px;
  font-weight: 700; font-size: var(--text-sm); text-decoration: none; line-height: 1;
  border: 1.5px solid transparent; transition: transform .15s var(--ease), background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 18px; height: 18px; }
.btn--ink { background: var(--btn-bg); color: var(--btn-ink); }
.btn--ink:hover { background: var(--accent); color: #17150f; }
.btn--line { border-color: var(--line-2); background: var(--surface); color: var(--ink); }
.btn--line:hover { border-color: var(--ink); color: var(--ink); }
.btn--sm { min-height: 40px; padding: .5rem 1rem; }
.btn--block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
  transition: border-color .15s, background .15s;
}
.icon-btn:hover { border-color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.chip {
  border: 1.5px solid var(--line-2); background: transparent; border-radius: 999px;
  padding: .45rem .95rem; font-size: var(--text-sm); font-weight: 500; min-height: 38px;
  transition: all .15s var(--ease);
}
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }

.flag {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: var(--text-xs); font-weight: 700; letter-spacing: .02em;
  padding: .2rem .5rem; border-radius: 999px; line-height: 1.3;
}
.flag .icon { width: 13px; height: 13px; stroke-width: 3; }
.flag--ok { background: var(--ok-bg); color: var(--ok); }
/* Compact "verified" tick on grid cards when space is tight */
.deal--grid .flag--pop + .flag--ok, .deal--mini .flag--pop + .flag--ok { padding: .2rem; }
.deal--grid .flag--pop + .flag--ok .flag__text, .deal--mini .flag--pop + .flag--ok .flag__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.flag--pop { background: var(--pop); color: var(--pop-ink); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: var(--text-sm); font-weight: 500; color: var(--muted);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }

.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: var(--text-sm); text-decoration: none; }
.link-arrow .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.is-scrolled { border-color: var(--line); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }

.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 34px; height: 34px; color: var(--ink); }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; letter-spacing: -.03em; line-height: 1; }
.brand__name span { color: var(--accent-text); }
.brand__img { max-height: 44px; width: auto; }

.primary-nav { flex: 1; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; }
.primary-nav > ul, .primary-nav > .menu { display: flex; align-items: center; gap: .15rem; flex-wrap: nowrap; }
.primary-nav li { position: relative; }
.primary-nav a {
  display: block; padding: .5rem .75rem; border-radius: 999px;
  font-size: var(--text-sm); font-weight: 500; text-decoration: none; color: var(--ink-2); white-space: nowrap;
}
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current-menu-ancestor > a { background: var(--surface-2); color: var(--ink); }
.primary-nav .sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 220px; padding: .5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .15s var(--ease);
}
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-nav .sub-menu a { border-radius: var(--radius-sm); }

.header-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.nav-toggle { display: none; }
.header-search { border-top: 1px solid var(--line); padding: 1rem 0; background: var(--bg); }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-grid; }
  .header-cta { display: none; }
  .primary-nav {
    position: fixed; inset: 72px 0 0 0; background: var(--bg); padding: 1rem var(--gutter) 2rem;
    overflow-y: auto; display: none; border-top: 1px solid var(--line);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav > ul, .primary-nav > .menu { flex-direction: column; align-items: stretch; gap: .25rem; }
  .primary-nav a { font-size: var(--text-lg); padding: .85rem 1rem; border-radius: var(--radius-sm); }
  .primary-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 1rem; background: transparent; }
  .nav-open { overflow: hidden; }
}

/* ==========================================================================
   Search bar
   ========================================================================== */
.searchbar {
  display: flex; align-items: center; gap: .5rem;
  background: var(--surface); border: 1.5px solid var(--line-2); border-radius: 999px;
  padding: .35rem .35rem .35rem 1.1rem; max-width: 560px; box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.searchbar:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.searchbar .icon { color: var(--muted); flex-shrink: 0; }
.searchbar input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; padding: .55rem 0; font-size: var(--text-base); }
.searchbar input::-webkit-search-cancel-button { display: none; }
.searchbar .btn { min-height: 44px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem); position: relative; overflow: hidden; }
.hero { background: radial-gradient(560px 360px at 80% 45%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; position: relative; }
.hero__title { font-family: var(--font-display); font-weight: 800; font-size: var(--text-hero); letter-spacing: -.035em; line-height: .98; margin: 1rem 0 1.25rem; text-wrap: balance; }
.hero__text { font-size: var(--text-lg); color: var(--ink-2); max-width: 36em; margin-bottom: 1.75rem; }
.hero__stats { display: flex; gap: clamp(1.25rem, 4vw, 2.75rem); margin: 2rem 0 0; flex-wrap: wrap; }
.hero__stats div { display: flex; flex-direction: column-reverse; }
.hero__stats dt { font-size: var(--text-sm); color: var(--muted); }
.hero__stats dd { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: var(--text-xl); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.hero__stack { display: grid; gap: .85rem; position: relative; }
.hero__stack-label { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--text-sm); font-weight: 700; color: var(--muted); }
.hero__stack-label .icon { width: 16px; height: 16px; color: var(--accent); fill: var(--accent); }
.hero__stack .deal:nth-child(2) { transform: rotate(-1.2deg); }
.hero__stack .deal:nth-child(3) { transform: rotate(.8deg) translateX(14px); }
.hero__stack .deal:nth-child(4) { transform: rotate(-.6deg) translateX(-6px); }
.hero__stack .deal { transition: transform .25s var(--ease); }
.hero__stack .deal:hover { transform: none; }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__stack .deal { transform: none !important; }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section--tight { padding: clamp(2rem, 4vw, 3rem) 0; }
.section--flush-top { padding-top: 0; }
.section--band { background: var(--surface-2); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 1.5rem; }
.section-head--split { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-title {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-display); font-weight: 800; font-size: var(--text-2xl); letter-spacing: -.03em;
}
.section-title .icon { width: 28px; height: 28px; color: var(--accent); stroke-width: 2.4; }
.section-title--sm { font-size: var(--text-xl); margin: 2.5rem 0 1rem; }
.section-sub { color: var(--muted); margin-top: .35rem; }

.page-hero { padding: clamp(2.25rem, 5vw, 4rem) 0 clamp(1.75rem, 3vw, 2.5rem); }
.page-hero--compact { padding-bottom: 1.25rem; }
.page-title { font-family: var(--font-display); font-weight: 800; font-size: var(--text-2xl); letter-spacing: -.03em; margin-top: .6rem; text-wrap: balance; }
.page-hero--compact .page-title { margin-top: 0; }
.page-intro { color: var(--ink-2); font-size: var(--text-lg); max-width: 44em; margin-top: .75rem; }
.page-search { margin-top: 1.5rem; }

.toolbar { display: flex; justify-content: space-between; align-items: start; gap: 1rem; flex-wrap: wrap; }
.toolbar .chips { margin-bottom: 1.5rem; }
.sort { display: inline-flex; align-items: center; gap: .5rem; font-size: var(--text-sm); color: var(--muted); }
.sort select { border: 1.5px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: .5rem 2rem .5rem .9rem; min-height: 40px; color: var(--ink); font-weight: 500; }

.empty-state { border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 2.5rem 1.5rem; text-align: center; color: var(--muted); }
.notice-bar { background: var(--pop); color: var(--pop-ink); font-weight: 700; border-radius: var(--radius-sm); padding: .8rem 1rem; margin-bottom: 1rem; font-size: var(--text-sm); }

/* ==========================================================================
   Store logos, chips, grid
   ========================================================================== */
.store-logo {
  --s: 40px;
  width: var(--s); height: var(--s); flex-shrink: 0; border-radius: 12px; overflow: hidden;
  display: inline-grid; place-items: center; background: #fff; border: 1px solid var(--line);
}
.store-logo--sm { --s: 30px; border-radius: 9px; }
.store-logo--lg { --s: 56px; border-radius: 16px; }
.store-logo--xl { --s: 88px; border-radius: 22px; }
.store-logo__img { width: 100%; height: 100%; object-fit: contain; padding: 12%; }
.store-logo--mono {
  background: var(--logo-bg, #1d3557); color: #fff; border-color: transparent;
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em;
  font-size: calc(var(--s) * .4); line-height: 1;
}

.store-chip { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; min-width: 0; }
.store-chip__name { font-weight: 700; font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-chip--pill { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .8rem .25rem .25rem; }
.store-chip--pill .store-logo { border-radius: 999px; }
.inline-stores { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }

.store-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.store-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; padding: 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; height: 100%; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.store-tile:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); color: var(--ink); }
.store-tile__name { font-weight: 700; line-height: 1.2; }
.store-tile__count { font-size: var(--text-xs); color: var(--muted); margin-top: auto; }

/* ==========================================================================
   Deal card (ticket)
   ========================================================================== */
.deal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; }
.deal-list { display: grid; gap: .85rem; }

.deal {
  --notch: 11px;
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
  min-width: 0;
}
.deal:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.deal__body { padding: 1.1rem 1.15rem 1rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; min-width: 0; }
.deal__top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-width: 0; }
.deal__flags { display: inline-flex; gap: .3rem; flex-shrink: 0; }
.deal__discount {
  font-family: var(--font-display); font-weight: 800; font-size: var(--text-xl); letter-spacing: -.025em;
  line-height: 1.05; color: var(--accent-text); margin-top: .35rem;
}
.deal__title { font-family: var(--font-body); font-size: var(--text-base); font-weight: 500; line-height: 1.4; color: var(--ink-2); }
.deal__title a { text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deal__title a:hover { color: var(--ink); text-decoration: underline; }
.deal__meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; font-size: var(--text-xs); color: var(--muted); margin-top: auto; padding-top: .25rem; }
.deal__type::before { content: "·"; margin-right: .75rem; }
.expiry { display: inline-flex; align-items: center; gap: .3rem; font-weight: 500; }
.expiry .icon { width: 14px; height: 14px; }
.expiry.is-urgent { color: var(--urgent); font-weight: 700; }
.expiry.is-soon { color: var(--ink-2); font-weight: 700; }

/* Perforated divider with side notches */
.deal__action {
  position: relative; padding: .9rem 1.15rem 1.1rem;
  border-top: 1.5px dashed var(--line-2);
}
.deal__action::before, .deal__action::after {
  content: ""; position: absolute; top: calc(var(--notch) * -1 - 1px); width: calc(var(--notch) * 2); height: calc(var(--notch) * 2);
  border-radius: 50%; background: var(--bg); border: 1px solid var(--line);
}
.section--band .deal__action::before, .section--band .deal__action::after,
.side-card .deal__action::before, .side-card .deal__action::after,
.inline-deals .deal__action::before, .inline-deals .deal__action::after { background: var(--surface-2); }
.deal__action::before { left: calc(var(--notch) * -1 - 1px); clip-path: inset(0 0 0 50%); }
.deal__action::after { right: calc(var(--notch) * -1 - 1px); clip-path: inset(0 50% 0 0); }

/* Deal buttons */
.dealbtn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; min-height: 48px; border-radius: 12px; text-decoration: none;
  font-weight: 700; font-size: var(--text-sm); overflow: hidden;
}
.dealbtn .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.dealbtn--deal { background: var(--btn-bg); color: var(--btn-ink); }
.dealbtn--deal:hover { background: var(--accent); color: #17150f; }
.dealbtn--deal:hover .icon { transform: translateX(3px); }
.dealbtn--code { border: 1.5px dashed var(--ink); background: var(--surface); color: var(--ink); justify-content: flex-end; padding-right: 1rem; }
.dealbtn__peek { font-family: var(--font-mono); font-weight: 700; letter-spacing: .08em; font-size: var(--text-sm); }
.dealbtn__label {
  position: absolute; inset: -1.5px auto -1.5px -1.5px; width: calc(100% - 3.6rem);
  display: grid; place-items: center; background: var(--btn-bg); color: var(--btn-ink);
  border-radius: 12px 0 0 12px; transition: width .25s var(--ease), background .15s;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  padding-right: 10px; white-space: nowrap;
}
.dealbtn--code:hover { color: var(--ink); }
.dealbtn--code:hover .dealbtn__label { width: calc(100% - 4.6rem); background: var(--accent); color: #17150f; }
.dealbtn--code.is-revealed { justify-content: center; padding: 0 1rem; }
.dealbtn--code.is-revealed .dealbtn__label { display: none; }
.dealbtn--expired { background: var(--surface-2); color: var(--muted); cursor: default; }

/* Row variant (store pages, articles) */
.deal--row { flex-direction: row; align-items: stretch; }
.deal--row .deal__action {
  border-top: 0; border-left: 1.5px dashed var(--line-2);
  display: flex; align-items: center; width: 220px; flex-shrink: 0; padding: 1.1rem;
}
.deal--row .deal__action::before { top: calc(var(--notch) * -1 - 1px); left: calc(var(--notch) * -1 - 1px); clip-path: inset(50% 0 0 0); }
.deal--row .deal__action::after { top: auto; bottom: calc(var(--notch) * -1 - 1px); right: auto; left: calc(var(--notch) * -1 - 1px); clip-path: inset(0 0 50% 0); }
.deal--row .deal__body { padding: 1.15rem 1.35rem; }
.deal--row .deal__discount { font-size: var(--text-2xl); }
@media (max-width: 640px) {
  .deal--row { flex-direction: column; }
  .deal--row .deal__action { width: auto; border-left: 0; border-top: 1.5px dashed var(--line-2); }
  .deal--row .deal__action::before { top: calc(var(--notch) * -1 - 1px); left: calc(var(--notch) * -1 - 1px); clip-path: inset(0 0 0 50%); }
  .deal--row .deal__action::after { top: calc(var(--notch) * -1 - 1px); bottom: auto; left: auto; right: calc(var(--notch) * -1 - 1px); clip-path: inset(0 50% 0 0); }
  .deal--row .deal__discount { font-size: var(--text-xl); }
}

/* Mini variant (hero stack, sidebar) */
.deal--mini { flex-direction: row; align-items: center; box-shadow: var(--shadow); }
.deal--mini .deal__body { padding: .9rem 1rem; gap: .3rem; }
.deal--mini .deal__discount { font-size: 1.5rem; margin-top: .15rem; }
.deal--mini .deal__meta { display: none; }
.deal--mini .deal__title { font-size: var(--text-sm); }
.deal--mini .deal__action { border-top: 0; border-left: 1.5px dashed var(--line-2); padding: .9rem; width: 172px; flex-shrink: 0; align-self: stretch; display: flex; align-items: center; }
.deal--mini .deal__action::before { top: calc(var(--notch) * -1 - 1px); left: calc(var(--notch) * -1 - 1px); clip-path: inset(50% 0 0 0); }
.deal--mini .deal__action::after { top: auto; bottom: calc(var(--notch) * -1 - 1px); right: auto; left: calc(var(--notch) * -1 - 1px); clip-path: inset(0 0 50% 0); }
.deal--mini .dealbtn { min-height: 44px; }
.deal--mini .dealbtn { font-size: var(--text-xs); }
.deal--mini .dealbtn__label { width: calc(100% - 3.1rem); }
.deal--mini .dealbtn--code:hover .dealbtn__label { width: calc(100% - 3.6rem); }
.deal--mini .dealbtn--code { padding-right: .7rem; }
.deal--mini .deal__flags .flag--ok { display: none; }
.side-card .deal-grid { grid-template-columns: 1fr; gap: .75rem; }
.side-card .deal--mini { box-shadow: none; }
.side-card .deal--mini .deal__action { width: 150px; }

/* Expired */
.deal.is-expired { opacity: .6; box-shadow: none; }
.deal.is-expired:hover { transform: none; }
.deal.is-expired .deal__discount { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.expired-block { margin-top: 2rem; }
.expired-block summary { cursor: pointer; font-weight: 700; color: var(--muted); padding: .5rem 0; margin-bottom: .75rem; }

/* Horizontal rail */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 300px); gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: .25rem .25rem 1rem; margin: 0 -.25rem;
  scrollbar-width: thin;
}
.rail > * { scroll-snap-align: start; }

/* ==========================================================================
   Coupon reveal dialog
   ========================================================================== */
.reveal {
  width: min(460px, calc(100vw - 2rem)); border: 0; padding: 2rem 1.75rem 1.75rem; border-radius: var(--radius-lg);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); text-align: center;
}
.reveal[open] { animation: pop .28s var(--ease); }
.reveal::backdrop { background: rgba(18, 17, 14, .55); backdrop-filter: blur(4px); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.reveal__close-form { position: absolute; top: .75rem; right: .75rem; margin: 0; }
.reveal__close { width: 40px; height: 40px; }
.reveal__store { font-weight: 700; font-size: var(--text-sm); color: var(--muted); }
.reveal__discount { font-family: var(--font-display); font-weight: 800; font-size: var(--text-2xl); color: var(--accent-text); letter-spacing: -.03em; line-height: 1.05; margin: .35rem 0; }
.reveal__title { font-family: var(--font-body); font-size: var(--text-base); font-weight: 500; color: var(--ink-2); line-height: 1.45; }
.reveal__code {
  display: flex; align-items: center; gap: .5rem; margin: 1.5rem 0 .75rem; padding: .45rem .45rem .45rem 1rem;
  border: 2px dashed var(--ink); border-radius: 14px; background: var(--bg);
}
.reveal__code code { flex: 1; font-family: var(--font-mono); font-weight: 700; font-size: 1.35rem; letter-spacing: .08em; text-align: left; overflow-wrap: anywhere; }
.reveal__code .btn.is-done { background: var(--ok); color: #fff; }
.reveal__hint { font-size: var(--text-sm); color: var(--muted); }
.reveal__terms { font-size: var(--text-xs); color: var(--muted); margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.reveal .btn--line { margin-top: 1.25rem; }

/* ==========================================================================
   Blog cards & article
   ========================================================================== */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.post-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card__media { aspect-ratio: 16 / 10; background: var(--surface-2); display: block; overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.post-card:hover .post-card__media img { transform: scale(1.03); }
.post-card__placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--line-2); }
.post-card__placeholder svg { width: 64px; height: 64px; }
.post-card__body { padding: 1.1rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: .5rem; }
.post-card__kicker { display: flex; gap: .6rem; font-size: var(--text-xs); color: var(--muted); font-weight: 500; }
.post-card__kicker span { color: var(--accent-text); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.post-card__title { font-family: var(--font-body); font-size: var(--text-lg); font-weight: 700; line-height: 1.3; }
.post-card__title a { text-decoration: none; }
.post-card__excerpt { font-size: var(--text-sm); color: var(--muted); }

.article__head { padding-top: clamp(2rem, 5vw, 3.5rem); max-width: 900px; }
.article__kicker { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: var(--text-sm); color: var(--muted); }
.article__kicker a { color: var(--accent-text); font-weight: 700; text-decoration: none; }
.article__title { font-family: var(--font-display); font-weight: 800; font-size: var(--text-2xl); letter-spacing: -.03em; margin: .75rem 0 1.75rem; text-wrap: balance; }
.article__media { margin-top: 0; margin-bottom: 2.5rem; }
.article__media img { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--radius-lg); border: 1px solid var(--line); }

.layout-split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.layout-split--article { padding-bottom: 4rem; }
.sidebar { display: grid; gap: 1rem; position: sticky; top: 96px; }
@media (max-width: 960px) {
  .layout-split { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
.side-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; display: grid; gap: .85rem; }
.side-card__title { font-size: var(--text-lg); font-weight: 700; font-family: var(--font-body); }
.steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .5rem; font-size: var(--text-sm); color: var(--ink-2); }
.steps li::marker { font-weight: 700; color: var(--accent-text); }
.side-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.side-links a { font-weight: 500; text-decoration: none; display: block; line-height: 1.35; }
.side-links a:hover { text-decoration: underline; }
.side-links time { font-size: var(--text-xs); color: var(--muted); }
.disclosure { font-size: var(--text-xs); color: var(--muted); }

.inline-deals { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 0 0 2rem; }
.inline-deals__label { display: flex; align-items: center; gap: .4rem; font-weight: 700; font-size: var(--text-sm); margin: 0 0 .75rem !important; }
.inline-deals__label .icon { color: var(--accent); width: 18px; height: 18px; }

/* Prose (post & page content, incl. existing Gutenberg/Spectra blocks) */
.prose { font-size: 1.0625rem; line-height: 1.75; color: var(--ink-2); min-width: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 { color: var(--ink); font-family: var(--font-body); font-weight: 700; margin-top: 2em; line-height: 1.25; }
.prose h2 { font-size: 1.6rem; letter-spacing: -.02em; }
.prose h3 { font-size: 1.3rem; }
.prose h4 { font-size: 1.1rem; }
.prose a { color: var(--accent-text); font-weight: 500; }
.prose img { border-radius: var(--radius); height: auto; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose blockquote { margin: 1.5em 0; padding: .25em 0 .25em 1.25em; border-left: 3px solid var(--accent); font-size: 1.15rem; color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.prose .wp-block-table { overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--surface-2); color: var(--ink); font-weight: 700; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose .wp-block-button__link, .prose .wp-element-button {
  background: var(--btn-bg); color: var(--btn-ink); border-radius: 999px; padding: .75rem 1.3rem; font-weight: 700; text-decoration: none;
}
.prose .not-prose, .prose .tgs-embed { font-size: var(--text-base); line-height: 1.6; }
.prose .tgs-embed { margin: 1.5em 0; }
.prose .deal__title { margin: 0; }
.prose .deal h3, .prose .not-prose h3 { margin-top: 0; }
.prose .deal-list, .prose .deal-grid { margin-top: 0; }
.store-about { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.deal-details { margin: 2rem 0; }
.crumbs { display: flex; gap: .5rem; font-size: var(--text-sm); color: var(--muted); }
.crumbs a { text-decoration: none; }

/* Store hero */
.store-hero { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.store-hero__copy { flex: 1; min-width: 260px; }
.store-hero__copy .page-title { margin-top: .4rem; }
.store-hero .page-intro { margin-top: .4rem; }

/* Newsletter band */
.newsletter { background: var(--ink); color: var(--bg); border-radius: var(--radius-lg); padding: clamp(1.75rem, 4vw, 3rem); }
.newsletter .widget-title { font-family: var(--font-display); font-weight: 800; font-size: var(--text-2xl); letter-spacing: -.03em; margin-bottom: .75rem; }
.newsletter a { color: var(--pop); }

/* Pagination */
.pagination { margin-top: 2.5rem; }
.pagination .nav-links { display: flex; gap: .35rem; flex-wrap: wrap; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 .9rem; border-radius: 999px; border: 1.5px solid var(--line-2); text-decoration: none; font-weight: 700; font-size: var(--text-sm); }
.pagination .page-numbers.current { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--surface-2); border-top: 1px solid var(--line); margin-top: 2rem; padding: 3.5rem 0 2rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.site-footer__brand p { color: var(--muted); font-size: var(--text-sm); margin-top: .9rem; max-width: 30em; }
.site-footer__title { font-size: var(--text-sm); font-weight: 700; margin-bottom: .85rem; font-family: var(--font-body); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer ul a { color: var(--muted); text-decoration: none; font-size: var(--text-sm); }
.site-footer ul a:hover { color: var(--ink); }
.site-footer__base { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: var(--text-xs); color: var(--muted); }
.site-footer__base .disclosure { max-width: 60em; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }

/* WordPress core alignment helpers */
.alignwide { width: 100%; }
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { margin-inline: auto; }
.wp-caption-text, figcaption { font-size: var(--text-sm); color: var(--muted); margin-top: .5rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Fixes & small-screen refinements
   ========================================================================== */
.hero__copy, .hero__stack, .sidebar, .sidebar > *, .layout-split > * { min-width: 0; }
@media (max-width: 900px) { .hero__grid { grid-template-columns: minmax(0, 1fr); } }

/* Keep deal cards un-styled by article link rules */
.prose .deal a, .prose .store-chip { color: inherit; font-weight: inherit; text-decoration: none; }
.prose .deal .deal__title a { color: var(--ink-2); font-weight: 500; }
.prose .dealbtn--code, .prose .dealbtn--code:hover { color: var(--ink); }
.prose .dealbtn--deal { color: var(--btn-ink); }
.prose .dealbtn--deal:hover { color: #17150f; }
.prose .deal__title { font-size: var(--text-base); }

/* Article header aligns with the content column */
.article__head { max-width: var(--container); }
.article__head > * { max-width: 860px; }

/* Generic widgets (sidebar) */
.side-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; font-size: var(--text-sm); }
.side-card ul a { text-decoration: none; font-weight: 500; line-height: 1.35; }
.side-card ul a:hover { text-decoration: underline; }
.side-card h2, .side-card .wp-block-heading, .side-card label.wp-block-search__label { font-size: var(--text-lg); font-weight: 700; font-family: var(--font-body); margin: 0 0 .25rem; }
.side-card .wp-block-search__inside-wrapper { display: flex; gap: .4rem; }
.side-card input[type="search"], .side-card input[type="text"], .side-card input[type="email"] {
  min-width: 0; width: 100%; border: 1.5px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: .55rem .9rem; min-height: 42px;
}
.side-card .wp-block-search__button, .side-card button[type="submit"], .side-card input[type="submit"] {
  border: 0; background: var(--btn-bg); color: var(--btn-ink); border-radius: 999px; padding: .55rem 1rem; font-weight: 700; min-height: 42px; margin: 0;
}

@media (max-width: 640px) {
  .searchbar { padding-left: .9rem; }
  .searchbar .btn { padding-inline: 1rem; }
  .store-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .store-tile { flex-direction: row; align-items: center; gap: .65rem; padding: .6rem .7rem; border-radius: 14px; }
  .store-tile .store-logo--lg { --s: 38px; border-radius: 11px; }
  .store-tile__name { font-size: var(--text-sm); }
  .store-tile__count { display: none; }
  .deal--mini .deal__action { width: 138px; padding: .75rem; }
  .deal--mini .dealbtn__label { width: calc(100% - 2.6rem); }
  .deal--mini .dealbtn--code:hover .dealbtn__label { width: calc(100% - 2.6rem); }
  .hero__stack .deal:nth-child(4) { display: none; }
  .deal--mini .dealbtn__peek { display: none; }
  .deal--mini .dealbtn--code { padding: 0; border-style: solid; border-color: var(--btn-bg); }
  .deal--mini .dealbtn__label, .deal--mini .dealbtn--code:hover .dealbtn__label { width: calc(100% + 3px); clip-path: none; border-radius: 12px; padding: 0; }
  .deal-grid { grid-template-columns: minmax(0, 1fr); }
  .rail { grid-auto-columns: 82%; }
  .section-title { font-size: 1.75rem; }
  .hero__stats { gap: 1.5rem; }
}
@media (max-width: 640px) {
  .store-hero { gap: 1rem; }
  .store-hero .store-logo--xl { --s: 60px; border-radius: 16px; }
}
