:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #0f9b57;
  --primary-dark: #0c7a45;
  --border: #dbe4ee;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.top-banner {
  background: #ecfdf5;
  color: #166534;
  padding: 11px 16px;
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
  border-bottom: 1px solid #d1fae5;
}

.top-banner a {
  font-weight: 700;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0 12px;
}

.brand {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.search-wrap {
  flex: 1;
  display: flex;
  gap: 8px;
}

.search-wrap input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  background: #f8fafc;
}

.search-wrap button,
.cta-btn,
.newsletter-form button {
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  padding: 11px 18px;
  cursor: pointer;
}

.search-wrap button:hover,
.cta-btn:hover,
.newsletter-form button:hover {
  background: var(--primary-dark);
}

.nav-actions {
  display: flex;
  gap: 14px;
  font-size: 14px;
  font-weight: 500;
}

.categories {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 0 0 14px;
}

.categories a {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.categories a.active {
  color: var(--text);
  font-weight: 700;
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
  margin-top: 24px;
  margin-bottom: 22px;
}

.hero-text {
  background: linear-gradient(135deg, #ebf9f0, #f8fffb);
  border: 1px solid #cdeeda;
  border-radius: 20px;
  padding: 32px;
}

.pill {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
}

.hero-text h1 {
  margin: 12px 0 10px;
  font-size: clamp(31px, 4.5vw, 50px);
  letter-spacing: -1.2px;
}

.hero-text p {
  margin: 0 0 16px;
  color: #374151;
  max-width: 58ch;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.secondary-link {
  color: #0b5d36;
  font-weight: 600;
}

.trust-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trust-inline span {
  border: 1px solid #d1eadd;
  border-radius: 999px;
  padding: 5px 10px;
  background: #f7fffa;
  font-size: 12px;
  color: #14532d;
  font-weight: 500;
}

.hero-card {
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 24px;
  align-self: stretch;
}

.hero-label {
  font-size: 12px;
  color: #92400e;
  background: #ffedd5;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
}

.merchant {
  color: var(--muted);
  margin-top: 6px;
}

.price-row {
  margin: 16px 0 8px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.old-price {
  color: #9ca3af;
  text-decoration: line-through;
}

.new-price {
  font-size: 30px;
  font-weight: 800;
  color: var(--primary-dark);
}

.discount {
  font-weight: 700;
  color: #b91c1c;
}

.rating {
  margin: 0;
  font-size: 14px;
  color: #4b5563;
}

.featured-points {
  margin: 12px 0 0;
  padding-left: 18px;
  color: #334155;
  font-size: 13px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 30px;
}

.stats article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.stats h3 {
  margin: 0;
  font-size: 24px;
  color: #0f9b57;
}

.stats p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

#how-it-works {
  scroll-margin-top: 88px;
}

.section {
  margin-bottom: 38px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0 0 4px;
}

.data-status {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.section-head a {
  color: var(--primary-dark);
  font-weight: 600;
}

.deal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.deal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.deal-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.thumb {
  height: 135px;
  background: linear-gradient(45deg, #d7f8e5, #c7e3ff);
}

.deal-content {
  padding: 13px;
}

.deal-tag {
  font-size: 11px;
  font-weight: 700;
  color: #7c2d12;
  background: #ffedd5;
  border-radius: 999px;
  padding: 4px 8px;
  display: inline-block;
}

.deal-title {
  margin: 10px 0 6px;
  font-size: 15px;
  min-height: 42px;
  line-height: 1.35;
}

.deal-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.deal-price {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.deal-price .final {
  font-size: 21px;
  font-weight: 800;
  color: var(--primary-dark);
}

.deal-price .was {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 13px;
}

.deal-price .off {
  color: #b91c1c;
  font-weight: 700;
  font-size: 13px;
}

.how-it-works {
  margin-bottom: 34px;
}

.how-it-works h2 {
  margin-bottom: 14px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.steps article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.steps h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.newsletter {
  background: #0f172a;
  color: #fff;
  padding: 32px 0;
  margin-top: 30px;
}

.newsletter-wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.newsletter-wrap h3 {
  margin: 0 0 6px;
}

.newsletter-wrap p {
  margin: 0;
  color: #d1d5db;
}

.newsletter-form {
  display: flex;
  gap: 8px;
}

.newsletter-form input {
  min-width: 260px;
  border: 1px solid #374151;
  background: #1f2937;
  border-radius: 10px;
  color: #fff;
  padding: 11px 12px;
}

.newsletter-msg {
  margin: 12px auto 0;
  font-size: 13px;
  color: #a7f3d0;
}

.site-footer {
  background: #fff;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 22px;
  padding-bottom: 18px;
}

.footer-grid h4,
.footer-grid h5 {
  margin-top: 0;
}

.footer-grid p {
  color: var(--muted);
}

.footer-grid a {
  display: block;
  color: #334155;
  font-size: 14px;
  margin-bottom: 8px;
}

.copyright {
  border-top: 1px solid var(--border);
  margin: 0;
  padding: 14px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.site-build {
  margin: 0;
  padding: 0 16px 20px;
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: -0.02em;
}

.hidden {
  display: none !important;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
}

.auth-panel {
  position: relative;
  background: #fff;
  width: min(460px, 92vw);
  margin: 8vh auto 0;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 20px;
}

.auth-close {
  position: absolute;
  right: 12px;
  top: 10px;
  border: 0;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  color: #64748b;
}

.auth-sub {
  margin-top: 0;
  color: var(--muted);
  font-size: 14px;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin: 14px 0;
}

.tab-btn {
  border: 1px solid var(--border);
  background: #f8fafc;
  color: #334155;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
}

.tab-btn.active {
  background: #e8fff2;
  border-color: #b7f2cf;
  color: #166534;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form input {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

.auth-form button,
.google-btn {
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  padding: 11px 14px;
  cursor: pointer;
}

.google-btn {
  margin-top: 12px;
  width: 100%;
  background: #334155;
}

.google-signin-render {
  margin-top: 12px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.google-signin-render > div {
  width: 100% !important;
  display: flex;
  justify-content: center !important;
}

.google-signin-render iframe {
  margin: 0 auto;
  max-width: 100%;
}

.auth-msg {
  margin: 10px 0 0;
  font-size: 13px;
  color: #0f766e;
  min-height: 20px;
}

.text-btn {
  border: 0;
  background: transparent;
  color: #0f766e;
  text-align: left;
  padding: 2px 0 0;
  cursor: pointer;
  font-size: 13px;
}

@media (max-width: 1080px) {
  .deal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 960px) {
  .main-nav {
    flex-wrap: wrap;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .deal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .newsletter-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .deal-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    width: 100%;
    flex-direction: column;
  }

  .newsletter-form input {
    min-width: 0;
  }

  .hero-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
