/* apps/tiendas/publico/comercio.css — escrito a mano (no viene de Horizon). Cajón del carrito,
   /carrito, /checkout y página del pedido. Usa las variables --nat-* de tienda.css y los tokens
   de cada tienda; los componentes base (nat-sheet, nat-btn, nat-pdp__qty) ya están en tienda.css. */

/* ── Cajón ── */
.nat-carrito .nat-sheet__body { display: flex; flex-direction: column; gap: 16px; }
.nat-carrito__aviso { min-height: 0; margin: 0; font: 400 14px/1.4 var(--nat-sans); color: #a33; }
.nat-carrito__aviso:empty { display: none; }
.nat-carrito__lineas, .nat-cart-page__lineas, .nat-co__lineas { list-style: none; margin: 0; padding: 0; }
.nat-carrito__linea { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--nat-linea); }
.nat-carrito__foto img, .nat-cart-linea__foto img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; }
.nat-carrito__info { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.nat-carrito__titulo { flex-basis: 100%; font: 600 15px/1.35 var(--nat-sans); color: var(--nat-tinta); text-decoration: none; }
.nat-carrito__precio { font: 600 15px/1 var(--nat-sans); color: var(--nat-tinta); }
.nat-carrito__qty { transform: scale(.9); transform-origin: left center; }
.nat-carrito__quitar, .nat-cart-linea__quitar { border: 0; background: none; padding: 0; font: 400 13px/1 var(--nat-sans); color: var(--nat-secundario); text-decoration: underline; cursor: pointer; }
.nat-carrito__linea.is-out .nat-carrito__precio, .nat-cart-linea.is-out .nat-cart-linea__precio { color: #a33; }
.nat-carrito__pie { display: grid; gap: 10px; margin-top: auto; padding-top: 16px; }
.nat-carrito__envio { margin: 0; padding: 10px 12px; background: var(--nat-niebla); font: 400 14px/1.4 var(--nat-sans); color: var(--nat-tinta); }
.nat-carrito__subtotal, .nat-cart-page__sub { display: flex; justify-content: space-between; margin: 0; font: 600 17px/1.2 var(--nat-sans); color: var(--nat-tinta); }
.nat-carrito__vacio { font: 400 15px/1.5 var(--nat-sans); color: var(--nat-secundario); }

/* ── /carrito ── */
.nat-cart-page { padding-block: 32px 72px; }
.nat-cart-page__titulo { margin: 0 0 24px; font-size: clamp(28px, 3.4vw, 44px); color: var(--nat-bosque); }
.nat-cart-linea { display: grid; grid-template-columns: 96px 1fr auto; grid-template-areas: "foto info importe" "foto qty quitar"; gap: 10px 16px; padding: 18px 0; border-bottom: 1px solid var(--nat-linea); }
.nat-cart-linea__foto { grid-area: foto; }
.nat-cart-linea__info { grid-area: info; display: grid; gap: 4px; }
.nat-cart-linea__titulo { font: 600 16px/1.35 var(--nat-sans); color: var(--nat-tinta); text-decoration: none; }
.nat-cart-linea__qty { grid-area: qty; justify-self: start; }
.nat-cart-linea__importe { grid-area: importe; font: 600 17px/1 var(--nat-sans); }
.nat-cart-linea__quitar { grid-area: quitar; justify-self: end; }
.nat-cart-page__total { display: grid; gap: 12px; max-width: 420px; margin: 28px 0 0 auto; }
.nat-cart-page__envio, .nat-cart-page__iva { margin: 0; font: 400 14px/1.45 var(--nat-sans); color: var(--nat-secundario); }

/* ── /checkout ── */
.nat-co-body { background: #fff; }
.nat-co__hdr { border-bottom: 1px solid var(--nat-linea); }
.nat-co__hdr-in { display: flex; align-items: center; justify-content: space-between; max-width: 1100px; margin: 0 auto; padding: 18px 16px; }
.nat-co__logo { font-size: 24px; color: var(--nat-bosque); text-decoration: none; }
.nat-co__bolsa { color: var(--nat-bosque); }
.nat-co__bolsa .nat-i { width: 24px; height: 24px; }
.nat-co__movil { border-bottom: 1px solid var(--nat-linea); background: var(--nat-marfil); }
.nat-co__movil > summary { display: flex; justify-content: space-between; align-items: center; padding: 16px; font: 600 15px/1 var(--nat-sans); color: var(--nat-bosque); cursor: pointer; list-style: none; }
.nat-co__movil > summary::-webkit-details-marker { display: none; }
.nat-co__movil > .nat-co__res { padding: 0 16px 16px; }
.nat-co { display: grid; max-width: 1100px; margin: 0 auto; }
.nat-co__form { padding: 24px 16px 48px; }
.nat-co__resumen { display: none; }
.nat-co__seccion { margin-bottom: 24px; }
.nat-co__seccion h2 { margin: 0 0 10px; font: 600 17px/1.2 var(--nat-sans); color: var(--nat-tinta); }
/* Etiqueta dentro del campo: grande mientras está vacío, chica arriba al escribir. */
.nat-co__campo { position: relative; margin-bottom: 10px; }
.nat-co__campo label { position: absolute; left: 12px; right: 12px; top: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font: 400 13px/1.2 var(--nat-sans); color: var(--nat-secundario); pointer-events: none; transition: top .12s, font-size .12s; }
.nat-co__campo input:focus + label, .nat-co__campo input:not(:placeholder-shown) + label, .nat-co__campo select + label { top: 5px; font-size: 11px; }
.nat-co__opcional { color: var(--nat-secundario); }
.nat-co__campo input, .nat-co__campo select, .nat-co__codigo input {
  width: 100%; height: 44px; padding: 17px 11px 3px; border: 1px solid var(--nat-borde); border-radius: 6px;
  background: #fff; color: var(--nat-tinta); font: 400 13px/1.2 var(--nat-sans);
}
.nat-co__codigo input { padding: 10px 11px; }
.nat-co__campo select { appearance: none; padding-right: 32px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23707070' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center; }
.nat-co__campo input:focus, .nat-co__campo select:focus, .nat-co__codigo input:focus { outline: none; border-color: var(--nat-bosque); box-shadow: 0 0 0 1px var(--nat-bosque); }
.nat-co__campo .nat-co__error-campo { margin-top: 4px; }
.nat-co__fila { display: grid; gap: 0 10px; grid-template-columns: 1fr; }
.nat-co__error-campo { margin: 0; min-height: 0; font: 400 12px/1.3 var(--nat-sans); color: #a33; }
.nat-co__error-campo:empty { display: none; }
.nat-co__check { display: flex; gap: 8px; align-items: center; font: 400 13px/1.4 var(--nat-sans); color: var(--nat-tinta); }
.nat-co__factura > summary { cursor: pointer; font: 400 13px/1.4 var(--nat-sans); color: var(--nat-bosque); text-decoration: underline; margin-bottom: 10px; }
.nat-co__envio { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--nat-bosque); border-radius: 6px; background: var(--nat-niebla); font: 400 14px/1.35 var(--nat-sans); }
.nat-co__nota { margin: 6px 0 0; font: 400 12px/1.45 var(--nat-sans); color: var(--nat-secundario); }
.nat-co__medios { border: 1px solid var(--nat-borde); border-radius: 10px; overflow: hidden; background: #fff; }
.nat-co__medio { display: flex; gap: 12px; align-items: center; min-height: 52px; padding: 12px 14px; border-top: 1px solid var(--nat-borde); font: 500 14px/1.25 var(--nat-sans); cursor: pointer; }
.nat-co__medio:first-child { border-top: 0; }
.nat-co__medio:has(input:checked) { background: color-mix(in srgb, var(--nat-bosque) 7%, #fff); box-shadow: inset 0 0 0 1px var(--nat-bosque); }
.nat-co__medio input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--nat-bosque); }
.nat-co__marcas { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nat-co__marca { display: grid; place-items: center; width: 38px; height: 24px; border: 1px solid #D9D9D9; border-radius: 4px; background: #fff; }
.nat-co__marca img { display: block; max-width: 30px; max-height: 16px; width: auto; height: auto; }
.nat-co__logo-efectivo { display: block; height: 13px; width: auto; }
.nat-co__logo-mp { display: block; height: 24px; width: auto; }
.nat-co__panel[data-co-panel="billetera"] .nat-co__nota { margin: 0; }
.nat-pedido__acciones { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
/* La fila elegida dibuja su borde con un box-shadow interior: en la primera fila sigue la curva del recuadro. */
.nat-co__medio:first-child { border-radius: 9px 9px 0 0; }
.nat-co__mas { display: grid; place-items: center; width: 30px; height: 24px; border: 1px solid #D9D9D9; border-radius: 4px; background: #fff; font: 600 11px/1 var(--nat-sans); color: #5f6368; }
.nat-co__panel { padding: 14px; background: #f5f5f5; border-top: 1px solid var(--nat-borde); }
.nat-co__panel .nat-co__campo input { background: #fff; }
.nat-co__pagar { width: 100%; min-height: 52px; margin-top: 20px; border-radius: 8px; font-size: 16px; font-weight: 700; }
.nat-co__pagar[disabled] { opacity: .6; cursor: progress; }
@media (max-width: 420px) { .nat-co__marca:nth-child(n+3) { display: none; } }
.nat-co__error { margin: 16px 0; padding: 12px 14px; border: 1px solid #a33; border-radius: 6px; background: #fbeeee; font: 400 14px/1.45 var(--nat-sans); color: #a33; }
.nat-co__aviso { margin-bottom: 20px; padding: 12px 14px; border-left: 3px solid var(--nat-durazno); background: var(--nat-marfil); font: 400 14px/1.45 var(--nat-sans); }
.nat-co__aviso p { margin: 0 0 6px; }
.nat-co__legal { font: 400 12px/1.5 var(--nat-sans); color: var(--nat-secundario); }
.nat-co__linea { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 8px 0; font: 400 14px/1.35 var(--nat-sans); }
.nat-co__foto { position: relative; width: 56px; height: 56px; border: 1px solid var(--nat-linea); border-radius: 6px; background: #fff; }
.nat-co__foto img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }
.nat-co__cant { position: absolute; top: -8px; right: -8px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--nat-secundario); color: #fff; font: 600 12px/20px var(--nat-sans); text-align: center; }
.nat-co__limporte { font-weight: 600; }
.nat-co__codigo { margin: 16px 0; }
.nat-co__codigo-caja { display: flex; align-items: center; gap: 6px; padding: 4px; border: 1px solid var(--nat-borde); border-radius: 8px; background: #fff; }
.nat-co__codigo-caja:focus-within { border-color: var(--nat-bosque); box-shadow: 0 0 0 1px var(--nat-bosque); }
.nat-co__codigo-caja label { flex: 1; min-width: 0; }
.nat-co__codigo .nat-co__codigo-caja input { width: 100%; height: 36px; padding: 0 8px; border: 0; box-shadow: none; outline: none; background: transparent; font: 400 13px/1.2 var(--nat-sans); }
.nat-co__aplicar { flex: none; height: 36px; padding: 0 14px; border: 1px solid #e3e3e3; border-radius: 6px; background: #f5f5f5; color: #707070; font: 600 13px/1 var(--nat-sans); cursor: pointer; }
.nat-co__aplicar:hover { color: var(--nat-tinta); }
.nat-co__aplicar[disabled] { cursor: progress; opacity: .6; }
.nat-co__codigo .nat-co__error-campo { margin-top: 6px; }
.nat-co__totales { margin: 0; font: 400 14px/1.4 var(--nat-sans); }
.nat-co__totales > div { display: flex; justify-content: space-between; padding: 4px 0; }
.nat-co__totales dt, .nat-co__totales dd { margin: 0; }
.nat-co__total { padding-top: 10px !important; font-size: 18px; font-weight: 600; }
.nat-co__total small { font-size: 12px; font-weight: 400; color: var(--nat-secundario); }
.nat-co__iva { margin: 4px 0 0; font: 400 12px/1.4 var(--nat-sans); color: var(--nat-secundario); }

/* ── /pedido ── */
.nat-pedido { max-width: 720px; padding-block: 40px 72px; }
.nat-pedido__titulo { margin: 8px 0 12px; font-size: clamp(28px, 3.4vw, 40px); color: var(--nat-bosque); }
.nat-pedido__ticket { margin: 20px 0; padding: 16px; background: var(--nat-marfil); border-left: 3px solid var(--nat-durazno); }
.nat-pedido__detalle { margin: 24px 0; padding: 16px 0; border-block: 1px solid var(--nat-linea); }
.nat-pedido__prueba { padding: 8px 12px; background: #fff4d6; font: 600 13px/1.4 var(--nat-sans); }

@media (min-width: 640px) {
  .nat-co__fila { grid-template-columns: 2fr 1fr 1fr; }
  .nat-co__factura .nat-co__fila { grid-template-columns: 1fr 2fr; }
}
@media (min-width: 1000px) {
  .nat-co__movil { display: none; }
  .nat-co { grid-template-columns: minmax(0, 1fr) 420px; }
  .nat-co__form { padding: 36px 48px 72px 16px; border-right: 1px solid var(--nat-linea); }
  .nat-co__resumen { display: block; padding: 36px 16px 72px 40px; background: var(--nat-marfil); }
  .nat-co__resumen .nat-co__res { position: sticky; top: 24px; }
}

.nat-co__brick-espera { margin: 0; font: 400 13px/1.45 var(--nat-sans); color: var(--nat-secundario); }
.nat-co__fila.nat-co__fila--2 { grid-template-columns: 1fr 1fr; }
