/* Catálogo del cliente: mobile-first, dos columnas en celular. */
.cat-cabecera { background: var(--primario); color: var(--primario-texto); }
.cat-cabecera-fila { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 1040px; margin: 0 auto; padding: .9rem 16px; }
.cat-cabecera .marca { font-size: 1.25rem; }
.cat-cabecera .marca-logo { height: 52px; }
.cat-horario { max-width: 1040px; margin: 0 auto; padding: .75rem 16px 0; color: var(--suave); font-size: .9rem; }

.cat-nav {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: .75rem 16px; background: var(--fondo); border-bottom: 1px solid var(--borde);
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav a {
  flex: none; padding: .45rem .9rem; border-radius: 999px; background: var(--superficie);
  border: 1px solid var(--borde); color: var(--texto); text-decoration: none; font-size: .9rem; font-weight: 500;
}

.cat-contenido { max-width: 1040px; margin: 0 auto; padding: .5rem 16px 7rem; }
.cat-seccion { scroll-margin-top: 4rem; }
.cat-seccion h2 { margin-top: 1.5rem; }
.cat-grilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .cat-grilla { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .cat-grilla { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.producto {
  display: flex; flex-direction: column; background: var(--superficie); border: 1px solid var(--borde);
  border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra);
}
.producto-foto { position: relative; aspect-ratio: 1; background: #F1ECE5; }
.producto-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.producto.agotado .producto-foto img { filter: grayscale(.8); opacity: .6; }
.sello {
  position: absolute; top: 10px; left: 10px; background: var(--texto); color: #fff;
  font-size: .75rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px;
}
.producto-info { padding: .75rem .75rem 0; flex: 1; }
.producto-info h3 { font-size: .95rem; margin: 0 0 .2rem; overflow-wrap: anywhere; }
.presentacion { color: var(--suave); font-size: .85rem; margin: 0 0 .25rem; }
.descripcion { color: var(--suave); font-size: .8rem; margin: 0 0 .25rem; }
.precio { font-weight: 700; font-size: 1.05rem; margin: .25rem 0 0; }
.producto-accion { padding: .75rem; }
.producto-accion .btn { padding: .6rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.contador { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.contador button {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--borde); background: var(--superficie);
  font-size: 1.25rem; font-weight: 600; color: var(--primario); cursor: pointer;
}
.contador .cantidad { min-width: 1.5rem; text-align: center; font-weight: 700; }

.barra-carrito {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 10; max-width: 560px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem; border: 0; border-radius: 14px; font: inherit; cursor: pointer;
  background: var(--texto); color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}

.hoja-fondo { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 20; }
.hoja {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 560px; margin: 0 auto;
  max-height: 88vh; overflow-y: auto; background: var(--superficie);
  border-radius: 18px 18px 0 0; padding: 1rem 16px calc(1rem + env(safe-area-inset-bottom));
}
.hoja-cabecera { display: flex; justify-content: space-between; align-items: center; }
.hoja-cabecera h2 { margin: 0; color: var(--texto); text-transform: none; letter-spacing: 0; font-size: 1.2rem; }
.cerrar { border: 0; background: none; font-size: 2rem; line-height: 1; cursor: pointer; color: var(--suave); padding: 0 .25rem; }
.hoja-items { list-style: none; padding: 0; margin: 1rem 0; }
.hoja-items li {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "nombre precio" "contador contador";
  gap: .5rem; padding: .75rem 0; border-bottom: 1px solid var(--borde);
}
.hoja-items .item-nombre { grid-area: nombre; font-weight: 500; }
.hoja-items .item-precio { grid-area: precio; font-weight: 600; }
.hoja-items .contador { grid-area: contador; justify-content: flex-start; }
.hoja-items .vacio { display: block; color: var(--suave); }

.btn-link { display: block; margin: .75rem auto 0; background: none; border: 0; color: var(--suave); text-decoration: underline; font: inherit; cursor: pointer; }
body.sin-scroll { overflow: hidden; }

/* Presentación del negocio, pie y páginas legales (página pública) */
.cat-intro { max-width: 1040px; margin: 0 auto; padding: 1.25rem 16px 0; }
.cat-intro h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
.cat-intro p { margin: 0 0 .35rem; }
.cat-pie { max-width: 1040px; margin: 2rem auto 0; padding: 1.25rem 16px 6rem; border-top: 1px solid var(--borde); display: flex; flex-direction: column; gap: 4px; color: var(--suave); font-size: .85rem; }
.cat-pie strong { color: var(--texto); }
.cat-pie span:empty { display: none; }
.legal { max-width: 760px; margin: 0 auto; padding: 1.25rem 16px 1rem; line-height: 1.6; }
.legal h1 { font-size: 1.6rem; line-height: 1.25; }
.legal h2 { font-family: var(--titulos); font-size: 1.15rem; margin: 1.5rem 0 .4rem; color: var(--texto); text-transform: none; letter-spacing: 0; font-weight: 700; }
.legal ul, .legal ol { padding-left: 1.3rem; }
.legal li { margin-bottom: .3rem; }
