/* ================================================
   Great-Rate.net — Stylesheet
   Palette: Red (#D85A30), Orange (#E8590A), Amber (#BA7517)
   Font: Inter (Google Fonts)
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ------------------------------------------------
   CSS Variables
   ------------------------------------------------ */
:root {
  --red-dark:     #993C1D;
  --red-mid:      #D85A30;
  --red-light:    #F0997B;
  --red-pale:     #F5C4B3;
  --red-wash:     #FFF5F0;

  --orange-dark:  #993C1D;
  --orange-mid:   #E8590A;
  --orange-light: #F5924A;
  --orange-pale:  #FBCBA8;
  --orange-wash:  #FFF8F3;

  --amber-dark:   #633806;
  --amber-mid:    #BA7517;
  --amber-light:  #EF9F27;
  --amber-pale:   #FAC775;
  --amber-wash:   #FAEEDA;

  --gray-dark:    #2C2C2A;
  --gray-mid:     #5F5E5A;
  --gray-light:   #888780;
  --gray-pale:    #D3D1C7;
  --gray-wash:    #F1EFE8;

  --text-primary:   #1a1a18;
  --text-secondary: #4a4a48;
  --text-muted:     #888780;

  --bg-page:      #ffffff;
  --bg-surface:   #FAFAF8;
  --bg-card:      #ffffff;

  --border:       #E8E7E0;
  --border-light: #F0EFE8;

  --radius-sm:    4px;
  --radius-md:    8px;
  --radius-lg:    12px;
  --radius-xl:    20px;
  --radius-pill:  999px;

  --shadow-sm:    0 1px 4px rgba(216, 90, 48, 0.08);
  --shadow-md:    0 4px 16px rgba(216, 90, 48, 0.14);
  --shadow-lg:    0 8px 32px rgba(216, 90, 48, 0.18);

  --font: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

/* ------------------------------------------------
   Reset & Base
   ------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------
   Typography
   ------------------------------------------------ */
h1, h2, h3 {
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: 3rem;   }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.2rem; }
h5 { font-size: 1rem;   }
h6 { font-size: 0.9rem; }

h1 span, h2 span { color: var(--red-mid); }

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

a {
  color: var(--red-mid);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--red-dark);
  text-decoration: underline;
}

strong { font-weight: 700; }

small {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ------------------------------------------------
   Layout
   ------------------------------------------------ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow { max-width: 800px; }
.container--wide   { max-width: 1400px; }

.section    { padding: 64px 0; }
.section--lg { padding: 96px 0; }
.section--sm { padding: 40px 0; }

/* ------------------------------------------------
   Navigation
   ------------------------------------------------ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--bg-card);
  border-bottom: 2px solid var(--red-wash);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav__logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--red-mid);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.nav__logo span {
  color: var(--orange-mid);
}

.nav__logo em {
  font-style: normal;
  font-weight: 300;
  color: var(--gray-light);
}

.nav__links {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
}

.nav__links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
  text-decoration: none;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--red-mid);
  text-decoration: none;
}

.nav__search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-wash);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 7px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s;
  min-width: 200px;
}

.nav__search:focus-within {
  border-color: var(--red-mid);
  background: #fff;
}

/* ------------------------------------------------
   Buttons
   ------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn:hover  { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--red-mid);
  color: #ffffff;
  border-color: var(--red-mid);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: var(--orange-mid);
  color: #ffffff;
  border-color: var(--orange-mid);
}
.btn--secondary:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  color: #ffffff;
}

.btn--outline {
  background: transparent;
  color: var(--red-mid);
  border-color: var(--red-mid);
}
.btn--outline:hover {
  background: var(--red-wash);
  color: var(--red-dark);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn--ghost:hover {
  background: var(--gray-wash);
  color: var(--text-primary);
}

.btn--sm { padding: 6px 14px; font-size: 0.78rem; }
.btn--lg { padding: 14px 32px; font-size: 1rem;   }
.btn--pill { border-radius: var(--radius-pill); }

/* ------------------------------------------------
   Deal Badges / Pills
   ------------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge--hot    { background: var(--red-mid);    color: #ffffff; }
.badge--sale   { background: var(--orange-mid); color: #ffffff; }
.badge--free   { background: var(--amber-mid);  color: #ffffff; }
.badge--new    { background: var(--gray-dark);  color: #ffffff; }
.badge--pct    { background: var(--red-wash);   color: var(--red-dark); border: 1px solid var(--red-pale); }
.badge--saving { background: var(--amber-wash); color: var(--amber-dark); border: 1px solid var(--amber-pale); }

/* Expiry badge */
.badge--expires {
  background: var(--gray-wash);
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.72rem;
}

/* ------------------------------------------------
   Deal Cards
   ------------------------------------------------ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--red-pale);
}

/* Hot deal accent bar */
.card--hot::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red-mid), var(--orange-mid));
}

.card__badge-row {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.card__store {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.card__saving {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--red-mid);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.card__original {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-bottom: 14px;
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

/* Coupon code card */
.card--coupon {
  border: 2px dashed var(--red-pale);
  background: var(--red-wash);
}

.card--coupon:hover {
  border-color: var(--red-mid);
  background: #fff;
}

.coupon-code {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--red-mid);
  background: #fff;
  border: 1.5px dashed var(--red-mid);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  letter-spacing: 0.1em;
  display: inline-block;
  cursor: pointer;
  transition: background 0.2s;
}

.coupon-code:hover {
  background: var(--red-wash);
}

/* ------------------------------------------------
   Category Tags
   ------------------------------------------------ */
.category-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--gray-wash);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.category-tag:hover,
.category-tag.active {
  background: var(--red-wash);
  color: var(--red-mid);
  border-color: var(--red-pale);
  text-decoration: none;
}

/* ------------------------------------------------
   Savings Banner
   ------------------------------------------------ */
.savings-banner {
  background: linear-gradient(135deg, var(--red-mid) 0%, var(--orange-mid) 100%);
  color: #ffffff;
  padding: 12px 24px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.savings-banner a {
  color: #ffffff;
  text-decoration: underline;
}

/* ------------------------------------------------
   Hero
   ------------------------------------------------ */
.hero {
  background: var(--red-wash);
  padding: 72px 24px;
  text-align: center;
  border-bottom: 1px solid var(--red-pale);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(216,90,48,0.08) 0%, transparent 65%);
  pointer-events: none;
}

.hero h1 {
  font-size: 3.5rem;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.hero h1 span { color: var(--red-mid); }

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--red-pale);
}

.hero__stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--red-mid);
  letter-spacing: -0.03em;
  display: block;
}

.hero__stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ------------------------------------------------
   Search Bar
   ------------------------------------------------ */
.search-bar {
  display: flex;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border: 2px solid var(--red-mid);
  border-radius: var(--radius-pill);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.search-bar input {
  flex: 1;
  padding: 14px 20px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text-primary);
  border: none;
  outline: none;
  background: transparent;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-bar button {
  padding: 12px 24px;
  background: var(--red-mid);
  color: #fff;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
}

.search-bar button:hover {
  background: var(--red-dark);
}

/* ------------------------------------------------
   Deal Grid
   ------------------------------------------------ */
.deal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ------------------------------------------------
   Countdown Timer
   ------------------------------------------------ */
.countdown {
  display: flex;
  gap: 8px;
  align-items: center;
}

.countdown__block {
  text-align: center;
  background: var(--red-mid);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  min-width: 36px;
}

.countdown__num {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.countdown__label {
  display: block;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

.countdown__sep {
  font-weight: 800;
  color: var(--red-mid);
  font-size: 1.1rem;
}

/* ------------------------------------------------
   Progress / Savings Bar
   ------------------------------------------------ */
.savings-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.savings-bar__label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  min-width: 100px;
}

.savings-bar__track {
  flex: 1;
  height: 6px;
  background: var(--gray-pale);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.savings-bar__fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--red-mid), var(--orange-mid));
  transition: width 0.6s ease;
}

.savings-bar__value {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--red-mid);
  min-width: 40px;
  text-align: right;
}

/* ------------------------------------------------
   Table
   ------------------------------------------------ */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead {
  background: var(--red-wash);
}

thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--red-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--red-pale);
}

tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}

tbody tr:hover { background: var(--red-wash); }

tbody td {
  padding: 12px 16px;
  color: var(--text-secondary);
}

tbody td:first-child {
  color: var(--text-primary);
  font-weight: 600;
}

td.saving { color: var(--red-mid); font-weight: 700; }

/* ------------------------------------------------
   Forms
   ------------------------------------------------ */
.form-group { margin-bottom: 18px; }

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--red-mid);
  box-shadow: 0 0 0 3px rgba(216, 90, 48, 0.12);
}

/* ------------------------------------------------
   Footer
   ------------------------------------------------ */
.footer {
  background: var(--gray-dark);
  color: var(--gray-pale);
  padding: 52px 24px 24px;
  margin-top: 80px;
}

.footer__logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--red-light);
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 8px;
}

.footer__logo span { color: var(--orange-light); }

.footer a {
  color: var(--gray-light);
  font-size: 0.88rem;
  transition: color 0.2s;
}

.footer a:hover { color: var(--red-light); text-decoration: none; }

.footer__bottom {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.75rem;
  color: var(--gray-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ------------------------------------------------
   Utilities
   ------------------------------------------------ */
.text-red    { color: var(--red-mid);    }
.text-orange { color: var(--orange-mid); }
.text-amber  { color: var(--amber-mid);  }
.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right  { text-align: right;  }
.strike      { text-decoration: line-through; color: var(--text-muted); }

.bg-red-wash    { background: var(--red-wash);    }
.bg-orange-wash { background: var(--orange-wash); }
.bg-amber-wash  { background: var(--amber-wash);  }
.bg-surface     { background: var(--bg-surface);  }

.mt-1 { margin-top: 8px;  } .mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mt-6 { margin-top: 48px; }
.mb-1 { margin-bottom: 8px;  } .mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }

.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.2rem; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .nav__links { display: none; }
  .hero__stats { gap: 24px; flex-wrap: wrap; }
}
