:root {
  /* Light Theme (Default) */
  --bg: #FAFAFA;
  --bg-card: #FFFFFF;
  --text: #0F172A;
  --text-muted: #64748B;
  --border: #CBD5E1;
  --accent: #10B981;
  --accent-glow: rgba(16, 185, 129, 0.15);
  --gold: #F59E0B;
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-hover: 0 12px 32px rgba(0,0,0,0.1);
  --transition: 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

[data-theme="dark"] {
  --bg: #0B0F14;
  --bg-card: #1E293B;
  --text: #F8F9FA;
  --text-muted: #94A3B8;
  --border: rgba(255,255,255,0.15);
  --accent: #10B981;
  --accent-glow: rgba(16, 185, 129, 0.25);
  --gold: #F59E0B;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-hover: 0 12px 32px rgba(0,0,0,0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

/* Utilities */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 12px; font-weight: 600;
  cursor: pointer; transition: all var(--transition); border: none;
  font-size: 15px; font-family: inherit;
}
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: #0ea572; transform: translateY(-2px); box-shadow: 0 8px 24px var(--accent-glow); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0; backdrop-filter: blur(12px);
  background: rgba(250, 250, 250, 0.8); border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
[data-theme="dark"] .nav { background: rgba(11, 15, 20, 0.8); }
.nav-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.logo:hover { color: var(--text); }
.logo svg { width: 24px; height: 24px; fill: var(--accent); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-card); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; fill: var(--text); transition: fill var(--transition); }
[data-theme="dark"] .theme-toggle svg { fill: var(--gold); }
@media (max-width: 768px) { .nav-links { display: none; } }

/* Hero */
.hero {
  padding: 140px 0 20px; text-align: center; position: relative;
  background: radial-gradient(circle at 50% 0%, var(--accent-glow) 0%, transparent 60%);
}
.hero h1 {
  font-size: clamp(40px, 8vw, 72px); font-weight: 800; line-height: 1.1;
  letter-spacing: -1.5px; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { font-size: 18px; color: var(--text-muted); max-width: 600px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Radial Carousel Section */
.carousel-section {
  padding: 0px 0 120px;
  position: relative;
  clip-path: inset(-80px 0 0 0);
}
.carousel-section::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
  z-index: 15;
}
.section-header { text-align: center; margin-bottom: 40px; position: relative; z-index: 10; }
.carousel-section .section-header { position: absolute; bottom: 55%; left: 0; right: 0; margin-bottom: 0; z-index: 20; }
.section-header h2 { font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.section-header p { color: var(--text-muted); }

/* Carousel Container - half-arc mask */
.radial-carousel {
  position: relative;
  width: 100%;
  height: 70vh;
}

/* Rotating container - center of the arc circle */
.carousel-rotate {
  position: absolute;
  top: 80px;
  left: 50%;
  width: 0;
  height: 0;
}

/* Carousel card drop shadow (light mode) */
.carousel-card {
  position: absolute;
  width: 230px;
  height: 160px;
  left: -115px;
  top: -80px;
  background: var(--bg-card);
  border: 1px solid #10B9816E;
  border-radius: 14px;
  padding: 9px 18px 18px 18px;
  box-shadow: var(--shadow), 0 8px 32px rgba(0,0,0,0.12), 0 0 0 1px rgba(16,185,129,0.12);
  transition: box-shadow 0.3s, border-color 0.3s;
  cursor: grab;
}
.carousel-card:active { cursor: grabbing; }
.carousel-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover), 0 0 0 2px rgba(16,185,129,0.25), 0 12px 32px rgba(0,0,0,0.16);
  z-index: 100;
}

/* Dark mode: revert carousel card shadows */
[data-theme="dark"] .carousel-card {
  box-shadow: var(--shadow), 0 0 0 1px rgba(16,185,129,0.12);
}

[data-theme="dark"] .carousel-card:hover {
  box-shadow: var(--shadow-hover), 0 0 0 2px rgba(16,185,129,0.25);
}
.carousel-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 14px 14px 0 0;
  opacity: 0;
  transition: opacity 0.3s;
}
.carousel-card:hover::before { opacity: 1; }

/* Card Content */
.card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.store-logo { width: 36px; height: 36px; background: #FFFFFF; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--text-muted); font-size: 16px; overflow: hidden; position: relative; flex-shrink: 0; }
.store-logo-img { width: 28px; height: 28px; object-fit: contain; border-radius: 4px; position: absolute; }
.store-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.verified { display: flex; align-items: center; gap: 3px; font-size: 8px; color: var(--text-muted); font-weight: 500; letter-spacing: 0.3px; margin-bottom: 4px; }
.verified svg { width: 8px; height: 8px; fill: var(--accent); }
.discount { font-size: 24px; font-weight: 800; color: var(--accent); margin-bottom: 6px; line-height: 1; }
.code { font-family: 'JetBrains Mono', monospace; background: var(--bg); padding: 4px 8px; border-radius: 6px; font-size: 12px; color: var(--gold); display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; border: 1px solid var(--border); }
.copy-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; transition: color 0.2s; }
.copy-btn:hover { color: var(--text); }
.copy-btn svg { width: 12px; height: 12px; fill: currentColor; }
.card-footer { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--text-muted); }
.countdown { font-family: 'JetBrains Mono', monospace; color: var(--gold); }

/* Categories */
.categories { padding: 80px 0; border-top: 1px solid var(--border); }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
/* Category card drop shadow (light mode) */
.cat-card {
  background: var(--bg-card); border: 2px solid #10B9816E; border-radius: 14px;
  padding: 24px; text-align: center; transition: all var(--transition); cursor: pointer;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.cat-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-hover), 0 12px 32px rgba(0,0,0,0.16); }

/* Dark mode: revert category card shadows */
[data-theme="dark"] .cat-card {
  box-shadow: var(--shadow);
}

[data-theme="dark"] .cat-card:hover {
  box-shadow: var(--shadow-hover);
}
.cat-icon { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.cat-icon svg { width: 24px; height: 24px; fill: var(--accent); }
.cat-icon img { width: 100%; height: 100%; object-fit: contain; }
.cat-card { text-decoration: none; color: inherit; display: block; }
.cat-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.cat-card p { font-size: 13px; color: var(--text-muted); }
.cat-card-stats { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 8px; }
.cat-card-brands { font-size: 13px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.cat-card-deals { font-size: 13px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
@media (max-width: 768px) {
  .cat-card-stats {
    display: block;
    text-align: center;
  }
  .cat-card-brands,
  .cat-card-deals {
    display: block;
  }
}

/* How It Works */
.how-it-works { padding: 80px 0; border-top: 1px solid var(--border); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; margin-top: 40px; }
.step { text-align: center; padding: 24px; }
.step-icon { width: 64px; height: 64px; margin: 0 auto 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.step-icon svg { width: 32px; height: 32px; fill: var(--accent); }
.step h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-muted); }

/* Footer */
.footer { padding: 60px 0 30px; border-top: 1px solid var(--border); background: var(--bg-card); transition: background var(--transition); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer h4 { font-size: 14px; font-weight: 600; margin-bottom: 16px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 10px; }
.footer a { color: var(--text); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer a:hover { color: var(--accent); }
.newsletter { display: flex; gap: 8px; margin-top: 12px; }
.newsletter input {
  flex: 1; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 14px; transition: all var(--transition);
}
.newsletter input:focus { outline: none; border-color: var(--accent); }
.footer-bottom { text-align: center; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 13px; }

/* Animations */
.fade-up { opacity: 0; transform: translateY(20px); }
.fade-up.visible { opacity: 1; transform: translateY(0); }
@media (max-width: 768px) {
  .hero { padding: 120px 0 60px; }
  .hero h1 { font-size: 36px; }
  .carousel-card { width: 170px; height: 140px; padding: 12px 14px; left: -85px; top: -70px; }
  .card-header { margin-bottom: 6px; }
  .store-logo { width: 28px; height: 28px; font-size: 12px; border-radius: 6px; }
  .store-name { font-size: 11px; }
  .discount { font-size: 18px; }
  .code { font-size: 10px; padding: 3px 6px; }
  .verified { font-size: 8px; }
  .coupon-elf-wrapper { width: 300px; height: 420px; }
  .newsletter { flex-direction: column; }
}

/* Brand Page Header */
.brand-header {
  padding: 120px 0 60px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.35) 0%, transparent 70%);
}
.brand-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  background: var(--bg-card);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow), 0 0 0 1px rgba(16,185,129,0.12);
  border: 2px solid var(--border);
}
.brand-title {
  font-size: clamp(32px, 6vw, 48px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-description {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
}
.brand-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 24px;
}
.stat { text-align: center; }
.stat-number {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}
.brand-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Coupons Section */
.coupons-section {
  padding: 60px 0 100px;
}
.coupons-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 800px;
  margin: 0 auto;
  gap: 24px;
}
.coupon-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Brand detail page coupon styling (light mode) */
.coupons-section .coupon-card {
  border: 1px solid #10B9816E;
  box-shadow: var(--shadow), 0 8px 32px rgba(0,0,0,0.12);
}

/* Brand detail page coupon hover (light mode) */
.coupons-section .coupon-card:hover {
  transform: translateY(-4px);
  border-color: #10B9816E;
  box-shadow: var(--shadow-hover), 0 0 0 2px rgba(16,185,129,0.25), 0 12px 32px rgba(0,0,0,0.16);
}

/* Dark mode: revert brand detail coupons to standard shadow */
[data-theme="dark"] .coupons-section .coupon-card {
  box-shadow: var(--shadow);
}

[data-theme="dark"] .coupons-section .coupon-card:hover {
  box-shadow: var(--shadow-hover), 0 0 0 2px rgba(16,185,129,0.25);
}

.coupon-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
}
.coupon-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  opacity: 0;
  transition: opacity 0.3s;
}
.coupon-card:hover::before { opacity: 1; }
.coupon-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.coupon-store { display: flex; align-items: center; gap: 12px; }
.coupon-code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 16px;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}
.copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.copy-btn:hover { color: var(--text); }
.copy-btn svg { width: 16px; height: 16px; fill: currentColor; }
.coupon-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}
.expiry { display: flex; align-items: center; gap: 6px; }
.expiry svg { width: 14px; height: 14px; fill: var(--gold); }
.expiry-countdown {
  font-family: 'JetBrains Mono', monospace;
  color: var(--gold);
  font-weight: 600;
}
.use-btn {
  padding: 8px 16px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.use-btn:hover { background: #0ea572; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
}
.page-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: all var(--transition);
  text-decoration: none;
  font-size: 14px;
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.page-btn.arrow { width: auto; padding: 0 16px; gap: 8px; }

/* Brand Page Responsive */
@media (max-width: 768px) {
  .brand-header { padding: 100px 0 40px; }
  .brand-logo { width: 80px; height: 80px; }
  .brand-stats { gap: 24px; }
  .section-header { flex-direction: column; gap: 16px; align-items: flex-start; }
}

/* Coupon Elf SVG */
.coupon-elf-wrapper {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  height: 480px;
  z-index: 20;
}
.coupon-elf-wrapper svg {
  width: 100%;
  height: 100%;
  display: block;
}
.glow { filter: url(#glow); }
.elf-glow { mix-blend-mode: normal; }
.elf-glow-dark { mix-blend-mode: screen; visibility: hidden; }
[data-theme="dark"] .elf-glow { visibility: hidden; }
[data-theme="dark"] .elf-glow-dark { visibility: visible; }
.shadow { filter: url(#dropShadow); }

/* Brand List Page Styles */
:root {
  --bg: #FAFAFA;
  --bg-card: #FFFFFF;
  --text: #0F172A;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --card-border: #CBD5E1;
  --card-shadow: 0 4px 16px rgba(0,0,0,0.06);
  --card-shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
  --accent: #10B981;
  --accent-glow: rgba(16, 185, 129, 0.4);
  --gold: #F59E0B;
  --transition: 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

[data-theme="dark"] {
  --bg: #0B0F14;
  --bg-card: #1E293B;
  --text: #F8F9FA;
  --text-muted: #94A3B8;
  --border: rgba(255,255,255,0.08);
  --card-border: rgba(255,255,255,0.1);
  --card-shadow: 0 4px 16px rgba(0,0,0,0.3);
  --card-shadow-hover: 0 8px 24px rgba(0,0,0,0.5);
  --accent: #10B981;
  --accent-glow: rgba(16, 185, 129, 0.25);
  --gold: #F59E0B;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

/* Utilities */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 12px; font-weight: 600;
  cursor: pointer; transition: all var(--transition); border: none;
  font-size: 15px; font-family: inherit;
}
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: #0ea572; transform: translateY(-2px); box-shadow: 0 8px 24px var(--accent-glow); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0; backdrop-filter: blur(12px);
  background: rgba(250, 250, 250, 0.8); border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
[data-theme="dark"] .nav { background: rgba(11, 15, 20, 0.8); }
.nav-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.logo:hover { color: var(--text); }
.logo svg { width: 24px; height: 24px; fill: var(--accent); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-card); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; fill: var(--text); transition: fill var(--transition); }
[data-theme="dark"] .theme-toggle svg { fill: var(--gold); }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
  background: var(--bg-card);
  z-index: 99;
  padding: 40px 24px;
}
.mobile-menu.open {
  display: flex;
}
.mobile-menu a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 20px;
  font-weight: 600;
  transition: color 0.2s;
}
.mobile-menu a:hover {
  color: var(--text);
}
.mobile-menu-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.mobile-menu-actions .btn {
  font-size: 16px;
  padding: 10px 24px;
}
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links { display: none; }
  .nav-actions { display: none !important; }
}

/* Page Header */
.page-header {
  padding: 120px 0 60px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, var(--accent-glow) 0%, transparent 60%);
}
.page-title {
  font-size: clamp(32px, 6vw, 48px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}
.page-subheading {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  max-width: 700px;
  margin: 0 auto;
}
.category-description {
  max-width: 700px;
  margin: 16px auto 0;
}
.category-description-text {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  max-height: 120px;
  overflow: hidden;
  position: relative;
}
.category-description-text::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
}
.category-description-text.expanded {
  max-height: none;
  overflow: visible;
}
.category-description-text.expanded::after {
  display: none;
}
.read-more-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 16px;
  background: none;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--accent);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}
.read-more-btn:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* Search Bar */
.search-container {
  max-width: 500px;
  margin: 32px auto 0;
  position: relative;
}
.search-input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  transition: all var(--transition);
  box-shadow: var(--card-shadow);
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--card-shadow-hover);
}
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  fill: var(--text-muted);
}

/* Main Layout */
.brands-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  padding-bottom: 80px;
}

/* A-Z Sidebar (Desktop) */
.alphabet-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}
.alphabet-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
}
.alphabet-link {
  display: block;
  padding: 6px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s;
  text-align: center;
}
.alphabet-link:hover {
  color: var(--accent);
  background: var(--accent-glow);
}
.alphabet-link.active {
  color: var(--accent);
  background: var(--accent-glow);
}

/* Mobile Alphabet Bar */
.alphabet-mobile {
  display: none;
  overflow-x: auto;
  padding: 16px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}
.alphabet-mobile::-webkit-scrollbar { display: none; }
.alphabet-mobile-list {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0 24px;
}
.alphabet-mobile-link {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}
.alphabet-mobile-link:hover {
  color: var(--accent);
  background: var(--accent-glow);
}

/* Brands Grid */
.brands-grid {
  column-count: 4;
  column-gap: 16px;
  padding-top: 80px;
}
/* Brand card drop shadow (light mode only) */
.brand-item {
  display: block;
  width: 100%;
  break-inside: avoid;
  margin-bottom: 16px;
  padding: 24px 16px;
  background: var(--bg-card);
  border: 1px solid #10B9816E;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
  box-shadow: var(--card-shadow), 0 8px 32px rgba(0,0,0,0.12);
  position: relative;
  overflow: hidden;
}

/* Brand card hover with lift effect (light mode only) */
.brand-item:hover {
  transform: translateY(-4px);
  border-color: #10B9816E;
  box-shadow: var(--card-shadow-hover), 0 12px 32px rgba(0,0,0,0.16);
}

/* Dark mode: revert brand card shadows to standard */
[data-theme="dark"] .brand-item {
  box-shadow: var(--card-shadow);
}

/* Dark mode: revert brand card border to standard */
[data-theme="dark"] .brand-item {
  border-color: var(--border);
}

[data-theme="dark"] .brand-item:hover {
  box-shadow: var(--card-shadow-hover);
}
.brand-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  opacity: 0;
  transition: opacity 0.2s;
}
.brand-item:hover::before { opacity: 1; }

.brand-logo {
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.brand-item:hover .brand-logo { opacity: 1; }
.brand-logo svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-name {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.brand-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 4px;
}
.brand-count,
.brand-deal-count {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}
@media (max-width: 768px) {
  .brand-stats {
    display: block;
    text-align: center;
  }
  .brand-count,
  .brand-deal-count {
    display: block;
  }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
}
.page-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: all var(--transition);
}
.page-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.page-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.page-btn.arrow {
  width: auto;
  padding: 0 16px;
  gap: 8px;
}

/* Footer */
.footer {
  padding: 60px 0 30px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  transition: background var(--transition);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}
.footer h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer ul {
  list-style: none;
}
.footer li {
  margin-bottom: 10px;
}
.footer a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.footer a:hover {
  color: var(--accent);
}
.newsletter {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.newsletter input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  transition: all var(--transition);
}
.newsletter input:focus {
  outline: none;
  border-color: var(--accent);
}
.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
  .page-header { padding: 100px 0 40px; }
  .brands-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .alphabet-sidebar { display: none; }
  .alphabet-mobile { display: block; }
  .brands-grid {
    column-count: 3;
    column-gap: 12px;
  }
  .brand-logo { width: 48px; height: 48px; }
  .brand-item {
    max-height: none;
  }
}

@media (max-width: 480px) {
  .brands-grid {
    column-count: 2;
    column-gap: 12px;
  }
}

/* Brand card sizing */
.brand-item {
  max-width: 200px;
  max-height: 160px;
}

/* Dark mode overrides for card borders */
[data-theme="dark"] .carousel-card,
[data-theme="dark"] .cat-card {
  border-color: var(--border);
}

/* Dark mode: revert brand detail coupon borders to standard */
[data-theme="dark"] .coupons-section .coupon-card {
  border-color: var(--border) !important;
}

/* Inline style extractions - utility classes */
.brand-detail-logo-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}
.fallback-brand-name {
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
}
.empty-state {
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
}
.empty-state-full-width {
  grid-column: 1 / -1;
}
.empty-state p:first-of-type {
  font-size: 18px;
  margin-bottom: 8px;
}
.empty-state p:last-of-type {
  font-size: 14px;
}
.brand-grid-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.footer-logo {
  margin-bottom: 16px;
}
.footer-logo svg {
  width: 20px;
  height: 20px;
  fill: var(--accent);
}
.footer-description {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}
.newsletter-text {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 8px;
}
.btn-footer {
  padding: 10px 16px;
}

/* Coupon card utilities */
.coupon-brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
}
.code-reveal {
  display: none;
}
