﻿/* =========================================================
   CARRITO
   Usa las variables que ya existen en tienda-general.css.
   Los valores de respaldo (2º argumento de var) solo se usan
   si alguna variable no estuviera definida.
   ========================================================= */

/* ---------- Cabecera ---------- */
.envio-gratis-barra
{
    display: grid;
    gap: 0.55rem;
    margin: 0.75rem 0;
    padding: 0.8rem 1rem;
    border: 1px solid #b8ded0;
    border-radius: 0.65rem;
    background: #eff8f3;
    color: #245a43;
    font-size: 0.9rem;
    line-height: 1.45;
}

.envio-gratis-barra[hidden] { display: none; }
.envio-gratis-barra p { margin: 0; color: inherit; }
.envio-gratis-barra progress
{
    display: block;
    width: 100%;
    height: 0.65rem;
    border: 0;
    border-radius: 999px;
    background: #dcebe3;
    color: #23825d;
    accent-color: #23825d;
}
.envio-gratis-barra progress::-webkit-progress-bar { border-radius: 999px; background: #dcebe3; }
.envio-gratis-barra progress::-webkit-progress-value { border-radius: 999px; background: #23825d; }
.envio-gratis-barra progress::-moz-progress-bar { border-radius: 999px; background: #23825d; }

.carrito-cabecera
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 1rem;
}

.carrito-cabecera h1 { margin: 0; }

.carrito-contador
{
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    background: rgba(14, 124, 148, 0.1);
    color: var(--teal-fuerte, #0b6e87);
    font-size: 0.85rem;
    font-weight: 700;
}

/* ---------- Layout: lista + resumen ---------- */
.carrito-layout
{
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: 1.75rem;
    align-items: start;
    margin-top: 1.75rem;
}

.carrito-form
{
    display: grid;
    gap: 1.1rem;
    margin: 0;
}

.carrito-lista
{
    display: grid;
    gap: 0.9rem;
    max-height: max(15rem, calc(100dvh - 25rem));
    overflow-y: auto;
    overflow-x: hidden;
    margin: -0.75rem;
    padding: 0.75rem 1.25rem 0.75rem 0.75rem;
    overscroll-behavior: contain;
    scrollbar-color: var(--teal-fuerte, #0b6e87) #e8f1f4;
    scrollbar-width: thin;
}

.carrito-lista::-webkit-scrollbar { width: 0.55rem; }
.carrito-lista::-webkit-scrollbar-track { border-radius: 999px; background: #e8f1f4; }
.carrito-lista::-webkit-scrollbar-thumb { border: 2px solid #e8f1f4; border-radius: 999px; background: var(--teal-fuerte, #0b6e87); }

/* ---------- Fila de producto ---------- */
.carrito-fila
{
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr) auto 10.5rem;
    grid-template-areas: "img info cant total";
    align-items: center;
    gap: 0.75rem 1.4rem;
    padding: 1rem 1.4rem 1rem 1rem;
    border: 1px solid var(--linea, #dbe6ee);
    border-radius: var(--radio, 16px);
    background: #ffffff;
    box-shadow: var(--sombra-suave, 0 6px 20px rgba(11, 45, 74, 0.06));
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.carrito-fila:hover,
.carrito-fila:focus-within
{
    border-color: rgba(14, 124, 148, 0.4);
    box-shadow: 0 12px 30px rgba(11, 45, 74, 0.1);
}

/* Miniatura */
.carrito-img
{
    grid-area: img;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    overflow: hidden;
    padding: 0.35rem;
    border: 1px solid var(--linea, #dbe6ee);
    border-radius: 0.7rem;
    background: #ffffff;
    color: var(--teal-fuerte, #0b6e87);
}

.carrito-img img { width: 100%; height: 100%; object-fit: contain; }
.carrito-img svg { width: 2.3rem; height: 2.3rem; }

/* Datos del producto */
.carrito-info
{
    grid-area: info;
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.carrito-nombre
{
    color: var(--titulo, #0b2d4a);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
}

.carrito-marca,
.carrito-modelo,
.carrito-unitario
{
    color: var(--texto-suave, #5d7384);
    font-size: 0.82rem;
}

.carrito-unitario { margin-top: 0.15rem; }

.carrito-quitar
{
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    justify-self: start;
    margin-top: 0.5rem;
    padding: 0.15rem 0;
    border: 0;
    background: none;
    color: var(--texto-suave, #5d7384);
    font: inherit;
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

.carrito-quitar svg { width: 1rem; height: 1rem; }
.carrito-quitar:hover,
.carrito-quitar:focus-visible { color: #c0392b; }

/* Selector de cantidad */
.cantidad
{
    grid-area: cant;
    display: inline-flex;
    align-items: center;
    padding: 0.2rem;
    border: 1px solid var(--linea, #dbe6ee);
    border-radius: 999px;
    background: #f4f9fb;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.cantidad:focus-within
{
    border-color: var(--teal-fuerte, #0b6e87);
    box-shadow: 0 0 0 3px rgba(14, 124, 148, 0.18);
}

.cantidad__btn
{
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(11, 45, 74, 0.15);
    color: var(--teal-fuerte, #0b6e87);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.cantidad__btn:hover,
.cantidad__btn:focus-visible
{
    background: var(--teal-fuerte, #0b6e87);
    color: #ffffff;
}

.carrito-fila .cantidad input
{
    width: 3rem;
    padding: 0.3rem 0;
    border: 0;
    outline: 0;
    box-shadow: none;
    background: transparent;
    color: var(--titulo, #0b2d4a);
    font-weight: 700;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.carrito-fila .cantidad input::-webkit-outer-spin-button,
.carrito-fila .cantidad input::-webkit-inner-spin-button
{
    margin: 0;
    -webkit-appearance: none;
}

/* Subtotal de la fila */
.carrito-subtotal
{
    grid-area: total;
    width: 10.5rem;
    min-width: 10.5rem;
    color: var(--titulo, #0b2d4a);
    font-size: 1.15rem;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

/* ---------- Acciones bajo la lista ---------- */
.carrito-acciones
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem 1rem;
}

.carrito-acciones .btn-accion {
    flex: 0 0 auto;
}

.carrito-acciones .btn-accion.btn-outline-azul,
.carrito-acciones .btn-accion.btn-outline-rojo,
.carrito-acciones .btn-accion.btn-neutro,
.carrito-acciones .btn-accion.btn-primario {
    min-width: 0;
}

.carrito-acciones .btn-accion.btn-outline-azul {
    border-color: #0096c7;
    color: #0096c7;
}

.carrito-acciones .btn-accion.btn-outline-rojo {
    border-color: #c0392b;
    color: #c0392b;
}

.carrito-acciones .btn-accion.btn-primario {
    background: #173861;
    border-color: #173861;
    color: #ffffff;
}

.carrito-acciones .btn-accion.btn-neutro {
    border-color: #cdd5e0;
    color: #173861;
}

.carrito-seguir
{
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--teal-fuerte, #0b6e87);
    font-weight: 600;
    text-decoration: none;
}

.carrito-seguir svg { width: 1.1rem; height: 1.1rem; }
.carrito-seguir:hover { text-decoration: underline; }

.carrito-actualizar:disabled
{
    opacity: 0.45;
    cursor: not-allowed;
}

/* ---------- Forma de pago / forma de entrega ---------- */
.carrito-pago
{
    margin: 0;
    padding: 1.1rem 1.25rem;
    border: 1px solid rgba(14, 124, 148, 0.18);
    border-radius: var(--radio, 16px);
    background: #f6fafb;
}

.carrito-pago + .carrito-pago { margin-top: 1rem; }

.carrito-pago legend
{
    padding: 0 0.4rem;
    font-weight: 700;
    color: var(--teal-fuerte, #0b6e87);
}

.carrito-pago-opciones
{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.6rem;
    margin-top: 0.4rem;
}

.carrito-pago-opcion
{
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid rgba(14, 124, 148, 0.25);
    border-radius: calc(var(--radio, 16px) - 6px);
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.carrito-pago-opcion:has(input:checked)
{
    border-color: var(--teal-fuerte, #0b6e87);
    box-shadow: 0 0 0 2px rgba(14, 124, 148, 0.18) inset;
}

.carrito-pago-opcion input { accent-color: var(--teal-fuerte, #0b6e87); margin: 0; }

.carrito-pago-opcion span { font-size: 0.92rem; font-weight: 600; color: #0a2f4d; }

.carrito-pago-nota
{
    margin: 0.7rem 0 0;
    font-size: 0.82rem;
    color: #5b7180;
}

.carrito-envio-direccion { margin-top: 1rem; }

.carrito-envio-grid
{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.75rem;
}

.carrito-envio-grid label
{
    display: grid;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #0a2f4d;
}

.carrito-envio-grid label.carrito-envio-ancho { grid-column: 1 / -1; }

.carrito-envio-grid input
{
    padding: 0.6rem 0.75rem;
    border: 1px solid rgba(14, 124, 148, 0.3);
    border-radius: calc(var(--radio, 16px) - 8px);
    font: inherit;
    color: #0a2f4d;
    background: #ffffff;
}

.carrito-envio-grid input:focus
{
    outline: none;
    border-color: var(--teal-fuerte, #0b6e87);
    box-shadow: 0 0 0 2px rgba(14, 124, 148, 0.18);
}

/* ---------- Resumen del pedido ---------- */
.carrito-resumen
{
    position: sticky;
    top: 1.5rem;
    display: grid;
    gap: 1.2rem;
    padding: 1.6rem;
    border-radius: calc(var(--radio, 16px) + 4px);
    background: var(--grad-oscuro, linear-gradient(145deg, #0a2f4d, #0b4763));
    box-shadow: 0 20px 44px rgba(8, 38, 66, 0.28);
    color: #cfe3ef;
}

.carrito-resumen h2
{
    margin: 0;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
}

.resumen-lineas
{
    display: grid;
    gap: 0.6rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.resumen-linea
{
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.95rem;
}

.resumen-linea span:last-child { color: #ffffff; font-weight: 600; }

.resumen-total
{
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.resumen-total span { font-size: 0.95rem; }

.resumen-total strong
{
    color: #ffffff;
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.carrito-resumen form { margin: 0; }

.carrito-resumen .boton
{
    display: flex;
    justify-content: center;
    width: 100%;
    padding-block: 0.95rem;
    background: #ffffff;
    box-shadow: none;
    color: var(--teal-fuerte, #0b6e87);
    font-weight: 700;
    transition: background 0.15s ease;
}

.carrito-resumen .boton:hover,
.carrito-resumen .boton:focus-visible { background: #e6f5f9; }

.resumen-garantias
{
    display: grid;
    gap: 0.7rem;
    margin: 0;
    padding: 1.1rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    list-style: none;
    font-size: 0.85rem;
}

.resumen-garantias li { display: flex; align-items: center; gap: 0.65rem; }
.resumen-garantias svg { flex: none; width: 1.15rem; height: 1.15rem; color: #7fd4e6; }

/* ---------- Carrito vacío ---------- */
.carrito-vacio
{
    display: grid;
    justify-items: center;
    gap: 0.8rem;
    margin-top: 1.75rem;
    padding: 3.5rem 1.5rem;
    border: 1px dashed var(--linea, #dbe6ee);
    border-radius: var(--radio, 16px);
    background: #ffffff;
    text-align: center;
}

.carrito-vacio svg { width: 3rem; height: 3rem; color: var(--teal-fuerte, #0b6e87); }
.carrito-vacio p { margin: 0; color: var(--texto-suave, #5d7384); }

/* ---------- Pedidos (otras vistas, sin cambios) ---------- */
.pedidos article
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.3rem;
    border: 1px solid var(--linea);
    border-radius: var(--radio);
    background: #ffffff;
    box-shadow: var(--sombra-suave);
}

.pedidos small { display: block; color: var(--texto-suave); font-size: 0.8rem; }

.mis-pedidos-pagina{padding-block:2.5rem;background:linear-gradient(145deg,#edf9fc,#f8fcfd 62%,#eaf7fb);color:#234c6b}
.mis-pedidos-contenedor{width:min(100% - 2rem,100rem);max-width:100rem}
.mis-pedidos-cabecera{display:flex;align-items:center;gap:1rem;margin:0 0 1.6rem}
.mis-pedidos-cabecera__icono{display:grid;width:4.75rem;height:4.75rem;flex:0 0 4.75rem;place-items:center;color:#0785a7}
.mis-pedidos-cabecera__icono svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.mis-pedidos-cabecera h1{margin:0;color:#0c3b5c;font-size:clamp(2rem,4vw,3.5rem);line-height:1.05}
.mis-pedidos-cabecera p{margin:.45rem 0 0;color:#7592ad;font-size:clamp(.95rem,1.5vw,1.2rem)}
.mis-pedidos-lista{display:grid;gap:.8rem}
.mis-pedido-card{display:grid;grid-template-columns:minmax(15rem,1.1fr) auto minmax(19rem,1.9fr) minmax(8rem,.55fr) 1.5rem;align-items:center;gap:1rem;min-width:0;padding:1rem 1.2rem;border:1px solid rgba(218,237,245,.9);border-radius:20px;background:rgba(255,255,255,.94);box-shadow:0 9px 24px rgba(25,95,129,.07)}
.mis-pedido-producto{display:flex;min-width:0;align-items:center;gap:.9rem}
.mis-pedido-producto__imagen,.mis-pedido-productos__imagen{display:grid;flex:0 0 auto;place-items:center;overflow:hidden;border-radius:15px;background:linear-gradient(145deg,#edf7fa,#e5f1f7);color:#1687a4;font-weight:800}
.mis-pedido-producto__imagen{width:5.25rem;height:5.25rem}
.mis-pedido-producto__imagen img,.mis-pedido-productos__imagen img{width:100%;height:100%;object-fit:contain}
.mis-pedido-producto__imagen span,.mis-pedido-productos__imagen span{font-size:1rem}
.mis-pedido-producto__imagen [hidden],.mis-pedido-productos__imagen [hidden]{display:none}
.mis-pedido-producto__texto{display:grid;min-width:0;gap:.35rem}
.mis-pedido-producto__texto>strong{color:#315d7d;font-size:.98rem}
.mis-pedido-producto__texto>span{overflow:hidden;color:#718ba5;text-overflow:ellipsis;white-space:nowrap}
.mis-pedido-ver-mas{justify-self:start;padding:0;border:0;background:none;color:#0785a7;font:inherit;font-size:.82rem;font-weight:700;text-decoration:underline;text-underline-offset:.15em;cursor:pointer}
.mis-pedido-estado{display:inline-flex;min-height:2.8rem;align-items:center;justify-content:center;gap:.45rem;padding:.55rem .85rem;border-radius:999px;background:#e5f8f8;color:#087d94;font-size:.88rem;font-weight:750;line-height:1.2;white-space:nowrap}
.mis-pedido-estado svg,.mis-pedido-meta__pago svg,.mis-pedido-envio>svg{width:1.35rem;height:1.35rem;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.mis-pedido-estado--completado{background:#e6f7ed;color:#16794a}
.mis-pedido-estado--envio{background:#e6f0ff;color:#1970b6}
.mis-pedido-estado--cancelado,.mis-pedido-estado--error{background:#e6f0ff;color:#1970b6}
.mis-pedido-meta{display:grid;min-width:0;gap:.35rem;padding-left:1rem;border-left:1px solid #dceaf0;color:#718ba5;font-size:.86rem}
.mis-pedido-meta__pago{display:flex;align-items:flex-start;gap:.5rem;overflow-wrap:anywhere}
.mis-pedido-meta__pago svg{color:#31678a}
.mis-pedido-meta__direccion{padding-left:1.85rem;overflow-wrap:anywhere}
.mis-pedido-meta small{color:#829ab0;font-size:.77rem;line-height:1.4}
.mis-pedido-meta small a{color:#0785a7;text-decoration:underline;text-underline-offset:.12em}
.mis-pedido-cancelar{display:inline-flex;min-height:2.35rem;justify-self:start;align-items:center;gap:.4rem;padding:.48rem .85rem;border:1px solid #e8b8b2;border-radius:10px;background:#fff7f5;color:#a63c36;font-size:.84rem;font-weight:750;text-decoration:none;transition:background-color .16s ease,border-color .16s ease,color .16s ease,transform .16s ease}
.mis-pedido-cancelar::before{content:"×";display:grid;width:1.15rem;height:1.15rem;place-items:center;border-radius:50%;background:#fbe5e1;color:#a63c36;font-size:1rem;line-height:1}
.mis-pedido-cancelar:hover{border-color:#d88c84;background:#ffefec;color:#8f2d28;transform:translateY(-1px)}
.mis-pedido-envio{display:flex;min-height:4.3rem;align-items:center;justify-content:center;gap:.65rem;padding:.65rem;border-radius:20px;background:#f0f9fc;color:#315d7d}
.mis-pedido-envio>svg{width:1.7rem;height:1.7rem}
.mis-pedido-envio>span{display:grid;gap:.1rem;color:#718ba5;font-size:.8rem}
.mis-pedido-envio strong{color:#315d7d;font-size:.88rem}
.mis-pedido-detalle{display:grid;width:2rem;height:2.5rem;place-items:center;padding:0;border:0;background:transparent;color:#91a9bd;cursor:pointer}
.mis-pedido-detalle svg{width:1.5rem;height:1.5rem;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.mis-pedido-detalle:hover,.mis-pedido-detalle:focus-visible{color:#0785a7}
.mis-pedido-modal{width:min(92vw,42rem);max-width:42rem;max-height:min(88vh,54rem);padding:0;overflow:visible;border:0;border-radius:20px;background:transparent;color:#234c6b}
.mis-pedido-modal::backdrop{background:rgba(11,42,61,.48);backdrop-filter:blur(3px)}
.mis-pedido-modal__panel{max-height:min(88vh,54rem);overflow:auto;border:1px solid #d7ebf3;border-radius:20px;background:#fff;box-shadow:0 24px 70px rgba(10,49,71,.24)}
.mis-pedido-modal__cabecera{position:sticky;top:0;z-index:1;display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:1.25rem 1.4rem;border-bottom:1px solid #e2eff4;background:rgba(255,255,255,.96)}
.mis-pedido-modal__eyebrow{color:#0785a7;font-size:.76rem;font-weight:750;letter-spacing:.07em;text-transform:uppercase}
.mis-pedido-modal__cabecera h2{margin:.15rem 0 .6rem;color:#0c3b5c;font-size:1.5rem;overflow-wrap:anywhere}
.mis-pedido-modal__cerrar{display:grid;width:2.4rem;height:2.4rem;flex:0 0 auto;place-items:center;border:1px solid #d7e8ef;border-radius:50%;background:#f5fafc;color:#315d7d;font-size:1.5rem;line-height:1;cursor:pointer}
.mis-pedido-modal__contenido{display:grid;gap:1rem;padding:1.25rem 1.4rem}
.mis-pedido-modal__seccion h3{display:flex;align-items:center;justify-content:space-between;margin:0 0 .75rem;color:#234c6b;font-size:1rem}
.mis-pedido-modal__seccion h3 span{display:grid;min-width:1.7rem;height:1.7rem;place-items:center;padding:0 .4rem;border-radius:999px;background:#eaf7fb;color:#0785a7;font-size:.8rem}
.mis-pedido-productos{display:grid;gap:.55rem;max-height:42vh;margin:0;padding:0;overflow:auto;list-style:none}
.mis-pedido-productos li{display:grid;grid-template-columns:3.7rem minmax(0,1fr) auto;align-items:center;gap:.8rem;padding:.6rem;border:1px solid #e3eff4;border-radius:13px;background:#fafdfe}
.mis-pedido-productos__imagen{width:3.7rem;height:3.7rem;border-radius:10px}
.mis-pedido-productos__nombre{display:grid;min-width:0;gap:.25rem}
.mis-pedido-productos__nombre strong{color:#315d7d;font-size:.9rem;overflow-wrap:anywhere}
.mis-pedido-productos__nombre small{color:#829ab0}
.mis-pedido-productos__precio{color:#234c6b;font-size:.88rem;white-space:nowrap}
.mis-pedido-modal__datos{display:grid;gap:.55rem;padding:.9rem 1rem;border-radius:13px;background:#f1f9fc;color:#718ba5;font-size:.88rem}
.mis-pedido-modal__datos p{margin:0;overflow-wrap:anywhere}
.mis-pedido-modal__datos strong{color:#315d7d}
.mis-pedido-modal__datos a{color:#0785a7}
.mis-pedido-modal__total{display:flex;justify-content:space-between;gap:1rem;padding-top:.65rem;border-top:1px solid #d9eaf1}
.mis-pedido-modal__total strong{font-size:1.05rem}
.mis-pedido-modal__acciones{display:flex;flex-wrap:wrap;gap:.6rem}
.mis-pedido-modal__acciones form{margin:0}
.mis-pedido-modal__acciones .boton{display:inline-flex;align-items:center;justify-content:center;min-height:2.7rem;padding:.6rem .9rem;border-radius:10px;text-decoration:none}
.mis-pedido-card button:focus-visible,.mis-pedido-card a:focus-visible,.mis-pedido-modal button:focus-visible,.mis-pedido-modal a:focus-visible{outline:3px solid #f0b429;outline-offset:3px}

/* ---------- Responsive ---------- */
@media (max-width: 960px)
{
    .carrito-lista
    {
        max-height: none;
        overflow: visible;
        margin: 0;
        padding: 0;
        overscroll-behavior: auto;
    }

    .carrito-layout { grid-template-columns: 1fr; }
    .carrito-resumen { position: static; }
}

@media(max-width:1100px){
	.mis-pedido-card{grid-template-columns:minmax(14rem,1fr) auto minmax(15rem,1.2fr) 1.5rem}
	.mis-pedido-envio{grid-column:1;grid-row:2;min-height:auto;justify-content:flex-start;width:max-content;margin-left:6.15rem;padding:.4rem .75rem}
	.mis-pedido-detalle{grid-column:4;grid-row:1 / span 2}
}
@media(max-width:760px){
	.mis-pedidos-pagina{padding-block:1.7rem}
	.mis-pedidos-cabecera{align-items:flex-start;gap:.65rem}
	.mis-pedidos-cabecera__icono{width:3.5rem;height:3.5rem;flex-basis:3.5rem}
	.mis-pedido-card{grid-template-columns:minmax(0,1fr) auto 1.5rem;gap:.75rem;padding:.85rem;border-radius:16px}
	.mis-pedido-producto{grid-column:1;grid-row:1}
	.mis-pedido-producto__imagen{width:4.2rem;height:4.2rem}
	.mis-pedido-estado{grid-column:2;grid-row:1;font-size:.76rem}
	.mis-pedido-meta{grid-column:1 / span 2;grid-row:2;padding:.7rem 0 0;border-top:1px solid #e2eff4;border-left:0;font-size:.8rem}
	.mis-pedido-envio{grid-column:1;grid-row:3;margin:0}
	.mis-pedido-detalle{grid-column:3;grid-row:1 / span 3}
}
@media(max-width:420px){
	.mis-pedidos-contenedor{width:calc(100% - 1rem)}
	.mis-pedidos-cabecera__icono{width:2.8rem;height:2.8rem;flex-basis:2.8rem}
	.mis-pedido-card{grid-template-columns:minmax(0,1fr) 1.25rem}
	.mis-pedido-producto{grid-column:1;grid-row:1}
	.mis-pedido-estado{grid-column:1;grid-row:2;justify-self:start;min-height:2.2rem}
	.mis-pedido-meta{grid-column:1;grid-row:3}
	.mis-pedido-envio{grid-column:1;grid-row:4}
	.mis-pedido-detalle{grid-column:2;grid-row:1 / span 4}
	.mis-pedido-productos li{grid-template-columns:3rem minmax(0,1fr)}
	.mis-pedido-productos__imagen{width:3rem;height:3rem}
	.mis-pedido-productos__precio{grid-column:2}
	.mis-pedido-modal__cabecera,.mis-pedido-modal__contenido{padding:1rem}
}

@media (max-width: 640px)
{
    .carrito-fila
    {
        grid-template-columns: 4.5rem minmax(0, 1fr) 10.5rem;
        grid-template-areas:
            "img  info  info"
            "cant cant  total";
        padding: 0.9rem;
    }

    .carrito-subtotal { width: 10.5rem; min-width: 10.5rem; }
    .carrito-acciones { flex-direction: column-reverse; align-items: stretch; }
    .carrito-acciones .boton { text-align: center; }
    .carrito-seguir { justify-content: center; }

    .carrito-resumen { padding: 1rem; }
    .carrito-resumen .boton { width: 100%; }
}

@media (max-width: 420px)
{
    .carrito-fila
    {
        grid-template-columns: 3.8rem minmax(0, 1fr);
        grid-template-areas: "img info" "cant cant" "total total";
    }

    .carrito-subtotal { width: auto; min-width: 0; text-align: left; }
    .cantidad { justify-self: start; }
}

@media (prefers-reduced-motion: reduce)
{
    .carrito-fila,
    .cantidad,
    .cantidad__btn,
    .carrito-quitar,
    .carrito-resumen .boton { transition: none; }
}

/* Ajuste compartido con las vistas públicas. */
.page-shell .carrito-panel {
    display: grid;
    gap: 1.1rem;
    padding: 1.25rem;
    border: 1px solid #d6e8ec;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 14px 30px rgba(23, 56, 97, .08);
}
.page-shell .carrito-fila {
    border-color: #d6e8ec;
    border-radius: 0;
    background: #f9fcfd;
    box-shadow: none;
}
.page-shell .carrito-fila:hover,
.page-shell .carrito-fila:focus-within { border-color: #9dcfd6; box-shadow: 0 12px 24px rgba(94, 167, 179, .12); }
.page-shell .carrito-nombre,
.page-shell .carrito-subtotal,
.page-shell .carrito-fila .cantidad input { color: #5d7b84; }
.page-shell .carrito-marca,
.page-shell .carrito-modelo,
.page-shell .carrito-unitario { color: #6f8a91; }
.carrito-modelo code { font-family: var(--font-body, "DM Mono", monospace); }
.page-shell .carrito-fila.is-pending-removal { opacity: .58; }
.page-shell .carrito-pendiente { display: none; color: #b16b3b; font-size: .78rem; font-weight: 700; }
.page-shell .carrito-fila.is-pending-removal .carrito-pendiente { display: block; }
.page-shell .cantidad { border-color: #c7e2e6; background: #f4fcfc; }
.page-shell .cantidad__btn { color: #5ea7b3; box-shadow: 0 1px 3px rgba(94, 167, 179, .2); }
.page-shell .cantidad__btn:hover,
.page-shell .cantidad__btn:focus-visible { background: #b8e3e8; color: #527b84; }
.page-shell .carrito-resumen {
    position: static;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid #d6e8ec;
    border-radius: 0;
    background: #eaf7f8;
    box-shadow: none;
    color: #5d7b84;
}
.page-shell .carrito-resumen strong { color: #527b84; font-size: 1.35rem; }
.page-shell .carrito-acciones { justify-content: flex-start; }
.page-shell .carrito-acciones .boton { background: #d8f2f4; color: #527b84; }
.page-shell .carrito-acciones .boton:hover { background: #b8e3e8; color: #4f747d; }
.page-shell .carrito-acciones .boton:not(.secundario),
.page-shell .carrito-acciones .btn-accion.btn-primario,
.page-shell .cotizacion-form .boton:not(.secundario),
.page-shell .cotizacion-panel .boton:not(.secundario) { min-height: 3rem; padding: .65rem 1rem; border: 1px solid #078eae; border-radius: .8rem; background: #0799bc; color: #fff; font: 700 .88rem/1.2 var(--fuente); letter-spacing: 0; text-transform: none; }

/* Carrito: panel claro y compacto, siguiendo la referencia visual. */
.page-shell:has(.carrito-seccion) {
    min-height: 100vh;
    padding-block: 1.5rem 4rem;
    background:
        radial-gradient(ellipse at 100% 0%, rgba(188, 222, 255, .5), transparent 32rem),
        radial-gradient(ellipse at 0% 100%, rgba(198, 228, 255, .45), transparent 28rem),
        #f3f8fd;
}

.carrito-seccion { padding-block: 1rem 2rem; }
.carrito-contenedor { width: min(100%, 70rem); }
.carrito-hero {
    display: grid;
    grid-template-columns: 5.25rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.35rem;
}
.carrito-hero__icono {
    display: grid;
    place-items: center;
    width: 5.25rem;
    aspect-ratio: 1;
    border: 1px solid #cbe4ff;
    border-radius: 50%;
    background: #e3f1ff;
    color: #1688e8;
}
.carrito-hero__icono svg { width: 2.6rem; height: 2.6rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.carrito-hero__texto h1 { margin: 0 0 .4rem; color: #102e63; font-size: 2.6rem; font-weight: 700; line-height: 1; }
.carrito-hero__texto p { margin: 0; color: #7d9bc3; font-size: 1rem; }
.carrito-contador {
    gap: .55rem;
    padding: .7rem 1.1rem;
    border: 1px solid #cbe4ff;
    background: rgba(255, 255, 255, .84);
    box-shadow: 0 4px 14px rgba(56, 133, 208, .08);
    color: #1682dc;
    font-size: .88rem;
}
.carrito-contador svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.page-shell .carrito-seccion .carrito-panel {
    gap: 1rem;
    padding: 1.15rem 1.25rem 1.25rem;
    border: 1px solid #c8e0fc;
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 12px 32px rgba(45, 111, 176, .08);
}
.page-shell .carrito-seccion .carrito-lista {
    gap: 0;
    max-height: min(47vh, 21rem);
    margin: 0;
    padding: 0 .6rem 0 0;
    scrollbar-color: #4a9bea #e6f1fc;
}
.page-shell .carrito-seccion .carrito-lista::-webkit-scrollbar-track { background: #e6f1fc; }
.page-shell .carrito-seccion .carrito-lista::-webkit-scrollbar-thumb { border-color: #e6f1fc; background: #4a9bea; }
.page-shell .carrito-seccion .carrito-fila {
    position: relative;
    grid-template-columns: 7rem minmax(8rem, 1fr) auto 10rem 2.75rem;
    grid-template-areas: "img info cant total delete";
    gap: .8rem 1.25rem;
    min-height: 9.5rem;
    padding: .9rem .2rem;
    border: 0;
    border-bottom: 1px solid #e4effb;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.page-shell .carrito-seccion .carrito-fila:last-child { border-bottom: 0; }
.page-shell .carrito-seccion .carrito-fila:hover,
.page-shell .carrito-seccion .carrito-fila:focus-within { border-color: #e4effb; background: #fbfdff; box-shadow: none; }
.page-shell .carrito-seccion .carrito-img {
    width: 7rem;
    border: 0;
    border-radius: 1rem;
    background: #edf6ff;
}
.page-shell .carrito-seccion .carrito-img-vacia {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #2586d8;
    font-size: 1.2rem;
    font-weight: 700;
}
.page-shell .carrito-seccion .carrito-img-vacia[hidden] { display: none; }
.page-shell .carrito-seccion .carrito-info { gap: .12rem; }
.page-shell .carrito-seccion .carrito-nombre { color: #142f63; font-size: 1rem; }
.page-shell .carrito-seccion .carrito-marca,
.page-shell .carrito-seccion .carrito-modelo,
.page-shell .carrito-seccion .carrito-unitario { color: #819bbf; font-size: .85rem; }
.page-shell .carrito-seccion .carrito-stock {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: .4rem;
    margin-top: .32rem;
    padding: .22rem .6rem;
    border-radius: 999px;
    background: #ddf7f3;
    color: #08a99b;
    font-size: .76rem;
    font-weight: 700;
}
.page-shell .carrito-seccion .carrito-stock i { width: .42rem; height: .42rem; border-radius: 50%; background: currentColor; }
.page-shell .carrito-seccion .carrito-stock.agotado { background: #fff0f0; color: #d85d66; }
.page-shell .carrito-seccion .carrito-fila .cantidad {
    justify-self: center;
    border-color: #d7eaff;
    background: #f2f8ff;
}
.page-shell .carrito-seccion .cantidad__btn { color: #1688e8; box-shadow: 0 1px 4px rgba(50, 125, 205, .13); }
.page-shell .carrito-seccion .cantidad__btn:hover,
.page-shell .carrito-seccion .cantidad__btn:focus-visible { background: #1688e8; color: #fff; }
.page-shell .carrito-seccion .carrito-fila .cantidad input,
.page-shell .carrito-seccion .carrito-subtotal { color: #142f63; }
.page-shell .carrito-seccion .carrito-subtotal { width: auto; min-width: 0; font-size: 1rem; }
.page-shell .carrito-movil-meta { display: contents; }
.page-shell .carrito-precio-unitario { display: none; }
.page-shell .carrito-seccion .carrito-quitar {
    position: absolute;
    top: 50%;
    right: .35rem;
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    aspect-ratio: 1;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    border-radius: 50%;
    background: #fff0f1;
    color: #fb5d67;
    font-size: 0;
}
.page-shell .carrito-seccion .carrito-quitar svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.page-shell .carrito-seccion .carrito-quitar:hover,
.page-shell .carrito-seccion .carrito-quitar:focus-visible { background: #ffe0e2; color: #d93343; }
.page-shell .carrito-seccion .carrito-footer { display: grid; gap: .6rem; }
.page-shell .carrito-seccion .carrito-footer__herramientas { display: flex; justify-content: flex-end; align-items: center; gap: .7rem; }
.page-shell .carrito-seccion .carrito-seguir,
.page-shell .carrito-seccion .carrito-actualizar,
.page-shell .carrito-seccion .carrito-vaciar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 2.2rem;
    padding: .35rem .65rem;
    border: 0;
    border-radius: .5rem;
    background: transparent;
    color: #5480b4;
    font: 600 .82rem/1.2 var(--fuente);
    text-decoration: none;
    cursor: pointer;
}
.page-shell .carrito-seccion .carrito-seguir svg,
.page-shell .carrito-seccion .carrito-actualizar svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.page-shell .carrito-seccion .carrito-seguir:hover,
.page-shell .carrito-seccion .carrito-actualizar:hover { background: #edf6ff; color: #187ed4; }
.page-shell .carrito-seccion .carrito-vaciar { color: #c75a64; }
.page-shell .carrito-seccion .carrito-vaciar:hover { background: #fff0f1; }
.page-shell .carrito-seccion .carrito-resumen {
    position: static;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    min-height: 5.2rem;
    padding: .75rem 1rem;
    border: 0;
    border-radius: 1rem;
    background: #eff7ff;
    box-shadow: none;
    color: #7d9bc3;
}
.page-shell .carrito-seccion .carrito-resumen__etiqueta { display: flex; align-items: center; gap: .8rem; font-size: .82rem; }
.page-shell .carrito-seccion .carrito-resumen__icono {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: #e1f0ff;
    color: #2787df;
}
.page-shell .carrito-seccion .carrito-resumen__icono svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.page-shell .carrito-seccion .carrito-resumen strong { color: #102e63; font-size: 1.4rem; white-space: nowrap; }
.page-shell .carrito-seccion .carrito-continuar {
    flex: 0 0 auto;
    min-width: 12rem;
    width: auto;
    min-height: 3.4rem;
    padding: .7rem 1.4rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(110deg, #2d9feb, #369be8);
    box-shadow: 0 8px 18px rgba(45, 159, 235, .2);
    color: #fff;
    font-size: .95rem;
}
.page-shell .carrito-seccion .carrito-continuar svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

@media (max-width: 900px) {
    .page-shell:has(.carrito-seccion) { padding-block: .75rem 3rem; }
    .carrito-hero { grid-template-columns: 3.8rem minmax(0, 1fr); gap: .8rem; }
    .carrito-hero__icono { width: 3.8rem; }
    .carrito-hero__icono svg { width: 2rem; height: 2rem; }
    .carrito-hero__texto h1 { font-size: 2rem; }
    .carrito-hero__texto p { font-size: .88rem; }
    .carrito-contador { grid-column: 2; justify-self: start; padding: .45rem .75rem; }
    .page-shell .carrito-seccion .carrito-lista { max-height: none; overflow: visible; padding: 0; }
    .page-shell .carrito-seccion .carrito-fila {
        grid-template-columns: 5.25rem minmax(0, 1fr) auto 2.5rem;
        grid-template-areas: "img info info info" "cant cant total delete";
        gap: .7rem;
        min-height: 0;
        padding: 1rem .1rem;
    }
    .page-shell .carrito-seccion .carrito-img { width: 5.25rem; }
    .page-shell .carrito-seccion .carrito-fila .cantidad { justify-self: start; }
    .page-shell .carrito-seccion .carrito-quitar { right: .1rem; }
    .page-shell .carrito-seccion .carrito-resumen { flex-wrap: wrap; gap: .7rem; }
    .page-shell .carrito-seccion .carrito-resumen__etiqueta { flex: 1 1 40%; }
    .page-shell .carrito-seccion .carrito-resumen strong { font-size: 1.15rem; }
    .page-shell .carrito-seccion .carrito-continuar { flex: 1 0 100%; width: 100%; }
}

@media (max-width: 480px) {
    .page-shell .carrito-seccion .carrito-fila {
        grid-template-columns: 3.5rem minmax(0, 1fr);
        grid-template-areas: "img info" "meta meta";
        gap: .55rem .6rem;
        min-height: 0;
        padding: .55rem;
        border: 1px solid #dceafb;
        border-radius: .8rem;
        background: rgba(255, 255, 255, .94);
    }
    .page-shell .carrito-seccion .carrito-lista { gap: .55rem; }
    .page-shell .carrito-seccion .carrito-img { width: 3.5rem; }
    .page-shell .carrito-seccion .carrito-info { align-self: center; padding-right: 2.8rem; }
    .page-shell .carrito-seccion .carrito-unitario { display: none; }
    .page-shell .carrito-seccion .carrito-movil-meta {
        grid-area: meta;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: center;
        margin-top: .15rem;
        border-top: 1px solid #e1edfa;
    }
    .page-shell .carrito-seccion .carrito-precio-unitario {
        display: grid;
        gap: .15rem;
        min-width: 0;
        padding: .45rem .4rem 0 .1rem;
    }
    .page-shell .carrito-seccion .carrito-precio-unitario small { color: #7893ba; font-size: .68rem; }
    .page-shell .carrito-seccion .carrito-precio-unitario strong { color: #142f63; font-size: .78rem; }
    .page-shell .carrito-seccion .carrito-fila .cantidad {
        grid-area: auto;
        justify-self: stretch;
        justify-content: space-between;
        width: 100%;
        min-width: 0;
        padding: .1rem;
        border: 0;
        border-left: 1px solid #dceafb;
        border-radius: 0;
        background: transparent;
    }
    .page-shell .carrito-seccion .carrito-fila .cantidad__btn { flex: 0 0 2rem; width: 2rem; height: 2rem; }
    .page-shell .carrito-seccion .carrito-fila .cantidad input { min-width: 0; width: 2rem; }
    .page-shell .carrito-seccion .carrito-quitar {
        top: .9rem;
        right: .6rem;
        transform: none;
    }
    .page-shell .carrito-seccion .carrito-fila .cantidad,
    .page-shell .carrito-seccion .carrito-subtotal { justify-self: start; }
    .page-shell .carrito-seccion .carrito-panel { padding: .85rem; }
    .page-shell .carrito-seccion .carrito-resumen { padding: .7rem; }
    .page-shell .carrito-seccion .carrito-resumen__icono { width: 2.5rem; height: 2.5rem; }
    .page-shell .carrito-seccion .carrito-footer__herramientas { justify-content: center; flex-wrap: wrap; gap: .2rem; }
    .page-shell .carrito-seccion:has(.carrito-vacio) .carrito-contenedor { padding-inline: 0; }
    .page-shell .carrito-seccion .carrito-vacio { min-height: 0; }
    .page-shell .carrito-seccion .carrito-vacio h2 {
        max-width: 100%;
        font-size: clamp(1.25rem, 7vw, 1.65rem);
        overflow-wrap: anywhere;
    }
    .page-shell .carrito-seccion .carrito-vacio p { max-width: 100%; overflow-wrap: anywhere; }
}

@media (max-width: 360px) {
    .page-shell .carrito-seccion .carrito-fila .cantidad { max-width: 100%; }
    .page-shell .carrito-seccion .carrito-subtotal { white-space: normal; }
}
.page-shell .carrito-acciones .btn-accion.btn-outline-azul,
.page-shell .carrito-acciones .btn-accion.btn-neutro { min-height: 3rem; padding: .65rem 1rem; border: 1.5px solid #078eae; border-radius: .8rem; background: #fff; color: #0788ad; }
.page-shell .carrito-acciones .btn-accion.btn-outline-rojo { min-height: 3rem; padding: .65rem 1rem; border-color: #c0392b; border-radius: .8rem; background: #fff; color: #c0392b; }
.page-shell .carrito-vacio,
.page-shell .vacio-panel { border-color: #c7e2e6; background: #fff; color: #6f8a91; }

.page-shell .carrito-seccion:has(.carrito-vacio) .carrito-hero {
    position: relative;
    overflow: hidden;
    padding: 1rem 1.1rem;
    border: 1px solid #cde6ff;
    border-radius: 1.15rem;
    background:
        radial-gradient(ellipse 18rem 8rem at 58% 150%, rgba(177, 218, 255, .5) 0 68%, transparent 69%),
        radial-gradient(ellipse 20rem 9rem at 82% 150%, rgba(205, 231, 255, .72) 0 68%, transparent 69%),
        linear-gradient(105deg, #f4f9ff, #eaf5ff);
}

.page-shell .carrito-seccion .carrito-vacio {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: .65rem;
    min-height: 31.5rem;
    margin-top: 1.2rem;
    padding: 2rem 1.5rem;
    border: 1px solid #d3e9ff;
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 12px 30px rgba(56, 133, 208, .08);
    text-align: center;
}
.page-shell .carrito-seccion .carrito-vacio::before {
    position: absolute;
    inset: auto auto 0 0;
    z-index: -1;
    width: min(27rem, 72%);
    height: 10rem;
    background:
        radial-gradient(ellipse 11rem 8rem at 6% 105%, #dcefff 0 72%, transparent 73%),
        radial-gradient(ellipse 19rem 9rem at 30% 120%, #e8f4ff 0 72%, transparent 73%);
    content: "";
    pointer-events: none;
}
.page-shell .carrito-seccion .carrito-vacio__arte {
    display: grid;
    place-items: center;
    width: 12rem;
    height: 12rem;
    margin-bottom: .1rem;
}
.page-shell .carrito-seccion .carrito-vacio__arte img { width: 100%; height: 100%; object-fit: contain; }
.page-shell .carrito-seccion .carrito-vacio h2 {
    margin: .1rem 0 .1rem;
    color: #10346b;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}
.page-shell .carrito-seccion .carrito-vacio p {
    max-width: 34rem;
    margin: 0;
    color: #7c98bf;
    font-size: 1rem;
    line-height: 1.55;
}
.page-shell .carrito-seccion .carrito-vacio__boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    min-width: 15rem;
    min-height: 3.5rem;
    margin-top: .8rem;
    padding: .7rem 1.5rem;
    border-radius: 999px;
    background: linear-gradient(110deg, #10a7cc, #0094b8);
    box-shadow: 0 10px 22px rgba(0, 148, 184, .2);
    color: #fff;
    font-size: .95rem;
}
.page-shell .carrito-seccion .carrito-vacio__boton svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

@media (max-width: 760px) {
    .page-shell .carrito-seccion:has(.carrito-vacio) .carrito-hero { padding: .75rem; }
    .page-shell .carrito-seccion .carrito-vacio { min-height: 28rem; padding: 1.75rem 1rem; }
    .page-shell .carrito-seccion .carrito-vacio__arte { width: 9.5rem; height: 9.5rem; }
    .page-shell .carrito-seccion .carrito-vacio h2 { font-size: 1.65rem; }
    .page-shell .carrito-seccion .carrito-vacio p { font-size: .9rem; }
}

@media (max-width: 480px) {
    .page-shell .carrito-seccion .carrito-vacio { min-height: 26rem; }
    .page-shell .carrito-seccion .carrito-vacio__arte { width: 8rem; height: 8rem; }
    .page-shell .carrito-seccion .carrito-vacio__boton { min-width: min(15rem, 100%); }
}
/* ---------- Checkout: dirección y pago (flujo tipo Mercado Libre) ---------- */
.contenedor-angosta { width: min(92vw, 46rem); margin-inline: auto; }

.checkout-pasos
{
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #8095a3;
}

.checkout-paso { text-decoration: none; color: inherit; }
.checkout-paso-activo { color: var(--teal-fuerte, #0b6e87); }
.checkout-paso-sep { color: #c3cdd4; }

.page-shell .checkout-contenedor .seccion-cabecera h1 {
    font-size: clamp(2rem, 2.8vw, 2.8rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.page-shell .checkout-subtitulo { margin: 1.6rem 0 0.6rem; font-size: 1.2rem; color: #0a2f4d; }

.checkout-opciones { display: grid; gap: 0.85rem; }

.checkout-tarjeta
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border: 1px solid rgba(14, 124, 148, 0.22);
    border-radius: var(--radio, 16px);
    background: #ffffff;
    flex-wrap: wrap;
}

.checkout-tarjeta-texto strong { display: block; margin-bottom: 0.3rem; color: #0a2f4d; font-size: 1rem; }
.checkout-tarjeta-texto p { margin: 0 0 0.25rem; font-size: 0.82rem; color: #4c5f6c; }
.checkout-tarjeta-texto small { color: #7c8d99; font-size: 0.78rem; }

.checkout-badge-default
{
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: rgba(14, 124, 148, 0.12);
    color: var(--teal-fuerte, #0b6e87);
    font-size: 0.7rem;
    font-weight: 700;
    vertical-align: middle;
}

.checkout-tarjeta-acciones { display: grid; gap: 0.4rem; justify-items: end; }
.checkout-eliminar-direccion { color: #a52b3b; font-size: 0.8rem; }

.checkout-nueva-direccion
{
    margin-top: 0.5rem;
    padding: 1rem 1.25rem;
    border: 1px dashed rgba(14, 124, 148, 0.35);
    border-radius: var(--radio, 16px);
    background: #f6fafb;
}

.checkout-nueva-direccion summary { cursor: pointer; font-weight: 700; color: var(--teal-fuerte, #0b6e87); }
.checkout-nueva-direccion form { margin-top: 1rem; }
.checkout-predeterminada { display: flex; align-items: center; gap: 0.5rem; margin: 0.85rem 0; font-size: 0.85rem; color: #4c5f6c; }

.checkout-resumen-entrega { margin-bottom: 1.25rem; }
.checkout-resumen-productos { max-height: none; }
.checkout-fila-resumen { grid-template-columns: 1fr auto; grid-template-areas: "info total"; padding: 0.8rem 1.1rem; }
.producto-showcase__thumbs{display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:.65rem;max-width:100%;overflow-x:auto;overflow-y:hidden;padding:.15rem .15rem .5rem;scrollbar-width:thin;overscroll-behavior-x:contain}
.producto-showcase__thumbs:empty { display: none; }
.producto-showcase__thumbs .producto-thumb{flex:0 0 4.25rem;width:4.25rem;height:4.25rem}
.producto-showcase__main [data-product-zoom-frame]{overflow:hidden;cursor:zoom-in;touch-action:manipulation}
.producto-showcase__main [data-product-zoom-frame]:focus-visible{outline:3px solid #21b6cc;outline-offset:3px}
.producto-showcase__main [data-product-zoom-frame].is-pointer-zoom #producto-main-image{transform:scale(2.15);transform-origin:var(--zoom-origin-x,50%) var(--zoom-origin-y,50%);transition:transform .08s ease-out}
.producto-showcase__main #producto-main-image{transform:scale(1);transform-origin:50% 50%;opacity:1;transition:transform .16s ease-out,opacity .28s ease-in-out}
.producto-showcase__main #producto-main-image.is-changing{opacity:.35}
@media(prefers-reduced-motion:reduce){.producto-showcase__main #producto-main-image{transition:none}}
.producto-lightbox{width:min(96vw,82rem);max-width:none;max-height:none;margin:auto;padding:0;overflow:hidden;border:1px solid rgba(129,154,169,.4);border-radius:1rem;background:#fff;color:#173d49;box-shadow:0 24px 80px rgba(14,38,52,.3)}
.producto-lightbox::backdrop{background:rgba(10,31,43,.58);backdrop-filter:blur(3px)}
.producto-lightbox__panel{position:relative;display:grid;width:100%;height:min(88dvh,56rem);grid-template-columns:minmax(0,1fr) auto;grid-template-rows:minmax(0,1fr);align-items:center;gap:.75rem;padding:1rem}
.producto-lightbox__viewport{position:relative;display:grid;grid-column:1;grid-row:1;min-width:0;min-height:0;place-items:center;overflow:hidden;border-radius:.65rem;background:#f7fafb;touch-action:none;user-select:none}
.producto-lightbox__nav{position:absolute;top:50%;z-index:1;display:grid;width:3rem;height:3rem;place-items:center;transform:translateY(-50%);border:1px solid rgba(14,124,148,.28);border-radius:50%;background:rgba(255,255,255,.94);color:#087f8c;font:400 2.25rem/1 sans-serif;cursor:pointer}
.producto-lightbox__nav:hover{background:#eaf7f8}
.producto-lightbox__nav--prev{left:.75rem}
.producto-lightbox__nav--next{right:.75rem}
.producto-lightbox__image{display:block;width:100%;height:100%;object-fit:contain;transform:translate3d(0,0,0) scale(1);transform-origin:50% 50%;will-change:transform;pointer-events:none}
.producto-lightbox__viewport.is-dragging{cursor:grabbing}
.producto-lightbox__controls{display:flex;grid-column:2;grid-row:1;flex-direction:column;align-items:center;justify-content:center;gap:.55rem;padding-top:2.5rem}
.producto-lightbox__controls button{display:grid;min-width:2.75rem;height:2.75rem;place-items:center;padding:0 .7rem;border:1px solid rgba(14,124,148,.28);border-radius:.55rem;background:#fff;color:#087f8c;font-family:inherit;font-size:1.2rem;font-weight:600;line-height:1;cursor:pointer}
.producto-lightbox__controls button:hover{background:#eaf7f8}
.producto-lightbox__controls [data-zoom-reset]{font-size:.82rem}
.producto-lightbox__controls output{min-width:3.5rem;color:#173d49;font-size:.85rem;font-weight:700;text-align:center}
.producto-lightbox__close{position:absolute;top:.65rem;right:.65rem;z-index:2;display:grid;width:2.75rem;height:2.75rem;place-items:center;border:1px solid rgba(14,124,148,.24);border-radius:50%;background:rgba(255,255,255,.96);color:#173d49;font:400 1.5rem/1 sans-serif;cursor:pointer}
.producto-lightbox__close:hover{background:#eaf7f8}
@media(max-width:40rem){
    .producto-lightbox{width:calc(100vw - 1rem);border-radius:.75rem}
    .producto-lightbox__panel{height:calc(100dvh - 1rem);grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:.55rem;padding:.6rem}
    .producto-lightbox__viewport{grid-column:1;grid-row:2;border-radius:.5rem}
    .producto-lightbox__controls{grid-column:1;grid-row:1;flex-direction:row;justify-content:center;gap:.4rem;padding:0 3rem 0 0}
    .producto-lightbox__controls button{min-width:3rem;height:3rem}
}
@media(max-width:36rem){.producto-showcase__thumbs .producto-thumb{flex-basis:3.75rem;width:3.75rem;height:3.75rem}}

@media (max-width: 640px) {
    .page-shell:has(.carrito-seccion) { overflow-x: clip; }
    .carrito-contenedor,
    .page-shell .contenedor-angosta {
        width: 100%;
        min-width: 0;
        padding-inline: 0;
    }
    .checkout-opciones,
    .checkout-tarjeta,
    .checkout-tarjeta-texto,
    .checkout-nueva-direccion,
    .checkout-nueva-direccion form { min-width: 0; }
    .checkout-tarjeta {
        align-items: flex-start;
        padding: .9rem;
    }
    .checkout-tarjeta-texto { width: 100%; overflow-wrap: anywhere; }
    .checkout-tarjeta-acciones {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-items: start;
        justify-content: flex-start;
        gap: .5rem;
        width: 100%;
    }
    .checkout-tarjeta-acciones form { min-width: 0; }
    .checkout-nueva-direccion { padding: .85rem; }
    .carrito-envio-grid { grid-template-columns: minmax(0, 1fr); }
    .carrito-envio-grid label.carrito-envio-ancho { grid-column: auto; }
    .checkout-pasos { flex-wrap: wrap; row-gap: .25rem; }
    .checkout-pago { min-width: 0; }
    .checkout-pago legend { max-width: 100%; overflow-wrap: anywhere; }
}

@media (max-width: 960px) {
    .page-shell .carrito-seccion .carrito-lista {
        max-height: none;
        overflow: visible;
        padding: 0;
    }
}