/*
Theme Name: Pickleball Deals of the Week
Theme URI: https://pickleballdealsoftheweek.com
Author: Pickleball Deals of the Week
Description: Custom theme for the PDOW deals site. Deal cards fill from WP All Import. Six fixed ad slots managed under Deals > Ad Slots.
Version: 1.9.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: pdow
*/

/* =========================================================
   BRAND TOKENS. Change colors here and nowhere else.
   ========================================================= */
:root {
  --pdow-ink: #094678;        /* brand blue: headlines, prices, outlines */
  --pdow-navy: #0A253B;       /* nav bar and footer */
  --pdow-ink-soft: #3B4761;   /* body text */
  --pdow-blue: #094678;       /* links and outlines use the main blue */
  --pdow-green: #80CD35;      /* brand green: RPPA band, newsletter band */
  --pdow-green-deep: #0A6B0A; /* dark green: button on the green bands */
  --pdow-yellow: #FCEF2F;     /* button yellow from the banner art */
  --pdow-buy: #FFA41C;        /* buy button, Amazon style orange */
  --pdow-buy-deep: #F08A00;   /* buy button hover */
  --pdow-deal: #B12704;       /* deal price */
  --pdow-paper: #F7F8F6;      /* page background */
  --pdow-card: #FFFFFF;       /* card background */
  --pdow-line: #DFE3DE;       /* borders */
  --pdow-muted: #76819A;      /* was price, footnotes */

  --pdow-font: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --pdow-display: "Bree Serif", Georgia, "Times New Roman", serif;
  --pdow-max: 1560px;
  --pdow-radius: 10px;
}

/* =========================================================
   BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--pdow-font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--pdow-ink-soft);
  background: var(--pdow-paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pdow-blue); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--pdow-green); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--pdow-display); color: var(--pdow-ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 400; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.screen-reader-text { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.pdow-wrap { max-width: var(--pdow-max); margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .pdow-wrap { padding: 0 16px; } }

/* =========================================================
   HEADER
   ========================================================= */
.pdow-header { background: var(--pdow-navy); color: #fff; }
.pdow-header__logo img { max-height: 68px; }
.pdow-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 88px; }
.pdow-header__shop { font-family: var(--pdow-display); background: var(--pdow-buy); color: #111; text-decoration: none; padding: 10px 18px; border-radius: 6px; white-space: nowrap; }
.pdow-header__shop:hover { background: var(--pdow-buy-deep); }
.pdow-header__logo img { max-height: 52px; width: auto; }
.pdow-header__logo a { font-family: var(--pdow-display); color: #fff; text-decoration: none; font-size: 1.15rem; white-space: nowrap; }
.pdow-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.pdow-nav a { color: #fff; text-decoration: none; font-size: 1.2rem; font-weight: 700; padding: 10px 14px; border-radius: 6px; display: block; white-space: nowrap; }
@media (max-width: 1400px) { .pdow-nav a { font-size: 1.05rem; padding: 10px 11px; } }
.pdow-nav a:hover { background: rgba(255,255,255,.12); }
.pdow-nav .current-menu-item > a { background: var(--pdow-blue); }
.pdow-nav__toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.4); color: #fff; padding: 8px 12px; border-radius: 6px; font: inherit; }
@media (max-width: 860px) {
  .pdow-header__shop { display: none; }
  .pdow-nav__toggle { display: block; }
  .pdow-nav { display: none; width: 100%; }
  .pdow-nav.is-open { display: block; padding-bottom: 12px; }
  .pdow-nav ul { flex-direction: column; }
  .pdow-header__bar { flex-wrap: wrap; }
}

/* =========================================================
   AD SLOTS. Sizes are locked. Nothing can come out uneven.
   ========================================================= */
.pdow-ad { display: flex; justify-content: center; margin: 0 auto; }
.pdow-ad a { display: block; }
.pdow-ad img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.pdow-ad--leaderboard { width: 728px; max-width: 100%; aspect-ratio: 728 / 90; }
.pdow-ad--box { width: 300px; max-width: 100%; aspect-ratio: 300 / 250; }
.pdow-ad--tall { width: 300px; max-width: 100%; aspect-ratio: 300 / 600; }
.pdow-ad a { width: 100%; height: 100%; }
.pdow-ad a.pdow-ad__house {
  width: 100%; height: 100%;
  border-radius: 6px;
  background: var(--pdow-ink);
  color: #fff;
  text-decoration: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  text-align: center; padding: 10px 16px;
}
.pdow-ad__house strong { font-family: var(--pdow-display); font-size: 1.05rem; font-weight: 400; line-height: 1.25; }
.pdow-ad__house span { font-size: .85rem; opacity: .85; }
.pdow-ad__house em { font-family: var(--pdow-display); font-style: normal; background: var(--pdow-yellow); color: #10240F; border-radius: 999px; padding: 5px 16px; font-size: .9rem; }
.pdow-ad--leaderboard .pdow-ad__house { flex-direction: row; gap: 16px; }
.pdow-ad--leaderboard .pdow-ad__house span { display: none; }


/* =========================================================
   HERO BAND. Thin. Image from Appearance > Header, headline from Customize > Homepage.
   ========================================================= */
.pdow-hero { position: relative; min-height: 210px; display: flex; align-items: center; justify-content: center; background: #36628F center / cover no-repeat; color: #fff; text-align: center; }
.pdow-hero::before { content: ""; position: absolute; inset: 0; background: rgba(9,70,120,.28); }
.pdow-hero:has(h1.screen-reader-text)::before { background: none; }
.pdow-hero h1 { position: relative; color: #fff; font-size: clamp(1.6rem, 3.4vw, 2.6rem); margin: 0; padding: 0 20px; text-shadow: 0 2px 8px rgba(0,0,0,.35); }
@media (max-width: 720px) { .pdow-hero { min-height: 140px; } }
.pdow-hero--page { min-height: 240px; }
.pdow-hero--page::before { background: rgba(9,70,120,.55); }
.pdow-hero--page h1 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); }
@media (max-width: 720px) { .pdow-hero--page { min-height: 160px; } }

/* =========================================================
   RPPA BAND
   ========================================================= */
.pdow-rppa { background: var(--pdow-green); color: #10240F; }
.pdow-rppa__inner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; padding-top: 14px; padding-bottom: 14px; }
.pdow-rppa__text { text-align: center; }
.pdow-rppa__head { font-family: var(--pdow-display); font-size: 24px; margin: 0 0 3px; color: #10240F; }
.pdow-rppa__lines { font-size: 20px; margin: 0; line-height: 1.35; }
.pdow-rppa__btn { font-family: var(--pdow-display); background: var(--pdow-yellow); color: #10240F; border: 2px solid #10240F; text-transform: uppercase; letter-spacing: .03em; border-radius: 999px; text-decoration: none; font-weight: 700; padding: 11px 20px; border-radius: 6px; white-space: nowrap; }
.pdow-rppa__btn:hover { background: #F5E400; }
@media (max-width: 860px) { .pdow-rppa__inner { grid-template-columns: 1fr; justify-items: center; gap: 12px; }
  .pdow-rppa__head { font-size: 20px; } .pdow-rppa__lines { font-size: 17px; } }

.pdow-disclaimer { font-size: 1.05rem; font-weight: 700; color: var(--pdow-ink); text-align: center; margin: 0; padding-top: 8px; padding-bottom: 16px; }
.pdow-ad-row { padding-top: 14px; padding-bottom: 4px; }

/* =========================================================
   PAGE INTRO
   ========================================================= */
.pdow-intro { padding-top: 20px; padding-bottom: 4px; }
.pdow-intro h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: .3em; }
.pdow-intro p { max-width: 62ch; margin-bottom: 0; }
.pdow-intro__note { font-size: .9rem; color: var(--pdow-muted); margin-top: 6px; }

/* =========================================================
   DEALS LAYOUT. Grid on the left, ad column on the right.
   ========================================================= */
.pdow-deals { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; padding-top: 4px; padding-bottom: 32px; align-items: start; }
.pdow-deals--full { grid-template-columns: minmax(0, 1fr); }
.pdow-rail { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 16px; }
@media (max-width: 960px) {
  .pdow-deals { grid-template-columns: minmax(0, 1fr); }
  .pdow-rail { position: static; flex-direction: row; flex-wrap: wrap; justify-content: center; }
}

.pdow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pdow-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pdow-grid--featured { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-bottom: 26px; }
@media (max-width: 720px) {
  .pdow-grid, .pdow-grid--three, .pdow-grid--featured { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 460px) {
  .pdow-grid, .pdow-grid--three, .pdow-grid--featured { grid-template-columns: minmax(0, 1fr); }
}
.pdow-section-title { display: flex; align-items: baseline; gap: 12px; margin: 4px 0 10px; }
.pdow-section-title h2 { margin: 0; }
.pdow-section-title span { color: var(--pdow-muted); font-size: .9rem; }

/* =========================================================
   DEAL CARD. One card, used everywhere.
   ========================================================= */
.pdow-card {
  background: var(--pdow-card);
  border: 1px solid var(--pdow-line);
  border-radius: var(--pdow-radius);
  display: flex; flex-direction: column;
  overflow: hidden;
  position: relative;
  height: 100%;
}
.pdow-card__media { display: flex; align-items: center; justify-content: center; height: 190px; background: #F4F6F8; padding: 14px; border-bottom: 1px solid var(--pdow-line); }
.pdow-card__media img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.pdow-card__badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--pdow-ink); color: #fff;
  font-weight: 700; font-size: .8rem;
  padding: 4px 9px; border-radius: 999px;
}
.pdow-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pdow-card__title { font-size: 1rem; font-weight: 500; color: var(--pdow-ink); margin: 0; line-height: 1.3; }
.pdow-card__title a { color: inherit; text-decoration: none; }
.pdow-card__desc { font-size: .9rem; color: var(--pdow-ink-soft); margin: 0; flex: 1; }
.pdow-card__price { display: flex; align-items: baseline; gap: 8px; }
.pdow-card__now { font-size: 1.35rem; font-weight: 700; color: var(--pdow-deal); }
.pdow-card__was { color: var(--pdow-muted); text-decoration: line-through; font-size: .95rem; }
.pdow-card__btn {
  display: block; text-align: center; font-family: var(--pdow-display);
  background: var(--pdow-buy); color: #111;
  text-decoration: none; font-weight: 700;
  padding: 11px 14px; border-radius: 8px;
  margin-top: 4px;
}
.pdow-card__btn:hover { background: var(--pdow-buy-deep); }
.pdow-card__btn { font-weight: 400; }
.pdow-card--featured { border-color: var(--pdow-ink); border-width: 2px; }
.pdow-card--featured .pdow-card__media { height: 260px; }
.pdow-card--featured .pdow-card__title { font-size: 1.2rem; }
.pdow-card--featured .pdow-card__desc { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.pdow-card--featured .pdow-card__desc { font-size: .95rem; }
.pdow-card--featured .pdow-card__now { font-size: 1.5rem; }
.pdow-card--featured .pdow-card__btn { padding: 12px 14px; font-size: 1rem; }
.pdow-empty { padding: 40px; border: 1px dashed var(--pdow-line); border-radius: var(--pdow-radius); text-align: center; color: var(--pdow-muted); }

/* =========================================================
   NEWSLETTER BAND
   ========================================================= */
.pdow-signup { background: var(--pdow-green); color: #10240F; padding: 26px 0; }
.pdow-signup__inner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; }
.pdow-signup__text { text-align: center; }
@media (max-width: 860px) { .pdow-signup__inner { grid-template-columns: 1fr; justify-items: center; } }
.pdow-signup h2 { color: #10240F; margin: 0 0 4px; font-size: 1.35rem; }
.pdow-signup p { margin: 0; opacity: .92; }
.pdow-signup__btn { font-family: var(--pdow-display); background: var(--pdow-yellow); color: #10240F; border: 2px solid #10240F; border-radius: 999px; text-decoration: none; padding: 13px 22px; border-radius: 8px; white-space: nowrap; }
.pdow-signup__btn:hover { background: #F5E400; }

/* =========================================================
   FOOTER
   ========================================================= */
.pdow-footer { background: var(--pdow-navy); color: rgba(255,255,255,.85); padding: 40px 0 24px; font-size: .92rem; }
.pdow-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
@media (max-width: 720px) { .pdow-footer__grid { grid-template-columns: 1fr; } }
.pdow-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 10px; }
.pdow-footer ul { list-style: none; margin: 0; padding: 0; }
.pdow-footer li { margin-bottom: 6px; }
.pdow-footer a { color: #fff; text-decoration: none; }
.pdow-footer a:hover { text-decoration: underline; }
.pdow-footer__legal { border-top: 1px solid rgba(255,255,255,.15); margin-top: 28px; padding-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: rgba(255,255,255,.7); }
.pdow-footer__legal a { color: rgba(255,255,255,.85); margin-right: 14px; }

/* =========================================================
   ARTICLES AND PAGES
   ========================================================= */
.pdow-article { max-width: 760px; margin: 0 auto; padding: 36px 20px 56px; }
/* Ordinary pages are not constrained. They use the site width so page
   content can lay itself out however it likes. */
.pdow-page { max-width: 1200px; margin: 0 auto; padding: 36px 32px 56px; }
@media (max-width: 720px) { .pdow-page { padding-left: 16px; padding-right: 16px; } }
.pdow-page .entry-content h2 { margin-top: 1.6em; }
.pdow-page .entry-content img { border-radius: 8px; }
.pdow-article h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.pdow-article__meta { color: var(--pdow-muted); font-size: .9rem; margin-bottom: 20px; }
.pdow-article .entry-content img { border-radius: 8px; }
.pdow-article .entry-content h2 { margin-top: 1.6em; }
.pdow-post-list { max-width: 1200px; margin: 0 auto; padding: 32px 32px 56px; }
@media (max-width: 720px) { .pdow-post-list { padding-left: 16px; padding-right: 16px; } }
.pdow-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 18px; }
@media (max-width: 1000px) { .pdow-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .pdow-post-grid { grid-template-columns: minmax(0, 1fr); } }
/* Article images are wide banners (about 8 to 3), so the card frame matches
   that shape and the whole image shows without cropping to a sliver. */
.pdow-post-card { display: flex; flex-direction: column; background: var(--pdow-card); border: 1px solid var(--pdow-line); border-radius: var(--pdow-radius); overflow: hidden; }
.pdow-post-card__media { display: block; aspect-ratio: 8 / 3; background: #F4F6F8; }
.pdow-post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.pdow-post-card__body { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.pdow-post-card h2 { font-size: 1.05rem; margin: 0; line-height: 1.3; }
.pdow-post-card h2 a { color: var(--pdow-ink); text-decoration: none; }
.pdow-post-card h2 a:hover { text-decoration: underline; }
.pdow-post-card p { font-size: .9rem; margin: 0; color: var(--pdow-ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pdow-pagination { display: flex; gap: 8px; margin-top: 24px; }
.pdow-pagination a, .pdow-pagination span { padding: 8px 12px; border: 1px solid var(--pdow-line); border-radius: 6px; text-decoration: none; }
.pdow-pagination .current { background: var(--pdow-ink); color: #fff; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
