*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); background: var(--vg-cream); color: var(--vg-ink); line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0; line-height: 1.15; font-variant-numeric: lining-nums; }
a { color: var(--vg-olive); }
img { max-width: 100%; display: block; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.contenedor { width: min(1200px, 100% - 2rem); margin-inline: auto; }
.principal { padding-block: 1.5rem 3rem; min-height: 60vh; }
.muted { opacity: .65; font-size: .88rem; margin: 0; }
.visualmente-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--vg-gold); outline-offset: 2px; }

/* ---------- Botones y campos ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; padding: .75rem 1.6rem; font: 500 .95rem var(--font-body); background: var(--vg-olive); color: #fff; text-decoration: none; cursor: pointer; box-shadow: var(--vg-shadow); transition: transform .15s, background .15s; }
.btn:hover { background: color-mix(in srgb, var(--vg-olive) 78%, black); transform: translateY(-1px); }
.btn-chico { padding: .4rem 1rem; font-size: .82rem; box-shadow: none; }
.btn-suave { background: var(--vg-cream-2); color: var(--vg-ink); box-shadow: none; }
.btn-suave:hover { background: var(--vg-borde); }
.btn-ancho { width: 100%; margin-top: 1.25rem; }
label { display: block; margin: 1rem 0 .3rem; font-size: .85rem; font-weight: 500; }
input, select, textarea { width: 100%; padding: .7rem .9rem; border: 1.5px solid var(--vg-borde); border-radius: 12px; background: var(--vg-input); color: var(--vg-ink); font: inherit; }
input:focus, select:focus { outline: none; border-color: var(--vg-gold); box-shadow: 0 0 0 4px rgba(198,160,122,.25); }
::placeholder { color: var(--vg-placeholder); opacity: 1; }
input.solo-lectura { background: var(--vg-cream-2); opacity: .75; }
.error { color: #A4402E; font-size: .8rem; display: block; }
.fila-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ---------- Mensajes ---------- */
.mensaje { padding: .8rem 1.1rem; border-radius: 12px; margin-bottom: 1rem; font-size: .92rem; }
.mensaje-ok { background: #E4EAD2; color: #3F4A1C; }
.mensaje-aviso { background: #F7E8C8; color: #6B4E12; }
.mensaje-error { background: #F6D9D1; color: #7A2E1F; }
.aviso-superior { background: var(--vg-olive); color: #fff; text-align: center; padding: .45rem 1rem; font-size: .85rem; letter-spacing: .02em; }

/* ---------- Cabecera ---------- */
.cabecera { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--vg-cream) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--vg-borde); }
.cabecera-fila { display: flex; align-items: center; gap: 1.25rem; padding-block: .7rem; }
.marca { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--vg-ink); }
.marca img { width: 52px; height: 52px; border-radius: 50%; }
.marca-texto { display: flex; flex-direction: column; line-height: 1.1; }
.marca-texto strong { font-family: var(--font-display); font-size: 1.35rem; }
.marca-texto small { opacity: .65; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.buscador { flex: 1; display: flex; position: relative; max-width: 520px; margin-inline: auto; }
.buscador input { border-radius: 999px; padding-right: 3rem; background: var(--vg-surface); }
.buscador button { position: absolute; right: .35rem; top: 50%; translate: 0 -50%; border: 0; background: transparent; color: var(--vg-olive); width: 2.4rem; height: 2.4rem; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.acciones-cabecera { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
.enlace-nav { padding: .5rem .8rem; text-decoration: none; color: var(--vg-ink); font-weight: 500; border-radius: 999px; }
.enlace-nav:hover { background: var(--vg-cream-2); }
.icono-btn { position: relative; display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .75rem; border-radius: 999px; color: var(--vg-ink); text-decoration: none; font-weight: 500; font-size: .92rem; }
.icono-btn:hover { background: var(--vg-cream-2); }
.burbuja { position: absolute; top: -.1rem; right: -.1rem; min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border-radius: 999px; background: var(--vg-rose); color: #fff; font-size: .7rem; font-weight: 600; display: grid; place-items: center; }

/* ---------- Home ---------- */
.hero { margin-bottom: 1.5rem; }
.hero-texto { display: flex; align-items: center; gap: 2rem; padding: 2.5rem; border-radius: 28px; background: linear-gradient(135deg, var(--vg-cream-2), #fff 140%); box-shadow: var(--vg-shadow); }
.hero-texto h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.hero-texto p { font-size: 1.1rem; opacity: .75; margin: .6rem 0 1.4rem; }
.hero-logo { width: 150px; height: 150px; border-radius: 50%; box-shadow: var(--vg-shadow); }
.carrusel { position: relative; border-radius: 28px; overflow: hidden; box-shadow: var(--vg-shadow); background: var(--vg-cream-2); }
.carrusel-pista { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carrusel-pista::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 8 / 3; min-height: 220px; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(40,32,16,.62), rgba(40,32,16,0) 65%); pointer-events: none; }
.slide-texto { position: absolute; z-index: 1; inset: 0 auto 0 0; display: flex; flex-direction: column; justify-content: center; gap: .6rem; padding: 2rem clamp(1.25rem, 5vw, 4rem); max-width: 620px; color: #fff; }
.slide-texto h2 { font-size: clamp(1.7rem, 4vw, 3rem); }
.slide-texto p { margin: 0; opacity: .92; }
.slide-texto .btn { align-self: flex-start; background: var(--vg-cream); color: var(--vg-ink); }
.slide-enlace { position: absolute; inset: 0; z-index: 2; }
.carrusel-flecha { position: absolute; top: 50%; translate: 0 -50%; z-index: 3; width: 2.6rem; height: 2.6rem; border: 0; border-radius: 50%; background: rgba(255,255,255,.85); color: var(--vg-ink); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.carrusel-flecha.prev { left: .8rem; } .carrusel-flecha.next { right: .8rem; }
.carrusel-puntos { position: absolute; z-index: 3; bottom: .8rem; left: 50%; translate: -50% 0; display: flex; gap: .4rem; }
.carrusel-puntos button { width: .55rem; height: .55rem; border: 0; padding: 0; border-radius: 50%; background: rgba(255,255,255,.55); cursor: pointer; }
.carrusel-puntos button.activo { background: #fff; width: 1.4rem; border-radius: 999px; }

.beneficios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2.5rem; }
.beneficios > div { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.25rem; background: var(--vg-surface); border-radius: var(--vg-radius); color: var(--vg-olive); }
.beneficios svg { width: 28px; height: 28px; }
.beneficios span { display: flex; flex-direction: column; color: var(--vg-ink); font-size: .92rem; }
.beneficios small { opacity: .65; font-size: .8rem; }

.seccion { margin-bottom: 2.75rem; }
.seccion-cabecera { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1rem; }
.seccion-titulo { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
.seccion-cabecera .seccion-titulo { margin-bottom: 0; }
.ver-todos { font-weight: 500; text-decoration: none; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip-cat { padding: .55rem 1.1rem; border-radius: 999px; background: var(--vg-surface); border: 1px solid var(--vg-borde); color: var(--vg-ink); text-decoration: none; font-weight: 500; transition: .15s; }
.chip-cat small { opacity: .5; margin-left: .25rem; }
.chip-cat:hover { background: var(--vg-olive); border-color: var(--vg-olive); color: #fff; }

/* ---------- Grilla y tarjetas ---------- */
.grilla-libros { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.4rem; }
.tarjeta-libro { display: flex; flex-direction: column; background: var(--vg-surface); border-radius: 18px; overflow: hidden; box-shadow: 0 2px 10px -4px rgba(74,65,40,.18); transition: transform .2s, box-shadow .2s; }
.tarjeta-libro:hover { transform: translateY(-4px); box-shadow: var(--vg-shadow); }
.tapa { position: relative; display: block; aspect-ratio: 2 / 3; background: var(--vg-cream-2); overflow: hidden; }
.tapa img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.tarjeta-libro:hover .tapa img { transform: scale(1.04); }
.tapa-vacia { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(160deg, var(--vg-cream-2), #fff); }
.tapa-vacia span { font-family: var(--font-display); font-size: 3rem; font-weight: 700; color: var(--vg-gold); }
.cinta { position: absolute; top: .7rem; left: .7rem; padding: .2rem .7rem; border-radius: 999px; background: var(--vg-rose); color: #fff; font-size: .72rem; font-weight: 600; }
.cinta-agotado { background: #6b6552; }
.tarjeta-info { display: flex; flex-direction: column; gap: .15rem; padding: .9rem 1rem 1rem; flex: 1; }
.tarjeta-categoria { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; opacity: .6; text-decoration: none; color: var(--vg-ink); }
.tarjeta-info h3 { font-size: 1.2rem; }
.tarjeta-info h3 a { color: var(--vg-ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tarjeta-autor { margin: 0; font-size: .85rem; opacity: .65; }
.tarjeta-pie { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .7rem; }
.tarjeta-pie form { margin: 0; }
.precio { font-size: 1.1rem; color: var(--vg-olive); }

/* ---------- Catálogo ---------- */
.migas { font-size: .85rem; opacity: .75; margin-bottom: 1rem; }
.migas a { text-decoration: none; }
.catalogo { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: start; }
.filtros { position: sticky; top: 6rem; background: var(--vg-surface); border-radius: var(--vg-radius); padding: 1.25rem; }
.filtros h2 { font-size: 1.3rem; margin-bottom: .6rem; }
.filtros ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .1rem; }
.filtros a { display: flex; justify-content: space-between; padding: .45rem .7rem; border-radius: 10px; color: var(--vg-ink); text-decoration: none; font-size: .92rem; }
.filtros a small { opacity: .5; }
.filtros a:hover { background: var(--vg-cream-2); }
.filtros a.activa { background: var(--vg-olive); color: #fff; }
.catalogo-cabecera { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.catalogo-cabecera h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.orden { display: flex; align-items: center; gap: .6rem; }
.orden label { margin: 0; white-space: nowrap; }
.orden select { width: auto; padding: .5rem .9rem; border-radius: 999px; }
.paginacion { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 2rem; }
.vacio-caja { background: var(--vg-surface); border-radius: var(--vg-radius); padding: 2.5rem 1.5rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .8rem; box-shadow: var(--vg-shadow); }
.vacio-caja h1 { font-size: 2rem; }
.vacio-caja p { margin: 0; }

/* ---------- Detalle ---------- */
.detalle { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 3rem; margin-bottom: 3rem; }
.detalle-tapa { aspect-ratio: 2 / 3; border-radius: 20px; overflow: hidden; background: var(--vg-cream-2); box-shadow: var(--vg-shadow); position: sticky; top: 6rem; align-self: start; }
.detalle-tapa img { width: 100%; height: 100%; object-fit: cover; }
.detalle-info h1 { font-size: clamp(2rem, 4vw, 3rem); margin: .3rem 0; }
.detalle-autor { font-size: 1.1rem; opacity: .7; margin: 0 0 1rem; }
.detalle-precio { font-family: var(--font-display); font-size: 2.4rem; color: var(--vg-olive); margin: .5rem 0; font-variant-numeric: lining-nums; }
.stock { display: inline-block; margin: 0 0 1rem; padding: .25rem .8rem; border-radius: 999px; font-size: .82rem; font-weight: 600; }
.stock-ok { background: #E4EAD2; color: #3F4A1C; }
.stock-pocas { background: #F7E8C8; color: #6B4E12; }
.stock-agotado { background: #F6D9D1; color: #7A2E1F; }
.comprar { display: flex; gap: .8rem; align-items: stretch; margin-bottom: 1.5rem; }
.cantidad { width: 5.2rem; text-align: center; border-radius: 999px; }
.detalle-descripcion { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--vg-borde); }
.detalle-descripcion h2 { font-size: 1.5rem; margin-bottom: .6rem; }
.detalle-descripcion p { white-space: pre-line; margin: 0; }
.ficha { margin: 1.5rem 0 0; display: grid; gap: .4rem; font-size: .9rem; }
.ficha div { display: flex; gap: .8rem; }
.ficha dt { opacity: .6; min-width: 6rem; } .ficha dd { margin: 0; }

/* ---------- Carrito ---------- */
.titulo-pagina { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 1.25rem; }
.carrito { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; align-items: start; }
.carrito-lineas { list-style: none; margin: 0; padding: 0; background: var(--vg-surface); border-radius: var(--vg-radius); box-shadow: var(--vg-shadow); }
.linea { display: grid; grid-template-columns: 72px 1fr auto; gap: 1rem; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--vg-borde); }
.linea:last-child { border-bottom: 0; }
.linea-tapa { aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--vg-cream-2); display: block; }
.linea-tapa img { width: 100%; height: 100%; object-fit: cover; }
.linea-tapa .tapa-vacia span { font-size: 1.4rem; }
.linea-info { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.linea-titulo { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; color: var(--vg-ink); text-decoration: none; }
.linea-aviso { color: #8A4B10; font-size: .82rem; font-weight: 500; }
.linea-agotada { opacity: .7; }
.linea-acciones { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: flex-end; }
.linea-acciones form { margin: 0; }
.linea-subtotal { min-width: 5.5rem; text-align: right; }
.enlace-quitar { border: 0; background: none; color: #A4402E; cursor: pointer; font: inherit; font-size: .85rem; text-decoration: underline; padding: .3rem; }
.resumen { position: sticky; top: 6rem; background: var(--vg-surface); border-radius: var(--vg-radius); padding: 1.5rem; box-shadow: var(--vg-shadow); }
.resumen h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.resumen dl { margin: 0; display: grid; gap: .5rem; }
.resumen dl div { display: flex; justify-content: space-between; gap: 1rem; font-size: .95rem; }
.resumen dd { margin: 0; text-align: right; }
.resumen-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--vg-borde); }
.resumen-total strong { font-family: var(--font-display); font-size: 1.9rem; color: var(--vg-olive); font-variant-numeric: lining-nums; }
.nota { margin-top: .8rem; line-height: 1.4; }
.enlace-secundario { display: block; text-align: center; margin-top: 1rem; font-size: .9rem; }

/* ---------- Auth y cuenta ---------- */
.tarjeta-auth { max-width: 460px; margin: 1rem auto; background: var(--vg-surface); border-radius: 24px; padding: 2rem; box-shadow: var(--vg-shadow); }
.tarjeta-auth h1 { font-size: 2.2rem; text-align: center; }
.tarjeta-auth > .muted { text-align: center; margin: .3rem 0 1rem; }
.auth-pie { text-align: center; margin: 1.25rem 0 0; font-size: .92rem; }
.cuenta-grilla { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.caja { background: var(--vg-surface); border-radius: var(--vg-radius); padding: 1.5rem; box-shadow: var(--vg-shadow); }
.caja h2 { font-size: 1.5rem; margin-bottom: .5rem; }
.caja .btn { margin-top: 1.25rem; }
.caja-ancha { grid-column: 1 / -1; }
.salir { margin-top: 1.5rem; }

/* ---------- Pie ---------- */
.pie { background: var(--vg-surface); border-top: 1px solid var(--vg-borde); padding-top: 2.5rem; }
.pie-grilla { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.pie-marca { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; }
.pie h4 { font-size: 1.15rem; margin-bottom: .6rem; }
.pie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-size: .92rem; }
.pie a { text-decoration: none; }
.pie p { margin: .3rem 0 0; opacity: .7; font-size: .92rem; }
.redes { display: flex; gap: .6rem; }
.redes a { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--vg-cream-2); color: var(--vg-olive); }
.redes a:hover { background: var(--vg-olive); color: #fff; }
.pie-legal { display: flex; align-items: center; gap: .4rem; padding-block: 1.5rem; margin-top: 1.5rem; border-top: 1px solid var(--vg-borde); font-size: .82rem; opacity: .7; }
.pie-legal svg { width: 14px; height: 14px; stroke: var(--vg-rose); fill: var(--vg-rose); }
.whatsapp-flotante { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 30; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: #3f9a5b; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px -6px rgba(0,0,0,.35); transition: transform .15s; }
.whatsapp-flotante:hover { transform: scale(1.07); }
.whatsapp-flotante svg { width: 28px; height: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .catalogo { grid-template-columns: 1fr; }
  .filtros { position: static; }
  .filtros ul { flex-direction: row; flex-wrap: wrap; gap: .4rem; }
  .filtros a { border: 1px solid var(--vg-borde); border-radius: 999px; gap: .4rem; }
  .detalle { grid-template-columns: 1fr; gap: 1.5rem; }
  .detalle-tapa { position: static; max-width: 320px; margin-inline: auto; width: 100%; }
  .carrito { grid-template-columns: 1fr; }
  .resumen { position: static; }
  .cuenta-grilla { grid-template-columns: 1fr; }
  .pie-grilla { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .cabecera-fila { flex-wrap: wrap; gap: .6rem; }
  .buscador { order: 3; flex-basis: 100%; max-width: none; }
  .marca-texto small, .solo-escritorio, .enlace-nav { display: none; }
  .beneficios { grid-template-columns: 1fr; }
  .hero-texto { flex-direction: column; text-align: center; padding: 1.75rem; }
  .hero-logo { width: 110px; height: 110px; }
  .slide { aspect-ratio: 4 / 3; }
  .grilla-libros { grid-template-columns: repeat(2, 1fr); gap: .9rem; }
  .linea { grid-template-columns: 56px 1fr; }
  .linea-acciones { grid-column: 1 / -1; justify-content: space-between; }
  .fila-2 { grid-template-columns: 1fr; }
  .pie-grilla { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Checkout y pedidos ---------- */
.checkout { display: grid; grid-template-columns: 1fr 360px; gap: 2rem; align-items: start; }
.checkout-datos { display: grid; gap: 1.5rem; }
.fila-3 { display: grid; grid-template-columns: 1fr 140px; gap: 1rem; }
.checkout .caja h2 { font-size: 1.5rem; }
.checkout textarea { width: 100%; padding: .7rem .9rem; border: 1.5px solid var(--vg-borde); border-radius: 12px; background: var(--vg-input); color: var(--vg-ink); font: inherit; resize: vertical; }
.opcion-pago { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; border: 1.5px solid var(--vg-borde); border-radius: 14px; margin-top: .7rem; }
.opcion-pago input { width: auto; accent-color: var(--vg-olive); }
.opcion-pago label { margin: 0; display: flex; flex-direction: column; font-size: .95rem; cursor: pointer; }
.opcion-pago small { opacity: .65; font-weight: 400; }
.opcion-activa { border-color: var(--vg-olive); background: color-mix(in srgb, var(--vg-olive) 6%, var(--vg-surface)); }
.opcion-deshabilitada { opacity: .5; }
.opcion-deshabilitada label { cursor: not-allowed; }
.datos-banco { margin-top: 1.25rem; padding: 1.1rem 1.25rem; background: var(--vg-cream); border-radius: 14px; }
.datos-banco h3, .caja-destacada h3 { font-size: 1.2rem; margin-bottom: .6rem; }
.datos-banco dl, .datos-banco-lista, .pedido-totales { margin: 0 0 .8rem; display: grid; gap: .35rem; }
.datos-banco dl div, .datos-banco-lista div, .pedido-totales div { display: flex; justify-content: space-between; gap: 1rem; font-size: .93rem; }
.datos-banco dt, .datos-banco-lista dt, .pedido-totales dt { opacity: .65; }
.datos-banco dd, .datos-banco-lista dd, .pedido-totales dd { margin: 0; text-align: right; }
.copiable { user-select: all; font-variant-numeric: tabular-nums; word-break: break-all; }
.comprobante-opcional { margin-top: 1.25rem; }
.comprobante-opcional input[type=file], .form-comprobante input[type=file] { padding: .55rem; font-size: .85rem; }
.resumen-items { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; font-size: .9rem; }
.resumen-items li { display: flex; justify-content: space-between; gap: 1rem; }
.resumen-items li span:first-child { overflow: hidden; text-overflow: ellipsis; }
.resumen button:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.lista-pedidos { display: grid; gap: .8rem; }
.tarjeta-pedido { display: grid; grid-template-columns: 1fr auto auto; gap: 1.25rem; align-items: center; padding: 1rem 1.25rem; background: var(--vg-surface); border-radius: var(--vg-radius); box-shadow: 0 2px 10px -4px rgba(74,65,40,.18); color: var(--vg-ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.tarjeta-pedido:hover { transform: translateY(-2px); box-shadow: var(--vg-shadow); }
.tarjeta-pedido > div { display: flex; flex-direction: column; gap: .15rem; }
.pedido-numero { font-family: var(--font-display); font-size: 1.3rem; }
.pedido-medio { align-items: flex-start; }
.pedido-total { font-size: 1.1rem; color: var(--vg-olive); text-align: right; }
.aviso-vence { color: #8A4B10; opacity: 1; }
.estado { display: inline-block; padding: .2rem .8rem; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.estado-pendientepago { background: #F7E8C8; color: #6B4E12; }
.estado-pagorecibido { background: #DDE6F2; color: #274466; }
.estado-preparando { background: #E7DDF2; color: #4A2F6B; }
.estado-enviado { background: #D8EBF0; color: #1E5A6B; }
.estado-entregado { background: #E4EAD2; color: #3F4A1C; }
.estado-cancelado { background: #F1D9D3; color: #7A2E1F; }

.pedido-cabecera { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.pedido-cabecera h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
.pedido-grilla { display: grid; grid-template-columns: 1fr 320px; gap: 1.75rem; align-items: start; }
.pedido-principal { display: grid; gap: 1.25rem; }
.pedido-lateral { display: grid; gap: 1rem; position: sticky; top: 6rem; }
.caja-destacada { border: 1.5px solid var(--vg-gold); }
.pedido-items { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .6rem; }
.pedido-items li { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .6rem; border-bottom: 1px solid var(--vg-borde); }
.pedido-totales .total { padding-top: .6rem; border-top: 1px solid var(--vg-borde); font-size: 1.1rem; }
.pedido-totales .total dd { font-family: var(--font-display); font-size: 1.6rem; color: var(--vg-olive); font-variant-numeric: lining-nums; }
address { font-style: normal; line-height: 1.6; }
.form-comprobante { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.form-comprobante input[type=file] { flex: 1; min-width: 200px; }
.form-comprobante .btn { margin: 0; }
.linea-tiempo { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; position: relative; }
.linea-tiempo li { display: flex; gap: .8rem; position: relative; }
.linea-tiempo li:not(:last-child)::before { content: ""; position: absolute; left: .42rem; top: 1.1rem; bottom: -1.1rem; width: 2px; background: var(--vg-borde); }
.linea-tiempo .punto { width: .9rem; height: .9rem; border-radius: 50%; margin-top: .3rem; flex: none; background: var(--vg-gold); box-shadow: 0 0 0 3px var(--vg-surface); position: relative; z-index: 1; }
.linea-tiempo .estado-cancelado { background: #C0594A; }
.linea-tiempo .estado-entregado { background: #7A8F3A; }
.linea-tiempo div { display: flex; flex-direction: column; }
.pedido-lateral .btn-ancho { margin-top: 0; }

@media (max-width: 900px) {
  .checkout, .pedido-grilla { grid-template-columns: 1fr; }
  .pedido-lateral { position: static; }
}
@media (max-width: 720px) {
  .tarjeta-pedido { grid-template-columns: 1fr auto; }
  .pedido-medio { grid-column: 1 / -1; order: 3; }
  .fila-3 { grid-template-columns: 1fr 110px; }
}
