:root {
  --brand-blue: #62add8;
  --brand-blue-strong: #159bd7;
  --brand-red: #e30613;
  --brand-green: #008d49;
  --brand-ink: #0f172a;
  --brand-muted: #64748b;

  --blue: var(--brand-blue-strong);
  --blue-dark: #0b4f8a;
  --blue-soft: #eef8fd;
  --ink: var(--brand-ink);
  --muted: var(--brand-muted);
  --bg: #f8fafc;
  --line: #e4eaf1;
  --shadow: 0 26px 70px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 14px 34px rgba(15, 23, 42, 0.06);
}

body {
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgba(98, 173, 216, 0.18), transparent 360px),
    radial-gradient(circle at 90% 14%, rgba(0, 141, 73, 0.10), transparent 300px),
    #f8fafc;
}

.header {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.88);
}

.brand strong {
  color: var(--brand-ink);
  letter-spacing: -0.055em;
}

.cart-btn {
  color: white;
  background: var(--brand-ink);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.cart-btn b {
  color: var(--brand-ink);
}

.screen {
  padding-top: 26px;
}

.back-btn {
  border-radius: 999px;
  border-color: var(--line);
  background: white;
  color: var(--brand-ink);
  box-shadow: var(--shadow-sm);
}

.back-btn:hover {
  border-color: rgba(98, 173, 216, 0.55);
  color: var(--blue-dark);
}

.locales-hero {
  position: relative;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: clamp(30px, 5vw, 58px);
  background:
    radial-gradient(circle at 18% 18%, rgba(98, 173, 216, 0.16), transparent 260px),
    radial-gradient(circle at 88% 18%, rgba(227, 6, 19, 0.07), transparent 240px),
    radial-gradient(circle at 82% 88%, rgba(0, 141, 73, 0.08), transparent 250px),
    #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.locales-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background:
    linear-gradient(
      90deg,
      var(--brand-blue) 0 42%,
      #ffffff 42% 56%,
      var(--brand-red) 56% 76%,
      var(--brand-green) 76% 100%
    );
}

.city-pill {
  min-height: 38px;
  border-radius: 999px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  color: var(--blue-dark);
  background: rgba(98, 173, 216, 0.13);
  border: 1px solid rgba(98, 173, 216, 0.24);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.locales-hero h1 {
  max-width: 760px;
  margin: 18px 0 10px;
  color: var(--brand-ink);
  font-size: clamp(42px, 7vw, 74px);
  line-height: 0.92;
  letter-spacing: -0.08em;
  text-wrap: balance;
}

.locales-hero p {
  max-width: 560px;
  margin: 0;
  color: var(--brand-muted);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.5;
  font-weight: 650;
  text-wrap: balance;
}

.locales-count {
  width: fit-content;
  min-height: 38px;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  color: var(--brand-muted);
  background: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 850;
}

.restaurants-toolbar {
  margin-bottom: 18px;
  display: grid;
  gap: 14px;
}

.search {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  background: white;
  box-shadow: var(--shadow-sm);
}

.search span {
  color: var(--brand-blue-strong);
  font-size: 13px;
  font-weight: 900;
}

.search input {
  min-width: 0;
  min-height: 56px;
  border: 0;
  outline: 0;
  color: var(--brand-ink);
  background: transparent;
  font-weight: 750;
}

.search input::placeholder {
  color: #94a3b8;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 17px;
  color: var(--brand-ink);
  background: white;
  font-weight: 850;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.filter:hover {
  transform: translateY(-1px);
  border-color: rgba(98, 173, 216, 0.55);
}

.filter.is-active {
  color: white;
  border-color: var(--brand-ink);
  background: var(--brand-ink);
}

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

.restaurant-card {
  border-radius: 28px;
  border: 1px solid var(--line);
  background: white;
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
}

.restaurant-card:hover {
  border-color: rgba(98, 173, 216, 0.55);
  transform: translateY(-5px);
  box-shadow: 0 26px 56px rgba(15, 23, 42, 0.10);
}

.restaurant-card:focus-visible {
  outline: 4px solid rgba(21, 155, 215, 0.18);
  outline-offset: 4px;
}

.restaurant-card__top {
  position: relative;
  min-height: 138px;
  background: var(--brand-blue);
}

.restaurant-card__top::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 7px;
  background: linear-gradient(90deg, var(--brand-red) 0 50%, var(--brand-green) 50% 100%);
}

.restaurant-card__badge {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.restaurant-card__icon {
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.13);
}

.restaurant-card h3 {
  color: var(--brand-ink);
  letter-spacing: -0.055em;
}

.restaurant-card p {
  color: var(--brand-muted);
}

.restaurant-meta span {
  color: var(--brand-muted);
  background: #f1f5f9;
}

.restaurant-card__button {
  min-height: 50px;
  border-radius: 999px;
  color: white;
  background: var(--brand-green);
  box-shadow: 0 16px 32px rgba(0, 141, 73, 0.18);
  pointer-events: none;
}

.restaurant-card__button:hover {
  background: #007a40;
}


.restaurant-status {
  min-height: 54px;
  margin-top: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 9px;
  align-items: center;
  background: #f8fafc;
}

.restaurant-status__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.13);
}

.restaurant-status strong {
  color: var(--brand-ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
}

.restaurant-status span:last-child {
  grid-column: 2;
  color: var(--brand-muted);
  font-size: 13px;
  font-weight: 750;
}

.restaurant-status.is-open {
  border-color: rgba(0, 141, 73, 0.16);
  background: rgba(0, 141, 73, 0.055);
}

.restaurant-status.is-open .restaurant-status__dot {
  background: var(--brand-green);
  box-shadow: 0 0 0 4px rgba(0, 141, 73, 0.13);
}

.restaurant-status.is-closed {
  border-color: rgba(227, 6, 19, 0.13);
  background: rgba(227, 6, 19, 0.045);
}

.restaurant-status.is-closed .restaurant-status__dot {
  background: var(--brand-red);
  box-shadow: 0 0 0 4px rgba(227, 6, 19, 0.11);
}

.footer__inner {
  color: var(--brand-muted);
}

@media (max-width: 980px) {
  .restaurants-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .screen {
    padding-top: 20px;
  }

  .locales-hero {
    border-radius: 28px;
    padding: 34px 18px;
  }

  .locales-hero h1 {
    font-size: clamp(42px, 13vw, 58px);
    letter-spacing: -0.075em;
  }

  .search {
    border-radius: 24px;
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 12px 16px;
  }

  .search input {
    min-height: 38px;
  }

  .filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .filter {
    white-space: nowrap;
  }

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


/* Carrito / checkout Fase 1 — locales */
.drawer__panel,
.checkout {
  box-shadow: -28px 0 80px rgba(15, 23, 42, 0.18);
}

.checkout {
  width: min(100%, 480px);
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.checkout-head {
  flex: 0 0 auto;
  padding: 20px 20px 14px;
  background: rgba(255, 255, 255, 0.96);
}

.checkout-head span {
  color: var(--brand-blue-strong);
}

.checkout-head h2 {
  font-size: clamp(25px, 4vw, 32px);
  letter-spacing: -0.055em;
}

.checkout-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

.checkout .form-grid {
  padding: 16px 20px 12px;
  grid-template-columns: 1fr;
  gap: 14px;
  overflow: visible;
}

.checkout-form-simple > label.wide,
.checkout-form-simple > .choice-field,
.checkout-form-simple > .wide {
  grid-column: 1 / -1;
}

.checkout .form-grid label {
  font-size: 14px;
  font-weight: 900;
}

.checkout .form-grid input,
.checkout .form-grid textarea {
  min-height: 54px;
  border-radius: 18px;
  border-color: #dbe5ef;
  background: #ffffff;
  font-size: 15px;
  font-weight: 750;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.035);
}

.checkout .form-grid textarea {
  min-height: 92px;
  resize: none;
  line-height: 1.35;
}

.choice-field {
  min-width: 0;
  border: 1px solid rgba(219, 229, 239, 0.92);
  border-radius: 22px;
  padding: 14px;
  margin: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(248,250,252,0.96));
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.choice-field legend {
  padding: 0 8px;
  margin-left: 2px;
  color: var(--brand-ink);
  font-size: 14px;
  font-weight: 950;
  letter-spacing: -0.01em;
}

.choice-grid--two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.choice-card {
  position: relative;
  min-height: 84px;
  border: 1px solid #dbe5ef;
  border-radius: 20px;
  padding: 14px 14px 14px 46px;
  display: flex;
  align-items: center;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.035);
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease;
}

.choice-card:hover {
  transform: translateY(-1px);
  border-color: rgba(21, 155, 215, 0.38);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.07);
}

.choice-card input {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--brand-green);
  transform: translateY(-50%);
}

.choice-card span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.choice-card strong {
  color: var(--brand-ink);
  font-size: 15px;
  font-weight: 950;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.choice-card small {
  color: var(--brand-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.choice-card:has(input:checked) {
  border-color: rgba(0, 141, 73, 0.34);
  background:
    linear-gradient(135deg, rgba(0, 141, 73, 0.09), rgba(98, 173, 216, 0.06)),
    #ffffff;
  box-shadow:
    0 14px 28px rgba(0, 141, 73, 0.08),
    0 0 0 3px rgba(0, 141, 73, 0.06);
}

.checkout-help {
  margin: 2px 20px 12px;
  border: 1px solid rgba(98, 173, 216, 0.20);
  border-radius: 18px;
  padding: 12px 14px;
  color: var(--brand-muted);
  background: rgba(98, 173, 216, 0.08);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.checkout-footer {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  margin-top: 0;
  border-top: 1px solid var(--line);
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), #ffffff 28%),
    #ffffff;
  box-shadow: 0 -16px 34px rgba(15, 23, 42, 0.08);
}

.checkout-footer .checkout-total {
  min-height: 56px;
  margin: 0 0 10px;
  border-radius: 20px;
  padding: 0 16px;
  background:
    linear-gradient(135deg, rgba(98, 173, 216, 0.13), rgba(0, 141, 73, 0.06)),
    #eef8fd;
}

.checkout-footer .btn {
  min-height: 54px;
  margin: 0;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 950;
  white-space: normal;
  line-height: 1.15;
  box-shadow: 0 18px 34px rgba(0, 141, 73, 0.22);
}

.cart-items {
  padding: 14px 20px 12px;
}

.cart-item {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
}

.cart-summary > div:nth-child(2) strong {
  max-width: 180px;
  color: var(--brand-muted);
  font-size: 13px;
  text-align: right;
  line-height: 1.15;
}

@media (min-width: 721px) {
  .mobile-cart {
    display: none !important;
  }

  .checkout-body::-webkit-scrollbar {
    width: 8px;
  }

  .checkout-body::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.38);
    border-radius: 999px;
  }
}

@media (max-width: 720px) {
  body {
    padding-bottom: 92px;
  }

  .drawer__panel,
  .checkout {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    box-shadow: none;
  }

  .checkout .form-grid {
    padding: 14px 16px 10px;
    gap: 12px;
  }

  .choice-field {
    border-radius: 20px;
    padding: 12px;
  }

  .choice-grid--two {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .choice-card {
    min-height: 74px;
    border-radius: 18px;
    padding: 12px 12px 12px 44px;
  }

  .choice-card input {
    left: 13px;
  }

  .checkout-help {
    margin-left: 16px;
    margin-right: 16px;
  }

  .checkout-footer {
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  }

  .checkout-footer .checkout-total {
    min-height: 54px;
  }

  .checkout-footer .checkout-total strong {
    font-size: 26px;
  }

  .checkout-footer .btn {
    min-height: 52px;
    font-size: 14px;
  }

  .mobile-cart {
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0 14px calc(12px + env(safe-area-inset-bottom));
  }

  .mobile-cart button {
    min-height: 58px;
    border-radius: 20px;
  }
}

@media (max-height: 720px) {
  .checkout-head {
    padding-top: 14px;
    padding-bottom: 10px;
  }

  .checkout-head h2 {
    font-size: 26px;
  }

  .checkout .form-grid {
    gap: 10px;
  }

  .choice-field {
    padding: 10px;
  }

  .choice-card {
    min-height: 62px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .checkout .form-grid textarea {
    min-height: 72px;
  }

  .checkout-help {
    font-size: 12px;
    padding: 10px 12px;
  }

  .checkout-footer .checkout-total {
    min-height: 50px;
  }

  .checkout-footer .btn {
    min-height: 50px;
  }
}
