/* 2026-11-09 (plan 02): la vitrina publica de la tienda. Movil primero.
   Todo el acento sale de --marca (color_primario de la tienda), puesto inline por la pagina.
   REGLA: --marca pinta fondos, bordes e iconos, NUNCA texto sobre blanco (contraste). */

.cat-fondo {
    min-height: 100vh;
    background: #f4f6fb;
    font-family: Inter, Helvetica, Arial, sans-serif;
    color: #1c2434;
    padding-bottom: 96px; /* aire para el boton flotante del carrito */
}

/* ---- cabecera de la tienda ---- */
.cat-cabecera {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--marca) 92%, #000) 0%,
        var(--marca) 60%,
        color-mix(in srgb, var(--marca) 80%, #fff) 100%);
    color: #fff;
    padding: 28px 16px 22px;
    text-align: center;
}
.cat-logo {
    width: 76px; height: 76px; border-radius: 20px; object-fit: cover;
    background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.cat-logo-letra {
    width: 76px; height: 76px; border-radius: 20px; margin: 0 auto;
    background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 800; color: #fff;
}
.cat-nombre { font-size: 1.45rem; font-weight: 800; margin: 10px 0 2px; }
.cat-descripcion { font-size: .92rem; opacity: .92; max-width: 520px; margin: 0 auto; }

/* ---- buscador y filtros ---- */
.cat-controles { max-width: 980px; margin: -18px auto 0; padding: 0 12px; }
.cat-buscar {
    display: flex; align-items: center; gap: 8px;
    background: #fff; border-radius: 14px; padding: 10px 14px;
    box-shadow: 0 4px 16px rgba(23,37,84,.10);
}
.cat-buscar input {
    border: none; outline: none; flex: 1; font-size: 1rem; font-family: inherit;
    background: transparent; color: inherit;
}
.cat-buscar i { color: var(--marca); font-size: 1.1rem; }

.cat-chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 4px; scrollbar-width: none; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chip {
    white-space: nowrap; border: 1px solid #d7deeb; background: #fff; color: #334;
    border-radius: 999px; padding: 7px 14px; font-size: .88rem; font-weight: 600;
    cursor: pointer; font-family: inherit;
}
.cat-chip.activo { background: var(--marca); border-color: var(--marca); color: #fff; }

/* ---- rejilla de productos ---- */
.cat-rejilla {
    max-width: 980px; margin: 10px auto; padding: 0 12px;
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
@media (min-width: 640px)  { .cat-rejilla { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px)  { .cat-rejilla { grid-template-columns: repeat(4, 1fr); } }

.cat-tarjeta {
    background: #fff; border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit;
    box-shadow: 0 2px 10px rgba(23,37,84,.07); display: flex; flex-direction: column;
    transition: transform .12s ease, box-shadow .12s ease; position: relative;
}
.cat-tarjeta:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(23,37,84,.13); }

.cat-foto { aspect-ratio: 1; width: 100%; object-fit: cover; background: #eef1f7; display: block; }
.cat-foto-vacia {
    aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    background: #eef1f7; color: #b6c0d4; font-size: 2rem;
}
.cat-tarjeta-info { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.cat-tarjeta-nombre {
    font-size: .92rem; font-weight: 600; line-height: 1.25;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cat-precio { font-weight: 800; font-size: 1.02rem; margin-top: auto; padding-top: 4px; }
.cat-precio-antes { color: #8a94a8; text-decoration: line-through; font-weight: 500; font-size: .85rem; margin-right: 6px; }

.cat-cinta-rebaja {
    position: absolute; top: 10px; left: 10px; background: #e11d48; color: #fff;
    font-size: .72rem; font-weight: 700; border-radius: 8px; padding: 3px 8px;
}
.cat-cinta-agotado {
    position: absolute; top: 10px; right: 10px; background: #1c2434; color: #fff;
    font-size: .72rem; font-weight: 700; border-radius: 8px; padding: 3px 8px; opacity: .92;
}
.cat-tarjeta.agotado .cat-foto, .cat-tarjeta.agotado .cat-foto-vacia { filter: grayscale(.8); opacity: .75; }

.cat-seccion { max-width: 980px; margin: 18px auto 4px; padding: 0 14px; font-size: 1.05rem; font-weight: 800; }
.cat-vacio { text-align: center; color: #78839b; padding: 48px 16px; }

/* ---- boton flotante del carrito ---- */
.cat-carrito-btn {
    position: fixed; right: 16px; bottom: 16px; z-index: 50;
    background: var(--marca); color: #fff; border: none; cursor: pointer;
    border-radius: 999px; padding: 14px 22px; font-size: 1rem; font-weight: 700; font-family: inherit;
    box-shadow: 0 8px 22px color-mix(in srgb, var(--marca) 45%, transparent);
    display: flex; align-items: center; gap: 10px;
}
.cat-carrito-btn .cuenta {
    background: #fff; color: var(--marca); border-radius: 999px;
    min-width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
    font-size: .85rem; font-weight: 800; padding: 0 6px;
}

/* ---- pagina de producto ---- */
.pp-cuerpo { max-width: 760px; margin: 0 auto; padding: 12px; }
.pp-volver {
    display: inline-flex; align-items: center; gap: 6px; color: #425; text-decoration: none;
    font-weight: 600; font-size: .92rem; margin: 6px 0;
}
.pp-tarjeta { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 2px 12px rgba(23,37,84,.08); }
.pp-foto { width: 100%; aspect-ratio: 1; object-fit: cover; background: #eef1f7; display: block; cursor: zoom-in; }
.pp-miniaturas { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.pp-miniatura {
    width: 58px; height: 58px; border-radius: 10px; object-fit: cover; cursor: pointer;
    border: 2px solid transparent; flex: 0 0 auto;
}
.pp-miniatura.activa { border-color: var(--marca); }
.pp-info { padding: 16px; }
.pp-nombre { font-size: 1.25rem; font-weight: 800; }
.pp-precio { font-size: 1.35rem; font-weight: 800; margin: 6px 0; }
.pp-descripcion { color: #4a5468; font-size: .95rem; white-space: pre-line; margin-top: 8px; }
.pp-agotado { color: #b91c1c; font-weight: 700; margin-top: 10px; }

.pp-cantidad { display: flex; align-items: center; gap: 0; margin: 14px 0 4px; }
.pp-cantidad button {
    width: 42px; height: 42px; border: 1px solid #d7deeb; background: #fff; cursor: pointer;
    font-size: 1.2rem; font-weight: 700; font-family: inherit; color: #1c2434;
}
.pp-cantidad button:first-child { border-radius: 12px 0 0 12px; }
.pp-cantidad button:last-child { border-radius: 0 12px 12px 0; }
.pp-cantidad span { min-width: 54px; text-align: center; border-top: 1px solid #d7deeb; border-bottom: 1px solid #d7deeb; height: 42px; line-height: 42px; font-weight: 700; }

.btn-marca {
    width: 100%; background: var(--marca); color: #fff; border: none; cursor: pointer;
    border-radius: 14px; padding: 14px; font-size: 1.02rem; font-weight: 700; font-family: inherit;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-marca:disabled { background: #b6c0d4; cursor: default; }
.btn-claro {
    width: 100%; background: #fff; border: 1px solid var(--marca); cursor: pointer;
    border-radius: 14px; padding: 13px; font-size: 1rem; font-weight: 700; font-family: inherit;
    color: #1c2434; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-claro i { color: var(--marca); }

/* ---- checkout ---- */
.ck-cuerpo { max-width: 640px; margin: 0 auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.ck-panel { background: #fff; border-radius: 16px; padding: 16px; box-shadow: 0 2px 10px rgba(23,37,84,.07); }
.ck-titulo { font-weight: 800; font-size: 1rem; margin-bottom: 10px; }
.ck-linea { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eef1f7; }
.ck-linea:last-child { border-bottom: none; }
.ck-linea img, .ck-linea .sinfoto {
    width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: #eef1f7; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center; color: #b6c0d4;
}
.ck-linea-info { flex: 1; min-width: 0; }
.ck-linea-nombre { font-weight: 600; font-size: .92rem; line-height: 1.25; }
.ck-linea-precio { color: #68738a; font-size: .85rem; }
.ck-mas-menos { display: flex; align-items: center; gap: 0; }
.ck-mas-menos button {
    width: 30px; height: 30px; border: 1px solid #d7deeb; background: #fff; cursor: pointer;
    font-weight: 700; font-family: inherit; border-radius: 8px; color: #1c2434;
}
.ck-mas-menos span { min-width: 34px; text-align: center; font-weight: 700; font-size: .95rem; }
.ck-quitar { border: none; background: none; color: #b91c1c; cursor: pointer; font-size: 1rem; padding: 4px; }

.ck-entregas { display: flex; flex-direction: column; gap: 8px; }
.ck-entrega {
    display: flex; align-items: center; gap: 10px; border: 1.5px solid #d7deeb; border-radius: 12px;
    padding: 12px; cursor: pointer; font-weight: 600; font-size: .94rem;
}
.ck-entrega.activa { border-color: var(--marca); background: color-mix(in srgb, var(--marca) 7%, #fff); }
.ck-entrega i { color: var(--marca); font-size: 1.15rem; }
.ck-entrega .costo { margin-left: auto; font-weight: 700; }

.ck-campo { margin-bottom: 10px; }
.ck-campo label { display: block; font-size: .85rem; font-weight: 600; color: #4a5468; margin-bottom: 4px; }
.ck-campo input, .ck-campo textarea {
    width: 100%; border: 1.5px solid #d7deeb; border-radius: 12px; padding: 11px 12px;
    font-size: 1rem; font-family: inherit; outline: none; box-sizing: border-box; background: #fff; color: inherit;
}
.ck-campo input:focus, .ck-campo textarea:focus { border-color: var(--marca); }

.ck-totales { font-size: .95rem; }
.ck-totales .fila { display: flex; justify-content: space-between; padding: 3px 0; color: #4a5468; }
.ck-totales .fila.total { font-weight: 800; font-size: 1.1rem; color: #1c2434; border-top: 1px solid #eef1f7; margin-top: 6px; padding-top: 8px; }

.ck-error {
    background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
    border-radius: 12px; padding: 12px; font-size: .92rem;
}
.ck-aviso { color: #68738a; font-size: .85rem; text-align: center; }

/* ---- exito ---- */
.ck-exito { text-align: center; padding: 28px 16px; }
.ck-exito .circulo {
    width: 76px; height: 76px; border-radius: 999px; margin: 0 auto 12px;
    background: #dcfce7; color: #16a34a; display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem;
}

/* ---- MiPedido (seguimiento) ---- */
.mp-estado {
    display: inline-block; border-radius: 999px; padding: 6px 16px;
    font-weight: 800; font-size: 1rem; background: color-mix(in srgb, var(--marca) 12%, #fff);
    color: #1c2434; border: 1.5px solid var(--marca);
}
.mp-estado.bueno { background: #dcfce7; border-color: #16a34a; }
.mp-estado.malo  { background: #fee2e2; border-color: #b91c1c; }
.mp-vence {
    margin-top: 10px; font-size: .88rem; color: #4a5468;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.mp-vence i { color: var(--marca); }

.mp-linea-tiempo { display: flex; flex-direction: column; gap: 0; }
.mp-evento { display: flex; gap: 12px; padding: 0 0 16px; position: relative; }
.mp-evento:last-child { padding-bottom: 0; }
.mp-evento .punto {
    width: 12px; height: 12px; border-radius: 999px; background: var(--marca);
    flex: 0 0 auto; margin-top: 4px; position: relative; z-index: 1;
}
.mp-evento:not(:last-child)::before {
    content: ""; position: absolute; left: 5px; top: 16px; bottom: 0;
    width: 2px; background: #e3e8f2;
}
.mp-evento-accion { font-weight: 700; font-size: .93rem; }
.mp-evento-fecha { color: #8a94a8; font-size: .8rem; }
.mp-evento-nota { color: #4a5468; font-size: .88rem; margin-top: 2px; }
.mp-evento-foto { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; margin-top: 6px; cursor: zoom-in; }

/* ---- Como pagar (orden de pago) ---- */
.mp-cuenta {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    border: 1.5px solid #e3e8f2; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px;
}
.mp-cuenta-banco { font-weight: 700; font-size: .95rem; }
.mp-cuenta-tipo { color: #8a94a8; font-weight: 500; font-size: .8rem; margin-left: 4px; }
.mp-cuenta-numero { font-size: 1.05rem; font-weight: 700; letter-spacing: .5px; color: #1c2434; }
.mp-cuenta-titular { color: #68738a; font-size: .82rem; }
.mp-copiar {
    border: 1px solid var(--marca); background: #fff; color: #1c2434; cursor: pointer;
    border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: .85rem; font-family: inherit;
    white-space: nowrap;
}
.mp-copiar i { color: var(--marca); }
.mp-select {
    width: 100%; border: 1.5px solid #d7deeb; border-radius: 12px; padding: 11px 12px;
    font-size: 1rem; font-family: inherit; background: #fff; color: inherit; outline: none;
}
.mp-efectivo {
    margin-top: 12px; background: #f4f6fb; border-radius: 12px; padding: 12px;
    font-size: .9rem; color: #4a5468; white-space: pre-line;
}
