/*
Theme Name: CartWatch
Theme URI: https://cartwatch.ca
Author: CartWatch
Author URI: https://cartwatch.ca
Description: CartWatch — Atlantic Canadian Grocery Price Comparison. A clean, modern theme built for the CartWatch grocery savings app. Compares prices across Sobeys, Atlantic Superstore, and Walmart so Atlantic Canadians always know where to shop.
Version: 2.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cartwatch
Tags: grocery, price-comparison, canada, atlantic, custom-colors, custom-logo, featured-images, responsive-layout, two-columns
*/

/* =========================================================
   CSS CUSTOM PROPERTIES
   ========================================================= */
:root {
  /* Brand palette */
  --cw-green-50:  #e8f5e8;
  --cw-green-100: #c8e6c8;
  --cw-green-400: #4caf50;
  --cw-green-600: #2e7d32;
  --cw-green-800: #1b5e20;

  --cw-teal-50:   #e0f7f4;
  --cw-teal-400:  #26a69a;
  --cw-teal-600:  #00796b;

  --cw-slate-50:  #f8fafc;
  --cw-slate-100: #f1f5f9;
  --cw-slate-200: #e2e8f0;
  --cw-slate-400: #94a3b8;
  --cw-slate-600: #475569;
  --cw-slate-800: #1e293b;
  --cw-slate-900: #0f172a;

  --cw-amber-400: #fbbf24;
  --cw-amber-600: #d97706;

  --cw-red-400:   #f87171;
  --cw-red-600:   #dc2626;

  /* Store brand colours */
  --cw-sobeys:      #e31837;
  --cw-superstore:  #c8102e;
  --cw-walmart:     #0071ce;

  /* Semantic */
  --cw-bg:         #ffffff;
  --cw-bg-subtle:  var(--cw-slate-50);
  --cw-bg-muted:   var(--cw-slate-100);
  --cw-border:     var(--cw-slate-200);
  --cw-text:       var(--cw-slate-800);
  --cw-text-muted: var(--cw-slate-600);
  --cw-text-faint: var(--cw-slate-400);
  --cw-accent:     var(--cw-green-600);
  --cw-accent-lt:  var(--cw-green-50);

  /* Typography */
  --font-display: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 5rem;

  /* Layout */
  --container-max: 1200px;
  --container-md:  800px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;
}

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--cw-text);
  background: var(--cw-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--cw-accent); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--cw-green-800); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--cw-slate-900);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin-bottom: var(--space-md); }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: var(--space-lg); }
li { margin-bottom: var(--space-xs); }

/* =========================================================
   LAYOUT UTILITIES
   ========================================================= */
.cw-container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-lg);
  box-sizing: border-box;
  overflow: hidden;
}

.cw-container--md {
  max-width: var(--container-md);
}

.cw-section {
  padding-block: var(--space-3xl);
}

.cw-section--sm {
  padding-block: var(--space-2xl);
}

.cw-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
}

.cw-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
}

.cw-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.cw-flex { display: flex; align-items: center; }
.cw-flex--gap { gap: var(--space-md); }
.cw-flex--between { justify-content: space-between; }
.cw-flex--center { justify-content: center; }
.cw-flex--wrap { flex-wrap: wrap; }

.cw-text-center { text-align: center; }
.cw-text-muted { color: var(--cw-text-muted); }

/* =========================================================
   BUTTONS
   ========================================================= */
.cw-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.cw-btn--primary {
  background: var(--cw-green-600);
  color: #fff;
  border-color: var(--cw-green-600);
}
.cw-btn--primary:hover {
  background: var(--cw-green-800);
  border-color: var(--cw-green-800);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(46,125,50,0.25);
}

.cw-btn--outline {
  background: transparent;
  color: var(--cw-green-600);
  border-color: var(--cw-green-600);
}
.cw-btn--outline:hover {
  background: var(--cw-green-600);
  color: #fff;
  transform: translateY(-1px);
}

.cw-btn--lg {
  padding: 1rem 2rem;
  font-size: 1.0625rem;
  border-radius: var(--radius-lg);
}

.cw-btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* =========================================================
   CARDS
   ========================================================= */
.cw-card {
  background: var(--cw-bg);
  border: 1px solid var(--cw-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.cw-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.cw-card--flat { box-shadow: none; }
.cw-card--flat:hover { transform: none; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }

/* =========================================================
   BADGES / PILLS
   ========================================================= */
.cw-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 100px;
  letter-spacing: 0.02em;
}

.cw-badge--green  { background: var(--cw-green-50);  color: var(--cw-green-800); }
.cw-badge { white-space: nowrap; flex-shrink: 0; }
.cw-badge--teal   { background: var(--cw-teal-50);   color: var(--cw-teal-600); }
.cw-badge--amber  { background: #fef3c7;              color: var(--cw-amber-600); }
.cw-badge--red    { background: #fee2e2;              color: var(--cw-red-600); }
.cw-badge--slate  { background: var(--cw-bg-muted);  color: var(--cw-text-muted); }

/* =========================================================
   SITE HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cw-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: var(--space-xl);
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-header__logo-icon {
  width: 36px;
  height: 36px;
  background: var(--cw-green-600);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}

.site-header__logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--cw-slate-900);
  letter-spacing: -0.03em;
}

.site-header__logo-text span { color: var(--cw-green-600); }

.site-header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-header__nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--cw-text-muted);
  transition: color var(--duration) var(--ease);
}

.site-header__nav a:hover,
.site-header__nav .current-menu-item > a { color: var(--cw-slate-900); }

.site-header__actions { display: flex; align-items: center; gap: var(--space-sm); }

/* Mobile menu toggle */
.site-header__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  color: var(--cw-text);
}
.site-header__nav-mobile-extra { display: none; }

/* =========================================================
   HERO SECTION
   ========================================================= */
.cw-hero {
  background: linear-gradient(135deg, var(--cw-slate-900) 0%, #1a3a1a 100%);
  color: #fff;
  padding-block: var(--space-3xl);
  overflow: hidden;
  position: relative;
  width: 100%;
  max-width: 100vw;
}

.cw-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(76,175,80,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.cw-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
  position: relative;
}

.cw-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--cw-green-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
}

.cw-hero__title {
  color: #fff;
  margin-bottom: var(--space-lg);
}

.cw-hero__title em {
  color: var(--cw-green-400);
  font-style: normal;
}

.cw-hero__subtitle {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: var(--space-xl);
  line-height: 1.65;
}

.cw-hero__actions { display: flex; gap: var(--space-md); flex-wrap: wrap; }

.cw-hero__stores {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
}

.cw-hero__store-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cw-green-400);
}

.cw-hero__visual {
  display: flex;
  justify-content: flex-end;
}

/* =========================================================
   STATS BAR
   ========================================================= */
.cw-stats {
  background: var(--cw-green-600);
  color: #fff;
  padding-block: var(--space-lg);
}

.cw-stats__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  text-align: center;
  align-items: center;
}

.cw-stats__divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.25);
  margin-inline: auto;
}

.cw-stat__number {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.cw-stat__label {
  font-size: 0.8125rem;
  opacity: 0.8;
  margin-top: 4px;
}

/* =========================================================
   HOW IT WORKS
   ========================================================= */
.cw-steps { counter-reset: steps; }

.cw-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.cw-step__num {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--cw-green-50);
  color: var(--cw-green-600);
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--cw-green-100);
}

.cw-step__title { font-size: 1.125rem; font-weight: 700; margin-bottom: 6px; }
.cw-step__desc { color: var(--cw-text-muted); font-size: 0.9375rem; }

/* =========================================================
   STORE COMPARISON STRIP
   ========================================================= */
.cw-stores-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--cw-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cw-store-tile {
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  border-right: 1px solid var(--cw-border);
}
.cw-store-tile:last-child { border-right: none; }

.cw-store-tile__logo {
  font-size: 0.875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: var(--space-md);
}

.cw-store-tile__logo--sobeys      { background: #fff0f2; color: var(--cw-sobeys); }
.cw-store-tile__logo--superstore  { background: #fff0f1; color: var(--cw-superstore); }
.cw-store-tile__logo--walmart     { background: #e8f4ff; color: var(--cw-walmart); }

.cw-store-tile__stat { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; }
.cw-store-tile__label { font-size: 0.8125rem; color: var(--cw-text-muted); margin-top: 4px; }

/* =========================================================
   SAVINGS CALLOUT
   ========================================================= */
.cw-savings-callout {
  background: var(--cw-slate-900);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-3xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cw-savings-callout::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(76,175,80,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.cw-savings-callout__amount {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  color: var(--cw-green-400);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-md);
}

.cw-savings-callout__title { color: #fff; margin-bottom: var(--space-sm); }
.cw-savings-callout__subtitle { color: rgba(255,255,255,0.65); font-size: 1.0625rem; margin-bottom: var(--space-xl); }

/* =========================================================
   BLOG / NEWS
   ========================================================= */
.cw-post-card { display: flex; flex-direction: column; }
.cw-post-card__img { border-radius: var(--radius-md); overflow: hidden; margin-bottom: var(--space-lg); aspect-ratio: 16/9; background: var(--cw-bg-muted); }
.cw-post-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.cw-post-card:hover .cw-post-card__img img { transform: scale(1.04); }
.cw-post-card__meta { font-size: 0.8125rem; color: var(--cw-text-faint); margin-bottom: var(--space-sm); }
.cw-post-card__title { font-size: 1.125rem; margin-bottom: var(--space-sm); }
.cw-post-card__title a { color: var(--cw-slate-900); }
.cw-post-card__title a:hover { color: var(--cw-accent); }
.cw-post-card__excerpt { font-size: 0.9375rem; color: var(--cw-text-muted); }

/* =========================================================
   SITE FOOTER
   ========================================================= */
.site-footer {
  background: var(--cw-slate-900);
  color: rgba(255,255,255,0.6);
  padding-block: var(--space-3xl) var(--space-xl);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.site-footer__brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-sm);
}

.site-footer__brand-name span { color: var(--cw-green-400); }
.site-footer__tagline { font-size: 0.875rem; margin-bottom: var(--space-lg); }

.site-footer__col-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  margin-bottom: var(--space-md);
}

.site-footer__links { list-style: none; padding: 0; margin: 0; }
.site-footer__links li { margin-bottom: 8px; }
.site-footer__links a { font-size: 0.9375rem; color: rgba(255,255,255,0.6); transition: color var(--duration) var(--ease); }
.site-footer__links a:hover { color: #fff; }

.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.site-footer__legal { display: flex; gap: var(--space-lg); }
.site-footer__legal a { color: rgba(255,255,255,0.4); }
.site-footer__legal a:hover { color: rgba(255,255,255,0.7); }

/* =========================================================
   WORDPRESS CONTENT
   ========================================================= */
.entry-content {
  max-width: var(--container-md);
  margin-inline: auto;
}

.entry-content h2,
.entry-content h3 { margin-top: var(--space-2xl); margin-bottom: var(--space-md); }

.entry-content blockquote {
  border-left: 3px solid var(--cw-green-400);
  padding-left: var(--space-lg);
  margin-left: 0;
  color: var(--cw-text-muted);
  font-style: italic;
}

.entry-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--cw-bg-muted);
  padding: 2px 6px;
  border-radius: 4px;
}

.entry-content pre {
  background: var(--cw-slate-900);
  color: #e2e8f0;
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

/* =========================================================
   WORDPRESS WIDGETS / BLOCKS ALIGNMENT
   ========================================================= */
.alignleft  { float: left;  margin-right: var(--space-lg); }
.alignright { float: right; margin-left:  var(--space-lg); }
.aligncenter { margin-inline: auto; text-align: center; }
.alignwide  { width: 100%; }
.alignfull  { width: 100vw; margin-inline: calc(-50vw + 50%); }

/* =========================================================
   PAGINATION
   ========================================================= */
.cw-pagination {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  align-items: center;
  margin-top: var(--space-2xl);
}

.cw-pagination a,
.cw-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--cw-border);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--cw-text-muted);
  transition: all var(--duration) var(--ease);
}

.cw-pagination a:hover { border-color: var(--cw-green-400); color: var(--cw-green-600); }
.cw-pagination .current { background: var(--cw-green-600); border-color: var(--cw-green-600); color: #fff; }

/* =========================================================
   APP EMBED WRAPPER  (used by plugin shortcode)
   ========================================================= */
.cw-app-wrapper {
  background: var(--cw-bg-subtle);
  border: 1px solid var(--cw-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-block: var(--space-xl);
}

.cw-app-wrapper__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--cw-border);
  flex-wrap: wrap;
}

.cw-app-wrapper__title {
  font-size: 1.0625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cw-app-wrapper__subtitle {
  font-size: 0.8125rem;
  color: var(--cw-text-muted);
  margin-top: 2px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .cw-hero__inner { grid-template-columns: 1fr; }
  .cw-hero__visual { display: none; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .cw-stats__inner { grid-template-columns: repeat(2, 1fr); }
  .cw-stores-strip { grid-template-columns: 1fr; }
  .cw-store-tile { border-right: none; border-bottom: 1px solid var(--cw-border); }
  .cw-store-tile:last-child { border-bottom: none; }
}

@media (max-width: 640px) {
  :root { --space-3xl: 3rem; --space-2xl: 2rem; }

  /* Header */
  .site-header__inner { gap: 0; }
  .site-header__nav-wrap { display: none; }
  .site-header__nav-wrap.open { display: block; position: absolute; top: 68px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--cw-border); padding: var(--space-lg); box-shadow: 0 8px 24px rgba(0,0,0,0.1); z-index: 200; }
  .site-header__nav-wrap.open .site-header__nav { display: flex; flex-direction: column; gap: var(--space-md); padding: 0; margin: 0; list-style: none; }
  .site-header__nav-wrap.open ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-md); }
  .site-header__nav-wrap.open a { font-size: 1rem; font-weight: 600; color: var(--cw-slate-900); display: block; padding: 4px 0; text-align: center; }
  .site-header__nav-wrap.open li { text-align: center; }
  .site-header__nav-mobile-extra { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; margin-top: 12px; border-top: 1px solid var(--cw-border); align-items: center; }
  .site-header__mobile-account { text-align: center; }
  .site-header__nav { display: none; }
  .site-header__toggle { display: block; padding: 6px; margin-left: 8px; }
  .site-header__actions { gap: 6px; }
  .site-header__actions .cw-btn--outline { display: none; }

  /* My Account / Sign In in mobile menu */
  .site-header__nav-mobile-extra { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; margin-top: 12px; border-top: 1px solid var(--cw-border); }
  .site-header__mobile-account { font-size: 1rem; font-weight: 600; color: var(--cw-slate-900); text-decoration: none; padding: 4px 0; display: block; }
  .site-header__mobile-account--primary { color: #16a34a; }
  .site-header__mobile-account:hover { color: #16a34a; }

  /* Footer */
  .site-footer__grid { grid-template-columns: 1fr; }
  .cw-stats__inner { grid-template-columns: 1fr 1fr; }
  .cw-savings-callout { padding: var(--space-xl); }
  .recommendation-cards { grid-template-columns: 1fr; }

  /* Hero — prevent text overflow */
  .cw-hero { overflow: hidden; }
  .cw-hero__inner { overflow: hidden; padding-inline: var(--space-md); }
  .cw-hero__text { overflow: hidden; }
  .cw-hero h1 { font-size: clamp(1.75rem, 8vw, 3rem); word-break: break-word; }
  .cw-hero p { font-size: clamp(0.9rem, 4vw, 1.1rem); }
  .cw-hero__actions { flex-direction: column; gap: var(--space-sm); }
  .cw-hero__actions .cw-btn { width: 100%; justify-content: center; }

  /* App wrapper on mobile */
  .cw-app-wrapper { padding: var(--space-md); border-radius: var(--radius-lg); margin-block: var(--space-md); }
  .cw-app-wrapper__header { gap: 8px; }
  .cw-app-wrapper__title { font-size: 0.9375rem; }

  /* AI toggle label */
  #cwa-app-root .cw-ai-toggle { flex-wrap: wrap; gap: 4px; }
  #cwa-app-root .cw-ai-tip { font-size: 11px; }

  /* Location bar */
  #cwa-app-root .cw-loc-bar { font-size: 12px; padding: 6px 10px; }
}

@media (max-width: 480px) {
  /* Tighter container padding */
  .cw-container { padding-inline: var(--space-md); }
  .page-template-page-full-width .cw-container { padding-inline: var(--space-md); }

  /* App */
  #cwa-app-root { font-size: 13px; }
  #cwa-app-root .cw-sw { flex-direction: column; }
  #cwa-app-root .cw-sw select { width: 100%; }
  #cwa-app-root .cw-rgrid { grid-template-columns: 1fr; }
  #cwa-app-root .cw-sgrid { grid-template-columns: 1fr; }
  #cwa-app-root .cw-totals-bar { grid-template-columns: 1fr; }
  #cwa-app-root .cw-vamt { font-size: 26px; }
  #cwa-app-root .cw-lazytot { font-size: 22px; }
  #cwa-app-root .cw-abar { flex-direction: column; align-items: stretch; }
  #cwa-app-root .cw-abar > div { display: flex; gap: 8px; }
  #cwa-app-root .cw-abtn { flex: 1; text-align: center; }
  #cwa-app-root .cw-pills { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  #cwa-app-root .cw-pill { flex-shrink: 0; }
  #cwa-app-root .cw-tabs { width: 100%; }
  #cwa-app-root .cw-tab { flex: 1; text-align: center; }
}

/* =========================================================
   FULL WIDTH TEMPLATE — remove content max-width constraint
   ========================================================= */
.page-template-page-full-width .entry-content,
.page-template-page-full-width .site-main {
  max-width: 100%;
  padding-inline: 0;
}

.page-template-page-full-width .cw-container {
  max-width: 1100px;
}

/* =========================================================
   APP MOBILE OPTIMIZATIONS
   ========================================================= */
@media (max-width: 768px) {
  /* App container padding */
  #cwa-app-root { font-size: 14px; }

  /* Nav tabs stack better */
  #cwa-app-root .cw-nav { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  #cwa-app-root .cw-nav-btn { padding: 10px 14px; font-size: 13px; }

  /* Search row stacks on small screens */
  #cwa-app-root .cw-sw { flex-direction: column; }
  #cwa-app-root .cw-sw select { width: 100%; }

  /* Results grid single column */
  #cwa-app-root .cw-rgrid { grid-template-columns: 1fr; }

  /* Store grid single column */
  #cwa-app-root .cw-sgrid { grid-template-columns: 1fr; }

  /* Totals bar single column */
  #cwa-app-root .cw-totals-bar { grid-template-columns: 1fr; }

  /* Verdict numbers wrap better */
  #cwa-app-root .cw-vamt { font-size: 28px; }

  /* Action bar stacks */
  #cwa-app-root .cw-abar { flex-direction: column; align-items: stretch; }
  #cwa-app-root .cw-abar > div { display: flex; gap: 8px; }
  #cwa-app-root .cw-abtn { flex: 1; justify-content: center; }
  #cwa-app-root .cw-savebtn { flex: 1; justify-content: center; }

  /* List items tighter */
  #cwa-app-root .cw-litem { padding: 8px 10px; }

  /* Tabs scrollable */
  #cwa-app-root .cw-tabs { overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 480px) {
  /* Header on mobile */
  .site-header__actions .cw-btn--primary { padding: 8px 14px; font-size: 13px; }

  /* Full width content */
  .page-template-page-full-width .cw-container { padding-inline: var(--space-md); }

  /* App smaller on tiny screens */
  #cwa-app-root { font-size: 13px; }
  #cwa-app-root .cw-vamt { font-size: 24px; }
  #cwa-app-root .cw-lazytot { font-size: 22px; }
  #cwa-app-root .cw-scn { font-size: 11px; }
  #cwa-app-root .cw-sct { font-size: 14px; }

  /* Pills scroll horizontally */
  #cwa-app-root .cw-pills { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  #cwa-app-root .cw-pill { flex-shrink: 0; }
}

/* ═══════════════════════════════════════════════════════
   HEADER — Sign in link
   ═══════════════════════════════════════════════════════ */
.site-header__signin {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--cw-text-muted);
  text-decoration: none;
  padding: 8px 4px;
  transition: color var(--duration) var(--ease);
}
.site-header__signin:hover { color: var(--cw-accent); }

/* ═══════════════════════════════════════════════════════
   PRICING PAGE
   ═══════════════════════════════════════════════════════ */
.cw-pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 720px;
  margin: 0 auto var(--space-3xl);
  align-items: start;
}
.cw-pricing-card {
  background: var(--cw-bg);
  border: 1px solid var(--cw-border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.cw-pricing-card--premium {
  background: var(--cw-green-600);
  border-color: var(--cw-green-600);
  color: #fff;
}
.cw-pricing-card__popular {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: #fbbf24;
  color: #78350f;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  white-space: nowrap;
}
.cw-pricing-card__tier {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--cw-text-muted);
  margin-bottom: 8px;
}
.cw-pricing-card__price {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--cw-slate-900);
  line-height: 1;
  margin-bottom: 4px;
}
.cw-pricing-card--premium .cw-pricing-card__price { color: #fff; }
.cw-pricing-card__price span { font-size: 1rem; font-weight: 500; color: var(--cw-text-muted); }
.cw-pricing-card--premium .cw-pricing-card__price span { color: rgba(255,255,255,.65); }
.cw-pricing-card__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: var(--space-lg) 0 var(--space-xl);
  flex: 1;
}
.cw-pricing-card__list li {
  font-size: 14px;
  color: var(--cw-text);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.cw-pricing-card--premium .cw-pricing-card__list li { color: rgba(255,255,255,.9); }
.cw-check { color: var(--cw-green-600); font-weight: 700; flex-shrink: 0; }
.cw-check--light { color: #86efac; }
.cw-x { color: var(--cw-slate-300); flex-shrink: 0; }

/* ── FAQ ─────────────────────────────────────────── */
.cw-faq { display: flex; flex-direction: column; }
.cw-faq__item { border-bottom: 1px solid var(--cw-border); padding: 22px 0; }
.cw-faq__item:last-child { border-bottom: none; }
.cw-faq__item h3 { font-size: 15px; font-weight: 600; color: var(--cw-slate-900); margin-bottom: 8px; }
.cw-faq__item p { font-size: 14px; color: var(--cw-text-muted); line-height: 1.7; }

/* ═══════════════════════════════════════════════════════
   MOBILE FIXES
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Pricing grid stacks */
  .cw-pricing-grid { grid-template-columns: 1fr; max-width: 420px; }

  /* How it works grid stacks */
  #how-it-works .cw-container > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: var(--space-2xl) !important;
  }

  /* Hero grid stacks */
  .cw-hero__inner { grid-template-columns: 1fr !important; }
  .cw-hero__visual { display: none; }
  .cw-hero h1 { font-size: clamp(1.75rem, 8vw, 2.5rem); }
  .cw-hero__subtitle { font-size: 1rem; }
  .cw-hero__actions { flex-direction: column; align-items: flex-start; gap: var(--space-sm); }
  .cw-hero__actions .cw-btn { width: 100%; justify-content: center; }

  /* Stats bar */
  .cw-stats__inner { grid-template-columns: 1fr 1fr; gap: var(--space-lg); }

  /* Store tiles */
  .cw-stores-strip { grid-template-columns: 1fr !important; }

  /* Header actions — hide sign in text on very small, keep join button */
  .site-header__signin { display: none; }

  /* Container padding tighter on mobile */
  .cw-container { padding-inline: var(--space-md); }

  /* Section spacing tighter */
  .cw-section { padding-block: var(--space-2xl); }
  :root { --space-3xl: 3rem; }
}

@media (max-width: 480px) {
  /* Stats single column */
  .cw-stats__inner { grid-template-columns: 1fr; text-align: center; }
  .cw-stat__number { font-size: 2rem; }

  /* Pricing card padding */
  .cw-pricing-card { padding: 24px 20px; }

  /* Hero smaller text */
  .cw-hero { padding-block: var(--space-2xl); }
  .cw-hero h1 { font-size: 1.875rem; }

  /* Savings callout */
  .cw-savings-callout { padding: var(--space-xl) var(--space-lg); }
  .cw-savings-callout__amount { font-size: 3rem; }
}
