:root {
  --yellow: #F4D83A;
  --orange: #FF751F;
  --green: #1E6F3F;
  --red: #E00000;
  --bg: #f6f3ea;
  --text: #16311f;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
  --shadow-soft: 0 12px 28px rgba(16, 36, 22, 0.08);
  --radius-xl: 34px;
  --radius-lg: 24px;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Nunito', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}
body { min-height: 100vh; }
a, button { text-decoration: none; }
button { font: inherit; cursor: pointer; }

.page-shell {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.nearest-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(244,216,58,0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(255,117,31,0.18), transparent 30%),
    linear-gradient(145deg, #1E6F3F 0%, #185d35 100%);
}
.nearest-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.08));
}
.nearest-content {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 36px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 0 18px;
  color: var(--white);
}
.hero-top {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  min-height: 0;
  margin-bottom: 0;
}
.brand-logo {
  width: min(220px, 42vw);
  height: auto;
  object-fit: contain;
  display: block;
}
.headline {
  margin: 0 0 6px;
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
  max-width: 1040px;
  font-weight: 900;
}
.nearest-store-card {
  position: relative;
  background: rgba(255,255,255,0.98);
  color: var(--text);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
  border: 1px solid rgba(22,49,31,0.06);
}
.nearest-store-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  border-radius: 34px 34px 0 0;
  background: linear-gradient(90deg, var(--green), var(--yellow), var(--orange), var(--red));
}
.nearest-store-card.loading { opacity: 0.95; }
.store-main {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: flex-start;
}
.store-copy {
  min-width: 0;
}
.store-label {
  margin: 0 0 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(22,49,31,0.62);
  font-weight: 900;
}
#nearestName, .store-name {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.store-card .store-name {
  font-size: clamp(1.4rem, 2vw, 1.9rem);
}
.store-address {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(22,49,31,0.82);
}

.store-meta-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.store-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.store-schedule-row {
  display: flex;
  justify-content: center;
}
.store-meta-block.compact {
  margin-top: 10px;
}
.store-card-header {
  width: 100%;
}
.status-pill,
.schedule-pill,
.distance-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(22,49,31,0.05);
}
.status-pill.abierta { background: rgba(30,111,63,0.14); color: var(--green); }
.status-pill.por-cerrar { background: rgba(244,216,58,0.32); color: #725d00; }
.status-pill.cerrada { background: rgba(224,0,0,0.12); color: var(--red); }
.status-pill.neutral { background: rgba(0,0,0,0.08); color: rgba(22,49,31,0.7); }
.schedule-pill { background: rgba(255,117,31,0.14); color: #8a430f; }
.store-schedule-row .schedule-pill {
  min-width: min(100%, 220px);
}
.distance-pill { background: rgba(30,111,63,0.1); color: var(--green); width: fit-content; margin: 0; }
.distance-pill.small { padding: 8px 12px; font-size: 0.92rem; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.promo-card,
.trust-card,
.rewards-card,
.reviews-card {
  border-radius: 24px;
  border: 1px solid rgba(22,49,31,0.06);
  box-shadow: var(--shadow-soft);
}
.promo-card {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, rgba(24,93,53,0.06) 0%, rgba(255,255,255,0.82) 100%);
}
.promo-kicker,
.trust-kicker,
.block-kicker {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(22,49,31,0.55);
}
.promo-title,
.block-gradient-title {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--green) 0%, var(--yellow) 42%, var(--orange) 72%, var(--red) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.promo-sub,
.block-copy,
.trust-copy {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.35;
  color: rgba(22,49,31,0.78);
}
.promo-timer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(22,49,31,0.05);
  box-shadow: inset 0 0 0 1px rgba(22,49,31,0.06);
  font-size: 0.92rem;
  font-weight: 800;
  color: rgba(22,49,31,0.82);
}
.promo-timer strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--yellow), var(--orange));
  color: #2d2200;
  font-weight: 900;
  line-height: 1;
}
.trust-card {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(246,243,234,0.95) 100%);
}
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.trust-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.92rem;
  line-height: 1;
}
.delivery-chip {
  background: rgba(30,111,63,0.10);
  color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(30,111,63,0.12);
}
.points-chip {
  background: rgba(244,216,58,0.18);
  color: #5a4700;
  box-shadow: inset 0 0 0 1px rgba(244,216,58,0.30);
}
.store-actions,
.card-actions {
  display: grid;
  gap: 12px;
}
.four-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.btn,
.carousel-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  padding: 16px 16px;
  font-weight: 900;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
  border: none;
  min-height: 64px;
  text-align: center;
}
.btn:hover,
.carousel-arrow:hover { transform: translateY(-1px); }
.btn-order { background: #e10600; color: #fff; }
.btn-call { background: #f0d33a; color: #1a1a1a; }
.btn-whatsapp { background: #1f6f3d; color: #fff; }
.btn-directions { background: #ff6a1a; color: #fff; }
.btn-order:hover { background: #c30000; }
.btn-call:hover { background: #e4c82f; }
.btn-whatsapp:hover { background: #195b33; }
.btn-directions:hover { background: #ea5f0d; }

.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.rewards-card,
.reviews-card {
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(248,248,245,1) 0%, rgba(244,243,237,1) 100%);
}
.points-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(244,216,58,0.24), rgba(255,117,31,0.20));
  box-shadow: inset 0 0 0 1px rgba(255,117,31,0.16);
  color: #6b3f10;
  font-weight: 900;
  font-size: 0.96rem;
}
.stars {
  display: flex;
  gap: 4px;
  font-size: 1.05rem;
  color: #f4b400;
  letter-spacing: .02em;
  margin-bottom: 10px;
}
.review-score {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
}
.review-score strong {
  font-size: 1.9rem;
  line-height: 1;
  color: var(--text);
}
.review-score span {
  font-size: .98rem;
  color: rgba(22,49,31,.62);
  font-weight: 800;
}

.eyebrow {
  display: inline-flex;
  align-self: flex-start;
  background: rgba(255,255,255,0.12);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 11px 16px;
  border-radius: 999px;
}
.eyebrow-green {
  background: rgba(30,111,63,0.1);
  color: var(--green);
}
.other-stores-section,
.map-section {
  width: min(1280px, calc(100% - 36px));
  margin: 0 auto;
}
.section-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.section-head h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  line-height: 1;
}
.section-head p:last-child {
  margin: 0;
  color: rgba(22,49,31,0.74);
  font-size: 1rem;
}
.carousel-shell {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}
.carousel-arrow {
  width: 52px;
  height: 52px;
  background: var(--green);
  color: var(--white);
  font-size: 2rem;
  box-shadow: var(--shadow);
}
.other-stores-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(320px, 390px);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.other-stores-carousel::-webkit-scrollbar { display: none; }
.store-card {
  scroll-snap-align: start;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 520px;
}
.store-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.map-card {
  background: var(--white);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 14px;
}
.stores-map {
  width: 100%;
  height: 720px;
  border-radius: 22px;
  overflow: hidden;
}
.hero-banner {
  width: min(1200px, calc(100% - 36px));
  margin: 0 auto;
  padding: 0 0 28px;
}
.hero-banner img {
  width: 100%;
  display: block;
  border-radius: 32px;
  box-shadow: var(--shadow);
}
.store-popup h4 { margin: 0 0 6px; font-size: 1rem; }
.store-popup p { margin: 0 0 10px; font-size: 0.92rem; }
.store-popup div { font-size: 0.9rem; margin-bottom: 10px; }
.store-popup a {
  display: inline-flex;
  margin-right: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 800;
}
.store-popup .popup-order { background: var(--red); color: var(--white); }
.store-popup .popup-call { background: var(--yellow); color: #342a00; }
.store-popup .popup-whatsapp { background: var(--green); color: var(--white); }

@media (max-width: 960px) {
  .nearest-content {
    width: min(100%, calc(100% - 24px));
    padding: 6px 0 14px;
  }
  .brand-logo {
    width: min(190px, 48vw);
  }
  .headline {
    font-size: clamp(2rem, 8vw, 3.8rem);
    line-height: 0.96;
    margin: 0 0 4px;
  }

  .nearest-content {
    width: min(100%, calc(100% - 24px));
    padding: 12px 0 22px;
  }
  .brand-logo {
    width: min(230px, 56vw);
  }
  .headline {
    font-size: clamp(2.45rem, 10vw, 4rem);
    line-height: 0.98;
  }
  .store-main {
    flex-direction: column;
    gap: 12px;
  }
  .store-meta-block {
    gap: 6px;
    margin-top: 10px;
  }
  .store-meta-row {
    gap: 8px;
    flex-wrap: nowrap;
  }
  .store-schedule-row {
    justify-content: center;
  }
  .store-schedule-row .schedule-pill {
    min-width: 100%;
  }
  .hero-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }
  .carousel-shell {
    grid-template-columns: 1fr;
  }
  .carousel-arrow {
    display: none;
  }
  .other-stores-section,
  .map-section,
  .hero-banner {
    width: min(100%, calc(100% - 24px));
  }
  .stores-map {
    height: 520px;
  }
}

@media (max-width: 560px) {
  .top-right-actions {
    top: 8px;
    right: 0;
  }
  .floating-app-btn {
    padding: 8px 11px;
    font-size: 0.82rem;
  }
}

/* visual cleanup */
.nearest-content {
  padding-top: 14px;
}
.hero-top {
  padding-right: 170px;
  margin-bottom: 8px;
}
.headline {
  max-width: 720px;
}
.store-main {
  display: block;
}
.store-meta-block {
  margin-top: 14px;
}
.store-meta-row {
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.store-schedule-row {
  justify-content: flex-start;
}
.store-schedule-row .schedule-pill {
  min-width: 0;
}
.promo-card,
.rewards-card,
.reviews-card {
  padding: 18px 20px;
}
.reviews-card .block-copy {
  margin-top: 6px;
}
.section-head {
  margin-bottom: 14px;
}
.section-head h3 {
  font-size: clamp(1.3rem, 2.6vw, 2rem);
}
.hero-banner img {
  object-fit: cover;
}

@media (max-width: 768px) {
  .hero-top {
    padding-right: 150px;
    margin-bottom: 6px;
  }
  .headline {
    max-width: 100%;
    margin-bottom: 6px;
  }
}

@media (max-width: 560px) {
  .nearest-content {
    padding-top: 10px;
  }
  .hero-top {
    padding-right: 136px;
    margin-bottom: 4px;
  }
  .brand-logo {
    width: min(178px, 42vw);
  }
  .headline {
    font-size: clamp(2.05rem, 9.8vw, 3rem);
    line-height: .98;
  }
  .nearest-store-card {
    padding: 22px 18px 18px;
    gap: 14px;
  }
  #nearestName {
    font-size: clamp(2.1rem, 10.6vw, 3rem);
  }
  .store-meta-row .distance-pill,
  .store-meta-row .status-pill {
    font-size: .9rem;
    padding: 9px 12px;
  }
  .store-schedule-row .schedule-pill {
    font-size: .92rem;
    padding: 9px 12px;
  }
  .promo-title,
  .block-gradient-title {
    font-size: 1.55rem;
  }
}
