/* ===========================================================
   PopCombo Prototype — Shared Design System
   Palette derived from logo: warm orange + sky blue + navy
   =========================================================== */

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

:root {
  color-scheme: light;
  --orange: #F5811E;
  --orange-light: #FFB366;
  --orange-dark: #D9660A;
  --blue: #3AB6E8;
  --blue-light: #8FE0FF;
  --blue-dark: #1C86B0;
  --navy: #182A45;
  --navy-soft: #45536B;
  --bg: #FFFFFF;
  --bg-soft: #F7F9FC;
  --bg-warm: #FFF6EC;
  --border: #E7ECF2;
  --success: #2FAE66;
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 8px 24px rgba(24, 42, 69, 0.08);
  --shadow-hover: 0 14px 32px rgba(24, 42, 69, 0.14);
  --star-gold: #FFB400;
}

/* Rating star -- deliberately a plain text glyph (not an emoji) colored via
   CSS. The previous "⭐" color emoji depends on the device having a decent
   emoji font; several Android phones/skins render it blank or invisible,
   which reads as "the rating is just a number, no star". A plain ★
   character comes from the regular text font already loaded on the page,
   so it renders identically everywhere. */
.star-icon { color: var(--star-gold); }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Nunito', sans-serif;
  color: var(--navy);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-font {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; }
ul { list-style: none; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--orange-light), var(--orange));
  color: #fff;
  box-shadow: 0 6px 16px rgba(245, 129, 30, 0.35);
}
.btn-primary:hover { box-shadow: 0 10px 22px rgba(245, 129, 30, 0.45); transform: translateY(-1px); }

.btn-blue {
  background: linear-gradient(135deg, var(--blue-light), var(--blue));
  color: #fff;
  box-shadow: 0 6px 16px rgba(58, 182, 232, 0.35);
}
.btn-blue:hover { box-shadow: 0 10px 22px rgba(58, 182, 232, 0.45); transform: translateY(-1px); }

.btn-outline {
  background: #fff;
  color: var(--navy);
  border: 2px solid var(--border);
}
.btn-outline:hover { border-color: var(--orange); color: var(--orange-dark); }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  padding: 10px 16px;
}
.btn-ghost:hover { color: var(--orange-dark); }

.btn-sm { padding: 9px 18px; font-size: 13.5px; }
.btn-block { width: 100%; }

/* ---------- Top Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  max-width: 1180px;
  margin: 0 auto;
}
.nav-logo { flex-shrink: 0; }
.nav-logo img { height: 46px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--navy-soft);
}
.nav-links a:hover, .nav-links a.active { background: var(--bg-warm); color: var(--orange-dark); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-find-deal { display: none; }
.nav-favorites-mobile { display: inline-flex; align-items: center; }
.nav-fav-badge {
  display: none;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 999px;
  background: #e5484d;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
  vertical-align: 2px;
}
.nav-fav-badge.show { display: inline-block; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #C7D0DE;
  padding: 56px 0 28px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-grid h4 {
  color: #fff;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
}
.footer-grid ul li { margin-bottom: 9px; }
.footer-grid a { color: #AEB9CC; font-size: 14.5px; }
.footer-grid a:hover { color: var(--orange-light); }
.footer-logo img { height: 38px; margin-bottom: 12px; }
.footer-tagline { font-size: 14px; color: #9AA6BA; max-width: 260px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 22px;
  font-size: 13px;
  color: #7E8AA0;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-restaurant-cta {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.footer-restaurant-cta p { color: #fff; font-family: 'Fredoka', sans-serif; font-size: 17px; }
.footer-restaurant-cta span { color: #9AA6BA; font-size: 13.5px; display: block; margin-top: 4px; font-family: 'Nunito', sans-serif; }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease;
}

#back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(24, 42, 69, 0.28);
  cursor: pointer;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, background .15s ease, visibility .2s ease;
}
#back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
#back-to-top:hover { background: var(--orange-dark); }
@media (max-width: 700px) { #back-to-top { right: 16px; bottom: 16px; width: 42px; height: 42px; } }
@media (max-width: 700px) { #featured-header { margin-bottom: 28px; } }

.deal-card { display: block; }
.deal-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
@media (min-width: 701px) {
  .deal-card { display: flex; flex-direction: column; height: 100%; }
  .deal-card-body {
    flex: 1;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
  }
  /* Cards whose name moved into the tab above the image (no h3 inside the
     body) have one fewer row than the default template. */
  .deal-card-body.no-title {
    grid-template-rows: 1fr auto auto;
  }
  .deal-card-body .combo-text-block {
    display: flex;
    flex-direction: column;
    min-height: 130px;
  }
  .deal-card-body .combo-text-block .deal-price-row {
    margin-top: auto;
  }
}
.deal-card-img {
  position: relative;
  height: 168px;
  background-size: cover;
  background-position: center;
}
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #fff;
  color: var(--orange-dark);
  font-weight: 800;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}
.combo-number {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font-family: 'Fredoka', sans-serif;
  font-size: 19px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}
.combo-number::before {
  content: "#";
}
.deal-card-body { padding: 16px 18px 18px; }
.deal-card-body h3 { font-size: 17px; margin-bottom: 4px; }
@media (min-width: 701px) {
  .deal-card-body h3.combo-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25em;
    height: 2.5em;
  }
}
.combo-title { color: var(--orange-dark); }
.deal-card-tab.combo-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 17px;
  font-weight: 400;
}
.combo-text-block { padding: 10px 0; margin: 6px 0 12px; }
.combo-text-block > *:first-child { margin-top: 0; }
.combo-text-block > *:last-child { margin-bottom: 0; }
.deal-card-tab {
  display: block;
  background: #F7F8FA;
  padding: 12px 18px;
  text-align: center;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: 0 2px 4px rgba(24, 42, 69, 0.06);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.deal-restaurant { font-size: 13.5px; color: var(--navy-soft); font-weight: 700; margin-bottom: 10px; }
a.deal-restaurant:hover { color: var(--orange-dark); text-decoration: underline; }
.deal-price-row { display: flex; align-items: baseline; gap: 8px; }
.deal-price { font-family: 'Fredoka', sans-serif; font-size: 20px; color: #000; }
.deal-save { font-size: 12.5px; font-weight: 800; color: var(--success); background: #E7F8EE; padding: 3px 9px; border-radius: 999px; }
.deal-tags { display: flex; gap: 6px; margin-top: 10px; margin-bottom: 12px; flex-wrap: wrap; }
@media (max-width: 700px) {
  .combo-text-block { padding: 14px 0; margin-bottom: 16px; }
  .deal-tags { margin-top: 12px; margin-bottom: 16px; }
  .deal-card-body > .btn { margin-top: 2px; }
}
.tag { font-size: 11.5px; font-weight: 700; color: var(--blue-dark); background: #EAF8FE; padding: 4px 10px; border-radius: 999px; }

/* ---------- Restaurant card description clamp (neighborhood.html) ----------
   line-height + max-height is the fallback for engines without support for
   -webkit-line-clamp — without it, unsupported browsers render the full
   unclamped paragraph (no truncation, no boundary), which throws off row
   heights in the cards grid. @supports upgrades to the nicer ellipsis-free
   multi-line clamp wherever the browser actually implements it. */
.restaurant-card-desc {
  line-height: 1.3em;
  max-height: 5.2em;
  overflow: hidden;
}
@supports (-webkit-line-clamp: 4) {
  .restaurant-card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    max-height: none;
  }
}
.restaurant-card-desc.expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  max-height: none;
}
.restaurant-card-more {
  display: none;
  background: none;
  color: var(--orange-dark);
  font-weight: 800;
  font-size: 13px;
  padding: 0;
  margin-top: 2px;
  margin-bottom: 10px;
}
.restaurant-card-more:hover { text-decoration: underline; }
.restaurant-card-more.show { display: inline-block; }

/* ---------- Section helpers ---------- */
.section { padding: 64px 0; }
.section-soft { background: var(--bg-soft); }
.section-title { font-size: 30px; margin-bottom: 8px; }
.section-sub { color: var(--navy-soft); font-size: 15.5px; margin-bottom: 34px; max-width: 560px; }
.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--orange-dark);
  background: var(--bg-warm);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.eyebrow.blue { color: var(--blue-dark); background: #EAF8FE; }

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

/* ---------- Form elements ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; color: var(--navy); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14.5px;
  color: var(--navy);
  background: #fff;
  transition: border-color .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
}
.field-hint { font-size: 12.5px; color: var(--navy-soft); margin-top: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24,42,69,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: 0 30px 60px rgba(0,0,0,0.25);
}
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--navy-soft);
}
.modal-close:hover { background: var(--border); }

/* ---------- Steps / progress ---------- */
.step-dots { display: flex; gap: 8px; justify-content: center; margin-bottom: 24px; }
.step-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.step-dot.active { background: var(--orange); width: 22px; border-radius: 999px; }

/* ---------- Pills / toggle ---------- */
.pill-toggle { display: flex; background: var(--bg-soft); border-radius: 999px; padding: 4px; gap: 4px; }
.pill-toggle button {
  flex: 1;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  color: var(--navy-soft);
  background: transparent;
}
.pill-toggle button.active { background: #fff; color: var(--navy); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--border); margin: 28px 0; }
.text-center { text-align: center; }
.muted { color: var(--navy-soft); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.chip.on { background: var(--bg-warm); border-color: var(--orange-light); color: var(--orange-dark); }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: #fff;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: all .25s ease;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav { padding: 12px 16px; }
  .nav-logo img { height: 34px; }
  .nav-actions { gap: 8px; }
  .nav-actions .btn-ghost { display: none; }
}
