:root {
  --red: #b91c1c;
  --red-dark: #7f1d1d;
  --red-light: #fee2e2;
  --cream: #faf7f2;
  --white: #ffffff;
  --text: #1f2937;
  --text-light: #6b7280;
  --green: #059669;
  --green-light: #d1fae5;
  --gold: #d97706;
  --gold-light: #fef3c7;
  --purple: #7c3aed;
  --purple-light: #ede9fe;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(31, 41, 55, 0.08);
  --radius: 16px;
  --sidebar-width: 260px;
  --bottom-nav-height: 78px;
  --mobile-toolbar-height: 112px;
  --content-max: 1440px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--cream);
  color: var(--text);
}

button, input, select, textarea {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

#app {
  min-height: 100vh;
  min-height: 100dvh;
}

.loading-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 8px;
  padding: 24px;
}

.brand-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border-radius: 20px;
  background: var(--red-light);
  display: grid;
  place-items: center;
  font-size: 34px;
}

/* ── Shell layout ── */

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.main-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar {
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  min-width: var(--sidebar-width);
  width: var(--sidebar-width);
  overflow-x: hidden;
  overflow-y: auto;
}

.mobile-toolbar,
.bottom-nav {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.brand h1 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.brand p {
  margin: 2px 0 0;
  color: var(--text-light);
  font-size: 0.82rem;
}

.locality-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.locality-card label,
.mobile-locality-row label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 6px;
}

.locality-card select,
.mobile-locality-row select,
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--white);
}

.sync-status {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sync-status.compact {
  margin-top: 8px;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.sync-dot.syncing {
  background: var(--gold);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  50% { opacity: 0.4; }
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item,
.bottom-nav-item {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-item {
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  width: 100%;
}

.nav-item.active,
.bottom-nav-item.active {
  background: var(--red-light);
  color: var(--red-dark);
  font-weight: 600;
}

.nav-item .badge,
.bottom-nav-item .badge {
  margin-left: auto;
  background: var(--red);
  color: white;
  border-radius: 999px;
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  padding: 0 6px;
}

.nav-item .nav-gift-badge,
.bottom-nav-item .nav-gift-badge {
  margin-left: auto;
  font-size: 1.2rem;
  line-height: 1;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.main-area {
  min-width: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: var(--content-max);
}

.topbar {
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 18px clamp(16px, 3vw, 28px);
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-wrap: wrap;
}

.topbar h2 {
  margin: 0;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.search-box {
  flex: 1 1 280px;
  max-width: 420px;
  min-width: 0;
  position: relative;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 11px 16px 11px 42px;
  background: var(--white);
}

.search-box span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.content {
  padding: clamp(16px, 3vw, 28px);
  padding-bottom: clamp(24px, 4vw, 40px);
  width: 100%;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.15s ease, opacity 0.15s ease;
  min-height: 44px;
}

.btn-icon {
  min-width: 44px;
  padding: 10px;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--red);
  color: white;
}

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

.btn-ghost {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red-light);
}

.btn-success {
  background: var(--green);
  color: white;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin: 18px 0;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.chip.active {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.section-title {
  margin: 28px 0 14px;
  font-size: clamp(1rem, 2.2vw, 1.1rem);
}

.featured-grid,
.restaurant-grid,
.promo-grid,
.menu-grid {
  display: grid;
  gap: clamp(14px, 2vw, 18px);
}

.featured-carousel {
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  margin-bottom: 4px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    #000 28px,
    #000 calc(100% - 28px),
    transparent
  );
  mask-image: linear-gradient(
    to right,
    transparent,
    #000 28px,
    #000 calc(100% - 28px),
    transparent
  );
}

.featured-carousel::-webkit-scrollbar {
  display: none;
}

/* Evita que al presionar/arrastrar desde una card el navegador inicie el
   "drag" nativo de la imagen o seleccione texto, lo que bloqueaba el scroll. */
.featured-carousel img,
.featured-carousel .card {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.featured-carousel.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
  user-select: none;
}

.featured-carousel.is-autoplaying {
  scroll-behavior: auto;
  scroll-snap-type: none;
}

.featured-carousel__track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: clamp(14px, 2vw, 18px);
  width: max-content;
}

.featured-carousel__track .card {
  flex: 0 0 min(260px, 78vw);
  width: min(260px, 78vw);
  max-width: 260px;
  scroll-snap-align: start;
}

.featured-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}

.restaurant-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}

.promo-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

.menu-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.card-clickable {
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(31, 41, 55, 0.12);
}

.card-image {
  aspect-ratio: 16 / 10;
  background: #f3f4f6;
  object-fit: cover;
  width: 100%;
}

.card-body {
  padding: 16px;
}

.card-title-row {
  display: flex;
  align-items: start;
  gap: 10px;
}

.card-title-row h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.card-meta {
  color: var(--text-light);
  font-size: 0.86rem;
  margin-top: 6px;
  line-height: 1.45;
}

.badge-open,
.badge-closed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-open {
  background: var(--green-light);
  color: var(--green);
}

.badge-closed {
  background: var(--border);
  color: var(--text-light);
}

.empty-state {
  text-align: center;
  padding: clamp(40px, 8vw, 60px) 20px;
  color: var(--text-light);
}

.empty-state h3 {
  color: var(--text);
}

.menu-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.menu-categories {
  position: sticky;
  top: 92px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.menu-categories button {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  min-height: 44px;
}

.menu-categories button.active {
  background: var(--red-light);
  color: var(--red-dark);
  font-weight: 600;
}

.menu-categories button.menu-category-promo {
  background: var(--gold-light);
  color: var(--red-dark);
  font-weight: 700;
}

.menu-categories button.menu-category-promo.active {
  background: var(--red);
  color: #fff;
}

.menu-item-card--promo .card-body h3:empty,
.menu-item-card--promo .card-body h3 {
  font-size: 0.95rem;
}

.menu-item-card--promo img,
.menu-item-card--promo .card-image {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.menu-view--refreshing .menu-grid {
  opacity: 0.72;
  transition: opacity 0.2s ease;
}

.restaurant-cover {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--cream);
  line-height: 0;
}

.restaurant-cover__closed-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-35deg);
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  padding: 12px 36px;
  border-radius: 999px;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  z-index: 2;
  pointer-events: none;
}

.restaurant-cover__favorite {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
}

.restaurant-card__media {
  position: relative;
}

.restaurant-card__favorite {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.favorite-btn {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 10px rgba(31, 41, 55, 0.12);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.restaurant-cover__favorite.favorite-btn {
  background: rgba(0, 0, 0, 0.28);
  box-shadow: none;
}

.favorite-btn .favorite-icon {
  font-size: 1.15rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.95);
}

.restaurant-card__favorite.favorite-btn .favorite-icon,
.favorite-btn:not(.restaurant-cover__favorite) .favorite-icon {
  color: var(--text-light);
}

.favorite-btn.is-favorite .favorite-icon {
  color: var(--red);
}

.price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.half-price-badge {
  font-size: 0.82rem;
  color: var(--text-light);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
}

.pizza-portion-modal {
  max-width: 420px;
}

.pizza-portion-name {
  margin: 0 0 14px;
  font-weight: 600;
}

.pizza-portion-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pizza-portion-option {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
}

.pizza-portion-option.selected {
  background: var(--red-light);
  border-color: rgba(185, 28, 28, 0.25);
}

.pizza-portion-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.pizza-portion-actions .btn {
  flex: 1;
}

.favorites-empty__icon {
  font-size: 3rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.restaurant-cover__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(380px, 52vh);
  object-fit: contain;
  object-position: center center;
  background: var(--cream);
}

.restaurant-cover__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 18px clamp(16px, 3vw, 28px);
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.82) 0%,
    rgba(0, 0, 0, 0.42) 42%,
    rgba(0, 0, 0, 0.08) 100%
  );
  color: #fff;
  pointer-events: none;
}

.restaurant-cover__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.restaurant-cover__badge {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #fff !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.restaurant-cover__meta {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.menu-view__content {
  padding-top: 20px;
  width: 100%;
  max-width: 920px;
}

.menu-layout--list {
  display: grid;
  grid-template-columns: minmax(200px, 220px) minmax(0, 1fr);
  grid-template-areas: "cats items";
  gap: 20px;
  align-items: start;
}

.menu-layout--list .menu-category-chips {
  display: none;
}

.menu-layout--list .menu-categories--desktop {
  grid-area: cats;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-layout--list .menu-list-section {
  grid-area: items;
  min-width: 0;
}

.menu-tab-bar {
  display: flex;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  width: 100%;
  max-width: 520px;
}

.menu-tab-bar__item {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 10px;
  cursor: pointer;
  color: var(--text-light);
  font-weight: 500;
  position: relative;
}

.menu-tab-bar__item.active {
  color: var(--red-dark);
  font-weight: 700;
}

.menu-tab-bar__item.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 28px;
  height: 2px;
  transform: translateX(-50%);
  background: var(--red);
  border-radius: 999px;
}

.menu-info-panel,
.menu-reviews-panel {
  padding-bottom: 8px;
}

.menu-info-card {
  padding: 20px;
}

.menu-info-card h3 {
  margin: 0 0 12px;
}

.menu-info-name {
  margin: 0 0 16px;
  font-weight: 600;
  font-size: 1.05rem;
}

.menu-info-list {
  margin: 0;
}

.menu-info-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.menu-info-row:last-child {
  border-bottom: none;
}

.menu-info-row dt {
  margin: 0;
  color: var(--text-light);
  font-size: 0.85rem;
}

.menu-info-row dd {
  margin: 0;
  white-space: pre-line;
}

.menu-info-open {
  color: var(--green);
  font-weight: 600;
}

.menu-info-closed {
  color: var(--text-light);
  font-weight: 600;
}

.menu-info-subtitle {
  margin: 18px 0 8px;
  font-size: 0.95rem;
}

.menu-info-row--location a {
  color: var(--red);
  font-weight: 600;
}

.menu-info-wa {
  display: block;
  width: 100%;
  margin-top: 18px;
  text-align: center;
  text-decoration: none;
}

.menu-reviews-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.menu-reviews-empty {
  padding: 24px 0;
}

.review-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.review-item__stars {
  color: var(--gold);
  letter-spacing: 1px;
}

.review-dialog {
  max-width: 420px;
}

.review-star-picker {
  display: flex;
  gap: 8px;
  margin: 12px 0 16px;
}

.review-star {
  border: none;
  background: transparent;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: var(--border);
  padding: 0;
}

.review-star.selected {
  color: var(--gold);
}

.review-dialog textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  resize: vertical;
  min-height: 96px;
  font: inherit;
}

.restaurant-about {
  margin: 0;
  padding: 16px clamp(16px, 3vw, 28px) 0;
  color: var(--text-light);
  line-height: 1.5;
  font-size: 0.92rem;
}

.restaurant-location-link {
  display: inline-block;
  margin: 8px clamp(16px, 3vw, 28px) 0;
  color: var(--red);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.restaurant-location-link:hover {
  text-decoration: underline;
}

.menu-view .menu-categories {
  top: 16px;
}

.menu-item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.menu-item-card--discount {
  overflow: visible;
}

.menu-discount-badge {
  position: absolute;
  top: -16px;
  right: -8px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--red);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 20px;
  padding: 10px 16px;
  box-shadow: 0 6px 16px rgba(185, 28, 28, 0.28);
  line-height: 1;
  pointer-events: none;
}

.menu-discount-badge--compact {
  padding: 8px 14px;
  border-radius: 16px;
}

.menu-discount-badge__value {
  font-size: 2.2rem;
  font-weight: 700;
}

.menu-discount-badge__suffix {
  display: flex;
  flex-direction: column;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

.menu-price-row--discount .menu-price-discount {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu-price-original {
  color: var(--text-light);
  text-decoration: line-through;
  font-weight: 500;
  font-size: 0.9rem;
}

.menu-price-current {
  display: inline-block;
  width: fit-content;
  background: var(--red-light);
  color: var(--red);
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
}

.menu-item-card .card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.menu-item-card .price {
  font-weight: 700;
  color: var(--red);
  margin-top: auto;
  padding-top: 10px;
}

.menu-item-card .actions {
  margin-top: 12px;
}

.menu-item-card .actions .btn {
  width: 100%;
}

.restaurant-header {
  display: grid;
  grid-template-columns: minmax(96px, 120px) minmax(0, 1fr);
  gap: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 20px;
}

.restaurant-header img,
.restaurant-header .card-image {
  width: 100%;
  max-width: 120px;
  height: auto;
  aspect-ratio: 1;
  border-radius: 14px;
  object-fit: cover;
}

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

.cart-group {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.cart-group-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cart-group-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.cart-group-header__info .card-meta {
  margin: 4px 0 0;
}

.cart-group-header__total {
  color: var(--primary);
  font-size: 1.05rem;
  white-space: nowrap;
}

.cart-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item__main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cart-item__info {
  min-width: 0;
  flex: 1;
}

.cart-item__adicional {
  padding-left: 10px;
  margin-top: 4px;
}

.cart-item__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cart-item__price {
  min-width: 72px;
  text-align: right;
  font-size: 0.95rem;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item input {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-controls button {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
}

.checkout-panel {
  position: sticky;
  top: 92px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 6px;
}

.profile-card {
  width: 100%;
  max-width: 520px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(18px, 4vw, 24px);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: max(20px, var(--safe-top)) 20px max(20px, var(--safe-bottom));
}

.modal {
  width: min(520px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  background: var(--white);
  border-radius: 18px;
  padding: clamp(18px, 4vw, 24px);
  box-shadow: var(--shadow);
}

.modal h3 {
  margin-top: 0;
}

.legal-modal {
  width: min(560px, 100%);
}

.legal-modal__updated {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.legal-modal__text {
  margin: 0 0 12px;
  line-height: 1.55;
  color: var(--text);
}

.legal-modal__section {
  margin-bottom: 16px;
}

.legal-modal__section h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

.legal-modal__list {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.55;
}

.legal-modal__list li + li {
  margin-top: 6px;
}

.legal-modal__email {
  margin: 0;
}

.legal-modal__email a {
  color: var(--red);
  word-break: break-all;
}

.progress-bar {
  height: 10px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 16px 0;
}

.progress-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--gold));
  transition: width 0.25s ease;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, calc(20px + var(--safe-bottom)));
  transform: translateX(-50%);
  background: var(--text);
  color: white;
  padding: 12px 16px;
  border-radius: 12px;
  z-index: 200;
  animation: fadeIn 0.2s ease;
  max-width: min(92vw, 420px);
  text-align: center;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.accent-red { border-left: 4px solid var(--red); }
.accent-gold { border-left: 4px solid var(--gold); }
.accent-green { border-left: 4px solid var(--green); }
.accent-purple { border-left: 4px solid var(--purple); }

.reviews {
  margin-top: 24px;
}

.review-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.welcome-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(24px, var(--safe-top)) 24px max(24px, var(--safe-bottom));
}

.welcome-card {
  width: min(560px, 100%);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(24px, 5vw, 32px);
  box-shadow: var(--shadow);
  text-align: center;
}

.welcome-card h1 {
  margin-top: 0;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
}

.wa-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.wa-links .btn {
  width: 100%;
}

/* ── Large desktop ── */
@media (min-width: 1400px) {
  .app-shell {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  .main-column {
    align-items: stretch;
  }
}

/* ── Tablet landscape / small laptop ── */
@media (max-width: 1100px) {
  :root {
    --sidebar-width: 220px;
  }

  .menu-layout {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .cart-layout {
    grid-template-columns: 1fr;
  }

  .checkout-panel {
    position: static;
  }
}

/* ── Tablet portrait / large phone ── */
@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar-desktop {
    display: none;
  }

  .mobile-toolbar {
    display: block;
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--white) 96%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: max(10px, var(--safe-top)) 16px 12px;
  }

  .mobile-toolbar-actions {
    display: flex;
    gap: 8px;
  }

  .mobile-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 12px;
    align-items: center;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .mobile-brand .brand-icon {
    width: 40px;
    height: 40px;
  }

  .mobile-brand strong {
    display: block;
    font-size: 0.95rem;
    line-height: 1.2;
  }

  .mobile-brand small {
    display: block;
    color: var(--text-light);
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-locality-row {
    grid-column: 1 / -1;
  }

  .mobile-locality-row select {
    width: 100%;
  }

  .bottom-nav {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    background: color-mix(in srgb, var(--white) 96%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding: 10px 8px calc(8px + var(--safe-bottom));
    box-shadow: 0 -8px 24px rgba(31, 41, 55, 0.06);
    border-radius: 20px 20px 0 0;
  }

  .bottom-nav__group {
    display: flex;
    flex: 1;
    min-width: 0;
  }

  .bottom-nav__group--left,
  .bottom-nav__group--right {
    justify-content: space-around;
  }

  .bottom-nav__group--center {
    flex: 0 0 72px;
    justify-content: center;
    align-items: flex-end;
  }

  .bottom-nav-item {
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    border-radius: 12px;
    min-height: 56px;
    position: relative;
    flex: 1;
    min-width: 0;
  }

  .bottom-nav-item.nav-home-btn {
    width: 56px;
    height: 56px;
    min-height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    box-shadow: 0 8px 20px rgba(185, 28, 28, 0.35);
    margin-bottom: 10px;
    flex: 0 0 56px;
    padding: 0;
  }

  .bottom-nav-item.nav-home-btn .nav-icon,
  .bottom-nav-item.nav-home-btn .nav-label {
    color: #fff;
  }

  .bottom-nav-item.nav-home-btn.active {
    background: linear-gradient(135deg, var(--red-dark), #5c1212);
    color: #fff;
  }

  .bottom-nav-item .nav-icon {
    font-size: 1.15rem;
    line-height: 1;
  }

  .bottom-nav-item .nav-label {
    font-size: 0.68rem;
    line-height: 1.1;
  }

  .bottom-nav-item .badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 24px);
    margin: 0;
    min-width: 18px;
    height: 18px;
    font-size: 0.65rem;
  }

  .bottom-nav-item .nav-gift-badge {
    position: absolute;
    top: -6px;
    right: calc(50% - 24px);
    margin: 0;
    font-size: 1.15rem;
  }

  .main-area {
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom));
    max-width: none;
  }

  .topbar {
    top: 0;
  }

  .menu-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .menu-categories {
    position: sticky;
    top: calc(var(--mobile-toolbar-height) - 12px);
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    max-height: none;
    padding: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .menu-categories::-webkit-scrollbar {
    display: none;
  }

  .menu-categories button {
    width: auto;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 10px 14px;
  }

  .search-box {
    flex: 1 1 100%;
    max-width: none;
    order: 3;
  }

  .topbar-actions {
    margin-left: 0;
    width: 100%;
    order: 2;
  }

  .topbar-actions .btn {
    flex: 1;
  }

  .toast {
    bottom: calc(var(--bottom-nav-height) + 16px + var(--safe-bottom));
  }
}

/* ── Mobile ── */
@media (max-width: 600px) {
  :root {
    --mobile-toolbar-height: 128px;
  }

  .content {
    padding: 14px;
    padding-bottom: 24px;
  }

  .topbar {
    padding: 14px;
    gap: 10px;
  }

  .featured-grid,
  .restaurant-grid,
  .promo-grid,
  .menu-grid {
    grid-template-columns: 1fr;
  }

  .featured-carousel__track .card {
    flex-basis: min(240px, 82vw);
    width: min(240px, 82vw);
  }

  .restaurant-header {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .restaurant-header img,
  .restaurant-header .card-image {
    max-width: 100%;
    width: 100%;
    aspect-ratio: 16 / 10;
  }

  .cart-item__main {
    flex-direction: column;
    align-items: stretch;
  }

  .cart-item__actions {
    justify-content: space-between;
    width: 100%;
  }

  .qty-controls {
    justify-content: flex-start;
  }

  .card-clickable:hover {
    transform: none;
  }
}

/* ── Very small screens ── */
@media (max-width: 380px) {
  .bottom-nav-item .nav-label {
    font-size: 0.62rem;
  }

  .topbar h2 {
    font-size: 1rem;
  }
}

/* ── Tema claro forzado ──
   La web siempre se muestra en tema claro, sin importar el tema (claro/oscuro)
   configurado en el dispositivo. */
:root {
  color-scheme: light only;
}

.profile-divider {
  margin: 24px 0;
  border: none;
  border-top: 1px solid var(--border);
}

.profile-value {
  padding: 12px 14px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--text);
}

.loyalty-card {
  background: var(--red-light);
  border: 1px solid var(--red);
  border-radius: 16px;
  padding: 16px;
  margin-top: 12px;
}

.loyalty-card-title {
  color: var(--red);
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 6px;
}

.loyalty-card-text {
  color: var(--text);
  font-size: 0.9rem;
  margin: 0 0 4px;
}

.loyalty-card-meta {
  color: var(--text-light);
  font-size: 0.8rem;
  margin: 0 0 12px;
}

.loyalty-card .btn {
  width: 100%;
}

.loyalty-menu-banner {
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.profile-section-title {
  margin: 0 0 8px;
  text-align: center;
}

.profile-section-subtitle {
  text-align: center;
  margin-bottom: 16px;
}

.profile-form-error {
  color: var(--red);
  text-align: center;
  margin: 0 0 12px;
}

.profile-status-block {
  margin-top: 16px;
  text-align: center;
}

.profile-password-field {
  position: relative;
}

.profile-toggle-password {
  width: 100%;
  margin-top: 8px;
}

.admin-session-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 8px;
}

.admin-session-card h3 {
  margin: 0 0 12px;
}

.loyalty-progress-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.loyalty-progress-row:last-child {
  border-bottom: none;
}

.badge-admin {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fde8ea;
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 700;
}

.restaurant-card__admin-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 3px 7px;
  font-size: 0.68rem;
  line-height: 1.2;
  pointer-events: none;
}

.restaurant-cover__admin-actions {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 3;
}

.restaurant-cover__admin-actions .btn,
.restaurant-cover__admin-actions label.btn {
  margin: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.menu-list-item__admin {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  min-width: 92px;
}

.menu-list-item__admin-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.menu-list-item__admin .admin-delete-item-btn {
  padding: 6px 8px;
  font-size: 0.78rem;
  border-color: var(--red);
  color: var(--red);
}

.menu-list-item__admin .admin-edit-item-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
}

.menu-item-unavailable-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.menu-item-unavailable-dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}

.menu-item-unavailable-label {
  position: relative;
  z-index: 1;
  width: 100%;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 600;
  text-align: center;
  padding: 4px 3px;
  line-height: 1.25;
}

.admin-availability-toggle {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.admin-availability-toggle:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.admin-availability-toggle__track {
  position: relative;
  display: block;
  width: 52px;
  height: 28px;
  border-radius: 999px;
  background: #54606b;
  transition: background 0.2s ease;
}

.admin-availability-toggle.is-on .admin-availability-toggle__track {
  background: #43a047;
}

.admin-availability-toggle__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ececec;
  transition: transform 0.2s ease;
  z-index: 2;
}

.admin-availability-toggle.is-on .admin-availability-toggle__knob {
  transform: translateX(24px);
}

.admin-availability-toggle__icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
  z-index: 1;
}

.admin-availability-toggle__icon--check {
  left: 7px;
  color: #fff;
  opacity: 0;
}

.admin-availability-toggle.is-on .admin-availability-toggle__icon--check {
  opacity: 1;
}

.admin-availability-toggle__icon--close {
  right: 7px;
  color: #9aa3ad;
  opacity: 1;
}

.admin-availability-toggle.is-on .admin-availability-toggle__icon--close {
  opacity: 0;
}

.admin-availability-toggle.is-loading .admin-availability-toggle__track {
  opacity: 0.65;
}

.admin-menu-form {
  max-height: 90vh;
  overflow-y: auto;
}

.admin-item-image-preview {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 8px;
}

.admin-item-image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Search autocomplete ── */
.search-box {
  position: relative;
}

.search-suggestions {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 40;
  max-height: 280px;
  overflow-y: auto;
}

.search-box.open .search-suggestions {
  display: block;
}

.search-suggestion {
  width: 100%;
  border: none;
  background: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
}

.search-suggestion:hover,
.search-suggestion:focus {
  background: var(--cream);
}

.search-suggestion small {
  color: var(--text-light);
  font-size: 0.75rem;
}

.search-suggestion.muted {
  justify-content: center;
  color: var(--text-light);
  font-size: 0.82rem;
}

/* ── Filter panel ── */
.filter-panel {
  width: min(480px, 100%);
}

.filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.filter-group {
  margin: 18px 0;
}

.filter-label {
  margin: 0 0 10px;
  color: var(--text-light);
  font-size: 0.85rem;
}

.filter-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  cursor: pointer;
}

.filter-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
}

.filter-chips {
  margin: 0;
}

.filter-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

/* ── Skeleton loaders ── */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, rgba(255,255,255,0.35) 37%, var(--border) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.2s ease infinite;
  border-radius: 10px;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.skeleton-card {
  overflow: hidden;
}

.skeleton-image {
  aspect-ratio: 16 / 10;
  border-radius: 0;
}

.skeleton-line {
  height: 14px;
  margin-bottom: 10px;
}

.skeleton-line.wide { width: 85%; }
.skeleton-line.short { width: 45%; }

.skeleton-button {
  height: 44px;
  margin-top: 12px;
}

.closed-notice {
  padding: 14px;
  margin-bottom: 16px;
  background: var(--gold-light);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
}

/* ── Cart animations ── */
.cart-bounce {
  animation: cartBounce 0.55s ease;
}

@keyframes cartBounce {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.12); }
  65% { transform: scale(0.96); }
}

.added-pulse {
  animation: addedPulse 0.45s ease;
}

@keyframes addedPulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.94); background: var(--green); }
  100% { transform: scale(1); }
}

.cart-fly {
  position: fixed;
  z-index: 300;
  transform: translate(-50%, -50%) scale(1);
  background: var(--red);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  pointer-events: none;
  transition: transform 0.65s cubic-bezier(.2,.8,.2,1), opacity 0.65s ease;
}

.cart-fly-active {
  transform: translate(calc(-50% + 120px), calc(-50% + 220px)) scale(0.4);
  opacity: 0;
}

.toast.success {
  background: var(--green);
}

.toast.error {
  background: var(--red-dark);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn:active,
  .card-clickable:hover {
    transform: none;
  }

  .sync-dot.syncing {
    animation: none;
  }

  .featured-carousel {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .skeleton {
    animation: none;
  }

  .cart-fly,
  .cart-bounce,
  .added-pulse {
    animation: none !important;
    transition: none !important;
  }
}

/* ── Promos stories (Instagram-style) ── */

.view-promos {
  background: #000;
}

.view-promos .main-column {
  background: #000;
}

.view-promos .main-area {
  max-width: none;
  padding: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.view-promos .mobile-toolbar {
  display: none;
}

.promos-stories-screen {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 0;
  min-height: calc(100dvh - var(--bottom-nav-height) - var(--safe-bottom));
  background: #000;
  color: #fff;
  overflow: hidden;
  touch-action: manipulation;
  user-select: none;
}

@media (min-width: 961px) {
  .promos-stories-screen {
    min-height: 100dvh;
  }
}

.promo-story-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: pointer;
}

.promo-story-media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
}

.promo-story-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
}

.promo-story-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(3rem, 12vw, 4.5rem);
  background: #111;
}

@media (min-width: 961px) {
  .promo-story-image {
    max-width: min(100%, calc(100dvh * 9 / 16));
  }
}

.promo-story-gradient {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
}

.promo-story-gradient-top {
  top: 0;
  height: 140px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.2), transparent);
}

.promo-story-gradient-bottom {
  bottom: 0;
  height: 180px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.25), transparent);
}

.promo-story-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: max(8px, var(--safe-top)) 10px 0;
}

.promo-story-progress {
  display: flex;
  gap: 4px;
  padding: 8px 2px;
}

.promo-story-progress-track {
  flex: 1;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

.promo-story-progress-fill {
  height: 100%;
  background: #fff;
  border-radius: inherit;
  transition: width 80ms linear;
}

.promo-story-meta-row {
  display: flex;
  align-items: center;
  padding: 0 2px 8px;
}

.promo-story-restaurant {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
  text-align: left;
  min-width: 0;
}

.promo-story-restaurant.disabled {
  cursor: default;
}

.promo-story-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.15);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.promo-story-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-story-avatar-emoji {
  font-size: 1rem;
}

.promo-story-restaurant-text {
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.promo-story-tag {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.78rem;
  font-weight: 500;
}

.promo-story-add-btn {
  position: absolute;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 4;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.promo-story-refresh-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 5;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  animation: promo-story-refresh 1.1s ease-in-out infinite;
}

@keyframes promo-story-refresh {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.promo-story-loading,
.promo-story-empty {
  min-height: inherit;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: 12px;
  padding: 32px;
}

.promo-story-empty h2 {
  margin: 0;
  font-size: 1.35rem;
}

.promo-story-empty p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  max-width: 320px;
}

.promo-story-empty-icon {
  font-size: 3rem;
  opacity: 0.75;
}

.promo-story-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: promo-story-spin 0.8s linear infinite;
}

@keyframes promo-story-spin {
  to { transform: rotate(360deg); }
}

.hidden { display: none !important; }

.image-shimmer-wrap {
  position: relative;
  overflow: hidden;
  background: #f3f4f6;
  display: block;
  width: 100%;
}

.restaurant-card__media .image-shimmer-wrap,
.card .image-shimmer-wrap:first-child {
  aspect-ratio: 16 / 10;
}

.menu-list-item__thumb .image-shimmer-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.restaurant-cover .image-shimmer-wrap {
  width: 100%;
  line-height: 0;
}

.menu-detail-hero .image-shimmer-wrap {
  width: 100%;
  height: 100%;
}

.image-shimmer-wrap .card-image {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

.image-shimmer-wrap:not(.loaded) .card-image[data-hosting-src],
.image-shimmer-wrap:not(.loaded) img[data-hosting-src] {
  opacity: 0;
}

.image-shimmer-wrap .restaurant-cover__img {
  width: 100%;
  height: auto;
  max-height: min(380px, 52vh);
  object-fit: contain;
}

.image-shimmer-wrap .menu-list-item__img,
.image-shimmer-wrap .menu-detail-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  animation: image-shimmer 1.2s infinite;
  pointer-events: none;
}

.image-shimmer-wrap.loaded .image-shimmer {
  display: none;
}

@keyframes image-shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.error-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #7f1d1d;
}

.error-banner p {
  margin: 4px 0 0;
  font-size: 0.92rem;
}

.inline-progress {
  height: 4px;
  margin: 0 0 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary, #b91c1c), #f59e0b, var(--primary, #b91c1c));
  background-size: 200% 100%;
  animation: inline-progress 1s linear infinite;
}

@keyframes inline-progress {
  to { background-position: 200% 0; }
}

.home-topbar__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-app-menu {
  position: relative;
}

.home-app-menu__dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  padding: 8px;
  border-radius: 12px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e7eb);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  z-index: 30;
}

.home-app-menu__dropdown.open {
  display: grid;
  gap: 4px;
}

.home-app-menu__dropdown button,
.home-app-menu__dropdown a {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.home-app-menu__dropdown button:hover,
.home-app-menu__dropdown a:hover {
  background: var(--surface-2, #f3f4f6);
}

.home-categories {
  margin: 0 0 12px;
  padding: 0 16px;
}

.home-categories__row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.home-categories__row::-webkit-scrollbar {
  height: 6px;
}

.home-categories__row::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 999px;
}

.home-category-item {
  flex: 0 0 auto;
  width: 78px;
  border: 0;
  background: transparent;
  cursor: pointer;
  scroll-snap-align: start;
  text-align: center;
  padding: 0;
}

.home-category-item__image-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 8px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid transparent;
  flex-shrink: 0;
}

.home-category-item.active .home-category-item__image-wrap {
  border-color: var(--red);
}

.home-category-item__image-wrap img {
  width: 64px;
  height: 64px;
  max-width: none;
  object-fit: cover;
  display: block;
}

.home-category-item__label {
  display: block;
  font-size: 0.74rem;
  line-height: 1.2;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-fab {
  position: fixed;
  right: 20px;
  bottom: calc(var(--bottom-nav-height, 72px) + 16px + var(--safe-bottom, 0px));
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: var(--primary, #b91c1c);
  color: #fff;
  font-size: 1.4rem;
  box-shadow: 0 10px 24px rgba(185, 28, 28, 0.35);
  cursor: pointer;
  z-index: 40;
}

.cart-fab__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 0.75rem;
  display: grid;
  place-items: center;
}

.filter-pills,
.filter-category-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-pill,
.filter-category-card {
  border: 1px solid var(--border, #e5e7eb);
  background: var(--surface, #fff);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
}

.filter-pill.active,
.filter-category-card.active {
  background: var(--primary, #b91c1c);
  border-color: var(--primary, #b91c1c);
  color: #fff;
}

.filter-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.filter-category-card {
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
}

.filter-locality-select {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border, #e5e7eb);
}

.menu-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.menu-section-header h3 {
  margin: 0;
}

.menu-section-header span {
  color: var(--text-light);
  font-size: 0.92rem;
}

.menu-subsection-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 10px;
}

.menu-subsection-header h4 {
  margin: 0;
  font-size: 1.05rem;
}

.menu-subsection-header span {
  color: var(--text-light);
  font-size: 0.88rem;
}

.menu-list {
  display: grid;
  gap: 10px;
}

.menu-list-item {
  position: relative;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 3px 12px rgba(31, 41, 55, 0.08);
  overflow: visible;
}

.menu-list-item > .menu-discount-badge {
  position: absolute;
  top: -10px;
  right: -4px;
  left: auto;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 10px;
  gap: 4px;
  border-width: 2px;
}

.menu-list-item > .menu-discount-badge .menu-discount-badge__value {
  font-size: 1.15rem;
}

.menu-list-item > .menu-discount-badge .menu-discount-badge__suffix {
  font-size: 0.55rem;
}

.menu-list-item__row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.menu-list-item__main {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.menu-list-item__thumb {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(31, 41, 55, 0.12);
}

.menu-list-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.menu-list-item__body h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-list-item__desc {
  margin: 2px 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--text-light);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-list-item__body .price-row {
  margin-top: 6px;
  align-items: flex-end;
  gap: 8px;
}

.menu-list-item__body .menu-price-row--discount .menu-price-discount {
  gap: 1px;
}

.menu-list-item__body .menu-price-original {
  font-size: 0.82rem;
  line-height: 1.2;
}

.menu-list-item__body .menu-price-current {
  font-size: 0.92rem;
  padding: 4px 8px;
  border-radius: 8px;
}

.menu-list-item__body .price {
  margin-top: 6px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--red);
  background: var(--red-light);
  padding: 4px 8px;
  border-radius: 8px;
}

.menu-list-item__body .half-price-badge {
  font-size: 0.76rem;
  padding: 3px 8px;
  line-height: 1.2;
  white-space: nowrap;
}

.menu-list-item__actions {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  width: auto;
  min-width: 44px;
}

.menu-list-item__actions .adicional-item-btn {
  width: 92px;
  min-height: auto;
  padding: 6px 8px;
  font-size: 0.72rem;
  line-height: 1.15;
  white-space: normal;
  text-align: center;
}

.menu-list-item__actions .menu-list-item__add {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  line-height: 1;
  flex: 0 0 auto;
}

.menu-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.72);
  overflow-y: auto;
}

.menu-detail-panel {
  width: min(100%, 480px);
  max-height: min(92vh, 860px);
  overflow: hidden auto;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.menu-detail-hero {
  position: relative;
  width: 100%;
  height: clamp(220px, 42vh, 320px);
  background: #111827;
}

.menu-detail-hero .image-shimmer-wrap,
.menu-detail-hero__img {
  width: 100%;
  height: 100%;
}

.menu-detail-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: #fff;
  cursor: pointer;
  z-index: 2;
}

.menu-detail-hero > .menu-discount-badge {
  top: 14px;
  right: 14px;
  left: auto;
  z-index: 2;
}

.menu-detail-sheet {
  padding: 20px;
}

.menu-detail-category {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--red-light);
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 700;
}

.menu-detail-sheet__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.menu-detail-sheet__header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.menu-detail-description {
  color: var(--text-light);
  line-height: 1.5;
}

.menu-detail-actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.menu-detail-actions .btn {
  width: 100%;
}

.order-sending-screen {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: 20px;
  padding: 32px;
  background: #fff7ed;
}

.order-sending-cart {
  font-size: 4rem;
  animation: order-sending-cart 1.2s linear infinite;
}

@keyframes order-sending-cart {
  0%, 100% { transform: translateX(-28px); }
  50% { transform: translateX(28px); }
}

.profile-photo-block {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.profile-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #fee2e2;
  color: var(--primary, #b91c1c);
  font-size: 1.6rem;
  font-weight: 700;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-photo-btn {
  margin-top: 8px;
  cursor: pointer;
}

.checkout-profile-hint {
  margin-bottom: 12px;
}

.restaurant-location-link {
  display: inline-block;
  margin: 0 16px 12px;
  color: var(--primary, #b91c1c);
}

@media (max-width: 960px) {
  .menu-layout--list {
    grid-template-columns: 1fr;
    grid-template-areas:
      "chips"
      "items";
    gap: 12px;
  }

  .menu-layout--list .menu-category-chips {
    display: flex;
    grid-area: chips;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0 8px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .menu-layout--list .menu-category-chips::-webkit-scrollbar {
    height: 5px;
  }

  .menu-layout--list .menu-categories--desktop {
    display: none !important;
  }

  .menu-category-chip {
    flex: 0 0 auto;
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.88rem;
  }

  .menu-category-chip.active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
  }

  .menu-category-chip.menu-category-promo {
    background: var(--gold-light);
    color: var(--red-dark);
  }

  .menu-category-chip.menu-category-promo.active {
    background: var(--red);
    color: #fff;
  }

  .menu-view__content {
    max-width: none;
  }

  .menu-list-item__thumb {
    width: 72px;
    height: 72px;
  }

  .menu-list-item__actions .adicional-item-btn {
    width: 80px;
    font-size: 0.68rem;
  }

  .view-promos .main-area {
    padding-bottom: 0;
  }

  .promos-stories-screen {
    min-height: calc(100dvh - var(--bottom-nav-height) - var(--safe-bottom));
  }
}

/* ── Site footer ── */

.site-footer {
  margin-top: auto;
  background: #1a2233;
  color: #b8c0cc;
}

.site-footer__inner {
  padding: clamp(32px, 5vw, 48px) clamp(20px, 4vw, 40px) clamp(24px, 3vw, 32px);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 40px);
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.site-footer__logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: contain;
}

.site-footer__brand p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 320px;
}

.site-footer__col h4 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__col a,
.site-footer__link {
  color: #b8c0cc;
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.15s ease;
}

.site-footer__link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.site-footer__col a:hover,
.site-footer__link:hover {
  color: #ffffff;
}

.site-footer__hours {
  margin: 0 0 14px;
  font-size: 0.92rem;
}

.site-footer__social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-footer__social svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.site-footer__bottom {
  margin-top: clamp(28px, 4vw, 40px);
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.site-footer__bottom p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.6;
}

.site-footer__disclaimer {
  margin-top: 6px !important;
  color: #8b95a5;
  font-size: 0.78rem !important;
}

@media (max-width: 960px) {
  .site-footer {
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom));
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

/* ── Tarjeta de local compacta en móvil (estilo app) ──
   En pantallas chicas las cards pasan de ocupar todo el ancho (imagen grande
   arriba) a una fila horizontal compacta: miniatura cuadrada + datos, igual
   que en la app. Sólo aplica a las grillas, no al carrusel de destacados. */
@media (max-width: 600px) {
  .restaurant-grid {
    gap: 12px;
  }

  .restaurant-grid > .restaurant-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    box-shadow: 0 2px 10px rgba(31, 41, 55, 0.08);
  }

  .restaurant-grid > .restaurant-card .restaurant-card__media {
    position: static;
    width: 88px;
    height: 88px;
    flex: 0 0 88px;
  }

  .restaurant-grid > .restaurant-card .restaurant-card__media .image-shimmer-wrap {
    aspect-ratio: 1 / 1;
    width: 88px;
    height: 88px;
    border-radius: 14px;
    border: 1px solid var(--border);
    line-height: 0;
  }

  .restaurant-grid > .restaurant-card .card-image {
    border-radius: 14px;
  }

  .restaurant-grid > .restaurant-card .restaurant-card__favorite {
    position: absolute;
    top: 8px;
    right: 8px;
  }

  .restaurant-grid > .restaurant-card .restaurant-card__admin-badge {
    position: absolute;
    top: 8px;
    left: 8px;
  }

  .restaurant-grid > .restaurant-card .card-body {
    flex: 1;
    min-width: 0;
    padding: 0;
  }

  .restaurant-grid > .restaurant-card .card-title-row {
    padding-right: 34px;
  }

  .restaurant-grid > .restaurant-card .card-title-row h3 {
    font-size: 0.98rem;
  }
}
