:root {
  --fondo: #fbf6ef; --tarjeta: #ffffff; --tinta: #2b1d16; --suave: #7a6a5e; --linea: #ecdfd2;
  --acento: #b3123e; --acento-2: #8f0e31; --cafe: #6b3e26; --crema: #f4e9dc; --ok: #2f7d4f; --aviso: #b86b00;
  --radio: 16px; --sombra: 0 1px 2px rgba(43, 29, 22, .06), 0 4px 14px rgba(43, 29, 22, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fondo); color: var(--tinta); font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.oculto { display: none !important; }

/* encabezado */
.cabecera { position: sticky; top: 0; z-index: 20; background: rgba(251, 246, 239, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linea); }
.cabecera .fila { max-width: 980px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 8px; gap: 12px; }
.marca { font-family: Georgia, "Times New Roman", serif; font-size: 26px; font-weight: 700; letter-spacing: .3px; color: var(--cafe); line-height: 1; display: flex; align-items: center; gap: 10px; }
.marca .logo { width: 46px; height: 46px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(107, 62, 38, .18); flex: none; object-fit: cover; }
.marca > span { display: block; min-width: 0; }
.marca small { display: block; font: 12px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--suave); letter-spacing: 0; font-weight: 500; margin-top: 3px; }
.tasa { font-size: 12px; color: var(--suave); text-align: right; }
.pestanas { max-width: 980px; margin: 0 auto; display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 10px; scrollbar-width: none; }
.pestanas::-webkit-scrollbar { display: none; }
.pestana { text-decoration: none; color: var(--tinta); flex: 0 0 auto; border: 1px solid var(--linea); background: var(--tarjeta); border-radius: 999px; padding: 7px 14px; font-size: 14px; white-space: nowrap; }
.pestana.activa { background: var(--cafe); border-color: var(--cafe); color: #fff; }

main { max-width: 980px; margin: 0 auto; padding: 8px 16px 120px; }
.aviso-tienda { background: #fff4e0; border: 1px solid #f0d2a0; color: #6b4300; border-radius: 12px; padding: 10px 14px; margin: 12px 0; font-size: 14px; }
.aviso-tienda.cerrada { background: #fde8ec; border-color: #f2b8c6; color: var(--acento-2); }
.buscador { margin: 12px 0 4px; position: relative; }
.buscador input[type=search] { width: 100%; border: 1px solid var(--linea); background: var(--tarjeta); border-radius: 12px; padding: 11px 14px 11px 38px; font-size: 16px; }
.buscador svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--suave); }

.grupo { scroll-margin-top: 120px; }
.grupo h2 { font-family: Georgia, "Times New Roman", serif; font-size: 22px; margin: 26px 0 12px; color: var(--cafe); }
.grilla { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .grilla { grid-template-columns: 1fr 1fr; } }
.producto { display: flex; gap: 12px; align-items: stretch; text-align: left; width: 100%; background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--radio); padding: 10px; box-shadow: var(--sombra); }
.producto:active { transform: scale(.995); }
.producto .foto { flex: 0 0 84px; height: 84px; border-radius: 12px; background: var(--crema); display: grid; place-items: center; font-size: 34px; overflow: hidden; }
.producto .foto img { width: 100%; height: 100%; object-fit: cover; }
.producto .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.producto .nombre { font-weight: 650; font-size: 16px; }
.producto .desc { color: var(--suave); font-size: 13px; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.producto .precio { margin-top: auto; padding-top: 6px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.usd { font-weight: 700; }
.bs { color: var(--suave); font-size: 13px; }
.producto.agotado { opacity: .55; }
.etiqueta { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 2px 8px; border-radius: 999px; background: #eee; color: #555; }
.etiqueta.roja { background: #fde8ec; color: var(--acento-2); }

/* barra del carrito */
.barra-carrito { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--fondo) 30%); }
.barra-carrito button { max-width: 980px; margin: 0 auto; width: 100%; display: flex; justify-content: space-between; align-items: center; border: 0; border-radius: 14px; background: var(--acento); color: #fff; padding: 14px 18px; font-weight: 650; font-size: 16px; box-shadow: 0 6px 20px rgba(179, 18, 62, .3); }
.barra-carrito .cuenta { background: rgba(255, 255, 255, .22); border-radius: 999px; padding: 1px 9px; margin-right: 8px; }

/* hoja inferior */
.velo { position: fixed; inset: 0; background: rgba(30, 18, 12, .45); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.velo.visible { opacity: 1; pointer-events: auto; }
.hoja { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--tarjeta); border-radius: 20px 20px 0 0; max-height: 92vh; display: flex; flex-direction: column; transform: translateY(105%); transition: transform .25s ease; max-width: 640px; margin: 0 auto; }
.hoja.visible { transform: none; }
@media (min-width: 700px) { .hoja { bottom: 4vh; border-radius: 20px; max-height: 88vh; } }
.hoja .tope { padding: 16px 18px 8px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hoja .tope h3 { margin: 0; font-size: 20px; }
.cerrar { border: 0; background: var(--crema); border-radius: 999px; width: 34px; height: 34px; flex: 0 0 34px; font-size: 18px; line-height: 1; }
.hoja .cuerpo { overflow-y: auto; padding: 0 18px 12px; -webkit-overflow-scrolling: touch; }
.hoja .pie { padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linea); display: flex; gap: 12px; align-items: center; }
.foto-grande { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; margin-bottom: 10px; background: var(--crema); }
.seccion { margin: 14px 0; }
.seccion h4 { margin: 0 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; color: var(--suave); display: flex; justify-content: space-between; }
.opciones { display: flex; flex-wrap: wrap; gap: 8px; }
.opcion { border: 1.5px solid var(--linea); background: var(--tarjeta); border-radius: 12px; padding: 9px 12px; text-align: left; min-width: 120px; }
.opcion.activa { border-color: var(--acento); background: #fff5f7; }
.opcion small { display: block; color: var(--suave); }
.lista-extras label { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--linea); }
.lista-extras label:last-child { border-bottom: 0; }
.lista-extras input { width: 20px; height: 20px; accent-color: var(--acento); }
.lista-extras .n { flex: 1; }
.lista-extras .p { color: var(--suave); font-size: 14px; }
textarea, input[type=text], input[type=tel], input[type=search], input[type=password], select.campo-sel { width: 100%; border: 1px solid var(--linea); border-radius: 12px; padding: 10px 12px; background: #fff; font-size: 16px; }
textarea { min-height: 64px; resize: vertical; }
.contador { display: flex; align-items: center; border: 1px solid var(--linea); border-radius: 12px; }
.contador button { border: 0; background: none; width: 40px; height: 44px; font-size: 22px; color: var(--cafe); }
.contador span { min-width: 26px; text-align: center; font-weight: 650; }
.boton { border: 0; border-radius: 14px; background: var(--acento); color: #fff; padding: 13px 18px; font-weight: 650; font-size: 16px; flex: 1; }
.boton:disabled { background: #c9b8ad; }
.boton.secundario { background: var(--crema); color: var(--cafe); }
.linea-carrito { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--linea); }
.linea-carrito .n { flex: 1; min-width: 0; }
.linea-carrito .d { color: var(--suave); font-size: 13px; }
.quitar { border: 0; background: none; color: var(--acento); font-size: 13px; padding: 0; margin-top: 4px; }
.totales { margin: 12px 0; }
.totales div { display: flex; justify-content: space-between; padding: 3px 0; }
.totales .grande { font-size: 18px; font-weight: 700; }
.campo { margin: 10px 0; }
.campo label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.campo .ayuda { font-size: 12px; color: var(--suave); margin-top: 4px; }
.error { background: #fde8ec; color: var(--acento-2); border-radius: 10px; padding: 9px 12px; font-size: 14px; margin: 8px 0; }
.enlace { border: 0; background: none; color: var(--acento); padding: 0; text-decoration: underline; font-size: 14px; }
.vacio { text-align: center; color: var(--suave); padding: 40px 0; }

/* seguimiento del pedido */
.tarjeta { background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--radio); padding: 16px; margin: 14px 0; box-shadow: var(--sombra); }
.tarjeta h2 { margin: 0 0 6px; font-size: 20px; }
.pasos { list-style: none; margin: 10px 0 0; padding: 0; }
.pasos li { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; color: var(--suave); }
.pasos li .punto { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; border: 2px solid var(--linea); display: grid; place-items: center; font-size: 12px; margin-top: 1px; }
.pasos li.hecho { color: var(--tinta); }
.pasos li.hecho .punto { background: var(--ok); border-color: var(--ok); color: #fff; }
.pasos li.actual { color: var(--tinta); font-weight: 650; }
.pasos li.actual .punto { border-color: var(--acento); background: #fff5f7; }
.dato-pago { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--linea); gap: 10px; }
.dato-pago:last-child { border-bottom: 0; }
.dato-pago .k { color: var(--suave); font-size: 13px; }
.dato-pago .v { font-weight: 650; word-break: break-all; }
.copiar { border: 1px solid var(--linea); background: var(--fondo); border-radius: 8px; font-size: 13px; padding: 5px 10px; flex: 0 0 auto; }
.mensaje-tienda { background: #f1f7f3; border: 1px solid #cfe5d7; border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.tachado { text-decoration: line-through; color: var(--suave); }
.estado-grande { display: inline-block; background: var(--crema); color: var(--cafe); border-radius: 999px; padding: 4px 12px; font-weight: 650; font-size: 14px; }
.archivo { border: 1.5px dashed var(--linea); border-radius: 12px; padding: 14px; text-align: center; color: var(--suave); display: block; cursor: pointer; }
.archivo input { display: none; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--tinta); color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 14px; z-index: 60; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.visible { opacity: 1; }
