/* El Mercadito de la Fran — colores tomados del logo */
:root {
  --verde: #1d7243;
  --verde-2: #26904f;
  --verde-3: #45ad66;
  --palta: #c9de8c;
  --crema: #ffffff;
  --claro: #eef6ea;
  --crema-2: #ffffff;
  --rojo: #d8432b;
  --rojo-2: #b9351f;
  --paja: #e7c46b;
  --naranja: #ee8a2c;
  --tinta: #1d2b22;
  --gris: #5d6b61;
  --borde: #dce8d6;
  --wa: #1fa855;
  --radio: 18px;
  --sombra: 0 10px 30px -12px rgba(29, 114, 67, .3);
  --titulos: "Fredoka", "Nunito", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  font: 16px/1.55 "Nunito", system-ui, sans-serif;
  color: var(--tinta);
  background: var(--crema-2);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--verde-2); }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--titulos); line-height: 1.12; margin: 0 0 .5em; color: var(--verde); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
.cont { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .7em 1.2em; border-radius: 999px; border: 0;
  font-family: var(--titulos); font-weight: 600; font-size: 1.05rem; text-decoration: none;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn--rojo { background: var(--rojo); color: #fff; box-shadow: 0 8px 20px -8px rgba(216, 67, 43, .7); }
.btn--rojo:hover { background: var(--rojo-2); }
.btn--crema { background: #fff; color: var(--verde); }
.btn--verde { background: var(--verde-2); color: #fff; }
.btn--verde:hover { background: var(--verde); }
.btn--wa { background: var(--wa); color: #fff; width: 100%; font-size: 1.1rem; }
.btn--wa:hover { background: #178c46; }

/* Cinta superior */
.cinta { background: var(--rojo); color: #fff; font-size: .9rem; overflow: hidden; white-space: nowrap; }
.cinta__mov { display: flex; justify-content: center; gap: 2.5rem; padding: .35rem 1rem; }
@media (max-width: 900px) {
  .cinta__mov { justify-content: flex-start; width: max-content; animation: cinta 26s linear infinite; }
}
@media (min-width: 901px) { .cinta__mov .dup { display: none; } }
@keyframes cinta { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .cinta__mov { animation: none; } }

/* Cabecera */
.cab { position: sticky; top: 0; z-index: 40; background: var(--verde); color: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.18); }
.cab__fila { display: flex; align-items: center; gap: 1.5rem; min-height: 62px; }
.marca { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: #fff; }
.marca img { width: 48px; height: 48px; }
.marca__txt { display: flex; flex-direction: column; font-family: var(--titulos); line-height: 1; }
.marca__txt b { font-size: 1.35rem; font-weight: 700; }
.marca__txt small { font-size: 1rem; color: var(--palta); font-weight: 600; }
.menu { display: flex; gap: 1.6rem; margin-left: auto; }
.menu a { color: #fff; text-decoration: none; font-weight: 700; opacity: .9; }
.menu a:hover { opacity: 1; color: var(--paja); }
.btn-carro {
  position: relative; display: flex; align-items: center; gap: .5rem;
  background: var(--paja); color: var(--verde); border: 0; border-radius: 999px;
  padding: .6rem 1.1rem; font-weight: 800;
}
.btn-carro__n {
  min-width: 24px; height: 24px; border-radius: 12px; background: var(--rojo); color: #fff;
  display: grid; place-items: center; font-size: .8rem; padding: 0 6px;
}
.btn-carro.salta { animation: salta .4s; }
@keyframes salta { 40% { transform: scale(1.12); } }
@media (max-width: 860px) {
  .menu { display: none; }
  .btn-carro { margin-left: auto; }
}
@media (max-width: 420px) {
  .btn-carro__txt { display: none; }
  .marca__txt b { font-size: 1.15rem; }
}

/* Héroe */
.heroe { position: relative; min-height: clamp(400px, 60vh, 540px); display: flex; align-items: center; color: #fff; overflow: hidden; }
.heroe picture, .heroe__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.heroe::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20, 92, 52, .92) 0%, rgba(20, 92, 52, .72) 42%, rgba(20, 92, 52, .05) 75%);
}
.heroe__cont { position: relative; z-index: 1; padding-block: 2rem 3rem; }
.heroe h1 { color: #fff; font-size: clamp(1.9rem, 3.8vw, 3rem); max-width: 17ch; font-weight: 700; text-wrap: balance; }
.heroe h1 span { display: block; color: var(--paja); }
.sello {
  display: inline-block; background: var(--rojo); color: #fff; font-family: var(--titulos); font-weight: 600;
  padding: .35em 1em; border-radius: 6px; margin: 0 0 .7rem; transform: rotate(-2deg);
  box-shadow: 0 6px 14px -6px rgba(0,0,0,.4);
}
.heroe__bajada { font-size: 1.05rem; max-width: 50ch; margin: 0 0 1.1rem; color: #eef3e6; }
.heroe__ctas { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.1rem; }
.heroe__datos { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.heroe__datos li {
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3);
  backdrop-filter: blur(4px); padding: .3rem .8rem; border-radius: 999px; font-size: .9rem;
}
.heroe__datos .ico { margin-right: .3rem; color: var(--paja); }
@media (max-width: 700px) {
  .heroe { align-items: flex-end; }
  .heroe::after { background: linear-gradient(180deg, rgba(20,92,52,.2) 0%, rgba(20,92,52,.82) 45%, rgba(20,92,52,.95) 100%); }
  .heroe__cont { padding-top: 6rem; padding-bottom: 2.2rem; }
  .heroe__datos { display: none; }
  .heroe__ctas .btn { flex: 1 1 100%; }
}

/* Ventajas */
.ventajas { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: -1.6rem; position: relative; z-index: 2; }
.ventaja { display: flex; gap: .9rem; background: #fff; border-radius: var(--radio); padding: .9rem 1rem; box-shadow: var(--sombra); border: 1px solid var(--borde); }
.ventaja__ico { font-size: 1.5rem; color: var(--verde-2); width: 46px; height: 46px; flex: none; display: grid; place-items: center; background: var(--claro); border-radius: 50%; }
.ventaja b { font-family: var(--titulos); color: var(--verde); font-size: 1.15rem; }
.ventaja p { margin: .2rem 0 0; color: var(--gris); font-size: .95rem; }
@media (max-width: 800px) { .ventajas { grid-template-columns: 1fr; margin-top: .8rem; } }

/* Títulos de sección */
.titulo { text-align: center; margin-bottom: 1.1rem; }
.titulo__sup { font-family: var(--titulos); color: var(--rojo); font-weight: 600; letter-spacing: .04em; margin: 0 0 .3rem; text-transform: uppercase; font-size: .9rem; }
.titulo__sup--claro { color: var(--paja); }

/* Productos */
.productos { padding: 2.5rem 0; }
.filtros { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.filtros__tabs { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.tab {
  flex: none; border: 2px solid var(--borde); background: #fff; color: var(--verde);
  padding: .4rem .9rem; border-radius: 999px; font-weight: 800; white-space: nowrap;
}
.tab.activo { background: var(--verde); border-color: var(--verde); color: #fff; }
.buscar { display: flex; align-items: center; gap: .5rem; background: #fff; border: 2px solid var(--borde); border-radius: 999px; padding: .45rem 1rem; color: var(--gris); min-width: min(320px, 100%); }
.buscar input { border: 0; outline: 0; font: inherit; width: 100%; background: transparent; }
.buscar:focus-within { border-color: var(--verde-3); }
@media (max-width: 700px) { .filtros__tabs { width: 100%; } .buscar { width: 100%; } }

.grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .9rem; }
@media (max-width: 560px) { .grilla { grid-template-columns: repeat(2, 1fr); gap: .7rem; } }
.prod {
  position: relative; display: flex; flex-direction: column; background: #fff; border-radius: var(--radio);
  border: 1px solid var(--borde); overflow: hidden; transition: box-shadow .2s, transform .2s;
}
.prod:hover { box-shadow: var(--sombra); transform: translateY(-3px); }
.prod__foto { aspect-ratio: 1; background: var(--claro); }
.prod__foto img { width: 100%; height: 100%; object-fit: cover; }
.prod__promo {
  position: absolute; top: 10px; left: 10px; background: var(--rojo); color: #fff;
  font-family: var(--titulos); font-weight: 600; font-size: .85rem; padding: .25em .7em; border-radius: 6px;
}
.prod__cuerpo { padding: .7rem .8rem .8rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.prod__nombre { font-family: var(--titulos); font-size: 1.15rem; font-weight: 600; color: var(--verde); margin: 0; line-height: 1.15; }
.prod__detalle { font-size: .82rem; color: var(--gris); margin: 0; }
.prod__precio { font-weight: 800; font-size: 1.25rem; color: var(--tinta); }
.prod__precio small { font-weight: 600; font-size: .85rem; color: var(--gris); }
.prod__var { display: flex; gap: .35rem; flex-wrap: wrap; }
.prod__var button {
  border: 2px solid var(--borde); background: #fff; border-radius: 8px; padding: .2rem .55rem;
  font-size: .82rem; font-weight: 700; color: var(--verde);
}
.prod__var button.activo { border-color: var(--verde-3); background: var(--palta); }
.prod__acc { display: flex; gap: .5rem; margin-top: auto; padding-top: .3rem; }
.cant { display: flex; align-items: center; border: 2px solid var(--borde); border-radius: 999px; overflow: hidden; flex: none; }
.cant button { width: 30px; height: 34px; border: 0; background: transparent; font-size: 1.2rem; font-weight: 800; color: var(--verde); }
.cant output { min-width: 34px; text-align: center; font-weight: 800; font-size: .95rem; }
.prod__add {
  flex: 1; border: 0; border-radius: 999px; background: var(--verde-2); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center; gap: .3rem; padding: 0 .6rem; min-height: 38px;
}
.prod__add:hover { background: var(--verde); }
.prod__add.ok { background: var(--rojo); }
@media (max-width: 560px) {
  .prod__cuerpo { padding: .7rem; }
  .prod__nombre { font-size: 1rem; }
  .prod__precio { font-size: 1.05rem; }
  .prod__acc { flex-direction: column; }
  .cant { justify-content: space-between; }
  .cant button { width: 38px; }
}
.vacio { text-align: center; color: var(--gris); padding: 2rem; }

/* Delivery */
.delivery {
  background: var(--verde) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='2' cy='2' r='1.5' fill='%23f6efdc' fill-opacity='.08'/%3E%3C/svg%3E");
  color: #fff; padding: 2.5rem 0;
}
.delivery h2, .delivery h3 { color: #fff; }
.delivery__fila { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: center; }
.dias { display: flex; gap: .8rem; margin-top: 1rem; }
.dia { background: var(--paja); color: var(--verde); border-radius: 14px; padding: .7rem 1.3rem; text-align: center; transform: rotate(-2deg); box-shadow: 0 10px 20px -10px rgba(0,0,0,.5); }
.dia:nth-child(2) { transform: rotate(2deg); background: var(--rojo); color: #fff; }
.dia b { display: block; font-family: var(--titulos); font-size: 1.5rem; }
.dia span { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.delivery__zonas { background: rgba(255, 255, 255, .07); border: 2px dashed rgba(255, 255, 255, .3); border-radius: var(--radio); padding: 1.1rem 1.2rem; }
.chips { list-style: none; padding: 0; margin: 0 0 .7rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { background: #fff; color: var(--verde); font-weight: 800; padding: .3rem .8rem; border-radius: 999px; font-size: .95rem; }
.delivery__nota a { color: var(--paja); font-weight: 800; }
@media (max-width: 800px) { .delivery__fila { grid-template-columns: 1fr; gap: 1.2rem; } }

/* Pasos */
.pasos { padding: 2.5rem 0; }
.pasos__lista { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; counter-reset: p; }
.pasos__lista li { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 1rem; text-align: center; }
.pasos__lista span { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--rojo); color: #fff; font-family: var(--titulos); font-size: 1.2rem; font-weight: 700; margin-bottom: .4rem; }
.pasos__lista b { display: block; font-family: var(--titulos); font-size: 1.2rem; color: var(--verde); }
.pasos__lista p { margin: .3rem 0 0; color: var(--gris); }
@media (max-width: 800px) { .pasos__lista { grid-template-columns: 1fr; } }

/* Palta */
.palta { background: var(--claro); padding: 2.5rem 0; border-block: 1px solid var(--borde); }
.palta__fila { display: grid; grid-template-columns: .8fr 1.2fr; gap: 2rem; align-items: center; }
.palta__fila > img { width: 100%; height: auto; max-width: 380px; justify-self: center; border-radius: 50%; border: 10px solid #fff; box-shadow: var(--sombra); aspect-ratio: 1; object-fit: cover; }
.tabla { width: 100%; border-collapse: collapse; margin: .7rem 0 1rem; background: #fff; border-radius: 12px; overflow: hidden; }
.tabla th, .tabla td { padding: .45rem .9rem; text-align: left; border-bottom: 1px solid var(--borde); }
.tabla th { font-weight: 700; color: var(--gris); }
.tabla td { font-weight: 800; color: var(--verde); text-align: right; }
.tabla tr:last-child th, .tabla tr:last-child td { border-bottom: 0; }
@media (max-width: 800px) { .palta__fila { grid-template-columns: 1fr; } .palta__fila > img { max-width: 220px; margin-inline: auto; } }

/* Nosotros */
.nosotros { padding: 2.5rem 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.nosotros__fotos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.nosotros__fotos img { border-radius: var(--radio); aspect-ratio: 3 / 4; object-fit: cover; width: 100%; height: auto; box-shadow: var(--sombra); }
.nosotros__fotos img:nth-child(2) { margin-top: 1.5rem; }
.nosotros__datos { list-style: none; padding: 0; margin: .8rem 0 0; display: grid; gap: .4rem; font-weight: 700; }
@media (max-width: 800px) { .nosotros { grid-template-columns: 1fr; } }

/* Pie */
.pie { background: var(--verde); color: #fff; padding: 1.6rem 0 .8rem; }
.pie__fila { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center; }
.pie__marca { display: flex; align-items: center; gap: 1rem; }
.pie__marca p, .pie__info { margin: 0; font-size: .95rem; }
.pie__info { opacity: .85; }
.pie__credito { text-align: center; font-size: .85rem; margin: 1.2rem 0 0; padding-top: .8rem; border-top: 1px solid rgba(255,255,255,.15); opacity: .85; }
.pie__credito a { color: #fff; font-weight: 700; }

/* Barra inferior móvil + WhatsApp flotante */
.barra-pedido {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 45;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  background: var(--rojo); color: #fff; border: 0; border-radius: 999px; padding: .9rem 1.3rem;
  font-weight: 700; box-shadow: 0 12px 30px -10px rgba(0,0,0,.45);
  max-width: 520px; margin-inline: auto;
}
.wa-flot {
  position: fixed; right: 18px; bottom: 18px; z-index: 44; width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px -8px rgba(0,0,0,.45);
}
body.con-pedido .wa-flot { bottom: 92px; }

/* Carro */
.carro { position: fixed; inset: 0; z-index: 60; }
.carro__fondo { position: absolute; inset: 0; background: rgba(15, 30, 20, .55); animation: aparece .2s; }
.carro__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%);
  background: var(--claro); display: flex; flex-direction: column; animation: entra .25s ease-out;
}
@keyframes aparece { from { opacity: 0; } }
@keyframes entra { from { transform: translateX(100%); } }
.carro__cab { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem; background: var(--verde); }
.carro__cab h2 { color: #fff; margin: 0; font-size: 1.5rem; }
.carro__x { border: 0; background: transparent; color: #fff; font-size: 2rem; line-height: 1; width: 40px; height: 40px; }
.carro__cuerpo { flex: 1; overflow-y: auto; padding: 1rem 1.2rem; }
.carro__lista { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.item { display: grid; grid-template-columns: 56px 1fr auto; gap: .7rem; align-items: center; background: #fff; border: 1px solid var(--borde); border-radius: 14px; padding: .55rem; }
.item img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.item__nom { font-weight: 800; line-height: 1.2; font-size: .95rem; }
.item__det { font-size: .8rem; color: var(--gris); }
.item__der { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.item__total { font-weight: 800; }
.item .cant button { width: 28px; height: 30px; font-size: 1rem; }
.item .cant output { min-width: 28px; font-size: .85rem; }
.item__quitar { border: 0; background: none; color: var(--rojo); font-size: .78rem; font-weight: 700; padding: 0; }
.carro__vacio { text-align: center; padding: 3rem 1rem; color: var(--gris); }
.carro__pie { border-top: 1px solid var(--borde); padding: 1rem 1.2rem 1.2rem; background: #fff; }
.carro__linea { display: flex; justify-content: space-between; margin-bottom: .3rem; }
.carro__linea--ahorro { color: var(--verde-3); }
.carro__nota { font-size: .78rem; color: var(--gris); margin: .4rem 0 .8rem; }

.form { margin-top: 1.4rem; display: grid; gap: .8rem; }
.form h3 { font-size: 1.2rem; margin: 0; }
.form label small { font-weight: 600; color: var(--gris); }
.form label { display: grid; gap: .25rem; font-weight: 700; font-size: .9rem; }
.form input:not([type=radio]), .form select, .form textarea {
  font: inherit; padding: .65rem .8rem; border: 2px solid var(--borde); border-radius: 10px; background: #fff; width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 0; border-color: var(--verde-3); }
.form .invalido { border-color: var(--rojo) !important; }
.opciones { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.opciones legend { font-weight: 700; font-size: .9rem; margin-bottom: .3rem; width: 100%; }
.opciones label { display: flex; align-items: center; gap: .4rem; background: #fff; border: 2px solid var(--borde); border-radius: 10px; padding: .5rem .8rem; cursor: pointer; }
.opciones label:has(input:checked) { border-color: var(--verde-3); background: #eef6e2; }
.opciones.invalido label { border-color: var(--rojo); }
.form__error { color: var(--rojo); font-weight: 700; margin: 0; }

.aviso {
  position: fixed; left: 50%; top: 90px; transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  background: var(--tinta); color: #fff; padding: .6rem 1.1rem; border-radius: 999px; font-weight: 700; z-index: 70;
  transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center;
}
.aviso.ver { opacity: 1; transform: translate(-50%, 0); }
.delivery__fila > * { min-width: 0; }
@media (max-width: 400px) { .dias { gap: .6rem; } .dia { padding: .8rem 1rem; flex: 1; } .dia b { font-size: 1.25rem; } }

/* Íconos SVG (sprite al inicio del body) */
.ico { width: 1.1em; height: 1.1em; flex: none; display: inline-block; vertical-align: -.18em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cinta .ico { color: var(--paja); }
.sello .ico { vertical-align: -.15em; }
.tab .ico { margin-right: .2rem; }
.tab:not(.activo) .ico { color: var(--verde-2); }
h2 .ico { color: var(--verde-2); vertical-align: -.1em; }
.delivery h2 .ico { color: var(--paja); }
.titulo__sup .ico { vertical-align: -.2em; }
.chips li { display: inline-flex; align-items: center; gap: .3rem; }
.chips .ico { color: var(--rojo); }
.nosotros__datos li { display: flex; align-items: center; gap: .5rem; }
.nosotros__datos .ico { color: var(--verde-2); }
.carro__vacio .ico { display: block; width: 52px; height: 52px; margin: 0 auto .6rem; color: var(--verde-3); stroke-width: 1.5; }
.aviso .ico { color: var(--palta); margin-right: .3rem; }
.prod__add .ico { width: 1em; height: 1em; }
