:root {
  --ink: #14201a;
  --ink-soft: #2a3830;
  --muted: #5a675f;
  --accent: #163528;
  --accent-2: #2f5d45;
  --cream: #f7f8f5;
  --paper: #ffffff;
  --line: #d7ded8;
  --soft: #e8eee9;
  --danger: #8b3a2a;
  --shadow: 0 14px 32px rgba(20, 32, 26, 0.08);
  --radius: 14px;
  --display: "Literata", Georgia, serif;
  --sans: "Figtree", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  touch-action: manipulation;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(900px 380px at 0% -10%, rgba(47, 93, 69, 0.12), transparent 55%),
    radial-gradient(700px 320px at 100% 0%, rgba(22, 53, 40, 0.08), transparent 50%),
    linear-gradient(180deg, #fbfcfa 0%, var(--cream) 48%, #eef2ef 100%);
  letter-spacing: 0.01em;
  overscroll-behavior-y: none;
}

img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.pwa-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.pwa-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.pwa-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--accent);
}
.pwa-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.05;
}
.pwa-brand-text strong {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
}
.pwa-brand-text span {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 700;
}

.pwa-top-actions { display: flex; gap: 6px; }
.pwa-icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pwa-icon-btn:active { transform: scale(0.96); }

.page {
  flex: 1;
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 16px 16px calc(96px + env(safe-area-inset-bottom, 0px));
}

.pwa-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}

.pwa-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  border-radius: 12px;
}
.pwa-tab.active { color: var(--accent); }
.pwa-tab:active { background: rgba(22, 53, 40, 0.06); }

.kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.page-title, .hero-copy h1, .detail-body h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.page-title { font-size: clamp(1.8rem, 6vw, 2.4rem); }
.lede, .app-sub, .desc, .meta {
  color: var(--muted);
  line-height: 1.45;
}
.lede { margin: 10px 0 0; font-size: 1rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
}
.btn.wide { width: 100%; }
.btn.mini { min-height: 40px; padding: 0 14px; font-size: 13px; }
.btn.accent {
  background: var(--accent);
  color: #fff;
}
.btn.accent:active { background: #10261c; }
.btn.ghost {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hero-app {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}
.hero-copy h1 { font-size: clamp(2.4rem, 10vw, 3.4rem); }
.hero-ctas, .detail-actions, .app-home-actions, .hero-copy .app-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.hero-media {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trust {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 8px 0 22px;
}
.trust div {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.trust strong { font-size: 0.92rem; }
.trust span { color: var(--muted); font-size: 0.85rem; }

.section-tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.section-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  min-height: 72px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.section-tile strong {
  font-family: var(--display);
  font-size: 1.15rem;
}
.section-tile span { color: var(--muted); font-size: 0.88rem; }

@media (min-width: 560px) {
  .hero-app { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
  .trust { grid-template-columns: repeat(3, 1fr); }
  .section-tiles { grid-template-columns: repeat(3, 1fr); }
}

.block { margin-bottom: 28px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.section-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 600;
}
.section-head a {
  color: var(--accent-2);
  font-weight: 600;
  font-size: 0.9rem;
}

.grid,
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 640px) {
  .grid, .catalog-grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.card-media {
  position: relative;
  aspect-ratio: 1;
  background: var(--soft);
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-ph {
  width: 100%;
  height: 100%;
  min-height: 140px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(47, 93, 69, 0.18), transparent 55%),
    linear-gradient(180deg, #dfe6df, #c9d2c8);
}
.card-ph span {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--accent) 60%, #fff);
}
.card-ph.tall { min-height: 280px; }
.pill {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 8px;
}
.pill.soon { background: var(--ink-soft); }
.card-body {
  padding: 12px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.card-body h3 {
  margin: 0;
  font-size: 1rem;
  font-family: var(--display);
  font-weight: 600;
}
.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.card-body strong { margin-top: 4px; font-size: 0.95rem; color: var(--accent); }
.card > .btn {
  margin: 8px 12px 12px;
  border-radius: 12px;
  min-height: 44px;
  font-size: 0.88rem;
}
.card.is-soon { opacity: 0.96; }

.chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.app-search { margin: 0 0 14px; }
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  min-height: 48px;
}
.search-field input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  min-width: 0;
  font-size: 1rem;
}
.search-clear {
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  padding: 4px 6px;
}

.steps {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.steps span {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}
.steps strong { display: block; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.muted-block .soon-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.soon-list span {
  background: rgba(22, 53, 40, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.product-detail { display: flex; flex-direction: column; gap: 14px; }
.back {
  font-weight: 600;
  color: var(--accent-2);
  font-size: 0.92rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.detail-media {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--soft);
  aspect-ratio: 1;
  box-shadow: var(--shadow);
}
.detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-body h1 { font-size: clamp(2rem, 7vw, 2.6rem); margin-top: 4px; }
.price {
  display: block;
  margin: 10px 0;
  font-size: 1.35rem;
  color: var(--accent);
  font-family: var(--display);
}
.extra-note {
  margin-top: 18px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(47, 93, 69, 0.08);
  border: 1px solid rgba(47, 93, 69, 0.2);
}
.extra-note p { margin: 6px 0 0; color: var(--muted); font-size: 0.92rem; }

.action-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
}
.info-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.info-card h2 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 1.25rem;
}
.info-card p { margin: 0 0 8px; color: var(--muted); line-height: 1.45; }
.info-card a { color: var(--accent); font-weight: 600; text-decoration: underline; }

.rate-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
.rate-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}
.rate-list span:last-child { color: var(--muted); text-align: right; }

.faq details {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.hint { color: var(--muted); line-height: 1.45; margin: 0 0 10px; }
.pwa-steps {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.5;
}
.pwa-steps li { margin-bottom: 8px; }

.pwa-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
}
.pwa-sheet[hidden] { display: none !important; }
.pwa-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(18, 18, 18, 0.45);
}
.pwa-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--paper);
  border-radius: 20px 20px 0 0;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  max-height: 80vh;
  overflow: auto;
}
.pwa-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.pwa-sheet-close {
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--muted);
  width: 44px;
  height: 44px;
}
#pwa-install-body .btn { width: 100%; margin-top: 12px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 90;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.toast[hidden] { display: none !important; }

.app-home-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

@media (display-mode: standalone), (display-mode: fullscreen) {
  body { overscroll-behavior-y: contain; }
  #pwa-install-btn,
  #pwa-share-btn,
  #pwa-install-sheet,
  #app-install-cta,
  #app-share-cta,
  .app-home-actions {
    display: none !important;
  }
}

body.is-standalone #pwa-install-btn,
body.is-standalone #pwa-share-btn,
body.is-standalone #pwa-install-sheet,
body.is-standalone #app-install-cta,
body.is-standalone #app-share-cta,
body.is-standalone .app-home-actions {
  display: none !important;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-app, .card, .info-card, .steps li, .section-tile {
  animation: rise-in 0.45s ease both;
}
.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.12s; }

/* Producto: Medio | Kilo */
.prod-opt {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 12px;
}
.prod-opt-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 10px;
  border: 1.5px solid var(--line, #d7d0c4);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.prod-opt-btn input { position: absolute; opacity: 0; pointer-events: none; }
.prod-opt-btn:has(input:checked) {
  border-color: var(--ink, #1c2b22);
  background: color-mix(in srgb, var(--ink, #1c2b22) 6%, #fff);
}
.prod-opt-label { font-weight: 800; font-size: 1rem; }
.prod-opt-price { font-size: .88rem; opacity: .8; }
.prod-buy-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.prod-buy-row .btn { flex: 1; min-width: 140px; }
.qty-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: .82rem;
  font-weight: 700;
}
.qty-field input {
  width: 72px;
  min-height: 44px;
  text-align: center;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid var(--line, #d7d0c4);
}
