:root {
  --bg: #fffaf3;
  --panel: #ffffff;
  --panel-soft: #fff3df;
  --ink: #1f2933;
  --muted: #64748b;
  --brand: #f97316;
  --brand-dark: #c2410c;
  --green: #15803d;
  --blue: #0f766e;
  --border: #f0dfc8;
  --shadow: 0 18px 45px rgba(91, 52, 20, 0.13);
  --radius: 24px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(249,115,22,.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(15,118,110,.10), transparent 28rem),
    var(--bg);
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.container {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  top: -50px;
  left: 16px;
  background: var(--ink);
  color: white;
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 100;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(255, 250, 243, .86);
  border-bottom: 1px solid rgba(240, 223, 200, .75);
}

.navbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: -.03em;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 12px 28px rgba(249, 115, 22, .28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 750;
  padding: 10px 12px;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand-dark);
  background: #fff1df;
}

.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 850;
  border: 0;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 14px 32px rgba(249, 115, 22, .25);
}

.btn-secondary {
  background: white;
  border: 1px solid var(--border);
  color: var(--ink);
}

.mobile-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 14px;
  font-size: 24px;
}

.hero {
  padding: 72px 0 42px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 36px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-dark);
  background: #fff1df;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 850;
  font-size: .92rem;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: .95;
  letter-spacing: -.075em;
}

.hero p {
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.65;
  max-width: 640px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.search-card {
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.78);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.search-card h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.search-box {
  display: flex;
  gap: 10px;
  background: white;
  border: 1px solid var(--border);
  padding: 8px;
  border-radius: 18px;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  font-size: 1rem;
  padding: 10px;
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  display: inline-flex;
  text-decoration: none;
  border: 1px solid var(--border);
  background: white;
  color: var(--muted);
  padding: 8px 11px;
  border-radius: 999px;
  font-weight: 750;
  font-size: .92rem;
}

.hero-deal {
  position: relative;
  padding: 22px;
  border-radius: 32px;
  background: linear-gradient(145deg, #ffffff, #fff0d9);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-deal:before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -80px;
  top: -80px;
  background: rgba(249, 115, 22, .15);
  border-radius: 999px;
}

.deal-image {
  position: relative;
  min-height: 260px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(15,118,110,.78), rgba(249,115,22,.82)),
    url("../images/deal-placeholder.svg") center/cover;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  color: white;
  overflow: hidden;
}

.discount-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: white;
  color: var(--brand-dark);
  padding: 10px 13px;
  border-radius: 16px;
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(0,0,0,.14);
}

.deal-image h2 {
  position: relative;
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -.06em;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.stat {
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
}

.stat strong {
  display: block;
  font-size: 1.45rem;
}

.stat span {
  color: var(--muted);
  font-size: .9rem;
}

.section {
  padding: 54px 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -.055em;
}

.section-head p {
  color: var(--muted);
  max-width: 560px;
  line-height: 1.6;
}

.grid {
  display: grid;
  gap: 18px;
}

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

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: rgba(255,255,255,.82);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(91, 52, 20, .06);
  border-radius: var(--radius);
  padding: 20px;
}

.category-card {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
}

.category-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--panel-soft);
  color: var(--brand-dark);
  font-size: 1.4rem;
}

.category-card h3,
.deal-card h3 {
  margin: 18px 0 8px;
  letter-spacing: -.035em;
}

.category-card p,
.deal-card p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.deal-card {
  overflow: hidden;
  padding: 0;
}

.deal-thumb {
  height: 170px;
  background: linear-gradient(135deg, rgba(249,115,22,.7), rgba(15,118,110,.75)), url("../images/deal-placeholder.svg") center/cover;
}

.deal-body {
  padding: 18px;
}

.meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 750;
}

.price {
  color: var(--green);
  font-weight: 950;
}

.cta-band {
  background: linear-gradient(135deg, #1f2933, #0f766e);
  color: white;
  border-radius: 34px;
  padding: clamp(26px, 5vw, 52px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.cta-band h2 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  letter-spacing: -.06em;
}

.cta-band p {
  margin: 0;
  color: rgba(255,255,255,.82);
  line-height: 1.6;
}

.site-footer {
  margin-top: 54px;
  padding: 38px 0;
  background: #1f2933;
  color: white;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: rgba(255,255,255,.76);
  text-decoration: none;
}

.pwa-shell {
  min-height: 100vh;
  background: #f8fafc;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(248,250,252,.88);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid #e2e8f0;
}

.app-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 0;
}

.app-tabs button {
  border: 1px solid #e2e8f0;
  background: white;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 850;
  cursor: pointer;
}

.app-tabs button.active {
  color: white;
  background: var(--brand);
  border-color: var(--brand);
}

.app-hero {
  padding: 28px 0 18px;
}

.app-search-panel {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 26px;
  box-shadow: 0 12px 35px rgba(15,23,42,.08);
  padding: 16px;
}

.app-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.filter-panel {
  position: sticky;
  top: 94px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 18px;
}

.filter-panel label {
  display: block;
  font-weight: 850;
  margin: 14px 0 8px;
}

.filter-panel select,
.filter-panel input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px;
}

.app-deals {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.install-banner {
  display: none;
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  background: #1f2933;
  color: white;
  padding: 16px;
  border-radius: 22px;
  box-shadow: 0 14px 38px rgba(0,0,0,.28);
}

.install-banner.show {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

#search-results {
  margin-top: 16px;
}

.pagefind-ui__form {
  position: relative;
}

.pagefind-ui__search-input {
  width: 100%;
  min-height: 52px;
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 0 16px;
  font-size: 1rem;
}

.pagefind-ui__result {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.pagefind-ui__result-link {
  font-weight: 850;
  color: var(--brand-dark);
  text-decoration: none;
}

@media (max-width: 900px) {
  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-links {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 84px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-actions .btn-secondary {
    display: none;
  }

  .hero-grid,
  .app-grid,
  .cta-band,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .grid-3,
  .grid-4,
  .app-deals {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
  }

  .section-head {
    display: block;
  }

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

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, var(--max));
  }

  .navbar {
    height: 68px;
  }

  .hero {
    padding-top: 42px;
  }

  .search-box {
    display: block;
  }

  .search-box .btn {
    width: 100%;
    margin-top: 8px;
  }
}
