/* Estilos generales y estructura visual principal de PediYun. */
/* ==========================================================================
   PEDIYUN — Estilos base
   ========================================================================== */

:root {
  --pediyun: #FF5A1F;
  --pediyun-dark: #E14A0F;
  --pediyun-light: #FFF1EA;
  --pediyun-light2: #FFE4D6;
  --dark: #1B1B1F;
  --gray-900: #1F2937;
  --gray-700: #374151;
  --gray-500: #6B7280;
  --gray-300: #D1D5DB;
  --gray-200: #E5E7EB;
  --gray-100: #F3F4F6;
  --gray-50: #FAFAFA;
  --white: #FFFFFF;
  --green: #16A34A;
  --green-bg: #DCFCE7;
  --red: #DC2626;
  --red-bg: #FEE2E2;
  --yellow-bg: #FEF9C3;
  --yellow-text: #854D0E;
  --blue-bg: #DBEAFE;
  --blue-text: #1E40AF;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 48px rgba(0,0,0,0.14);
  --max-width: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--dark);
  background: var(--gray-50);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, h5 { margin: 0; font-weight: 800; letter-spacing: -0.01em; }

p { margin: 0; line-height: 1.55; color: var(--gray-700); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 48px 0; }
.section-sm { padding: 28px 0; }
/* .section pisaba el margen lateral de .container: se lo devolvemos cuando van juntas */
.section.container, .section-sm.container { padding-left: 16px; padding-right: 16px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.section-head h2 { font-size: 22px; }

.link-more { color: var(--pediyun); font-weight: 700; font-size: 14px; white-space: nowrap; }

/* -------------------- Botones -------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease, opacity .12s ease;
  font-family: inherit;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--pediyun); color: #fff; box-shadow: 0 6px 16px rgba(255,90,31,0.28); }
.btn-primary:hover { background: var(--pediyun-dark); }

.btn-ghost { background: #fff; color: var(--dark); border: 1.5px solid var(--gray-200); }
.btn-ghost:hover { border-color: var(--pediyun); color: var(--pediyun); }

.btn-secondary { background: var(--gray-100); color: var(--dark); }
.btn-secondary:hover { background: var(--gray-200); }

.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-danger:hover { background: #fecaca; }

.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 15px 30px; font-size: 16px; border-radius: 14px; }
.btn.is-added { background: var(--green); }

.icon-btn {
  position: relative;
  background: transparent;
  border: none;
  font-size: 19px;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
}
.icon-btn:hover { background: var(--gray-100); }

/* -------------------- Navbar -------------------- */

.navbar {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.brand-icon { font-size: 26px; }
.brand-name { font-size: 22px; font-weight: 900; color: var(--pediyun); }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  margin-left: auto;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}

.nav-link {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--gray-700);
  padding: 8px 4px;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.is-active { color: var(--pediyun); }

.navbar-search {
  flex: 1;
  max-width: 380px;
  display: flex;
  background: var(--gray-100);
  border-radius: 12px;
  overflow: hidden;
}
.navbar-search input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.navbar-search button {
  border: none;
  background: transparent;
  padding: 0 14px;
  cursor: pointer;
  font-size: 15px;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.badge-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--pediyun);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 50%;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
}

.avatar-circle {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--pediyun-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}

.user-menu { position: relative; }
.user-menu-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--gray-100);
  border: none;
  border-radius: 30px;
  padding: 5px 10px 5px 5px;
  cursor: pointer;
  font-family: inherit;
}
.user-menu-name { font-weight: 700; font-size: 13.5px; }
.chevron { font-size: 10px; color: var(--gray-500); }

.user-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  width: 200px;
  padding: 8px;
  display: none;
  flex-direction: column;
  z-index: 50;
}
.user-menu-dropdown.is-open { display: flex; }
.user-menu-dropdown a, .user-menu-dropdown button {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--dark);
}
.user-menu-dropdown a:hover, .user-menu-dropdown button:hover { background: var(--gray-100); }
.user-menu-dropdown button#logout-btn { color: var(--red); }

.notif-panel {
  position: absolute;
  right: 20px;
  top: 60px;
  width: 300px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 8px;
  display: none;
  flex-direction: column;
  z-index: 60;
  max-height: 340px;
  overflow-y: auto;
}
.notif-panel.is-open { display: flex; }
.notif-item { padding: 10px 12px; font-size: 13.5px; border-radius: 10px; color: var(--gray-700); }
.notif-item.is-unread { background: var(--pediyun-light); font-weight: 600; color: var(--dark); }

/* -------------------- Footer -------------------- */

.footer { background: var(--dark); color: #cfcfd4; margin-top: 60px; }
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 20px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
}
.footer-tagline { color: #9CA3AF; margin-top: 10px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-col a { display: block; color: #9CA3AF; font-size: 14px; padding: 5px 0; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 20px;
  text-align: center;
  font-size: 12.5px;
  color: #6B7280;
}

/* -------------------- Hero -------------------- */

.hero {
  background: linear-gradient(135deg, var(--pediyun-light) 0%, #fff 60%);
  padding: 64px 0;
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
}
.hero h1 { font-size: 44px; line-height: 1.1; margin-bottom: 16px; }
.hero h1 span { color: var(--pediyun); }
.hero p.hero-sub { font-size: 17px; margin-bottom: 26px; max-width: 460px; }
.hero-search {
  display: flex;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 6px;
  max-width: 480px;
}
.hero-search input {
  flex: 1;
  border: none;
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
  font-family: inherit;
  border-radius: 12px;
}
.hero-visual {
  font-size: 9rem;
  text-align: center;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.1));
}

/* -------------------- Categorías -------------------- */

.category-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.category-chip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: 16px;
  padding: 16px 18px;
  min-width: 92px;
  cursor: pointer;
  transition: all .15s ease;
  font-family: inherit;
}
.category-chip:hover, .category-chip.is-active { border-color: var(--pediyun); box-shadow: 0 4px 14px rgba(255,90,31,0.15); }
.category-chip span.emoji { font-size: 26px; }
.category-chip span.label { font-size: 12px; font-weight: 700; text-align: center; }

/* -------------------- Grids -------------------- */

.grid-locales {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.grid-products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

/* -------------------- Tarjetas de local -------------------- */

.local-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: box-shadow .15s ease, transform .15s ease;
  display: block;
}
.local-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.local-card-image {
  height: 120px;
  background: var(--pediyun-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 46px;
  position: relative;
}
.local-card-closed {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.45);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  pointer-events: none; /* para que el cartel no tape el corazón de favoritos */
}
.fav-btn {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,0.9);
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  color: var(--gray-500);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.fav-btn.is-active { color: var(--pediyun); }
.local-card-body { padding: 14px 16px; }
.local-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.local-card-top h3 { font-size: 15.5px; }
.local-card-category { font-size: 12.5px; color: var(--gray-500); margin-bottom: 10px; }
.local-card-meta { display: flex; gap: 12px; font-size: 12.5px; color: var(--gray-700); font-weight: 600; }

/* -------------------- Badges -------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-gray { background: var(--gray-100); color: var(--gray-500); }
.badge-yellow { background: var(--yellow-bg); color: var(--yellow-text); }
.badge-blue { background: var(--blue-bg); color: var(--blue-text); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-orange { background: var(--pediyun-light); color: var(--pediyun-dark); }

/* -------------------- Product cards -------------------- */

.product-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .15s ease;
}
.product-card:hover { box-shadow: var(--shadow-sm); }
.product-card-image {
  height: 90px;
  background: var(--gray-50);
  display: flex; align-items: center; justify-content: center;
  font-size: 34px;
}
.product-card-body { padding: 14px; }
.product-card-body h4 { font-size: 14.5px; margin-bottom: 4px; }
.product-card-body p { font-size: 12.5px; color: var(--gray-500); min-height: 32px; margin-bottom: 10px; }
.product-card-bottom { display: flex; align-items: center; justify-content: space-between; }
.product-price { font-weight: 800; color: var(--pediyun); font-size: 15px; }

/* -------------------- Cómo funciona -------------------- */

.how-it-works {
  background: #fff;
  border-top: 1px solid var(--gray-200);
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  text-align: center;
  padding: 56px 0;
}
.how-step .how-icon { font-size: 40px; margin-bottom: 12px; }
.how-step h3 { font-size: 16px; margin-bottom: 6px; }

/* -------------------- Página genérica / breadcrumb -------------------- */

.page-header {
  padding: 32px 0 12px;
}
.page-header h1 { font-size: 26px; }
.breadcrumb { font-size: 13px; color: var(--gray-500); margin-bottom: 10px; }
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--pediyun); }

/* -------------------- Empty state -------------------- */

.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--gray-500);
}
.empty-state .emoji { font-size: 50px; margin-bottom: 14px; }
.empty-state h3 { color: var(--dark); margin-bottom: 8px; }

/* -------------------- Skeleton / loading -------------------- */

.spinner {
  width: 22px; height: 22px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--pediyun);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 80px 20px;
}
.loading-screen .spinner-lg {
  width: 54px; height: 54px;
  border: 5px solid var(--gray-200);
  border-top-color: var(--pediyun);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}


/* ==========================================================================\n   PEDIYUN — Refresh visual 2026\n   Dirección: minimalismo cálido + azul cielo de servicio\n   ========================================================================== */
:root {
  --pediyun: #ff5a1f;
  --pediyun-dark: #d94716;
  --pediyun-light: #fff1ea;
  --pediyun-light2: #ffe1d3;
  --sky: #35b9e8;
  --sky-dark: #168fbe;
  --sky-light: #e9f8fd;
  --sky-soft: #f3fbfe;
  --dark: #102337;
  --gray-900: #172b3f;
  --gray-700: #4d6173;
  --gray-500: #788b9a;
  --gray-300: #cbd7df;
  --gray-200: #e3ebf0;
  --gray-100: #f1f6f8;
  --gray-50: #f8fbfc;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 10px rgba(16,35,55,.05);
  --shadow-md: 0 12px 30px rgba(16,35,55,.09);
  --shadow-lg: 0 24px 60px rgba(16,35,55,.16);
}

body { background: linear-gradient(180deg, #f8fbfc 0%, #f5f9fb 100%); color: var(--dark); }

.navbar { background: rgba(255,255,255,.94); border-bottom: 1px solid rgba(203,215,223,.75); box-shadow: 0 4px 18px rgba(16,35,55,.04); backdrop-filter: blur(14px); }
.navbar-inner { padding-top: 14px; padding-bottom: 14px; }
.brand-icon { color: var(--sky); filter: saturate(.9); }
.brand-name { color: var(--dark); letter-spacing: -.04em; }
.brand-name::after { content: '.'; color: var(--sky); }
.nav-link { color: var(--gray-700); }
.nav-link:hover, .nav-link.is-active { color: var(--sky-dark); }
.navbar-search { background: var(--gray-100); border: 1px solid transparent; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.navbar-search:focus-within { background: #fff; border-color: var(--sky); box-shadow: 0 0 0 4px rgba(53,185,232,.12); }

.btn { border-radius: 12px; letter-spacing: -.01em; box-shadow: none; }
.btn-primary { background: var(--pediyun); box-shadow: 0 8px 18px rgba(255,90,31,.2); }
.btn-primary:hover { background: var(--pediyun-dark); box-shadow: 0 10px 22px rgba(255,90,31,.25); transform: translateY(-1px); }
.btn-ghost:hover { border-color: var(--sky); color: var(--sky-dark); background: var(--sky-soft); }

.hero { position: relative; overflow: hidden; background: linear-gradient(120deg, #e9f8fd 0%, #f7fcfe 48%, #fff 100%); padding: 78px 0 72px; border-bottom: 1px solid #d9edf4; }
.hero::before { content: ''; position: absolute; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%; background: rgba(53,185,232,.15); }
.hero::after { content: ''; position: absolute; width: 180px; height: 180px; left: 4%; bottom: -100px; border-radius: 50%; border: 22px solid rgba(53,185,232,.11); }
.hero-inner { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(36px, 4vw, 52px); letter-spacing: -.055em; color: var(--dark); }
.hero h1 span { color: var(--sky-dark); }
.hero p.hero-sub { color: var(--gray-700); }
.hero-search { border: 1px solid rgba(53,185,232,.2); box-shadow: 0 16px 34px rgba(16,35,55,.1); }
.hero-search:focus-within { box-shadow: 0 0 0 4px rgba(53,185,232,.13), 0 16px 34px rgba(16,35,55,.1); }
.hero-visual { filter: drop-shadow(0 24px 24px rgba(22,143,190,.18)); }

.section-head h2 { letter-spacing: -.04em; }
.link-more { color: var(--sky-dark); }
.link-more:hover { color: var(--pediyun); }
.category-chip { border-color: var(--gray-200); box-shadow: 0 2px 8px rgba(16,35,55,.03); }
.category-chip:hover, .category-chip.is-active { border-color: var(--sky); box-shadow: 0 8px 20px rgba(53,185,232,.16); background: var(--sky-soft); }

.local-card, .product-card { border-color: rgba(203,215,223,.8); box-shadow: 0 2px 10px rgba(16,35,55,.035); }
.local-card:hover, .product-card:hover { box-shadow: 0 14px 30px rgba(16,35,55,.1); transform: translateY(-3px); }
.local-card-image { background: linear-gradient(135deg, var(--sky-light), #fff); }
.product-card-image { background: linear-gradient(135deg, #f5fafc, #fff); }
.product-price { color: var(--sky-dark); }
.fav-btn:hover { color: var(--pediyun); background: #fff; }

.how-it-works { background: #fff; border-top: 1px solid #e4eef2; }
.how-step .how-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; background: var(--sky-light); box-shadow: inset 0 0 0 1px rgba(53,185,232,.14); }
.how-step h3 { color: var(--dark); }

.page-header { padding-top: 42px; }
.page-header h1 { letter-spacing: -.045em; }
.breadcrumb a:hover { color: var(--sky-dark); }

.footer { background: #102337; }
.avatar-circle, .profile-avatar-lg, .courier-avatar { background: var(--sky-light); }

@media (prefers-reduced-motion: no-preference) {
  .local-card, .product-card, .btn { transition: transform .18s cubic-bezier(.23,1,.32,1), box-shadow .18s ease, background .18s ease, border-color .18s ease; }
}


/* Imágenes de locales y productos */
.local-card-image img, .product-card-image img { width: 100%; height: 100%; object-fit: cover; }
.local-card-image img { position: absolute; inset: 0; }
.local-card-image .local-card-fallback, .product-card-image .product-card-fallback { position: relative; z-index: 1; display: none; }
.local-card-image:has(img:not([style*="display: none"])) .local-card-fallback, .product-card-image:has(img:not([style*="display: none"])) .product-card-fallback { display: none; }
/* Sin foto: mostrar el emoji de la categoría en vez de un recuadro vacío */
.local-card-image:not(:has(img)) .local-card-fallback { display: inline; }
.product-card-image:not(:has(img)) .product-card-fallback { display: inline; }
.product-card-image { position: relative; overflow: hidden; }
.product-card-image img { position: absolute; inset: 0; }
.product-card-image::after, .local-card-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(16,35,55,.08)); pointer-events: none; }


/* Ajuste de paleta: azul suavizado para una apariencia menos intensa */
:root {
  --sky: #5b72c4;
  --sky-dark: #4258a3;
  --sky-light: #eef1fc;
  --sky-soft: #f7f8fe;
}
.hero { background: linear-gradient(120deg, #eef1fc 0%, #f8f9fe 48%, #fff 100%); border-bottom-color: #e1e6f5; }
.hero::before { background: rgba(91,114,196,.12); }
.hero::after { border-color: rgba(91,114,196,.1); }
.navbar-search:focus-within { box-shadow: 0 0 0 4px rgba(91,114,196,.11); }
.hero-search { border-color: rgba(91,114,196,.18); }
.hero-search:focus-within { box-shadow: 0 0 0 4px rgba(91,114,196,.11), 0 16px 34px rgba(16,35,55,.1); }
.category-chip:hover, .category-chip.is-active { box-shadow: 0 8px 20px rgba(91,114,196,.13); }
.how-step .how-icon { box-shadow: inset 0 0 0 1px rgba(91,114,196,.12); }


/* Hero visual: pedido en camino */
.hero::before, .hero::after { display: none; }
.hero-visual { font-size: initial; text-align: initial; filter: none; }
.hero-order-card { position: relative; max-width: 410px; margin: 0 auto; padding: 22px; background: rgba(255,255,255,.9); border: 1px solid rgba(91,114,196,.16); border-radius: 24px; box-shadow: 0 24px 54px rgba(41,61,117,.16); transform: rotate(2deg); }
.hero-order-card::after { content: ''; position: absolute; width: 72px; height: 72px; right: -24px; bottom: -22px; border-radius: 20px; background: var(--sky); opacity: .12; z-index: -1; }
.hero-order-top, .hero-order-footer, .hero-order-progress { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hero-order-label { color: var(--gray-500); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.hero-order-status { padding: 6px 10px; border-radius: 999px; background: #e9f7ef; color: #24804b; font-size: 12px; font-weight: 800; }
.hero-order-main { display: flex; align-items: center; gap: 14px; margin: 20px 0; text-align: left; }
.hero-food-image { width: 86px; height: 86px; flex: 0 0 86px; overflow: hidden; border-radius: 18px; background: var(--sky-light); }
.hero-food-image img { width: 100%; height: 100%; object-fit: cover; }
.hero-order-main strong, .hero-order-main span { display: block; }
.hero-order-main strong { margin-bottom: 5px; color: var(--dark); font-size: 17px; }
.hero-order-main span { color: var(--gray-500); font-size: 13px; line-height: 1.4; }
.hero-order-progress { position: relative; justify-content: flex-start; padding: 13px 0 6px; border-top: 1px solid var(--gray-100); color: var(--gray-500); font-size: 11px; font-weight: 700; }
.hero-progress-line { position: relative; flex: 1; height: 5px; margin: 0 4px; border-radius: 999px; background: var(--gray-200); overflow: hidden; }
.hero-progress-line i { display: block; width: 70%; height: 100%; border-radius: inherit; background: var(--sky); }
.hero-order-progress strong { color: var(--sky-dark); font-size: 14px; margin-left: auto; }
.hero-order-footer { padding-top: 14px; border-top: 1px dashed var(--gray-200); color: var(--gray-500); font-size: 11.5px; }
.hero-order-footer span:last-child { color: var(--sky-dark); font-weight: 700; }

@media (prefers-reduced-motion: no-preference) {
  .hero-order-card { animation: hero-card-float 4.5s ease-in-out infinite; }
}
@keyframes hero-card-float { 0%, 100% { transform: rotate(2deg) translateY(0); } 50% { transform: rotate(2deg) translateY(-6px); } }





/* Hero con animación 3D de canvas proporcionada por el usuario */
.hero-animation-visual { position: relative; min-height: 400px; display: flex; align-items: center; justify-content: center; overflow: visible; }
.hero-animation-visual #container { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-origin: center center; }
.hero-animation-visual canvas { position: absolute; display: block; pointer-events: none; }




/* Logo gráfico de Pediyun */
.brand { gap: 9px; }
.brand-icon { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 8px; color: transparent; filter: none; }
.brand-icon img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.footer .brand-icon { width: 34px; height: 34px; border-radius: 9px; }
.footer .brand-name { color: #fff; } /* el nombre de la marca era oscuro sobre fondo oscuro */



/* Hero con mapa de repartidores */
.hero-map-visual { position: relative; min-height: 400px; display: flex; align-items: center; justify-content: center; overflow: visible; }
.hero-map-card { width: min(100%, 530px); padding: 12px; border: 1px solid rgba(91,114,196,.17); border-radius: 24px; background: rgba(255,255,255,.9); box-shadow: 0 24px 54px rgba(41,61,117,.14); transform: rotate(1deg); }
.hero-map-head, .hero-map-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 8px 10px; color: var(--gray-500); font-size: 11px; font-weight: 800; }
.hero-map-head strong { color: var(--dark); font-size: 12px; }
.map-live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #38a169; box-shadow: 0 0 0 4px rgba(56,161,105,.12); }
.hero-map-stage { position: relative; height: 330px; overflow: hidden; border-radius: 17px; background: #f5f7fb; }
.hero-map-stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(135deg, rgba(238,241,252,.16), transparent 42%, rgba(255,255,255,.12)); }
.hero-map-stage img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 42%; filter: saturate(.82) contrast(.96); }
#delivery-map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.map-location-pin { position: absolute; z-index: 2; width: 15px; height: 15px; border: 3px solid #fff; border-radius: 50%; background: var(--pediyun); color: transparent; box-shadow: 0 4px 10px rgba(217,119,6,.32); }
.map-pin-one { left: 52%; top: 45%; }
.map-pin-two { left: 65%; top: 29%; }
.hero-map-foot { padding: 10px 8px 3px; font-size: 10px; font-weight: 700; }
.hero-map-foot span { display: inline-flex; align-items: center; gap: 5px; }
.hero-map-foot strong { color: var(--sky-dark); font-size: 12px; }
.map-key { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.map-key-blue { background: var(--sky); box-shadow: 0 0 0 3px rgba(91,114,196,.12); }
.map-key-orange { background: var(--pediyun); box-shadow: 0 0 0 3px rgba(217,119,6,.12); }
@media (prefers-reduced-motion: no-preference) { .hero-map-card { animation: map-card-float 5.5s ease-in-out infinite; } }
@keyframes map-card-float { 0%, 100% { transform: rotate(1deg) translateY(0); } 50% { transform: rotate(1deg) translateY(-4px); } }




/* Mapa libre a pantalla amplia en el hero */
.hero-map-visual { position: relative; min-height: 455px; width: 100%; display: block; overflow: hidden; border: 0; border-radius: 0; box-shadow: none; filter: none; }
.hero-map-visual::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(247,252,254,.56), transparent 24%, transparent 80%, rgba(255,255,255,.18)); }
.hero-map-visual > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 47%; filter: saturate(.78) contrast(.96); }
#delivery-map-canvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }


@media (prefers-reduced-motion: reduce) { #delivery-map-canvas { opacity: .7; } }


/* El mapa ocupa todo el banner, sin tarjeta ni marco */
.hero { min-height: 470px; padding: 0; background: #f7fcfe; }
.hero-inner { position: relative; display: block; max-width: none; min-height: 470px; padding: 0; }
.hero-inner > div:first-child { position: relative; z-index: 3; max-width: var(--max-width); margin: 0 auto; padding: 118px 20px 86px; }
.hero-map-visual { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; min-height: 0; opacity: .94; }
.hero-map-visual::after { background: linear-gradient(90deg, rgba(247,252,254,.97) 0%, rgba(247,252,254,.84) 25%, rgba(247,252,254,.18) 52%, rgba(255,255,255,.04) 100%); }
.hero-map-visual > img { object-position: center 47%; filter: saturate(.78) contrast(.95); }



/* Encuadre urbano: más ciudad, menos campo; imagen y puntos se desplazan juntos */
.hero-map-visual > img, .hero-map-visual > #delivery-map-canvas { transform: scale(1.22) translateX(4%); transform-origin: 47% 45%; }



/* Hero estático: solo mapa, sin puntos ni capas de animación */
.hero-map-visual > img { transform: none; object-position: 0% 30%; }
.hero-map-visual > #delivery-map-canvas { display: none; }

/* ==========================================================================
   PEDIYUN — Mobile first: base para teléfonos
   Los tamaños mayores se amplían desde responsive.css con min-width.
   ========================================================================== */

html, body { max-width: 100%; overflow-x: hidden; }

.container { width: 100%; padding-left: 16px; padding-right: 16px; }
.section { padding: 36px 0; }
.section-sm { padding: 22px 0; }
.section-head { align-items: flex-start; gap: 10px; }
.section-head h2 { font-size: 20px; }

/* Navbar móvil como estado base */
.navbar-inner { padding: 11px 16px; gap: 10px; }
.brand-name { font-size: 20px; }
.brand-icon { width: 28px; height: 28px; }
.mobile-toggle { display: block; }
.navbar-links {
  position: fixed;
  top: 58px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 18px 16px 28px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 18px 32px rgba(16,35,55,.1);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .2s ease;
}
.navbar-links.is-open { transform: translateX(0); }
.navbar-search { width: 100%; max-width: none; order: -1; }
.navbar-right { width: 100%; flex-direction: column; align-items: stretch; margin-left: 0; gap: 8px; }
.navbar-right .btn { width: 100%; }
.user-menu-dropdown { position: static; width: 100%; margin-top: 6px; box-shadow: none; }
.notif-panel { position: fixed; top: 66px; right: 10px; left: 10px; width: auto; max-height: calc(100vh - 86px); }

/* Footer */
.footer { margin-top: 40px; }
.footer-inner { grid-template-columns: 1fr; gap: 24px; padding: 38px 16px 22px; }

/* Hero móvil */
.hero, .hero-inner { min-height: 560px; }
.hero { padding: 0; }
.hero-inner { display: block; max-width: none; padding: 0; }
.hero-inner > div:first-child { padding: 62px 16px 28px; }
.hero h1 { font-size: clamp(30px, 9vw, 38px); line-height: 1.08; }
.hero p.hero-sub { font-size: 15px; max-width: 100%; }
.hero-search { width: 100%; max-width: 100%; flex-direction: column; gap: 6px; padding: 8px; }
.hero-search input { min-width: 0; width: 100%; min-height: 44px; }
.hero-search .btn { width: 100%; }
.hero-visual { font-size: 5rem; margin-top: 8px; }
.hero-order-card { width: 100%; max-width: 100%; padding: 17px; border-radius: 20px; transform: none; }
.hero-food-image { width: 70px; height: 70px; flex-basis: 70px; }
.hero-order-main { margin: 16px 0; }
.hero-order-progress { gap: 6px; }
.hero-order-footer { align-items: flex-start; flex-direction: column; gap: 4px; }
.hero-animation-visual { min-height: 300px; margin-top: 8px; }
.hero-map-visual { min-height: 0; height: 100%; margin-top: 0; }
.hero-map-visual::after { background: linear-gradient(180deg, rgba(247,252,254,.98) 0%, rgba(247,252,254,.82) 38%, rgba(255,255,255,.08) 78%, rgba(255,255,255,.18) 100%); }
.hero-map-visual > img, .hero-map-visual > #delivery-map-canvas { transform: none; transform-origin: 48% 46%; }
.hero-map-stage { height: 230px; border-radius: 14px; }
.hero-map-card { padding: 9px; border-radius: 20px; transform: none; }
.hero-map-foot { gap: 6px; padding-inline: 4px; font-size: 9px; }
.hero-map-foot span:nth-child(2) { display: none; }

/* Contenido principal */
.category-scroll { gap: 10px; }
.category-chip { min-width: 84px; padding: 13px 14px; }
.grid-locales, .grid-products { grid-template-columns: 1fr; gap: 14px; }
.local-card-image { height: 145px; }
.product-card-image { height: 120px; }
.product-card-bottom { gap: 8px; flex-wrap: wrap; }
.how-grid { grid-template-columns: 1fr; gap: 28px; padding: 38px 0; }
.page-header { padding-top: 28px; }
.page-header h1 { font-size: 24px; }
.empty-state { padding: 50px 16px; }

/* Detalle de local */
.local-detail-inner { align-items: flex-start; padding-top: 26px; padding-bottom: 26px; gap: 14px; }
.local-detail-icon { width: 64px; height: 64px; font-size: 32px; border-radius: 18px; }


/* -------------------- Detalle de producto -------------------- */
.product-card-clickable { cursor: pointer; }
.product-card-clickable:focus-visible { outline: 3px solid rgba(31, 153, 201, .28); outline-offset: 3px; }
.product-card-weight { min-height: auto !important; margin-bottom: 10px !important; }
body.product-detail-open { overflow: hidden; }
.product-detail-modal { position: fixed; inset: 0; z-index: 3000; display: none; align-items: center; justify-content: center; padding: 20px; }
.product-detail-modal.is-open { display: flex; }
.product-detail-backdrop { position: absolute; inset: 0; background: rgba(16, 35, 55, .58); backdrop-filter: blur(3px); }
.product-detail-dialog { position: relative; z-index: 1; width: min(760px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 22px; box-shadow: 0 24px 70px rgba(16,35,55,.24); }
.product-detail-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255,255,255,.94); box-shadow: 0 2px 12px rgba(16,35,55,.14); font-size: 27px; line-height: 1; cursor: pointer; color: var(--gray-700); }
.product-detail-layout { display: grid; grid-template-columns: minmax(260px, .95fr) 1.05fr; }
.product-detail-image { min-height: 390px; background: linear-gradient(135deg, #f5fafc, #fff); display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 22px 0 0 22px; }
.product-detail-image img { width: 100%; height: 100%; min-height: 390px; object-fit: cover; }
.product-detail-fallback { width: 100%; min-height: 390px; align-items: center; justify-content: center; font-size: 72px; }
.product-detail-info { padding: 40px 34px 32px; display: flex; flex-direction: column; }
.product-detail-local { margin: 0 0 5px; color: var(--gray-500); font-size: 13px; font-weight: 700; }
.product-detail-info h2 { margin: 0; font-size: 25px; line-height: 1.2; }
.product-detail-meta { display: flex; gap: 9px 12px; flex-wrap: wrap; align-items: center; margin: 14px 0 18px; font-size: 13px; color: var(--gray-600); }
.product-detail-unit-price { color: var(--pediyun); font-weight: 800; font-size: 16px; }
.product-detail-description { color: var(--gray-600); line-height: 1.55; margin-bottom: 20px; }
.product-detail-purchase { margin-top: auto; border-top: 1px solid var(--gray-200); padding-top: 20px; display: flex; justify-content: space-between; gap: 24px; align-items: end; }
.product-detail-label { display: block; font-size: 12px; font-weight: 800; color: var(--gray-500); margin-bottom: 7px; text-transform: uppercase; letter-spacing: .04em; }
.product-quantity-control { display: grid; grid-template-columns: 40px 54px 40px; border: 1px solid var(--gray-200); border-radius: 12px; overflow: hidden; height: 42px; }
.product-quantity-control button { border: 0; background: var(--gray-50); cursor: pointer; font-size: 22px; color: var(--dark); }
.product-quantity-control button:hover { background: var(--gray-100); }
.product-quantity-control input { width: 54px; border: 0; border-left: 1px solid var(--gray-200); border-right: 1px solid var(--gray-200); text-align: center; font: inherit; font-weight: 800; outline: none; appearance: textfield; }
.product-quantity-control input::-webkit-outer-spin-button, .product-quantity-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.product-detail-total-box { text-align: right; }
.product-detail-total-box span { display: block; color: var(--gray-500); font-size: 12px; margin-bottom: 4px; }
.product-detail-total-box strong { display: block; color: var(--pediyun); font-size: 24px; line-height: 1; }
.product-detail-add { width: 100%; margin-top: 22px; min-height: 46px; }
.product-detail-add:disabled { cursor: not-allowed; opacity: .55; }

@media (max-width: 650px) {
  .product-detail-modal { padding: 0; align-items: flex-end; }
  .product-detail-dialog { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; }
  .product-detail-layout { grid-template-columns: 1fr; }
  .product-detail-image { min-height: 230px; height: 230px; border-radius: 22px 22px 0 0; }
  .product-detail-image img { min-height: 230px; height: 230px; }
  .product-detail-fallback { min-height: 230px; }
  .product-detail-info { padding: 25px 22px 24px; }
  .product-detail-info h2 { font-size: 22px; }
  .product-detail-purchase { align-items: center; }
  .product-detail-total-box strong { font-size: 22px; }
}
