/* Hojas (CartDrawer, detalle, checkout, cobertura, asistente), formularios, avisos. */
.fondo { position: fixed; inset: 0; background: rgba(10,25,21,.5); backdrop-filter: blur(2px); z-index: 50; opacity: 0; transition: opacity .22s; } .fondo.on { opacity: 1; }
.hoja { position: fixed; z-index: 51; left: 0; right: 0; bottom: 0; max-height: 92dvh; display: flex; flex-direction: column; background: var(--superficie); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--sombra-3); transform: translateY(100%); transition: transform .28s var(--ease); }
.hoja.on { transform: none; } .hoja.completa { top: 0; max-height: none; border-radius: 0; }
@media (min-width: 760px) {
  .hoja { left: auto; top: 0; width: 460px; max-height: none; border-radius: var(--r-xl) 0 0 var(--r-xl); transform: translateX(100%); } .hoja.completa { width: 580px; }
  .hoja.centro { left: 50%; top: 50%; right: auto; bottom: auto; width: 540px; max-height: 90dvh; border-radius: var(--r-xl); transform: translate(-50%, -46%); opacity: 0; transition: transform .26s var(--ease), opacity .2s; } .hoja.centro.on { transform: translate(-50%, -50%); opacity: 1; }
}
.hoja > header { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--linea); }
.hoja > header h2 { font-size: var(--t-lg); font-weight: 800; }
.cerrar { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--r); background: var(--verde-suave); color: var(--verde); transition: background-color .15s; } .cerrar:hover { background: var(--verde-medio); }
.hoja .contenido { overflow-y: auto; padding: var(--s4); flex: 1; overscroll-behavior: contain; }
.hoja > footer { padding: var(--s3) var(--s4) calc(var(--s3) + env(safe-area-inset-bottom)); border-top: 1px solid var(--linea); background: var(--superficie); }

/* Carrito */
.linea { display: grid; grid-template-columns: 64px 1fr auto; gap: var(--s1) var(--s3); align-items: center; padding: var(--s3) 0; border-bottom: 1px solid var(--linea); }
.linea-img { width: 64px; height: 64px; border-radius: var(--r); object-fit: contain; background: #fff; border: 1px solid var(--linea); }
.linea-nom { font-weight: 600; line-height: 1.25; } .linea-sub { color: var(--tinta-2); font-size: var(--t-sm); }
.linea-imp { font-weight: 800; font-size: var(--t-lg); text-align: right; font-variant-numeric: tabular-nums; } .linea-imp small { display: block; font-size: var(--t-xs); font-weight: 400; color: var(--tinta-2); }
.linea-ctrl { grid-column: 2 / 4; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.quitar { background: none; border: 0; color: var(--error); font-size: var(--t-sm); min-height: 44px; padding: 0 var(--s2); text-decoration: underline; text-underline-offset: 3px; }
.totales { display: grid; gap: var(--s1); font-size: var(--t-base); font-variant-numeric: tabular-nums; } .totales > div { display: flex; justify-content: space-between; gap: var(--s3); }
.totales .total { margin-top: var(--s1); padding-top: var(--s2); border-top: 1px dashed var(--linea-fuerte); font-weight: 800; font-size: var(--t-lg); } .totales .total b { font-size: var(--t-2xl); color: var(--verde); letter-spacing: -.03em; }
.nota { font-size: var(--t-sm); color: var(--tinta-2); background: var(--naranja-suave); border-radius: var(--r); padding: var(--s3); margin: var(--s3) 0; } .nota.error { background: var(--error-suave); color: var(--error); }
.barra { height: 8px; background: var(--verde-medio); border-radius: 4px; overflow: hidden; margin: var(--s2) 0 0; } .barra i { display: block; height: 100%; background: var(--naranja); transform-origin: left; transition: transform .3s var(--ease); }

/* Formularios y selecciones */
.campo { display: grid; gap: var(--s1); margin-bottom: var(--s3); } .campo > label, .grupo > legend { font-weight: 600; font-size: var(--t-sm); }
.campo input, .campo select, .campo textarea { width: 100%; min-height: 48px; padding: var(--s3); border: 1.5px solid var(--linea); border-radius: var(--r); background: #fff; transition: border-color .15s, box-shadow .15s; } .campo textarea { min-height: 80px; resize: vertical; }
.campo select { appearance: none; -webkit-appearance: none; padding-right: 40px; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5d57' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>") no-repeat right 12px center / 18px; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--verde); box-shadow: var(--foco); }
.campo.malo input, .campo.malo select { border-color: var(--error); } .campo .err { color: var(--error); font-size: var(--t-sm); } .campo small { color: var(--tinta-2); }
.grupo { border: 0; padding: 0; margin: 0 0 var(--s4); } .grupo > legend { padding: 0; margin-bottom: var(--s2); }
.opcion { display: flex; gap: var(--s3); align-items: center; min-height: 52px; padding: var(--s3) var(--s4); margin-bottom: var(--s2); border: 1.5px solid var(--linea); border-radius: var(--r-lg); background: #fff; cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.opcion:hover { border-color: var(--linea-fuerte); } .opcion:has(input:checked) { border-color: var(--verde); background: var(--verde-suave); box-shadow: 0 0 0 1px var(--verde) inset; } .opcion:has(input:focus-visible) { box-shadow: var(--foco); }
.opcion input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border: 2px solid var(--linea-fuerte); background: #fff; display: grid; place-content: center; transition: background-color .15s, border-color .15s; } .opcion input[type=radio] { border-radius: 50%; } .opcion input[type=checkbox] { border-radius: 7px; }
.opcion input:checked { background: var(--verde); border-color: var(--verde); } .opcion input[type=radio]:checked { box-shadow: inset 0 0 0 4px #fff; }
.opcion input[type=checkbox]:checked::before { content: ''; width: 11px; height: 6px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: translateY(-1px) rotate(-45deg); } .opcion input:focus-visible { outline: none; }
.opcion > span { flex: 1; min-width: 0; } .opcion b { display: block; font-weight: 600; } .opcion small { color: var(--tinta-2); display: block; line-height: 1.35; }
#prog { display: grid; gap: var(--s2); margin-top: var(--s2); } #prog select { width: 100%; min-height: 44px; border: 1.5px solid var(--linea); border-radius: var(--r-sm); padding: 0 var(--s3); background: #fff; }
.paso-titulo { display: flex; align-items: center; gap: var(--s2); margin: var(--s6) 0 var(--s3); padding-bottom: var(--s2); border-bottom: 1px solid var(--linea); font-size: var(--t-base); font-weight: 800; color: var(--verde); } .paso-titulo:first-child { margin-top: 0; }
.resumen { background: var(--verde-suave); border-radius: var(--r-lg); padding: var(--s4); margin-top: var(--s4); } .resumen h3 { font-size: var(--t-base); margin-bottom: var(--s2); }
.fila-item { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--linea); font-size: var(--t-sm); font-variant-numeric: tabular-nums; } .fila-item:last-of-type { border: 0; }

/* Detalle, confirmación, asistente, avisos */
.detalle-img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; border-radius: var(--r-lg); border: 1px solid var(--linea); }
.detalle h3 { font-size: var(--t-xl); margin: var(--s3) 0 var(--s1); } .detalle p { color: var(--tinta-2); margin: var(--s2) 0; }
.exito { text-align: center; display: grid; gap: var(--s2); justify-items: center; padding: var(--s2) 0; }
.sello { width: 64px; height: 64px; border-radius: 50%; background: var(--verde); color: #fff; display: grid; place-items: center; animation: aparece .4s var(--ease); } .sello svg { width: 34px; height: 34px; } @keyframes aparece { from { transform: scale(.6); opacity: 0; } }
.num { font-size: var(--t-3xl); font-weight: 800; color: var(--verde); letter-spacing: .02em; }
.insignia { display: inline-block; padding: 2px var(--s3); border-radius: var(--r-pill); font-size: var(--t-sm); font-weight: 700; background: var(--naranja-suave); color: var(--naranja-osc); }
.enlace-seg { display: flex; gap: var(--s2); width: 100%; } .enlace-seg input { flex: 1; min-width: 0; font-size: var(--t-sm); border: 1.5px solid var(--linea); border-radius: var(--r); padding: 0 var(--s3); min-height: 44px; background: #fff; }
.chat { display: grid; gap: var(--s2); } .msg { max-width: 88%; padding: var(--s3); border-radius: var(--r-lg); font-size: var(--t-sm); white-space: pre-wrap; } .msg.yo { background: var(--verde); color: #fff; justify-self: end; border-bottom-right-radius: 4px; } .msg.bot { background: var(--verde-suave); border-bottom-left-radius: 4px; } .msg.err { background: var(--error-suave); color: var(--error); }
.propuesta { background: #fff; border: 1.5px solid var(--verde); border-radius: var(--r); padding: var(--s3); font-size: var(--t-sm); } .propuesta ul { margin: var(--s2) 0; padding-left: var(--s5); }
.chat-form { display: flex; gap: var(--s2); } .chat-form input { flex: 1; min-height: 48px; border: 1.5px solid var(--linea); border-radius: var(--r); padding: 0 var(--s3); } .chat-form input:focus { outline: none; border-color: var(--verde); box-shadow: var(--foco); }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); z-index: 80; max-width: min(92vw, 420px); padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--tinta); color: #fff; font-size: var(--t-sm); text-align: center; box-shadow: var(--sombra-3); opacity: 0; pointer-events: none; transition: opacity .22s, transform .22s var(--ease); }
.toast.on { opacity: 1; transform: translate(-50%, 0); } .toast.error { background: var(--error); } body.bloqueado .toast { bottom: auto; top: var(--s4); transform: translate(-50%, -20px); } body.bloqueado .toast.on { transform: translate(-50%, 0); }

.linea-calc { margin-top: 2px; font-size: var(--t-sm); color: var(--tinta); font-variant-numeric: tabular-nums; } .linea-calc b { color: var(--verde); }
