:root {
  --court-green: #064e3b;
  --deal-orange: #f97316;
  --deal-orange-dark: #ea580c;
  --tennis-lime: #d7f64a;
  --baseline-navy: #0f172a;
  --clean-white: #ffffff;
  --rally-gray: #f8fafc;
  --net-gray: #e5e7eb;
  --clay-tint: #fff3e8;
  --muted: #64748b;
  --shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--rally-gray);
  color: var(--baseline-navy);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  background: var(--court-green);
  color: var(--clean-white);
  box-shadow: 0 8px 20px rgba(6, 78, 59, 0.22);
}

.brand,
.site-nav,
.site-footer nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.65rem;
  width: min(310px, 54vw);
  min-height: 3.25rem;
  border-radius: 8px;
  background: var(--clean-white);
  padding: 0.35rem 0.55rem;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 2.65rem;
  object-fit: contain;
}

.site-nav {
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 1.75rem);
}

.site-nav a,
.site-footer a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-footer a:hover {
  color: var(--clean-white);
}

.header-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.68rem 0.95rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.header-cta,
.button-primary {
  background: var(--deal-orange);
  color: var(--clean-white);
}

.header-cta:hover,
.button-primary:hover {
  background: var(--deal-orange-dark);
}

.button-secondary {
  background: var(--court-green);
  color: var(--clean-white);
}

main {
  overflow: hidden;
}

.hero {
  min-height: min(560px, calc(100vh - 74px));
  display: flex;
  align-items: center;
  padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 4vw, 3rem);
  background:
    linear-gradient(90deg, rgba(248, 250, 252, 0.98) 0%, rgba(248, 250, 252, 0.92) 44%, rgba(248, 250, 252, 0.38) 100%),
    url("https://images.unsplash.com/photo-1736178476845-7996039f0850?auto=format&fit=crop&fm=jpg&q=70&w=1800") center right / cover;
}

.hero-copy {
  width: min(650px, 100%);
}

.eyebrow,
.kicker {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: var(--tennis-lime);
  color: var(--court-green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 0.38rem 0.65rem;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.alerts-section h2 {
  margin: 0;
  color: var(--baseline-navy);
  letter-spacing: 0;
}

.hero h1 {
  max-width: 12ch;
  margin-top: 1rem;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.95;
}

.hero p {
  max-width: 42rem;
  margin: 1.2rem 0 0;
  color: #334155;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.toolbar-section,
.deals-section,
.category-section,
.guides-section,
.alerts-section {
  padding: clamp(2.25rem, 5vw, 4.5rem) clamp(1rem, 4vw, 3rem);
}

.toolbar-section {
  background: var(--clean-white);
}

.section-heading {
  display: grid;
  gap: 0.65rem;
  max-width: 62rem;
  margin: 0 auto 1.5rem;
}

.section-heading h2,
.alerts-section h2 {
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1.05;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 220px) minmax(180px, 220px);
  gap: 1rem;
  max-width: 1180px;
  margin: 0 auto;
  align-items: end;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tab,
.toolbar select,
.category-card {
  border: 1px solid var(--net-gray);
  background: var(--clean-white);
  color: var(--baseline-navy);
}

.tab {
  min-height: 2.4rem;
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  font-weight: 800;
  cursor: pointer;
}

.tab.is-active {
  border-color: var(--court-green);
  background: var(--court-green);
  color: var(--clean-white);
}

.toolbar label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.toolbar select,
.alert-form input {
  width: 100%;
  min-height: 2.7rem;
  border-radius: 8px;
  padding: 0 0.75rem;
}

.deals-section {
  background: var(--rally-gray);
}

.deals-meta,
.deals-grid {
  max-width: 1180px;
  margin: 0 auto;
}

.deals-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

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

.deal-card,
.guide-list article {
  border: 1px solid var(--net-gray);
  border-radius: 8px;
  background: var(--clean-white);
  box-shadow: var(--shadow);
}

.deal-card {
  overflow: hidden;
}

.deal-media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 180px;
  overflow: hidden;
  background: var(--court-green);
  color: var(--clean-white);
  isolation: isolate;
}

.deal-media::before,
.deal-media::after {
  content: "";
  position: absolute;
  inset: 16%;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  transform: rotate(-20deg);
  z-index: -1;
}

.deal-media::after {
  inset: 33%;
  border-color: rgba(215, 246, 74, 0.55);
  transform: rotate(28deg);
}

.deal-media img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
}

.deal-media span:not(.badge) {
  font-size: 1.25rem;
  font-weight: 900;
}

.category-racquets { background: #064e3b; }
.category-shoes { background: #1f3a5f; }
.category-apparel { background: #7c2d12; }
.category-bags { background: #334155; }
.category-balls { background: #365314; }
.category-strings { background: #0f766e; }
.category-accessories { background: #713f12; }

.badge {
  position: absolute;
  left: 0.8rem;
  top: 0.8rem;
  border-radius: 999px;
  background: var(--tennis-lime);
  color: var(--court-green);
  padding: 0.35rem 0.58rem;
  font-size: 0.76rem;
  font-weight: 900;
}

.deal-body {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
}

.merchant-row,
.price-row,
.card-footer,
.site-footer {
  display: flex;
  align-items: center;
}

.merchant-row,
.checked {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.merchant-row {
  justify-content: space-between;
  gap: 1rem;
}

.merchant-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deal-card h3 {
  min-height: 3.15rem;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.price-row {
  gap: 0.65rem;
}

.price-row strong {
  color: var(--baseline-navy);
  font-size: 1.55rem;
}

.old-price {
  color: var(--muted);
  font-weight: 700;
  text-decoration: line-through;
}

.card-footer {
  justify-content: space-between;
  gap: 0.8rem;
}

.savings {
  color: var(--court-green);
  font-weight: 900;
}

.savings.muted {
  color: var(--muted);
}

.checked {
  margin: 0;
  text-transform: none;
}

.disclosure {
  max-width: 1180px;
  margin: 1.25rem auto 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.category-section,
.alerts-section {
  background: var(--clean-white);
}

.category-grid,
.guide-list {
  display: grid;
  max-width: 1180px;
  margin: 0 auto;
  gap: 1rem;
}

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

.category-card {
  display: grid;
  gap: 0.5rem;
  min-height: 7.5rem;
  border-radius: 8px;
  padding: 1rem;
  text-align: left;
  font-weight: 900;
  cursor: pointer;
}

.category-card:hover {
  border-color: var(--deal-orange);
  box-shadow: var(--shadow);
}

.category-card span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
}

.guides-section {
  background: var(--rally-gray);
}

.guide-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-list article {
  padding: 1rem;
}

.guide-list span {
  color: var(--deal-orange);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-list h3 {
  margin: 0.45rem 0;
  font-size: 1.08rem;
}

.guide-list p,
.alerts-section p {
  color: var(--muted);
  line-height: 1.55;
}

.alerts-section {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 1.25rem;
  align-items: center;
  background: var(--clay-tint);
}

.alert-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
}

.alert-form input {
  border: 1px solid var(--net-gray);
  background: rgba(255, 255, 255, 0.75);
  color: var(--muted);
}

.button:disabled,
.alert-form input:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.site-footer {
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem clamp(1rem, 4vw, 3rem);
  background: var(--court-green);
  color: rgba(255, 255, 255, 0.82);
}

.site-footer p {
  max-width: 46rem;
  margin: 0;
  font-size: 0.9rem;
}

.site-footer nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1rem;
}

.loading-state,
.empty-state {
  max-width: 1180px;
  margin: 0 auto;
  border: 1px solid var(--net-gray);
  border-radius: 8px;
  background: var(--clean-white);
  padding: 2rem;
  color: var(--muted);
  box-shadow: var(--shadow);
}

.empty-state h2 {
  margin: 0 0 0.5rem;
  color: var(--baseline-navy);
}

@media (max-width: 920px) {
  .site-header,
  .toolbar,
  .alerts-section {
    grid-template-columns: 1fr;
  }

  .site-nav {
    justify-content: start;
    order: 3;
  }

  .header-cta {
    justify-self: start;
  }

  .hero {
    min-height: auto;
    background:
      linear-gradient(90deg, rgba(248, 250, 252, 0.98) 0%, rgba(248, 250, 252, 0.78) 100%),
      url("https://images.unsplash.com/photo-1736178476845-7996039f0850?auto=format&fit=crop&fm=jpg&q=70&w=1200") center / cover;
  }

  .deals-grid,
  .category-grid,
  .guide-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    position: static;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .hero h1 {
    max-width: 10ch;
  }

  .brand {
    width: min(275px, 100%);
  }

  .deals-meta,
  .card-footer,
  .site-footer,
  .alert-form {
    align-items: stretch;
    flex-direction: column;
  }

  .deals-grid,
  .category-grid,
  .guide-list {
    grid-template-columns: 1fr;
  }

  .alert-form {
    grid-template-columns: 1fr;
  }

  .deal-card h3 {
    min-height: auto;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}
