:root {
    --rojo: #e10600;
    --rojo-oscuro: #b10500;
    --tinta: #1a1a1a;
    --muted: #667085;
    --linea: #ececec;
    --fondo: #f6f6f6;
    --card: #fff;
    --ok: #0f7a3a;
    --sombra: 0 8px 24px rgba(20, 20, 20, .06);
    --ancho: 1240px;
    --texto: "Source Sans 3", "Segoe UI", sans-serif;
    --titulo: Montserrat, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--tinta); background: #fff; font-family: var(--texto); font-size: 16px; line-height: 1.45; }
a { color: inherit; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
.saltar { position: absolute; left: -999px; }
.saltar:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 5; }
.franja { height: 6px; background: var(--rojo); }
.ancho { width: min(var(--ancho), calc(100% - 32px)); margin: 0 auto; }
.cabecera { background: #fff; border-bottom: 1px solid var(--linea); position: sticky; top: 0; z-index: 4; }
.barra { display: flex; align-items: center; gap: 28px; min-height: 78px; }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.marca strong { display: block; font-family: var(--titulo); color: var(--rojo); letter-spacing: .12em; font-size: 22px; line-height: 1; }
.cabecera .marca strong { font-family: Fraunces, Georgia, serif; font-size: 34px; font-weight: 700; letter-spacing: .06em; }
.marca small { color: var(--muted); letter-spacing: .04em; }
.sello { width: 36px; height: 36px; border-radius: 50%; background: var(--rojo); color: #fff; display: grid; place-items: center; font-family: var(--titulo); font-weight: 800; }
.menu { display: flex; gap: 18px; margin-left: auto; }
.menu a { text-decoration: none; font-weight: 700; font-size: 15px; }
.menu a[aria-current="page"] { color: var(--rojo); }
.fb { text-decoration: none; font-weight: 700; color: var(--rojo); font-size: 14px; }
.intro { margin: 22px 0 8px; color: var(--muted); }
.intro-wa { margin: 10px 0 0; }
.intro-wa .btn-wa { background: #128c7e; }
.intro-wa .btn-wa:hover { background: #0e6e63; }
.tienda { display: grid; grid-template-columns: 230px 1fr; gap: 32px; align-items: start; padding-bottom: 48px; }
.filtros { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 96px; }
.filtros .filtro-lista { display: flex; flex-direction: column; }
.filtros summary { font-family: var(--titulo); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 16px 0 6px; font-weight: 700; list-style: none; cursor: default; pointer-events: none; }
.filtros summary::-webkit-details-marker { display: none; }
.filtros summary::marker { content: none; }
.filtros summary em { display: none; }
.filtros a { text-decoration: none; padding: 6px 0; display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid transparent; }
.filtros a.activa { color: var(--rojo); font-weight: 700; }
.filtros span { color: var(--muted); }
.toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 18px; flex-wrap: wrap; }
h1, h2 { font-family: var(--titulo); line-height: 1.2; }
h1 { margin: 0 0 4px; font-size: 32px; }
.cuenta { margin: 0; color: var(--muted); }
.buscar { display: flex; gap: 8px; flex-wrap: wrap; }
.buscar input, .buscar select, .form input, .form select, .form textarea {
    border: 1px solid #ddd; border-radius: 4px; padding: 10px 12px; background: #fff; color: var(--tinta);
}
.buscar input, .buscar select { min-width: 0; flex: 1 1 180px; }
.buscar button, .btn {
    background: var(--rojo); color: #fff; border: 0; border-radius: 4px; padding: 10px 16px;
    font-weight: 700; text-decoration: none; display: inline-block; cursor: pointer;
}
.btn:hover, .buscar button:hover { background: var(--rojo-oscuro); }
.btn.secundario { background: #fff; color: var(--rojo); border: 1px solid var(--rojo); }
.rejilla { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 16px; align-items: stretch; }
.card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--linea);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    transition: transform .22s ease, box-shadow .22s ease;
    transform-origin: center center;
}
.card:hover, .card:focus-within {
    transform: scale(1.06);
    z-index: 3;
    box-shadow: 0 18px 40px rgba(20, 20, 20, .16);
}
.card-foto {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
    overflow: hidden;
    background: #f4f4f4;
    text-decoration: none;
}
.card-foto img {
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 12px;
    box-sizing: border-box;
    object-fit: contain;
    object-position: center;
}
.card-cuerpo { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
.card-cuerpo h2 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.card-cuerpo h2 a { text-decoration: none; }
.card-cuerpo h2 a:hover { color: var(--rojo); }
.precio { margin: 0; display: flex; flex-direction: row; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.precio del { color: #65676b; font-weight: 600; text-decoration: line-through; font-size: 15px; }
.precio ins { text-decoration: none; font-weight: 800; font-size: 18px; color: #1c1e21; }
.etiqueta.menos { top: auto; bottom: 10px; left: 10px; background: rgba(28, 30, 33, .88); border-radius: 8px; font-size: 13px; }
.agregar button, .cantidad-form button {
    background: none; border: 0; padding: 0; color: var(--rojo); font-weight: 700; cursor: pointer;
}
.cantidad { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.cantidad input, .cantidad-form input { width: 72px; border: 1px solid #ddd; border-radius: 4px; padding: 8px; }
.entrega { background: #e9f8ee; color: #0f7a3a; font-weight: 700; padding: 10px 12px; border-radius: 6px; }
.pedido-pagina {
    margin-top: 12px;
    padding: 8px 0 36px;
    background:
        linear-gradient(90deg, var(--rojo) 0 72px, transparent 72px) top / 100% 3px no-repeat,
        #f3f5f8;
}
.pedido-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); gap: 28px 36px; align-items: start; }
.pedido-principal { min-width: 0; }
.pedido-principal .form { max-width: none; }
.pedido-pagina .sociales { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 10px; }
.pedido-pagina .sociales .nota { grid-column: 1 / -1; margin: 0; }
.pedido-pagina h1 { font-family: Fraunces, Georgia, serif; letter-spacing: -.02em; color: #142033; }
.pedido-principal > p:not(.entrega) { margin: 8px 0 0; color: #526070; }
.pedido-pagina .entrega { display: inline-block; margin-top: 10px; border: 1px solid #b7e4c7; }
.pedido-pagina .sociales .btn { width: 100%; text-align: center; padding: 10px 12px; border-radius: 12px; }
.pedido-pagina .sociales .btn.social:nth-child(1):disabled {
    background: #1877f2;
    color: #fff;
    border: 0;
    box-shadow: 0 4px 0 #145dbf;
    opacity: 1;
    cursor: not-allowed;
}
.pedido-pagina .sociales .btn.social:nth-child(2):disabled {
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 12px;
    background:
        linear-gradient(180deg, #4285f4 0 25%, #ea4335 0 50%, #fbbc05 0 75%, #34a853 0 100%) left / 6px 100% no-repeat,
        #fff;
    box-shadow: 0 4px 0 #e4e6ea;
    opacity: 1;
    cursor: not-allowed;
}
.pedido-pagina .form-pedido {
    padding: 4px 0 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}
.pedido-pagina .form-pedido input:not([type="radio"]):not([type="checkbox"]),
.pedido-pagina .form-pedido textarea {
    background: #fff;
    border: 1px solid #c5ceda;
    border-radius: 10px;
    color: #142033;
}
.pedido-pagina .form-pedido input:focus,
.pedido-pagina .form-pedido textarea:focus {
    outline: 2px solid rgba(225, 6, 0, .28);
    border-color: var(--rojo);
}
.pedido-pagina .form-pedido > .btn {
    width: 100%;
    margin-top: 6px;
    padding: 14px 18px;
    border-radius: 12px;
    font-family: var(--titulo);
    letter-spacing: .04em;
    background: linear-gradient(180deg, #ff2a1f, var(--rojo) 46%, var(--rojo-oscuro));
    box-shadow: 0 10px 22px rgba(225, 6, 0, .28);
}
.form-pedido { gap: 8px; min-width: 0; }
.form-pedido .pedido-par { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; min-width: 0; }
.form-pedido .pedido-par > label,
.form-pedido .pedido-direccion > label:first-child,
.form-pedido .pago-card,
.form-pedido .pago-card span { min-width: 0; }
.form-pedido input:not([type="radio"]):not([type="checkbox"]),
.form-pedido textarea { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.form-pedido .pedido-direccion { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 12px; padding: 8px 10px; border-radius: 12px; background: #fbf6ea; border: 1px solid #ead7b0; }
.form-pedido .pedido-direccion > label:first-child { flex: 1 1 180px; min-width: 0; }
.form-pedido .pedido-direccion .check { flex: 0 0 auto; margin: 0 0 8px; }
.form-pedido .pedido-fecha-yape {
    display: grid;
    grid-template-columns: 11.5rem minmax(0, 1fr);
    grid-template-areas: "fecha-titulo yape-titulo" "fecha-input yape-boton";
    column-gap: 12px;
    row-gap: 4px;
    align-items: end;
    min-width: 0;
}
.form-pedido .pedido-fecha-titulo { grid-area: fecha-titulo; margin: 0; line-height: 1.25; }
.form-pedido .yape-rotulo { grid-area: yape-titulo; margin: 0; color: #5b2c83; line-height: 1.25; }
.form-pedido .yape-rotulo .nota { color: #7a5b96; font-weight: 700; }
.form-pedido input.pedido-fecha { grid-area: fecha-input; width: 12.5rem; max-width: 100%; }
.form-pedido .pedido-fecha-aviso { margin: 0; padding: 6px 10px; border-radius: 8px; background: #e7f6ec; color: #0f7a3a; font-size: 13px; font-weight: 700; }
.form-pedido .pedido-yape { grid-area: yape-boton; min-width: 0; width: 100%; }
.form-pedido .yape-soltar { position: relative; display: block; width: 100%; min-height: 42px; padding: 0; border: 0; background: transparent; text-align: center; }
.form-pedido .yape-elegir-boton {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 16px;
    border-radius: 10px;
    background: #5b2c83;
    color: #fff;
    font-family: var(--titulo);
    font-weight: 800;
    letter-spacing: .02em;
}
.form-pedido .yape-soltar input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    opacity: 0;
    cursor: pointer;
}
.form-pedido .yape-soltar:focus-within .yape-elegir-boton,
.form-pedido .yape-soltar:hover .yape-elegir-boton { background: #431f66; }
.form-pedido .yape-soltar.sobre .yape-elegir-boton { outline: 2px solid #5b2c83; outline-offset: 2px; }
.form-pedido .pedido-comentario textarea { min-height: 58px; }
.form-pedido .captcha-bloque { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; padding: 10px; border-radius: 14px; background: #e8eef8; border: 1px solid #c5d4ea; }
.form-pedido .captcha-bloque a { color: #1d4f91; font-weight: 800; }
.form-pedido .captcha-bloque img { width: 140px; height: 50px; }
.form-pedido .captcha-bloque > div { display: grid; gap: 4px; min-width: 0; flex: 1 1 160px; }
.form-pedido .galeria:empty { display: none; }
.form-pedido .pago-opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.form-pedido .pago-opciones legend { grid-column: 1 / -1; font-size: 14px; font-weight: 800; padding: 0; color: #142033; }
.form-pedido .pago-card { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: start; margin: 0; padding: 8px 10px; border: 1px solid #f0b4ae; border-left: 4px solid var(--rojo); border-radius: 12px; background: #fff; cursor: pointer; }
.form-pedido .pago-card:last-of-type { background: #e7f6ec; border-color: #b7e0c4; border-left-color: #0f7a3a; }
.form-pedido .pago-card input { width: 18px; height: 18px; margin: 2px 0 0; padding: 0; }
.form-pedido .pago-card small { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.3; overflow-wrap: anywhere; }
.form-pedido .pago-card:has(:checked) { background: #fff1ef; box-shadow: 0 8px 0 #f3c7c2; }
.form-pedido .pago-card:last-of-type:has(:checked) { background: #dff5e7; border-color: #8fceb0; border-left-color: #0f7a3a; box-shadow: 0 8px 0 #b7e4c7; }
.pedido-producto { display: flex; gap: 12px; align-items: center; }
.pedido-foto { position: relative; width: 72px; height: 72px; flex: 0 0 72px; overflow: hidden; background: #f4f4f4; display: block; }
.pedido-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 4px; box-sizing: border-box; }
.reproductor { margin-top: 12px; width: min(100%, 560px); aspect-ratio: 16 / 9; background: #111; }
.reproductor iframe { width: 100%; height: 100%; border: 0; }
.total-pedido { font-family: var(--titulo); font-size: 22px; }
.resumen-pedido { padding-left: 18px; }
.detalle-pedido {
    margin: 16px 0 20px;
    padding: 16px;
    display: grid;
    gap: 10px;
    border-radius: 18px;
    border: 1px solid #d9e0ea;
    border-left: 5px solid var(--rojo);
    background: #fff;
    box-shadow: 0 14px 32px rgba(20, 32, 51, .08);
}
.detalle-pedido h2 {
    margin: 0;
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--rojo);
}
.detalle-fila {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 10px;
    border-radius: 14px;
    background: #f7f9fc;
    border: 1px solid #e1e7f0;
    box-shadow: 0 1px 0 #e1e7f0;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}
.detalle-fila:hover,
.detalle-fila:focus-visible,
.detalle-fila:active,
.detalle-fila.alzada {
    transform: translateY(-6px);
    box-shadow: 0 16px 28px rgba(177, 8, 0, .18);
    outline: none;
}
.detalle-foto {
    position: relative;
    width: 76px;
    height: 76px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff4f2;
    display: block;
}
.detalle-foto img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    box-sizing: border-box;
}
.detalle-texto { min-width: 0; }
.detalle-nombre {
    display: block;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.detalle-nombre:hover { color: var(--rojo); }
.detalle-cantidad { margin: 4px 0 0; display: flex; align-items: baseline; gap: 6px; }
.detalle-cantidad b {
    font-family: var(--titulo);
    font-size: 30px;
    line-height: 1;
    color: var(--rojo);
}
.detalle-cantidad span { color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.detalle-precio {
    margin: 0;
    font-family: var(--titulo);
    font-weight: 800;
    font-size: 18px;
    white-space: nowrap;
}
.detalle-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin: 2px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #142033;
    border: 0;
    color: #fff;
    font-family: var(--titulo);
    font-weight: 700;
}
.detalle-total strong { font-size: 28px; color: #fff; }
@media (prefers-reduced-motion: reduce) {
    .detalle-fila { transition: none; }
    .detalle-fila:hover,
    .detalle-fila:focus-visible,
    .detalle-fila:active,
    .detalle-fila.alzada { transform: none; box-shadow: 0 0 0 3px rgba(225, 6, 0, .35); }
}
.captcha-bloque { display: grid; gap: 8px; justify-items: start; }
.pedido-texto { white-space: pre-wrap; background: #f6f6f6; padding: 12px; border-radius: 6px; }
.pedido-pagina .pedido-saludo { margin: 8px 0 0; color: #526070; }
.pedido-pagina .pedido-tarjeta {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid #d9e0ea;
    border-top: 4px solid var(--rojo);
    background: #fff;
    box-shadow: 0 16px 36px rgba(20, 32, 51, .08);
}
.pedido-pagina .pedido-tarjeta-cabeza { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pedido-pagina .pedido-kicker { margin: 0; color: var(--rojo); font-family: var(--titulo); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.pedido-pagina .pedido-cliente { margin: 2px 0 0; font-family: Fraunces, Georgia, serif; font-size: 28px; color: #142033; }
.pedido-pagina .pedido-meta { margin: 4px 0 0; color: #526070; }
.pedido-pagina .pedido-tarjeta .codigo-seguimiento { margin: 0; padding: 8px 12px; border-radius: 10px; background: #142033; color: #fff; font-size: 16px; }
.pedido-pagina .pedido-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pedido-pagina .seg-chip { margin: 0; padding: 7px 12px; border-radius: 999px; color: #fff; font-weight: 800; background: #1d4ed8; }
.pedido-pagina .seg-chip[data-clave="recibido"] { background: #1d4ed8; }
.pedido-pagina .seg-chip[data-clave="preparacion"] { background: #d97706; }
.pedido-pagina .seg-chip[data-clave="transito"] { background: #0f766e; }
.pedido-pagina .seg-chip[data-clave="parcial"] { background: #7c3aed; }
.pedido-pagina .seg-chip[data-clave="entregado"] { background: #047857; }
.pedido-pagina .seg-chip[data-clave="anulado"] { background: #9f1239; }
.pedido-pagina .seg-chip.pago[data-clave="pendiente"] { background: #b45309; }
.pedido-pagina .seg-chip.pago[data-clave="parcial"] { background: #c2410c; }
.pedido-pagina .seg-chip.pago[data-clave="pagado"] { background: #047857; }
.pedido-pagina .seg-fecha { margin: 0; padding: 8px 12px; border-radius: 10px; background: #fff6e5; color: #9a6700; font-weight: 800; }
.pedido-pagina .seg-fecha.confirmada { background: #e7f6ec; color: #0f7a3a; }
.pedido-pagina .seg-modo, .pedido-pagina .seg-comentario, .pedido-pagina .pedido-yape-nota { margin: 0; }
.pedido-pagina .seg-comentario:empty, .pedido-pagina .seg-comentario[hidden] { display: none; }
.pedido-pagina .pedido-tarjeta .detalle-nombre { margin: 0; }
.pedido-pagina .pedido-tarjeta .detalle-fila { cursor: default; }
.pedido-pagina .seg-historial h2 { margin: 4px 0 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #526070; }
.pedido-pagina .linea-tiempo li { background: #f7f9fc; border-radius: 10px; padding: 8px 10px 8px 12px; }
.pedido-pagina .tarjeta-acciones { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pedido-pagina .btn-wa { background: #128c7e; box-shadow: 0 8px 18px rgba(18, 140, 126, .28); }
.pedido-pagina .btn-wa:hover { background: #0e6e63; }
.pedido-pagina .tarjeta-volver { color: #1d4f91; font-weight: 800; }
.pedido-pagina.tarjeta-cambio .pedido-tarjeta { animation: tarjeta-pulso .6s ease; }
@keyframes tarjeta-pulso { from { box-shadow: 0 0 0 4px rgba(225, 6, 0, .35); } }
@media (prefers-reduced-motion: reduce) {
    .pedido-pagina.tarjeta-cambio .pedido-tarjeta { animation: none; }
}
.sociales { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.btn.social:disabled { background: #e6e6e6; color: #777; cursor: not-allowed; }
.precarga {
    position: fixed; inset: 0; z-index: 40; background: #e10600; color: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    transition: opacity .4s ease, visibility .4s ease;
}
.precarga-sello {
    width: 84px; height: 84px; border-radius: 50%; border: 3px solid #fff;
    display: grid; place-items: center; font-family: var(--titulo); font-size: 42px; font-weight: 800;
    animation: pulso 1.1s ease-in-out infinite;
}
.precarga-union { font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: clamp(40px, 12vw, 64px); letter-spacing: .08em; line-height: 1; margin: 0; text-align: center; }
.precarga-marca { font-family: var(--titulo); letter-spacing: .04em; font-size: clamp(15px, 4.2vw, 18px); margin: 12px 0 0; text-align: center; padding: 0 16px; }
.precarga-barra { width: min(240px, 60vw); height: 4px; background: rgba(255,255,255,.35); border-radius: 99px; overflow: hidden; margin-top: 16px; }
.precarga-barra span { display: block; height: 100%; width: 0; background: #fff; animation: carga 5s linear forwards; }
.precarga-fuera { opacity: 0; visibility: hidden; }
@keyframes pulso { 50% { transform: scale(1.08); } }
@keyframes carga { to { width: 100%; } }
.consultar { margin-top: auto; color: var(--rojo); font-weight: 700; font-size: 14px; text-decoration: none; }
.etiqueta { position: absolute; z-index: 2; top: 10px; left: 10px; background: var(--rojo); color: #fff; font-family: var(--titulo); font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 2px; }
.etiqueta.agotado { background: #6b7280; top: 10px; bottom: auto; }
.paginacion { display: flex; justify-content: center; gap: 6px; margin: 28px 0; }
.paginacion a, .paginacion span { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--linea); text-decoration: none; }
.paginacion .actual { background: var(--rojo); color: #fff; border-color: var(--rojo); }
.vacio { padding: 24px 0 48px; }
.miga { color: var(--muted); }
.miga a { color: var(--rojo); }
.ficha { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; padding: 12px 0 36px; }
.ficha-foto {
    position: relative;
    width: min(100%, 520px);
    aspect-ratio: 1 / 1;
    height: auto;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--linea);
    background: #f4f4f4;
}
.ficha-foto img {
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    object-fit: contain;
    object-position: center;
}
.ficha-datos h1 { font-size: 30px; }
.ficha-precio .precio ins { font-size: 28px; }
.stock { font-weight: 700; }
.stock.ok { color: var(--ok); }
.stock.agotado { color: #6b7280; }
.acciones { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 18px; }
.descripcion { white-space: pre-line; }
.sku { color: var(--muted); font-size: 14px; }
.relacionados { padding-bottom: 48px; }
.contacto { padding: 12px 0 64px; max-width: 680px; }
.pie { background: #1a1a1a; color: #f3f3f3; padding: 28px 0; }
.pie a { color: #fff; }
.pie p { color: #c8c8c8; max-width: 640px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.nota { color: var(--muted); }

body.admin { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; background: var(--fondo); }
.admin-nav { background: #fff; border-right: 1px solid var(--linea); padding: 18px 14px; display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 0; overflow: visible; }
.admin-nav > a, .admin-nav > form { display: block; width: 100%; flex: 0 0 auto; }
.admin-nav a, .admin-nav .enlace { text-decoration: none; padding: 8px 10px; border-radius: 6px; background: none; border: 0; text-align: left; cursor: pointer; color: var(--tinta); white-space: normal; overflow-wrap: break-word; line-height: 1.35; }
.admin-nav a.activa { background: #ffe8e6; color: var(--rojo); font-weight: 700; }
.admin-nav .marca { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 10px; row-gap: 6px; align-items: center; width: 100%; margin: 0 0 14px; padding: 4px 10px 0; }
.admin-nav .marca > .sello { grid-column: 1; grid-row: 1; }
.admin-nav .marca > span:last-child { display: contents; }
.admin-nav .marca strong { grid-column: 2; grid-row: 1; }
.admin-nav .marca small { grid-column: 1 / -1; grid-row: 2; display: block; margin: 0; white-space: normal; overflow-wrap: break-word; line-height: 1.35; }
.admin-nav form .enlace { display: block; width: 100%; }
.marca.mini strong { font-size: 16px; letter-spacing: .08em; line-height: 1.2; }
.admin-main { padding: 28px; min-width: 0; }
.admin.simple { display: block; background: var(--fondo); }
.acceso { width: min(440px, calc(100% - 32px)); margin: 8vh auto; background: #fff; border: 1px solid var(--linea); border-radius: 8px; padding: 24px; }
.form { display: grid; gap: 12px; max-width: 820px; margin-bottom: 22px; min-width: 0; }
.form label, .checks label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
.form label.check { display: flex; align-items: center; gap: 8px; }
.form label.check input { width: 18px; height: 18px; padding: 0; }
.checks { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.checks label, .check { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.grilla-form { grid-template-columns: 1fr 1fr; }
.ancho-completo { grid-column: 1 / -1; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 12px 0 20px; }
.stats div { background: #fff; border: 1px solid var(--linea); border-radius: 8px; padding: 14px; }
.stats b { display: block; font-family: var(--titulo); font-size: 28px; color: var(--rojo); }
.stats-estado { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 0; }
.estado-card {
    display: block;
    text-decoration: none;
    color: #fff;
    border-radius: 12px;
    padding: 14px;
    min-width: 0;
    box-shadow: 0 4px 0 rgba(20, 20, 20, .08);
    transition: transform .16s ease, box-shadow .16s ease;
}
.estado-card b { color: #fff; font-size: 32px; line-height: 1; }
.estado-card span { display: block; margin-top: 6px; font-weight: 800; font-size: 14px; }
.estado-card:hover, .estado-card:focus-visible { transform: translateY(-3px); box-shadow: 0 12px 22px rgba(20, 20, 20, .16); outline: none; }
.estado-recibido { background: #1d4ed8; }
.estado-preparacion { background: #d97706; }
.estado-transito { background: #0f766e; }
.estado-parcial { background: #7c3aed; }
.estado-entregado { background: #047857; }
.estado-anulado { background: #9f1239; }
.filtro-estado { margin: 0 0 12px; font-weight: 700; }
.filtro-estado a { color: var(--rojo); }
.tabla-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--linea); border-radius: 8px; }
.tabla { width: 100%; border-collapse: collapse; }
.tabla th, .tabla td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--linea); vertical-align: middle; }
.tabla small { display: block; color: var(--muted); font-weight: 400; }
.mini { width: 44px; height: 44px; object-fit: contain; background: #f4f4f4; border-radius: 6px; display: block; }
.lista-productos { background: #fff; border: 1px solid var(--linea); border-radius: 12px; padding: 12px; min-width: 0; }
.productos-cards { display: none; }
.lista-buscar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.lista-buscar input { flex: 1 1 180px; min-width: 0; width: 100%; border: 1px solid #ddd; border-radius: 8px; padding: 10px 12px; }
.tabla.densa th { font-size: 13px; color: #65676b; font-weight: 700; }
.tabla th.ordenable a { color: inherit; text-decoration: none; white-space: nowrap; }
.tabla th.ordenable a:hover { color: var(--rojo); }
.tabla th.ordenable .flecha { font-size: 12px; }
.tabla.densa td { padding: 8px 10px; }
.celda-nombre { display: flex; gap: 10px; align-items: center; min-width: 220px; }
.celda-nombre div { min-width: 0; }
.celda-nombre a { font-weight: 700; color: #0b57d0; text-decoration: none; }
.celda-nombre small { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.celda-precio .precio { flex-wrap: nowrap; }
.celda-precio .precio ins, .celda-precio .precio del { font-size: 14px; }
.estado { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.estado::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9aa0a6; }
.estado.ok::before { background: #16a34a; }
.estado.off { color: #6b7280; }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.editor-acciones { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
.editor-card { background: #fff; border: 1px solid var(--linea); border-radius: 12px; padding: 16px 18px 18px; margin-bottom: 16px; display: grid; gap: 14px; }
.editor-card h2 { margin: 0; font-size: 16px; }
.editor-card h3 { margin: 4px 0 0; font-size: 15px; }
.editor-card label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
.editor-card label.interruptor, .editor-card label.check { display: flex; align-items: center; }
.editor-card input:not([type="checkbox"]), .editor-card textarea, .editor-card select {
    width: 100%; box-sizing: border-box; border: 1px solid #ddd; border-radius: 8px; padding: 10px 12px; background: #fff;
}
.etiqueta-campo { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.precios-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: end; }
.precio-pen { display: flex; align-items: stretch; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; background: #fff; min-height: 44px; }
.precio-pen input[type="checkbox"] { width: 18px; height: 18px; margin: 0 10px; align-self: center; flex: 0 0 auto; }
.precio-pen input:not([type="checkbox"]) { border: 0; border-radius: 0; width: auto; flex: 1; min-width: 0; }
.moneda, .signo { display: flex; align-items: center; padding: 0 12px; background: #f3f4f6; border-right: 1px solid #ddd; font-weight: 800; }
.contador { color: var(--muted); font-weight: 600; }
.interruptor { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.interruptor input { appearance: none; width: 42px; height: 24px; border-radius: 99px; background: #d0d5dd; position: relative; cursor: pointer; margin: 0; }
.interruptor input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s ease; }
.interruptor input:checked { background: var(--rojo); }
.interruptor input:checked::after { transform: translateX(18px); }
.preview { width: 120px; height: 120px; object-fit: contain; border: 1px solid var(--linea); }
.soltar { border: 2px dashed #d0d5dd; border-radius: 12px; padding: 16px; text-align: center; background: #fafafa; min-width: 0; max-width: 100%; overflow: hidden; }
.soltar input[type="file"] { width: 100%; max-width: 100%; min-width: 0; color: transparent; }
.soltar input[type="file"]::file-selector-button { color: var(--tinta); font: inherit; font-weight: 700; border: 1px solid var(--linea); border-radius: 4px; background: #fff; padding: 8px 12px; cursor: pointer; }
.soltar.sobre { border-color: var(--rojo); background: #fff5f4; }
.soltar p { margin: 0 0 8px; }
.editor-card .galeria { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; min-width: 0; width: 100%; }
.editor-card .galeria-item { width: 104px; max-width: 104px; flex: 0 0 104px; min-width: 0; box-sizing: border-box; border: 1px solid var(--linea); border-radius: 8px; background: #fff; padding: 6px; cursor: grab; overflow: hidden; }
.galeria-item.principal { border-color: var(--rojo); box-shadow: 0 0 0 1px var(--rojo); }
.editor-card .galeria-item img { width: 92px; height: 92px; max-width: 92px; max-height: 92px; object-fit: contain; background: #f4f4f4; display: block; }
.galeria-item .check { margin-top: 6px; font-size: 13px; }
.ficha-galeria { min-width: 0; }
.miniaturas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; width: min(100%, 520px); }
.miniatura { width: 72px; height: 72px; padding: 4px; border: 1px solid var(--linea); background: #fff; cursor: pointer; }
.miniatura.activa { border-color: var(--rojo); }
.miniatura img { width: 100%; height: 100%; object-fit: contain; }
.pastilla { display: inline-block; background: #ffe8e6; color: var(--rojo); border-radius: 99px; padding: 2px 8px; font-size: 12px; font-weight: 700; margin-right: 4px; }
.pastilla.gris { background: #eee; color: #555; }
.acciones-tabla { display: flex; gap: 10px; align-items: center; }
.productos-admin .celda-nombre { min-width: 0; }
.stock-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.stock-form label { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tabla .stock-form .kicker { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.stock-form input { width: 72px; max-width: 100%; border: 1px solid #ddd; border-radius: 6px; padding: 8px; background: #fff; }
.stock-form button { background: none; border: 0; padding: 0; color: var(--rojo); font-weight: 700; cursor: pointer; }
.stock-pedidos { flex: 1 1 100%; color: var(--muted); font-size: 13px; }
.enlace { background: none; border: 0; color: var(--rojo); cursor: pointer; padding: 0; font-weight: 700; }
.enlace.peligro { color: #8a1c13; }
.aviso { padding: 10px 12px; border-radius: 6px; background: #e9f8ee; }
.aviso.error { background: #ffe8e6; }
.admin-toolbar { margin-bottom: 8px; }
.foto-editor { display: grid; gap: 8px; }
.form.inline { grid-template-columns: 2fr 120px auto auto; align-items: end; margin-bottom: 16px; max-width: none; }
.yape { display: grid; justify-items: start; gap: 8px; margin: 0; padding: 18px; border: 1px solid #e4d7f0; border-top: 4px solid #5b2c83; border-radius: 18px; background: #fff; box-shadow: 0 14px 32px rgba(60, 30, 90, .08); position: sticky; top: 96px; }
.pedido-pagina .yape h2 { color: #5b2c83; }
.yape h2 { margin: 0; }
.yape p { margin: 0; }
.yape-qr { width: min(220px, 100%); height: auto; aspect-ratio: 1; object-fit: contain; background: #fff; border: 1px solid var(--linea); }
.yape-pregunta { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(20, 20, 20, .45); padding: 16px; }
.yape-pregunta[hidden] { display: none !important; }
.yape-pregunta-caja { width: min(420px, 100%); background: #fff; border-radius: 14px; padding: 18px; box-shadow: 0 16px 40px rgba(0, 0, 0, .2); }
.yape-pregunta-caja p { margin: 0 0 14px; font-weight: 800; font-size: 18px; }
.yape-pregunta-acciones { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.comprobante { display: grid; gap: 8px; }
.comprobante .galeria { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; min-width: 0; }
.comprobante .galeria-item { width: 104px; max-width: 104px; flex: 0 0 104px; min-width: 0; box-sizing: border-box; border: 1px solid var(--linea); border-radius: 8px; background: #fff; padding: 6px; overflow: hidden; }
.comprobante .galeria-item img { width: 92px; height: 92px; max-width: 92px; max-height: 92px; object-fit: contain; background: #f4f4f4; display: block; }
.prueba-mini { width: 72px; height: 72px; object-fit: contain; display: block; margin-top: 6px; background: #f4f4f4; border: 1px solid var(--linea); }
.prueba-impresion { width: 280px; max-width: 100%; height: auto; object-fit: contain; display: block; margin: 8px 0; border: 1px solid var(--linea); }
.form.form-categoria { display: flex; flex-flow: row nowrap; align-items: flex-end; gap: 12px; max-width: none; }
.form-categoria > label:not(.check) { flex: 1 1 auto; min-width: 0; margin: 0; }
.form-categoria > label:nth-of-type(2) { flex: 0 0 96px; }
.form-categoria > label.check { flex: 0 0 auto; align-self: flex-end; margin: 0 0 10px; }
.form-categoria .form-acciones { flex: 0 0 auto; margin: 0; }
.form-categoria input[type="text"], .form-categoria input[type="number"], .form-categoria input:not([type="checkbox"]) { width: 100%; box-sizing: border-box; }
.codigo-seguimiento { font-family: var(--titulo); letter-spacing: .08em; font-size: 22px; }
.aviso-vivo { position: sticky; top: 8px; z-index: 5; background: #fff7d6; border: 1px solid #e6c200; padding: 10px 12px; border-radius: 8px; margin: 0 0 12px; }
.linea-tiempo { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.linea-tiempo li { border-left: 3px solid var(--rojo); padding: 2px 0 2px 10px; }
.linea-tiempo time { display: block; color: var(--muted); font-size: 13px; }
.pedido-gestion.pedido-oculto { display: none !important; }
.pedido-gestion {
    border: 1px solid var(--linea);
    border-left-width: 5px;
    border-radius: 14px;
    background: #fff;
    padding: 12px 14px;
    margin: 0 0 12px;
    display: grid;
    gap: 8px;
    min-width: 0;
    box-shadow: 0 4px 0 rgba(20, 20, 20, .04);
    transition: transform .16s ease, box-shadow .16s ease;
    cursor: pointer;
}
.pedido-gestion:hover,
.pedido-gestion:focus-within,
.pedido-gestion.alzada,
.pedido-gestion:active {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(20, 20, 20, .12);
}
.pedido-gestion.estado-recibido { border-left-color: #1d4ed8; background: linear-gradient(90deg, #f5f8ff 0, #fff 88px); }
.pedido-gestion.estado-preparacion { border-left-color: #d97706; background: linear-gradient(90deg, #fff8eb 0, #fff 88px); }
.pedido-gestion.estado-transito { border-left-color: #0f766e; background: linear-gradient(90deg, #f0fdfa 0, #fff 88px); }
.pedido-gestion.estado-parcial { border-left-color: #7c3aed; background: linear-gradient(90deg, #f6f2ff 0, #fff 88px); }
.pedido-gestion.estado-entregado { border-left-color: #047857; background: linear-gradient(90deg, #f0fdf6 0, #fff 88px); }
.pedido-gestion.estado-anulado { border-left-color: #9f1239; background: linear-gradient(90deg, #fff1f2 0, #fff 88px); }
.pedido-cabeza { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; min-width: 0; }
.pedido-cabeza strong { font-family: var(--titulo); }
.pedido-codigo { font-family: var(--titulo); letter-spacing: .06em; font-size: 13px; color: var(--muted); }
.pedido-quien { min-width: 0; overflow-wrap: anywhere; }
.pedido-imprimir {
    margin-left: auto;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    color: var(--rojo);
    border: 1px solid #f3c7c2;
    background: #fff;
    border-radius: 999px;
    padding: 4px 10px;
}
.pedido-imprimir:hover, .pedido-imprimir:active { background: #fff1ef; transform: translateY(-1px); }
.pedido-lineas { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pedido-lineas li {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 4px 12px;
    align-items: center;
    min-width: 0;
    padding: 8px;
    border: 1px solid #e1e7f0;
    border-radius: 12px;
    background: #f7f9fc;
    color: #142033;
}
.pedido-lineas img { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 8px; }
.pedido-linea-nombre { font-weight: 800; overflow-wrap: anywhere; }
.pedido-linea-datos { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 14px; }
.pedido-linea-dato { display: grid; justify-items: end; min-width: 0; }
.pedido-linea-dato small { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.pedido-linea-dato b { font-family: var(--titulo); font-size: 16px; white-space: nowrap; }
.pedido-datos { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-start; justify-content: space-between; }
.pedido-datos-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; flex: 1 1 180px; }
.pedido-total-lado { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.pedido-total { margin: 0; font-family: var(--titulo); font-size: 18px; font-weight: 800; white-space: nowrap; }
.dato-fecha, .dato-mitad, .dato-nota {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 13px;
    font-weight: 700;
    max-width: 100%;
}
.dato-fecha { background: #fff7ed; color: #9a3412; }
.dato-fecha.confirmada { background: #d1fae5; color: #065f46; }
.dato-mitad { background: #fef3c7; color: #92400e; }
.dato-nota { background: #f3f4f6; color: #374151; font-weight: 600; }
.dato-comentario { margin: 0; color: #374151; overflow-wrap: anywhere; }
.pedido-fotos { display: flex; flex-wrap: wrap; gap: 8px; }
.pedido-fotos .prueba-mini { width: 48px; height: 48px; margin: 0; border-radius: 8px; }
.chips-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.chips-titulo { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); width: 58px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.chip {
    border: 1px solid #e4e4e7;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: #fafafa;
    color: #a1a1aa;
    transition: transform .14s ease, box-shadow .14s ease, background .14s ease, color .14s ease;
}
.chip:hover, .chip:focus-visible {
    transform: translateY(-1px);
    outline: none;
}
.chip:active { transform: translateY(-2px); outline: none; }
.chip-recibido { border-color: #dbe3f5; color: #93a4c8; }
.chip-preparacion { border-color: #f3e2cc; color: #c4a484; }
.chip-transito { border-color: #d5ebe7; color: #8fb3ad; }
.chip-parcial { border-color: #e4dff5; color: #b0a4cf; }
.chip-entregado, .chip-pago-pagado { border-color: #d5ebe3; color: #8fb5a6; }
.chip-pago-pendiente { border-color: #e4e4e7; color: #a1a1aa; }
.chip-pago-parcial { border-color: #f3e6c4; color: #c4b07a; }
.chip-anulado { border-color: #f0d0d6; color: #c4a0a8; }
.chip.activo {
    color: #fff;
    font-weight: 800;
    border-color: transparent;
    box-shadow: 0 8px 16px rgba(20, 20, 20, .18);
}
.chip-recibido.activo { background: #1d4ed8; }
.chip-preparacion.activo { background: #d97706; }
.chip-transito.activo { background: #0f766e; }
.chip-parcial.activo { background: #7c3aed; }
.chip-entregado.activo, .chip-pago-pagado.activo { background: #047857; }
.chip-pago-pendiente.activo { background: #374151; }
.chip-pago-parcial.activo { background: #d97706; }
.chip-anulado.activo { background: #9f1239; }
.yape-estado {
    border: 1px solid #e4e4e7;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    cursor: default;
    background: #f4f4f5;
    color: #71717a;
    white-space: nowrap;
}
.yape-estado.yape-parcial { background: #fef3c7; color: #92400e; border-color: #f3e6c4; }
.yape-estado.yape-pagado { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.confirmar-fecha { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.confirmar-fecha input[type="date"] { border: 1px solid #ddd; border-radius: 8px; padding: 6px 8px; background: #fff; max-width: 100%; }
.pedido-historial { font-size: 14px; }
.pedido-historial summary { cursor: pointer; font-weight: 700; color: var(--rojo); }
.historial-grupos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.historial-grupos h3 { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.historial-estado h3 { color: #1d4ed8; }
.historial-pago h3 { color: #b45309; }
.historial-estado { background: #f5f8ff; border-radius: 10px; padding: 8px 10px; }
.historial-pago { background: #fff7ed; border-radius: 10px; padding: 8px 10px; }
.historial-estado .linea-tiempo li { border-left-color: #1d4ed8; }
.historial-pago .linea-tiempo li { border-left-color: #d97706; }
.historial-vacio { margin: 0; color: var(--muted); font-size: 13px; }
.filtro-pedidos { align-items: flex-end; }
.filtro-acciones { display: flex; align-items: center; gap: 16px; flex-wrap: nowrap; }
.filtro-ocultar { display: flex; flex-wrap: nowrap; align-items: center; gap: 14px 18px; margin: 0; }
.filtro-pedidos .interruptor { display: flex; align-items: center; gap: 10px; }
.pedido-eliminar { margin: 0; }
.pedido-eliminar button {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 999px;
    padding: 6px 12px;
    color: #9f1239;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
}
.pedido-eliminar button:hover, .pedido-eliminar button:focus-visible { background: #ffe4e6; outline: none; }
.pedido-gestion small { display: block; color: var(--muted); }
.filtro-pedidos label { display: grid; gap: 4px; font-size: 14px; font-weight: 700; }
.cuenta-categoria { color: #0b57d0; font-weight: 700; text-decoration: none; }
.cuenta-categoria:hover { text-decoration: underline; }
.form-acciones { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pedido-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pedido-lista li { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.hoja-pedido { max-width: 720px; margin: 24px auto; background: #fff; padding: 28px; }
.hoja-pedido h1 { margin-top: 0; }
.hoja-pedido table { width: 100%; border-collapse: collapse; }
.hoja-pedido th, .hoja-pedido td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--linea); }
@media print {
    .no-imprimir { display: none !important; }
    body { background: #fff; }
    .hoja-pedido { margin: 0; max-width: none; }
}
code { font-size: .95em; }

@media (max-width: 1100px) {
    .rejilla { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pedido-layout { grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); gap: 20px; }
}
@media (max-width: 980px) {
    .stats-estado { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ficha { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats.stats-estado { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grilla-form, .form.inline, .editor, .precios-editor { grid-template-columns: 1fr; }
    body.admin { grid-template-columns: 1fr; }
    .admin-nav { flex-direction: column; align-items: stretch; gap: 8px; border-right: 0; border-bottom: 1px solid var(--linea); }
    .admin-main { padding: 18px 14px; }
    .editor-acciones { flex-wrap: wrap; justify-content: flex-start; }
    .acciones-tabla { flex-wrap: wrap; }
    .celda-nombre { min-width: 0; }
}
@media (max-width: 760px) {
    .ancho { width: min(var(--ancho), calc(100% - 20px)); }
    .barra { flex-wrap: wrap; align-items: flex-start; min-height: 0; padding: 12px 0; gap: 12px; }
    .cabecera .marca strong { font-size: 28px; }
    .marca small { font-size: 12px; }
    .menu { margin-left: 0; width: 100%; flex-wrap: wrap; gap: 10px 14px; }
    .fb { margin-left: auto; }
    .tienda { grid-template-columns: 1fr; }
    .filtros { position: static; flex-direction: column; flex-wrap: nowrap; gap: 8px; }
    .filtros details { width: 100%; border: 1px solid #e4e8ef; border-radius: 12px; background: #fff; overflow: hidden; }
    .filtros details:not([open]) > .filtro-lista { display: none; }
    .filtros .filtro-lista { display: flex; flex-direction: column; }
    .filtros summary { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 10px 14px; font-size: 14px; letter-spacing: 0; text-transform: none; cursor: pointer; pointer-events: auto; }
    .filtros summary em { display: inline; margin-left: auto; font-style: normal; color: var(--rojo); font-size: 13px; letter-spacing: 0; text-transform: none; }
    .filtros summary::after { content: ""; width: 8px; height: 8px; margin-left: 8px; border-right: 2px solid var(--rojo); border-bottom: 2px solid var(--rojo); transform: rotate(45deg); flex: 0 0 auto; }
    .filtros details[open] summary::after { transform: rotate(225deg); margin-top: 6px; }
    .filtros a { min-height: 44px; padding: 10px 14px; align-items: center; border-top: 1px solid #eee; border-bottom: 0; }
    .toolbar { align-items: stretch; }
    .buscar { width: 100%; }
    .buscar input, .buscar select, .buscar button { flex: 1 1 100%; }
    .card:hover, .card:focus-within { transform: none; box-shadow: none; }
    h1 { font-size: 26px; }
    .ficha-datos h1 { font-size: 24px; }
    .pedido-layout { grid-template-columns: 1fr; }
    .yape { position: static; }
    .detalle-fila { grid-template-columns: 64px minmax(0, 1fr) auto; }
    .detalle-foto { width: 64px; height: 64px; }
    .detalle-cantidad b { font-size: 26px; }
    .detalle-precio { font-size: 16px; }
    .detalle-total strong { font-size: 24px; }
    .pedido-lineas li { grid-template-columns: 64px minmax(0, 1fr); }
    .pedido-lineas img { grid-row: 1 / span 2; }
    .pedido-linea-datos { grid-column: 2; justify-content: flex-start; }
    .pedido-linea-dato { justify-items: start; }
    .pedido-pagina .pedido-tarjeta-cabeza { flex-direction: column; }
    .pedido-pagina .pedido-cliente { font-size: 24px; }
    .pedido-pagina .tarjeta-acciones .btn { width: 100%; text-align: center; }
    .carrito-tabla thead { display: none; }
    .carrito-tabla, .carrito-tabla tbody, .carrito-tabla tr, .carrito-tabla td { display: block; width: 100%; }
    .carrito-tabla tr { padding: 8px 0; }
    .carrito-tabla td { border-bottom: 0; }
    .cantidad-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
    .acceso { margin: 24px auto; padding: 16px; }
    .admin-nav .marca { width: 100%; margin-bottom: 8px; }
    .lista-buscar .btn { width: 100%; text-align: center; }
    .filtro-pedidos .btn { width: auto; }
    .historial-grupos { grid-template-columns: 1fr; }
    .form.form-categoria { flex-wrap: wrap; }
    .pedido-gestion:hover { transform: none; }
    .pedido-cabeza { align-items: center; }
    .pedido-imprimir { margin-left: 0; }
    .pedido-total-lado { align-items: flex-end; }
    .pedido-eliminar button { min-height: 40px; }
    .yape-estado { min-height: 40px; }
    .chips-titulo { width: 100%; }
    .chip { min-height: 40px; }
    .confirmar-fecha, .confirmar-fecha input[type="date"] { width: 100%; }
    .form-categoria > label:nth-of-type(2) { flex: 0 1 120px; }
}
@media (max-width: 760px) {
    .lista-productos .tabla-wrap { display: none; }
    .productos-cards { display: grid; gap: 12px; min-width: 0; }
    .producto-card {
        display: grid;
        gap: 6px;
        justify-items: start;
        min-width: 0;
        max-width: 100%;
        background: #fff;
        border: 1px solid var(--linea);
        border-radius: 12px;
        padding: 12px;
    }
    .producto-card .mini { width: 88px; height: 88px; }
    .producto-card-nombre { font-weight: 700; color: #0b57d0; text-decoration: none; overflow-wrap: anywhere; }
    .producto-card small { color: var(--muted); overflow-wrap: anywhere; }
    .producto-card p { margin: 0; }
    .producto-card .kicker { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
    .producto-card .precio { flex-wrap: wrap; }
    .producto-card .precio ins, .producto-card .precio del { font-size: 16px; white-space: nowrap; }
    .producto-card .stock-form { width: 100%; }
    .producto-card .stock-form input, .producto-card .stock-form button { min-height: 40px; }
    .producto-card .stock-form input { flex: 1 1 88px; }
}
@media (max-width: 520px) {
    .rejilla { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr 1fr; }
    .stats.stats-estado { grid-template-columns: 1fr 1fr; }
    .paginacion { flex-wrap: wrap; }
    .hoja-pedido { margin: 0; padding: 16px; }
}
