/* ============================================
   SaveMore Deals - Main Stylesheet
   Modern coupon website with dark/light theme
   ============================================ */

/* --- CSS Custom Properties (Theme Variables) --- */
:root {
  /* Light theme colors */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-hero: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: #eef2ff;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
  --nav-height: 72px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark theme overrides */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-hero: linear-gradient(135deg, #4338ca 0%, #6d28d9 50%, #7c3aed 100%);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: #334155;
  --accent-light: #312e81;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* --- Reset & Base Styles --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition), color var(--transition);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-size: inherit;
}

input,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* --- Utility Classes --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.25);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

/* Fade-in animation on scroll */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   NAVIGATION BAR (Sticky)
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--bg-hero);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
}

/* Desktop Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: var(--accent-light);
}

/* Nav Actions (theme toggle, auth buttons) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition);
}

.theme-toggle:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

/* Hamburger Menu Button (Mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.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 Navigation Overlay */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-secondary);
  padding: 1.5rem;
  z-index: 999;
  transform: translateX(100%);
  transition: transform var(--transition);
  overflow-y: auto;
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu a {
  display: block;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--accent);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  margin-top: var(--nav-height);
  background: var(--bg-hero);
  padding: 4rem 0 5rem;
  position: relative;
  overflow: hidden;
}

/* Decorative background shapes */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.hero::before {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
}

.hero::after {
  width: 300px;
  height: 300px;
  bottom: -80px;
  left: -80px;
}

.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(8px);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero p {
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* Search Bar in Hero */
.search-bar {
  display: flex;
  max-width: 560px;
  margin: 0 auto 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 0.35rem;
  box-shadow: var(--shadow-lg);
}

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.85rem 1.25rem;
  color: var(--text-primary);
  outline: none;
  font-size: 1rem;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-bar button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: background var(--transition);
}

.search-bar button:hover {
  background: var(--accent-hover);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-stat {
  text-align: center;
  color: #fff;
}

.hero-stat strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
}

.hero-stat span {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* ============================================
   CATEGORY FILTER SECTION
   ============================================ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.category-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.category-card:hover,
.category-card.active {
  border-color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.category-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}

.category-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.category-card .count {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ============================================
   COUPON CARDS
   ============================================ */
.coupons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.coupon-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.coupon-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.coupon-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px dashed var(--border-color);
}

.store-logo {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
}

.store-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.store-info .category-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.coupon-card-body {
  padding: 1.25rem;
  flex: 1;
}

.discount-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.coupon-code-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-primary);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  margin-bottom: 0.75rem;
}

.coupon-code-box code {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
}

.copy-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}

.copy-btn:hover {
  background: var(--accent-hover);
}

.copy-btn.copied {
  background: var(--success);
}

.coupon-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.expiry-date {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Countdown Timer */
.countdown {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.countdown-item {
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  text-align: center;
  min-width: 48px;
}

.countdown-item strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.countdown-item span {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.coupon-card-footer {
  padding: 0 1.25rem 1.25rem;
}

.get-deal-btn {
  width: 100%;
  padding: 0.85rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.get-deal-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.02);
}

/* Featured badge on coupon cards */
.featured-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--warning);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  text-transform: uppercase;
}

.coupon-card {
  position: relative;
}

/* ============================================
   POPULAR STORES SECTION
   ============================================ */
.stores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.store-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
}

.store-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.store-card .store-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.75rem;
  font-size: 1.25rem;
}

.store-card h4 {
  font-size: 0.9rem;
  font-weight: 600;
}

.store-card .deal-count {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.25rem;
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */
.newsletter {
  background: var(--bg-hero);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
  color: #fff;
}

.newsletter h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
}

.newsletter p {
  opacity: 0.85;
  margin-bottom: 1.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: 0.5rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  outline: none;
  font-size: 1rem;
}

.newsletter-form button {
  padding: 0.85rem 1.5rem;
  background: #fff;
  color: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: all var(--transition);
  white-space: nowrap;
}

.newsletter-form button:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand p {
  color: var(--text-secondary);
  margin-top: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-links a {
  display: block;
  color: var(--text-secondary);
  padding: 0.35rem 0;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition);
}

.social-links a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition);
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent-hover);
  transform: translateY(-4px);
}

/* ============================================
   LOGIN / SIGNUP MODAL (UI Only)
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  transform: scale(0.9);
  transition: transform var(--transition);
  position: relative;
}

.modal-overlay.open .modal {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: none;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.modal-close:hover {
  background: var(--accent-light);
}

.modal h2 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.modal p.subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition);
}

.form-group input:focus {
  border-color: var(--accent);
}

.form-footer {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-footer a {
  color: var(--accent);
  font-weight: 600;
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.social-login {
  display: flex;
  gap: 0.75rem;
}

.social-login button {
  flex: 1;
  padding: 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition);
}

.social-login button:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

/* ============================================
   PAGE-SPECIFIC: Categories Page
   ============================================ */
.page-hero {
  margin-top: var(--nav-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 3rem 0;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  align-items: center;
}

.filter-bar .search-bar {
  flex: 1;
  min-width: 240px;
  margin: 0;
  box-shadow: var(--shadow-sm);
}

.filter-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 2px solid var(--border-color);
  background: var(--bg-card);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition);
  cursor: pointer;
}

.filter-pill:hover,
.filter-pill.active {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

.no-results {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.no-results .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* ============================================
   PAGE-SPECIFIC: Coupon Details
   ============================================ */
.coupon-detail {
  margin-top: var(--nav-height);
  padding: 3rem 0;
}

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

.detail-header {
  background: var(--bg-hero);
  padding: 2.5rem 2rem;
  text-align: center;
  color: #fff;
}

.detail-header .store-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  font-size: 1.75rem;
  border-radius: var(--radius-md);
}

.detail-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.detail-header .discount-badge {
  font-size: 1.1rem;
  margin-bottom: 0;
}

.detail-body {
  padding: 2rem;
}

.detail-body h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.detail-code-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-primary);
  border: 2px dashed var(--accent);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.detail-code-box code {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 2px;
}

.detail-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.info-item {
  background: var(--bg-primary);
  padding: 1rem;
  border-radius: var(--radius-sm);
}

.info-item label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-item p {
  font-weight: 600;
  margin-top: 0.25rem;
}

.detail-countdown {
  margin-bottom: 1.5rem;
}

.detail-countdown h4 {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.detail-countdown .countdown-item {
  min-width: 64px;
  padding: 0.75rem;
}

.detail-countdown .countdown-item strong {
  font-size: 1.5rem;
}

.how-to-use {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.how-to-use h3 {
  margin-bottom: 1rem;
}

.how-to-use ol {
  list-style: decimal;
  padding-left: 1.25rem;
  color: var(--text-secondary);
}

.how-to-use li {
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

/* ============================================
   PAGE-SPECIFIC: About & Contact
   ============================================ */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.feature-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all var(--transition);
}

.feature-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.feature-item .icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.feature-item h4 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.feature-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.about-image {
  background: var(--bg-hero);
  border-radius: var(--radius-xl);
  padding: 3rem;
  text-align: center;
  color: #fff;
}

.about-image .big-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
}

.stat-box strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-box span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Contact Page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
}

.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.contact-info-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.contact-item .icon {
  width: 44px;
  height: 44px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-item h4 {
  font-size: 0.9rem;
  font-weight: 600;
}

.contact-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.contact-form-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.contact-form-card textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
  resize: vertical;
  min-height: 120px;
  transition: border-color var(--transition);
}

.contact-form-card textarea:focus {
  border-color: var(--accent);
}

/* Toast notification for copy */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 3000;
  opacity: 0;
  transition: all var(--transition);
  box-shadow: var(--shadow-lg);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links,
  .nav-actions .btn-outline,
  .nav-actions .btn-primary {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-menu {
    display: block;
  }

  .hero {
    padding: 3rem 0 4rem;
  }

  .search-bar {
    flex-direction: column;
    border-radius: var(--radius-md);
  }

  .search-bar button {
    border-radius: var(--radius-sm);
  }

  .newsletter-form {
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .detail-info {
    grid-template-columns: 1fr;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 2.5rem 0;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .coupons-grid {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .countdown {
    flex-wrap: wrap;
  }
}
