/* =========================================================
   MyDealsWallet — Design System
   ========================================================= */

:root {
  /* Color */
  --primary: #34b654;
  --primary-dark: #279042;
  --primary-darker: #1f7536;
  --primary-light: #eaf8ee;
  --primary-tint-border: #bfe8c9;
  --header-text: #163a1f;
  --header-cta-bg: #16211a;
  --header-cta-bg-hover: #223528;
  --text: #1c2126;
  --muted: #6b7280;
  --muted-2: #9aa2ab;
  --border: #e7e9ec;
  --background: #f6f7f6;
  --band: #eef7f0;
  --card: #ffffff;
  --danger: #d64545;
  --amber: #b45309;
  --amber-bg: #fef3e2;
  --blue: #1d4ed8;
  --blue-bg: #e8effe;
  --focus-ring: #1f7536;

  /* Header — deep gradient + gold "deal-tag" accent */
  --header-grad-1: #0e5527;
  --header-grad-2: #2c9e49;
  --header-topbar-bg: #0a3f1d;
  --header-ink: #ffffff;
  --header-ink-muted: rgba(255, 255, 255, 0.76);
  --header-hairline: rgba(255, 255, 255, 0.16);
  --gold: #ffb703;
  --gold-dark: #c98a00;
  --gold-ink: #3d2600;

  /* Layout */
  --container-width: 1220px;
  --container-narrow: 760px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(20, 24, 20, 0.05);
  --shadow-sm: 0 4px 14px rgba(20, 24, 20, 0.07);
  --shadow-md: 0 12px 32px rgba(20, 24, 20, 0.12);
  --shadow-header: 0 6px 20px rgba(6, 36, 16, 0.22);

  /* Spacing scale */
  --sp-1: 8px;
  --sp-2: 12px;
  --sp-3: 16px;
  --sp-4: 24px;
  --sp-5: 32px;
  --sp-6: 48px;

  /* Type */
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --header-height: 76px;
  --topbar-height: 36px;
}

/* =========================================================
   Reset
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
body, h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, li { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
input { font: inherit; color: inherit; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--header-cta-bg);
  color: #fff;
  padding: 10px 16px;
  z-index: 999;
  border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 92%;
  max-width: var(--container-width);
  margin: 0 auto;
}
.container--narrow { max-width: var(--container-narrow); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--primary);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 44px;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-primary:active { transform: translateY(1px); }

h1, h2, h3 { font-weight: 800; letter-spacing: -0.01em; color: var(--text); }

/* Section eyebrow signature */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--primary-dark);
  margin: 0 0 8px;
}
.section-eyebrow::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--primary);
  display: inline-block;
}
.section-eyebrow--center { justify-content: center; }

/* =========================================================
   Header topbar — slim trust strip above the sticky bar
   ========================================================= */
.header-topbar {
  background: var(--header-topbar-bg);
  color: var(--header-ink-muted);
  height: var(--topbar-height);
}
.header-topbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.header-topbar-msg {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-topbar-msg svg { flex-shrink: 0; color: var(--gold); }
.header-topbar-links {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}
.header-topbar-links a {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--header-ink-muted);
  transition: color 0.15s ease;
}
.header-topbar-links a:hover { color: var(--header-ink); }
.header-topbar-links span[aria-hidden] { color: var(--header-hairline); }

/* =========================================================
   Header — gradient fill
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(100deg, var(--header-grad-1) 0%, var(--header-grad-2) 100%);
  box-shadow: var(--shadow-header);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  height: var(--header-height);
}

/* Perforation: a row of punched dots along the header's bottom edge,
   echoing a coupon's tear-off stub. */
/* Perforation removed per feedback — header now ends with a clean edge. */


.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--header-ink);
  border-radius: 2px;
}
.hamburger:hover { background: rgba(255,255,255,0.14); }

.logo {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo img {
  display: block;
  height: 30px;
  width: auto;
}
.footer-logo img { height: 26px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.nav-link {
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  color: var(--header-ink);
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.nav-link:hover, .nav-item.open .nav-link { opacity: 1; background: rgba(255,255,255,0.15); }
.chev { transition: transform 0.15s ease; }
.nav-item.open .chev { transform: rotate(180deg); }

.nav-item { position: relative; }
.dropdown-menu, .mega-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--sp-2);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 50;
}
.mega-menu {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px 20px;
  min-width: 340px;
  padding: var(--sp-3);
}
.nav-item.open .dropdown-menu,
.nav-item.open .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a, .mega-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
}
.dropdown-menu a:hover, .mega-menu a:hover { background: var(--primary-light); color: var(--primary-darker); }

.header-search {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-width: 0;
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 0 14px;
  height: 44px;
  box-shadow: 0 3px 12px rgba(6, 36, 16, 0.16);
  transition: box-shadow 0.15s ease;
}
.header-search:focus-within {
  box-shadow: 0 0 0 3px rgba(255, 183, 3, 0.4);
}
.search-icon { flex-shrink: 0; color: var(--muted-2); }
.header-search input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  padding: 0 10px;
  font-size: 14px;
  color: var(--text);
}
.header-search input::placeholder { color: var(--muted-2); }

/* Search clear (×) button — sits inside the pill, right-aligned,
   only shown once the input has text (toggled via [hidden] in JS). */
.search-clear-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--muted-2);
  transition: background 0.15s ease, color 0.15s ease;
}
.search-clear-btn:hover {
  background: var(--primary-light);
  color: var(--primary-darker);
}
.search-clear-btn[hidden] { display: none; }

/* Promo CTA — shaped like a ticket tag, with a stub notch punched
   in its left edge to match the header's perforation motif. */
.promo-btn {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
  background: linear-gradient(135deg, #ffc93c, var(--gold));
  color: var(--gold-ink);
  font-weight: 800;
  font-size: 13px;
  padding: 9px 20px 9px 24px;
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}
.promo-btn::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 11px; height: 11px;
  background: var(--header-grad-2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.promo-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.22); }
.promo-btn:active { transform: translateY(0); }
.promo-btn span {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold-dark);
}

.mobile-search-btn {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  margin-left: auto;
  color: var(--header-ink);
}
.mobile-search-btn:hover { background: rgba(255,255,255,0.14); }

/* Autocomplete panel */
.autocomplete-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-height: 360px;
  overflow-y: auto;
  z-index: 70;
  display: none;
}
.autocomplete-panel.open { display: block; }
.ac-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.active { background: var(--primary-light); }
.ac-logo {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  object-fit: contain;
  padding: 4px;
  flex-shrink: 0;
}
.ac-info { min-width: 0; flex: 1; }
.ac-name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.ac-type-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary-darker);
  background: var(--primary-light);
  padding: 2px 6px;
  border-radius: 4px;
}
.ac-empty { padding: 20px 14px; text-align: center; color: var(--muted); font-size: 14px; }

/* =========================================================
   Mobile drawer
   ========================================================= */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 24, 20, 0.45);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.drawer-overlay.open { opacity: 1; visibility: visible; }

.mobile-drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 82%;
  max-width: 340px;
  background: var(--card);
  z-index: 95;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
}
.mobile-drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-3);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  background: linear-gradient(100deg, var(--header-grad-1) 0%, var(--header-grad-2) 100%);
}
.drawer-close {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--header-ink);
}
.drawer-close:hover { background: rgba(255,255,255,0.2); }
.drawer-list { padding: var(--sp-2) 0; overflow-y: auto; }
.drawer-link {
  display: block;
  padding: 14px var(--sp-3);
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.drawer-link:hover { color: var(--primary-darker); background: var(--primary-light); }

/* =========================================================
   Mobile search overlay
   ========================================================= */
.mobile-search-overlay {
  position: fixed; inset: 0;
  background: var(--card);
  z-index: 100;
  transform: translateY(-100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  padding: var(--sp-3);
}
.mobile-search-overlay.open { transform: translateY(0); }
.mobile-search-top { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.mobile-search-close {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.mobile-search-close:hover { background: var(--background); }
.mobile-search-title { font-size: 15px; font-weight: 700; }
.mobile-search-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0 16px;
  height: 52px;
}
.mobile-search-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.mobile-search-field input {
  border: none; background: transparent; outline: none;
  width: 100%; font-size: 16px; color: var(--text);
  padding-right: 30px; /* room for the clear button */
}
.mobile-search-field .search-icon { color: var(--muted-2); flex-shrink: 0; }
.mobile-search-field .search-clear-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}
.mobile-panel { position: static; margin-top: var(--sp-3); box-shadow: none; max-height: none; }

/* =========================================================
   Today's Deal ticker — breaking-news style strip that sits
   between the header and the hero carousel
   ========================================================= */
.deal-ticker {
  background: var(--header-cta-bg);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}
.deal-ticker-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 5px 0;
}
.deal-ticker-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #0e1710;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.deal-ticker-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
}
.deal-ticker-track {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  width: max-content;
  /* Duration set inline by initDealTicker() in script.js, calculated
     from content width so speed stays constant regardless of how
     many coupons are in the strip. This 40s is just a fallback for
     the brief moment before JS measures the track (or if JS fails). */
  animation: deal-ticker-scroll 40s linear infinite;
}
.deal-ticker:hover .deal-ticker-track,
.deal-ticker:focus-within .deal-ticker-track {
  animation-play-state: paused;
}
.deal-ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 13px;
  color: #dfe6e1;
}
.deal-ticker-store {
  font-weight: 700;
  color: #ffffff;
}
.deal-ticker-store::after {
  content: "•";
  margin-left: 8px;
  color: var(--primary);
  font-weight: 700;
}
@keyframes deal-ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* =========================================================
   Hero carousel — 
   ========================================================= */
.hero-carousel-section {
  padding: var(--sp-3) 0 var(--sp-4);
  background: var(--background);
}
.carousel {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--sp-2) 0;
  background: radial-gradient(circle at 22% 20%, var(--primary-light) 0%, var(--background) 65%);
}
.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }

.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: 27% 23% 1fr;
  grid-template-areas: "left content right";
  column-gap: var(--sp-5);
  align-items: center;
  padding: 0 4px 36px;
}

.slide-photo {
  position: relative;
}
.slide-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 32px -8px rgba(20, 24, 20, 0.22);
  background: #eef1ee;
}
.slide-photo--left { grid-area: left; aspect-ratio: 3 / 3.5; }
.slide-photo--right { grid-area: right; aspect-ratio: 16 / 9.2; }

.slide-badge {
  position: absolute;
  left: 20px;
  bottom: -26px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 0 0 4px var(--primary-light), 0 10px 22px -6px rgba(31, 117, 54, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 3;
  transition: box-shadow 0.2s ease;
}
.slide-badge img { width: 62%; height: 62%; object-fit: contain; }
.slide-badge--mobile { display: none; }

.slide-content {
  grid-area: content;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.slide-eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  background: var(--primary-light);
  color: var(--primary-darker);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 2px;
}
.slide-headline {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.38;
  color: var(--text);
  letter-spacing: -0.005em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.slide-store { font-size: 15px; color: var(--muted); }
.slide-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--sp-2);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  width: fit-content;
  box-shadow: 0 10px 20px -6px rgba(52, 182, 84, 0.45);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, gap 0.15s ease;
}
.slide-cta svg { transition: transform 0.15s ease; }
.slide-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -6px rgba(52, 182, 84, 0.55);
  gap: 11px;
}
.slide-cta:hover svg { transform: translateX(2px); }

.carousel-arrow {
  position: absolute;
  top: 44%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  border: none;
  color: var(--primary-darker);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 6px 18px -4px rgba(20, 24, 20, 0.25);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.carousel-arrow:hover {
  background: var(--primary-light);
  box-shadow: 0 8px 22px -4px rgba(20, 24, 20, 0.32);
}
.carousel-arrow:active { transform: translateY(-50%) scale(0.94); }
.carousel-arrow--prev { left: 8px; }
.carousel-arrow--next { right: 8px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin-top: var(--sp-2);
}
.carousel-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary-tint-border);
  border: none;
  padding: 0;
  position: relative;
  overflow: hidden;
  transition: background 0.2s ease, width 0.2s ease;
}
.carousel-dot.active { background: var(--primary-tint-border); width: 26px; border-radius: var(--radius-pill); }
.carousel-dot-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: var(--primary-darker);
  border-radius: inherit;
}
.carousel-dot-fill.run { animation: dot-fill 5000ms linear forwards; }
.carousel-dots.paused .carousel-dot-fill.run { animation-play-state: paused; }
@keyframes dot-fill {
  from { width: 0%; }
  to { width: 100%; }
}

/* =========================================================
   Sections general
   ========================================================= */
.section { padding: var(--sp-6) 0; }
.section--muted { background: #f0f2f0; }
.section-head { margin-bottom: var(--sp-4); }
.section-head h2 { font-size: 26px; }
.section-head--center { text-align: center; }

/* =========================================================
   Deal cards — centered, logo-in-middle layout
   ========================================================= */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
}
.deal-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4) var(--sp-3) var(--sp-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
  height: 100%;
}
.deal-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--primary-tint-border);
}
.deal-card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 5px;
}
.badge-code { color: var(--primary-darker); background: var(--primary-light); }
.badge-sale { color: var(--amber); background: var(--amber-bg); }
.badge-cashback { color: var(--blue); background: var(--blue-bg); }

.deal-card-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border-ring, var(--border));
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: var(--sp-3);
  flex-shrink: 0;
}
.deal-card-avatar.ring-code { border-color: var(--primary-tint-border); }
.deal-card-avatar.ring-sale { border-color: #f6d9ab; }
.deal-card-avatar.ring-cashback { border-color: #bcd0fb; }
.deal-card-avatar img { width: 62%; height: 62%; object-fit: contain; }

.deal-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: var(--sp-1);
  flex: 1;
}
.deal-card-expiry {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: var(--sp-3);
}
.deal-card-cta {
  width: 100%;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  padding: 11px 14px;
  border-radius: var(--radius-pill);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  margin-top: auto;
}
.deal-card-cta:hover { background: var(--primary-dark); }

/* =========================================================
   Store logo grid
   ========================================================= */
.stores-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--sp-4) var(--sp-3);
}
.store-tile { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.store-tile-logo {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.store-tile:hover .store-tile-logo { border-color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.store-tile-logo img { width: 68%; height: 68%; object-fit: contain; }
.store-tile-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  max-width: 104px;
}

/* =========================================================
   Collapsible sections (Popular Stores / Categories)
   ========================================================= */
.collapsible-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-darker);
  padding: var(--sp-3) 0;
  border-radius: var(--radius-md);
  transition: background 0.15s ease;
}
.collapsible-trigger:hover { background: var(--primary-light); }
.collapsible-chev { transition: transform 0.2s ease; flex-shrink: 0; }
.collapsible-trigger[aria-expanded="true"] .collapsible-chev { transform: rotate(180deg); }
.collapsible-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.collapsible-panel.open { max-height: 2000px; }
.popular-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 24px;
  padding-top: var(--sp-4);
}
.popular-links-grid a {
  display: block;
  padding: 9px 4px;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.popular-links-grid a:hover { color: var(--primary-darker); }
.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--sp-3);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-darker);
}
.view-all-link:hover { text-decoration: underline; }

/* =========================================================
   Newsletter
   ========================================================= */
.newsletter-box {
  background: var(--primary-light);
  border: 1px solid var(--primary-tint-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6) var(--sp-4);
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
}
.newsletter-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #fff;
  color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--sp-3);
  box-shadow: var(--shadow-xs);
}
.newsletter-box h2 { font-size: 26px; margin-bottom: var(--sp-2); }
.newsletter-box p { color: var(--muted); font-size: 14px; margin-bottom: var(--sp-4); }
.newsletter-form { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); }
.newsletter-fields {
  display: flex;
  gap: var(--sp-2);
  width: 100%;
  max-width: 480px;
}
.field { flex: 1; text-align: left; }
.field input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-size: 14px;
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px #ffffff; }
.field input.invalid { border-color: var(--danger); }
.field-error {
  display: block;
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
  min-height: 16px;
}
.newsletter-submit { margin-top: var(--sp-1); padding-left: 32px; padding-right: 32px; }
.newsletter-success {
  display: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-darker);
  margin-top: var(--sp-1);
}
.newsletter-success.show { display: block; }

/* =========================================================
   Why section
   ========================================================= */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
}
.why-card {
  text-align: center;
  padding: var(--sp-4) var(--sp-2);
  border-radius: var(--radius-md);
  transition: background 0.15s ease;
}
.why-card:hover { background: var(--primary-light); }
.why-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-darker);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--sp-2);
  border: 1px solid var(--primary-tint-border);
}
.why-card h3 { font-size: 15px; margin-bottom: 4px; }
.why-card p { font-size: 13px; color: var(--muted); }

/* =========================================================
   FAQ
   ========================================================= */
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: var(--sp-3) 2px;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  min-height: 44px;
}
.faq-chev { transition: transform 0.2s ease; flex-shrink: 0; color: var(--primary-darker); }
.faq-question[aria-expanded="true"] .faq-chev { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.faq-answer p { font-size: 14px; color: var(--muted); padding: 0 2px var(--sp-3); line-height: 1.6; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--text);
  color: #cfd3d1;
  padding: var(--sp-5) 0 var(--sp-4);
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-4);
  border-bottom: 1px solid #33383a;
}
.footer-logo { color: #fff; }
.footer-logo span { color: var(--primary); }
.footer-social { display: flex; gap: 10px; }
.social-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid #3a3f41;
  display: flex; align-items: center; justify-content: center;
  color: #cfd3d1;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.social-icon:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  padding-bottom: var(--sp-5);
}
.footer-accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-2);
  cursor: default;
}
.footer-plus { display: none; }
.footer-col-panel { display: flex; flex-direction: column; gap: 10px; }
.footer-col-panel a { font-size: 14px; color: #b7bcb9; transition: color 0.15s ease; }
.footer-col-panel a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid #34383a;
  padding-top: var(--sp-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.footer-bottom-links { display: flex; gap: 10px; font-size: 13px; color: #b7bcb9; }
.footer-bottom-links a:hover { color: var(--primary); }
.footer-copyright { font-size: 13px; color: #8b9089; }

/* =========================================================
   Modals
   ========================================================= */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(14, 20, 15, 0.6);
  backdrop-filter: blur(2px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--card);
  border-radius: 24px;
  padding: 44px 36px 32px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 60px -12px rgba(15, 23, 17, 0.35), 0 4px 16px rgba(15, 23, 17, 0.08);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2), opacity 0.2s ease;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--text);
}
.modal-close:hover { background: var(--background); }
.modal-store-logo-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px; height: 96px;
  margin: 0 auto var(--sp-3);
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 10px 24px -8px rgba(15, 23, 17, 0.28), 0 0 0 1px var(--border);
  overflow: hidden;
}
.modal-store-logo {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 12px;
}
.modal-store-name {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-2);
}
.modal-headline {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.28;
  color: var(--text);
  margin-bottom: var(--sp-5);
}
.coupon-pill {
  display: flex;
  align-items: stretch;
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: var(--sp-3);
  box-shadow: 0 10px 22px -10px rgba(15, 23, 17, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.coupon-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -10px rgba(15, 23, 17, 0.4);
}
.coupon-pill-code {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 16px 14px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text);
  background: var(--background);
  border: 2px dashed var(--border);
  border-right: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coupon-pill-copy {
  flex-shrink: 0;
  padding: 16px 28px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--primary-darker);
  transition: background 0.15s ease;
}
.coupon-pill-copy:hover { background: var(--header-cta-bg); }
.coupon-pill-copy.copied { background: #2f9e57; }
.copied-msg {
  font-size: 13px;
  font-weight: 700;
  color: #2f9e57;
  min-height: 18px;
  margin-bottom: var(--sp-3);
  margin-top: -6px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.copied-msg.show { opacity: 1; }
.modal-instructions {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: var(--sp-2);
  line-height: 1.5;
}
.modal-instructions a {
  color: var(--primary-darker);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.modal-expiry {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-2);
}
.btn-get-deal {
  display: block;
  width: 100%;
  padding: 18px;
  border-radius: var(--radius-pill);
  background: var(--primary-darker);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: center;
  margin-bottom: var(--sp-3);
  box-shadow: 0 10px 22px -10px rgba(15, 23, 17, 0.35);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-get-deal:hover {
  background: var(--header-cta-bg);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -10px rgba(15, 23, 17, 0.4);
}

/* =========================================================
   Responsive — Tablet (768–1199px)
   ========================================================= */
@media (max-width: 1199px) {
  .header-topbar-links { display: none; }
  .main-nav { display: none; }
  .header-search { order: 3; flex-basis: 100%; margin-top: 0; }
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; row-gap: 10px; }
  .promo-btn { display: none; }
  .hamburger { display: flex; }
  .mobile-search-btn { display: none; }

  .carousel-slide { grid-template-columns: 30% 26% 1fr; column-gap: var(--sp-4); }
  .slide-headline { font-size: 19px; }
  .slide-badge { width: 64px; height: 64px; left: 14px; bottom: -20px; }

  .deals-grid { grid-template-columns: repeat(2, 1fr); }
  .stores-grid { grid-template-columns: repeat(4, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .popular-links-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 899px) {
  .carousel-slide {
    grid-template-columns: 32% 1fr;
    grid-template-areas: "left content" "right right";
    row-gap: var(--sp-3);
    column-gap: var(--sp-3);
    align-items: start;
  }
  .slide-photo--right { aspect-ratio: 21/9; margin-top: var(--sp-1); }
  .slide-content { padding-top: 4px; }
  .slide-badge { width: 56px; height: 56px; bottom: -16px; left: 12px; }
  .carousel-arrow { display: none; }
}

/* =========================================================
   Responsive — Mobile (≤767px)
   ========================================================= */
@media (max-width: 767px) {
  :root { --header-height: 56px; --topbar-height: 30px; }

  .header-topbar-msg { font-size: 11.5px; }
  .header-inner { padding: 8px 0; gap: 10px; }
  .logo img { height: 29px; width: 190px;}
  .header-search { display: none; }
  .mobile-search-btn { display: flex; }

  .hero-carousel-section { padding: var(--sp-3) 0 var(--sp-3); }
  .carousel-slide {
    grid-template-columns: 1fr;
    grid-template-areas: "right" "content";
    row-gap: 0;
    padding: 0 4px 18px;
  }
  .slide-photo--left { display: none; }
  .slide-photo--right { aspect-ratio: 2/1; }
  .slide-badge--desktop { display: none; }
  .slide-badge--mobile { display: flex; width: 64px; height: 64px; bottom: -20px; }
  .slide-content { margin-top: 30px; }
  .slide-headline { font-size: 18px; }
  .carousel-arrow { display: none; }

  .deal-ticker-inner { gap: var(--sp-2); padding: 8px 0; }
  .deal-ticker-badge { font-size: 10px; padding: 5px 9px; }
  .deal-ticker-viewport {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
  }
  .deal-ticker-item { font-size: 12px; gap: 6px; }
  .deal-ticker-track { gap: var(--sp-5); }

  .section { padding: var(--sp-5) 0; }
  .section-head h2 { font-size: 21px; }

  .deals-grid { grid-template-columns: 1fr; }
  .deal-card { width: 100%; padding: var(--sp-4) var(--sp-3); }

  .stores-grid { grid-template-columns: repeat(3, 1fr); gap: var(--sp-3) 10px; }
  .store-tile-logo { width: 66px; height: 66px; }
  .store-tile-name { font-size: 12px; }

  .popular-links-grid { grid-template-columns: repeat(2, 1fr); gap: 4px 14px; }

  .why-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
  .why-card { padding: var(--sp-3) var(--sp-1); }

  .newsletter-box { padding: var(--sp-4) var(--sp-3); }
  .newsletter-fields { flex-direction: column; }

  .footer-top { flex-direction: column; gap: var(--sp-3); text-align: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 0; padding-bottom: var(--sp-2); }
  .footer-col { border-bottom: 1px solid #34383a; }
  .footer-accordion-trigger { cursor: pointer; padding: var(--sp-3) 0; margin-bottom: 0; }
  .footer-plus { display: inline-block; font-size: 18px; font-weight: 400; transition: transform 0.2s ease; }
  .footer-accordion-trigger[aria-expanded="true"] .footer-plus { transform: rotate(45deg); }
  .footer-col-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    gap: 0;
  }
  .footer-col-panel.open { max-height: 300px; padding-bottom: var(--sp-3); }
  .footer-col-panel a { padding: 6px 0; }

  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .modal { max-width: 92%; padding: 36px 24px 26px; }
  .modal-store-logo-ring { width: 80px; height: 80px; }
  .modal-headline { font-size: 21px; margin-bottom: var(--sp-4); }
  .coupon-pill-code { font-size: 14px; padding: 14px 10px; }
  .coupon-pill-copy { padding: 14px 20px; font-size: 14px; }
  .btn-get-deal { padding: 16px; font-size: 15px; }
}

@media (min-width: 768px) {
  .footer-col-panel { max-height: none !important; }
}

/* =========================================================
   Slider — equal left/right image height fix
   The left and right hero photos sit side-by-side (in the same
   grid row) at 900px and above, but previously used two
   different aspect-ratios, so the right image rendered shorter
   than the left one. Locking both to the same responsive height
   keeps them visually aligned; object-fit: cover (set above)
   still crops each photo to fill that height without stretching
   or squashing it. Left/right stack into separate rows below
   900px, where their original per-breakpoint aspect-ratios
   already produce a balanced, single-column look and are left
   untouched.
   ========================================================= */
@media (min-width: 900px) {
  .slide-photo--left,
  .slide-photo--right {
    aspect-ratio: auto;
    height: clamp(280px, 26vw, 400px);
  }
}

/* =========================================================
   STORE PAGE  (/store/[store-slug])
   ========================================================= */

/* ---- Breadcrumb ---- */
.breadcrumb-bar { padding: var(--sp-3) 0; }
.breadcrumb-bar--bottom { border-top: 1px solid var(--border); margin-top: var(--sp-4); }
.breadcrumb-trail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.breadcrumb-trail a { color: var(--muted-2); }
.breadcrumb-trail a:hover { color: var(--primary-darker); }
.breadcrumb-trail span[aria-current] { color: var(--muted); }

/* ---- Layout: sidebar + main ---- */
.store-page-section { padding: var(--sp-4) 0 var(--sp-6); }
.store-layout {
  display: grid;
  grid-template-columns: 268px 1fr;
  align-items: start;
  gap: var(--sp-5);
}
.store-main { min-width: 0; }

/* ---- Sidebar ---- */
.store-sidebar { display: flex; flex-direction: column; gap: var(--sp-4); }

.sidebar-logo-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
}
.store-badge {
  width: 100%;
  max-width: 180px;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  background: var(--store-badge-bg, #5b2a8c);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 900;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.sidebar-count { font-size: 17px; font-weight: 800; color: var(--text); }

.sidebar-section-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}
.sidebar-about p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}
.sidebar-link-list { display: flex; flex-direction: column; }
.sidebar-link-list a {
  padding: 7px 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--blue);
  border-bottom: 1px solid var(--border);
}
.sidebar-link-list a:last-child { border-bottom: none; }
.sidebar-link-list a:hover { color: var(--primary-darker); text-decoration: underline; }

/* ---- Store heading ---- */
.store-title { font-size: 26px; margin-bottom: 6px; }
.store-title-meta { font-size: 13.5px; color: var(--muted); margin-bottom: var(--sp-4); }

/* ---- Coupon list ---- */
.coupon-list { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-6); }
.coupon-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.coupon-item-main {
  display: grid;
  grid-template-columns: 108px 1fr auto;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-3);
}
.coupon-discount {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  border-right: 1px dashed var(--border);
  padding-right: var(--sp-3);
}
.coupon-discount-value { font-size: 22px; font-weight: 900; color: var(--primary-darker); line-height: 1.05; }
.coupon-discount-unit { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.coupon-item-badge {
  display: inline-block;
  width: fit-content;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 5px;
  margin-bottom: 8px;
}
.coupon-item-title { font-size: 16px; font-weight: 700; line-height: 1.4; margin-bottom: 4px; }
.coupon-item-expiry { font-size: 12.5px; color: var(--muted); }
.coupon-item-cta {
  min-width: 152px;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: var(--primary);
  padding: 13px 18px;
  border-radius: var(--radius-pill);
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.1s ease;
}
.coupon-item-cta:hover { background: var(--primary-dark); }
.coupon-item-cta:active { transform: translateY(1px); }

.coupon-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 10px var(--sp-3);
  border-top: 1px solid var(--border);
}
.coupon-details-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.coupon-details-trigger:hover { color: var(--primary-darker); }
.coupon-details-chev { transition: transform 0.2s ease; }
.coupon-details-trigger[aria-expanded="true"] .coupon-details-chev { transform: rotate(180deg); }

.coupon-feedback { display: flex; align-items: center; gap: 10px; }
.feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted-2);
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}
.feedback-btn:hover { background: var(--primary-light); color: var(--primary-darker); }
.feedback-btn.active { color: var(--primary-darker); background: var(--primary-light); }
.feedback-btn[data-vote="down"]:hover,
.feedback-btn[data-vote="down"].active { color: var(--danger); background: #fdeceb; }

.coupon-details-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  border-top: 1px solid transparent;
}
.coupon-details-panel.open { max-height: 260px; border-top-color: var(--border); }
.coupon-details-panel p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  padding: var(--sp-3);
}

/* ---- Long-form article ---- */
.store-article h2 { font-size: 22px; margin: var(--sp-5) 0 var(--sp-2); }
.store-article h2:first-child { margin-top: 0; }
.store-article h3 { font-size: 16px; margin: var(--sp-4) 0 6px; }
.store-article p { font-size: 14.5px; line-height: 1.75; color: var(--muted); margin-bottom: var(--sp-2); }
.store-article ul { margin: var(--sp-2) 0 var(--sp-3); padding-left: 20px; }
.store-article li { font-size: 14.5px; line-height: 1.8; color: var(--muted); }
.store-article .faq-item { margin-bottom: 8px; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .store-layout { grid-template-columns: 1fr; }
  .store-main { order: 1; }
  .store-sidebar {
    order: 2;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--sp-4) var(--sp-5);
  }
  .sidebar-logo-card { width: 200px; }
  .store-sidebar > * { flex: 1 1 220px; }
}
@media (max-width: 767px) {
  .store-title { font-size: 21px; }
  .coupon-item-main { grid-template-columns: 1fr; }
  .coupon-discount {
    flex-direction: row;
    justify-content: flex-start;
    border-right: none;
    border-bottom: 1px dashed var(--border);
    padding-right: 0;
    padding-bottom: 10px;
    margin-bottom: 4px;
  }
  .coupon-item-cta { width: 100%; }
  .coupon-item-foot { flex-wrap: wrap; }
  .store-sidebar { flex-direction: column; }
  .store-sidebar > * { flex: 1 1 auto; }
  .sidebar-logo-card { width: 100%; }
}

/* =========================================================
   CATEGORIES LIST PAGE  (/categories) — text-only, no images/icons
   ========================================================= */
.categories-hero {
  padding: var(--sp-6) 0 var(--sp-4);
  text-align: center;
}
.categories-hero h1 {
  font-size: 32px;
  margin: 8px 0 10px;
}
.categories-hero-sub {
  color: var(--muted);
  font-size: 15px;
  max-width: 560px;
  margin: 0 auto var(--sp-4);
}
.categories-search {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
}
.categories-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  pointer-events: none;
}
.categories-search input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--card);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.categories-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.categories-section { padding-top: var(--sp-2); }
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
}
.category-card {
  display: block;
  padding: var(--sp-4) var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  text-align: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.category-card:hover {
  border-color: var(--primary-tint-border);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.category-card-name {
  font-size: 16px;
  color: var(--text);
  margin: 0 0 4px;
}
.category-card-count {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.categories-empty {
  text-align: center;
  color: var(--muted);
  padding: var(--sp-5) 0;
}

@media (max-width: 1023px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
  .categories-hero h1 { font-size: 24px; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .categories-grid { grid-template-columns: 1fr; }
}
/* =========================================================
   Toast notification (subscribe success/error feedback)
   Bottom-center pill — matches the store page's .mdw-toast
   pattern (store.css) so both pages feel consistent.
   ========================================================= */
.mdw-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 16px);
  background: var(--text);
  color: #fff;
  font: 600 13px/1 var(--font-body);
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 320;
  max-width: 88vw;
  text-align: center;
}
.mdw-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 400px) {
  .header-topbar { display: none; }
}