/*
Theme Name: Catch Hot Deals
Theme URI: https://catchhotdeals.com/
Author: Catch Hot Deals
Description: A fast, original block theme for an editorial Amazon deals website.
Version: 1.0.1
Requires at least: 6.7
Requires PHP: 8.1
Text Domain: catch-hot-deals
*/

@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/Manrope-VariableFont_wght.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: "Fira Code";
  src: url("assets/fonts/FiraCode-VariableFont_wght.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --chd-black: #111111;
  --chd-lime: #afff00;
  --chd-soft-lime: #d8ff79;
  --chd-ivory: #f7f8f2;
  --chd-white: #ffffff;
  --chd-muted: #686868;
  --chd-line: rgba(17, 17, 17, 0.16);
  --chd-radius: 30px;
  --chd-shadow: 0 18px 45px rgba(17, 17, 17, 0.1);
  --chd-shell: min(1200px, calc(100vw - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--chd-ivory);
  color: var(--chd-black);
  font-family: "Manrope", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.admin-bar .chd-site-header { top: 32px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
img { max-width: 100%; height: auto; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  z-index: 100000; top: 10px; left: 10px; width: auto; height: auto;
  clip: auto; padding: 12px 18px; background: var(--chd-white); color: var(--chd-black);
}

.chd-shell { width: var(--chd-shell); margin-inline: auto; }
.chd-mono,
.chd-eyebrow,
.chd-trust-strip,
.chd-deal-rank,
.chd-deal-category,
.chd-deal-price,
.chd-deal-meta,
.chd-section-kicker,
.chd-site-footer__legal { font-family: "Fira Code", ui-monospace, monospace; }

.chd-site-header {
  position: sticky; top: 0; z-index: 1000;
  border-bottom: 1px solid var(--chd-line);
  background: rgba(247, 248, 242, 0.94);
  backdrop-filter: blur(16px);
}
.chd-site-header__inner {
  min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 28px;
}
.chd-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 900; letter-spacing: -0.045em; font-size: 20px; }
.chd-brand img { width: 40px; height: 40px; }
.chd-brand span { white-space: nowrap; }
.chd-desktop-nav { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 750; }
.chd-desktop-nav a { text-decoration: none; }
.chd-desktop-nav a:not(.chd-button):hover { text-decoration: underline; }
.chd-mobile-nav { display: none; }
.chd-mobile-nav summary { list-style: none; cursor: pointer; font-weight: 800; padding: 10px 0; }
.chd-mobile-nav summary::-webkit-details-marker { display: none; }
.chd-mobile-nav__panel {
  position: absolute; inset: 82px 20px auto; border: 1px solid var(--chd-black); border-radius: 22px;
  padding: 18px; background: var(--chd-white); box-shadow: var(--chd-shadow);
}
.chd-mobile-nav__panel a { display: block; padding: 12px 4px; text-decoration: none; font-weight: 800; }

.chd-button,
.wp-element-button,
.wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 52px; padding: 0 24px; border: 2px solid var(--chd-black); border-radius: 999px;
  background: var(--chd-lime); color: var(--chd-black); font-size: 14px; font-weight: 850;
  line-height: 1; text-decoration: none; box-shadow: none;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.chd-button:hover,
.wp-element-button:hover,
.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 4px 4px 0 var(--chd-black); }
.chd-button--dark { background: var(--chd-black); color: var(--chd-white); }
.chd-button--ghost { background: transparent; }
.chd-button--small { min-height: 44px; padding-inline: 18px; }

.chd-hero { padding: 64px 0 78px; }
.chd-hero__grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(380px, .98fr); align-items: center; gap: 42px; }
.chd-eyebrow,
.chd-section-kicker { margin: 0 0 18px; font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.chd-eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px; border: 1px solid var(--chd-black); border-radius: 999px; background: var(--chd-soft-lime); }
.chd-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--chd-black); }
.chd-hero h1 {
  max-width: 760px; margin: 0; font-size: clamp(58px, 7.3vw, 112px); line-height: .88;
  letter-spacing: -.075em; font-weight: 900; text-transform: uppercase;
}
.chd-hero__copy { max-width: 630px; margin: 28px 0 0; font-size: clamp(18px, 2vw, 23px); line-height: 1.5; color: #343434; }
.chd-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.chd-trust-strip { margin-top: 28px; font-size: 12px; line-height: 1.7; color: var(--chd-muted); }
.chd-hero__art { position: relative; }
.chd-hero__art::before { content: ""; position: absolute; inset: 9% 5% 7% 8%; border-radius: 42%; background: var(--chd-lime); filter: blur(50px); opacity: .22; }
.chd-hero__art img { position: relative; display: block; width: 100%; border-radius: 44px; animation: chd-float 6s ease-in-out infinite; }
.chd-hero__badge {
  position: absolute; z-index: 2; right: -8px; bottom: 8%; width: 112px; aspect-ratio: 1;
  display: grid; place-items: center; border: 2px solid var(--chd-black); border-radius: 50%;
  background: var(--chd-white); font: 800 12px/1.25 "Fira Code", monospace; text-align: center;
  transform: rotate(9deg); box-shadow: 6px 6px 0 var(--chd-black);
}

.chd-marquee { overflow: hidden; border-block: 2px solid var(--chd-black); background: var(--chd-lime); }
.chd-marquee__track { display: flex; width: max-content; animation: chd-marquee 26s linear infinite; }
.chd-marquee__track span { padding: 14px 22px; font: 800 13px/1 "Fira Code", monospace; letter-spacing: .08em; white-space: nowrap; }

.chd-section { padding: 104px 0; }
.chd-section--white { background: var(--chd-white); }
.chd-section--dark { background: var(--chd-black); color: var(--chd-white); }
.chd-section__heading { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 48px; }
.chd-section h2,
.chd-page-hero h1,
.chd-roundup-header h2 { margin: 0; font-size: clamp(42px, 6vw, 78px); line-height: .95; letter-spacing: -.06em; font-weight: 900; text-transform: uppercase; }
.chd-section__lede { max-width: 440px; margin: 0; color: var(--chd-muted); font-size: 17px; line-height: 1.6; }
.chd-section--dark .chd-section__lede { color: #b9b9b9; }

.chd-deal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.chd-deal-card {
  position: relative; min-width: 0; display: flex; flex-direction: column; gap: 18px;
  min-height: 100%; padding: 26px; border: 2px solid var(--chd-black); border-radius: var(--chd-radius);
  background: var(--chd-white); color: var(--chd-black); box-shadow: 6px 6px 0 transparent;
  transition: transform .22s ease, box-shadow .22s ease;
}
.chd-deal-card:hover { transform: translateY(-5px); box-shadow: 7px 7px 0 var(--chd-black); }
.chd-deal-card:nth-child(2) { background: var(--chd-soft-lime); }
.chd-deal-card:nth-child(3n) { background: var(--chd-black); color: var(--chd-white); }
.chd-deal-card__top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.chd-deal-rank { display: grid; place-items: center; width: 52px; height: 52px; flex: 0 0 auto; border-radius: 16px; background: var(--chd-lime); color: var(--chd-black); font-size: 18px; font-weight: 800; }
.chd-deal-category { padding: 7px 10px; border: 1px solid currentColor; border-radius: 999px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.chd-deal-card h3 { margin: 8px 0 0; font-size: clamp(22px, 2.4vw, 31px); line-height: 1.08; letter-spacing: -.045em; }
.chd-deal-card__summary { margin: 0; color: var(--chd-muted); font-size: 14px; line-height: 1.65; }
.chd-deal-card:nth-child(3n) .chd-deal-card__summary { color: #c3c3c3; }
.chd-deal-card:nth-child(3n) .chd-deal-compare { color: #c3c3c3; }
.chd-deal-price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; margin-top: auto; }
.chd-deal-price { font-size: 28px; font-weight: 700; letter-spacing: -.04em; }
.chd-deal-compare { color: var(--chd-muted); text-decoration: line-through; }
.chd-discount { display: inline-flex; padding: 7px 10px; border-radius: 999px; background: var(--chd-lime); color: var(--chd-black); font: 800 11px/1 "Fira Code", monospace; }
.chd-deal-card .chd-button { align-self: flex-start; margin-top: 4px; }
.chd-deal-card:nth-child(3n) .chd-button { border-color: var(--chd-white); }

.chd-principles { counter-reset: principles; display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid #3a3a3a; }
.chd-principle { counter-increment: principles; display: grid; grid-template-columns: 70px 1fr; gap: 18px; padding: 34px 24px 34px 0; border-bottom: 1px solid #3a3a3a; }
.chd-principle:nth-child(odd) { border-right: 1px solid #3a3a3a; }
.chd-principle:nth-child(even) { padding-left: 24px; }
.chd-principle::before { content: "0" counter(principles); color: var(--chd-lime); font: 700 14px/1.4 "Fira Code", monospace; }
.chd-principle h3 { margin: 0 0 10px; font-size: 24px; letter-spacing: -.035em; }
.chd-principle p { margin: 0; color: #b9b9b9; line-height: 1.65; }

.chd-category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.chd-category-card { min-height: 270px; display: flex; flex-direction: column; justify-content: space-between; padding: 24px; border: 2px solid var(--chd-black); border-radius: var(--chd-radius); background: var(--chd-white); overflow: hidden; }
.chd-category-card:nth-child(2) { background: var(--chd-lime); }
.chd-category-card:nth-child(3) { background: var(--chd-black); color: var(--chd-white); }
.chd-category-card:nth-child(4) { background: var(--chd-soft-lime); }
.chd-category-card__icon { width: 82px; height: 82px; display: grid; place-items: center; align-self: end; border-radius: 50%; background: currentColor; color: var(--chd-white); }
.chd-category-card:nth-child(3) .chd-category-card__icon { background: var(--chd-lime); color: var(--chd-black); }
.chd-category-card__icon svg { width: 42px; height: 42px; }
.chd-category-card h3 { margin: 0; font-size: 34px; letter-spacing: -.055em; }
.chd-category-card p { margin: 6px 0 0; font: 500 11px/1.5 "Fira Code", monospace; color: var(--chd-muted); }
.chd-category-card:nth-child(3) p { color: #b9b9b9; }

.chd-final-cta { padding: 48px 0 108px; }
.chd-final-cta__box { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 30px; padding: 58px; border: 2px solid var(--chd-black); border-radius: 44px; background: var(--chd-lime); box-shadow: 10px 10px 0 var(--chd-black); }
.chd-final-cta h2 { max-width: 780px; }
.chd-final-cta p { max-width: 580px; font-size: 17px; line-height: 1.6; }

.chd-disclosure { padding: 26px 0; border-top: 1px solid var(--chd-line); font-size: 13px; line-height: 1.65; color: var(--chd-muted); }
.chd-disclosure strong { color: var(--chd-black); }

.chd-page-main { min-height: 55vh; }
.chd-page-hero { padding: 72px 0 46px; border-bottom: 1px solid var(--chd-line); }
.chd-page-hero h1 { max-width: 980px; }
.chd-page-content { width: min(840px, calc(100vw - 40px)); margin: 0 auto; padding: 58px 0 100px; font-size: 17px; line-height: 1.75; }
.chd-page-content h2 { margin: 56px 0 16px; font-size: 34px; line-height: 1.08; letter-spacing: -.04em; }
.chd-page-content h3 { margin-top: 34px; }
.chd-page-content a { font-weight: 750; }
.chd-page-content > :first-child { margin-top: 0; }
.chd-page-content > :last-child { margin-bottom: 0; }

.chd-roundup { width: var(--chd-shell); margin: 0 auto; padding: 22px 0 108px; }
.chd-roundup-header { display: grid; grid-template-columns: 1fr .7fr; gap: 34px; align-items: end; padding: 38px 0 46px; }
.chd-roundup-header p { margin: 0; color: var(--chd-muted); line-height: 1.65; }
.chd-deal-meta { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 28px; color: var(--chd-muted); font-size: 12px; }
.chd-deal-table-wrap { overflow-x: auto; margin-bottom: 54px; border: 2px solid var(--chd-black); border-radius: 22px; background: var(--chd-white); }
.chd-deal-table { width: 100%; border-collapse: collapse; min-width: 650px; }
.chd-deal-table th, .chd-deal-table td { padding: 15px 18px; border-bottom: 1px solid var(--chd-line); text-align: left; }
.chd-deal-table th { background: var(--chd-black); color: var(--chd-white); font: 600 11px/1.4 "Fira Code", monospace; text-transform: uppercase; }
.chd-deal-table tr:last-child td { border-bottom: 0; }
.chd-roundup .chd-deal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chd-roundup .chd-deal-card:nth-child(3n) { background: var(--chd-white); color: var(--chd-black); }
.chd-roundup .chd-deal-card:nth-child(3n) .chd-deal-card__summary { color: var(--chd-muted); }
.chd-roundup .chd-deal-card:nth-child(3n) .chd-deal-compare { color: var(--chd-muted); }
.chd-roundup .chd-deal-card:nth-child(3n) .chd-button { border-color: var(--chd-black); }
.chd-roundup-notes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 58px; }
.chd-note { padding: 28px; border: 1px solid var(--chd-line); border-radius: 24px; background: var(--chd-white); }
.chd-note h2 { margin: 0 0 14px; font-size: 26px; letter-spacing: -.035em; }
.chd-note ul { margin: 0; padding-left: 20px; }
.chd-note li + li { margin-top: 8px; }

.chd-site-footer { padding: 68px 0 26px; background: var(--chd-black); color: var(--chd-white); }
.chd-site-footer__top { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; padding-bottom: 52px; }
.chd-site-footer__brand .chd-brand { font-size: 28px; }
.chd-site-footer__brand p { max-width: 430px; color: #b8b8b8; line-height: 1.7; }
.chd-site-footer__links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 30px; align-content: start; }
.chd-site-footer__links a { text-decoration: none; font-weight: 750; }
.chd-site-footer__links a:hover { color: var(--chd-lime); }
.chd-site-footer__legal { display: flex; justify-content: space-between; gap: 22px; padding-top: 24px; border-top: 1px solid #363636; color: #9a9a9a; font-size: 10px; line-height: 1.65; }
.chd-site-footer__legal p { max-width: 780px; margin: 0; }

@keyframes chd-float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-12px) rotate(1deg); } }
@keyframes chd-marquee { to { transform: translateX(-50%); } }

@media (max-width: 980px) {
  .chd-desktop-nav { display: none; }
  .chd-mobile-nav { display: block; }
  .chd-hero__grid { grid-template-columns: 1fr 42%; gap: 20px; }
  .chd-hero h1 { font-size: clamp(55px, 9vw, 90px); }
  .chd-deal-grid { grid-template-columns: repeat(2, 1fr); }
  .chd-deal-card:nth-child(3n) { background: var(--chd-white); color: var(--chd-black); }
  .chd-deal-card:nth-child(3n) .chd-deal-card__summary { color: var(--chd-muted); }
  .chd-deal-card:nth-child(3n) .chd-deal-compare { color: var(--chd-muted); }
  .chd-category-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 782px) {
  body.admin-bar .chd-site-header { top: 46px; }
  :root { --chd-shell: min(100% - 28px, 1200px); }
  .chd-site-header__inner { min-height: 72px; }
  .chd-mobile-nav__panel { inset: 72px 14px auto; }
  .chd-hero { padding: 44px 0 58px; }
  .chd-hero__grid { grid-template-columns: 1fr; }
  .chd-hero__art { width: min(520px, 100%); margin: 16px auto 0; }
  .chd-hero__art img { border-radius: 30px; }
  .chd-hero__badge { right: 2px; width: 92px; }
  .chd-section { padding: 78px 0; }
  .chd-section__heading { display: block; margin-bottom: 32px; }
  .chd-section__lede { margin-top: 16px; }
  .chd-deal-grid,
  .chd-roundup .chd-deal-grid { grid-template-columns: 1fr; }
  .chd-principles { grid-template-columns: 1fr; }
  .chd-principle:nth-child(odd) { border-right: 0; }
  .chd-principle:nth-child(even) { padding-left: 0; }
  .chd-category-grid { grid-template-columns: 1fr 1fr; }
  .chd-final-cta__box { grid-template-columns: 1fr; align-items: start; padding: 40px 28px; }
  .chd-roundup-header { grid-template-columns: 1fr; }
  .chd-roundup-notes { grid-template-columns: 1fr; }
  .chd-site-footer__top { grid-template-columns: 1fr; }
  .chd-site-footer__legal { display: block; }
  .chd-site-footer__legal p + p { margin-top: 14px; }
}

@media (max-width: 520px) {
  .chd-brand span { font-size: 17px; }
  .chd-brand img { width: 36px; height: 36px; }
  .chd-hero h1 { font-size: clamp(48px, 15vw, 70px); }
  .chd-hero__copy { font-size: 17px; }
  .chd-hero__actions { display: grid; }
  .chd-hero__actions .chd-button { width: 100%; }
  .chd-section h2, .chd-page-hero h1, .chd-roundup-header h2 { font-size: clamp(38px, 12vw, 56px); }
  .chd-category-grid { grid-template-columns: 1fr; }
  .chd-category-card { min-height: 220px; }
  .chd-deal-card { padding: 22px; }
  .chd-page-hero { padding-top: 48px; }
  .chd-page-content { font-size: 16px; }
  .chd-site-footer__links { grid-template-columns: 1fr; }
}

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

@media print {
  .chd-site-header, .chd-site-footer, .chd-marquee, .chd-button { display: none !important; }
  body { background: #fff; }
}
