/* ============================================================
   PEDIDO RÁPIDO + BARRA DE CATEGORÍAS - EL NEGRO
   Paleta: --primary #F88200, --primary-dark #D66F00, --ink #151525
   ============================================================ */

.pedido-wrap {
    --wa: #25d366;
}

/* ---------- Barra de categorías (chips) ---------- */
.cats-bar {
    background: linear-gradient(90deg, var(--primary-dark, #D66F00) 0%, var(--primary, #F88200) 60%, var(--primary-hover, #FFB100) 100%);
    border-top: 1px solid rgba(0, 0, 0, .08);
}

.cats-scroll {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding: .55rem 1rem;
    max-width: 1240px;
    margin: 0 auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.cats-scroll::-webkit-scrollbar { display: none; }

.cat-chip {
    flex: 0 0 auto;
    padding: .35rem 1rem;
    border-radius: 2rem;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, .3);
    white-space: nowrap;
}

.cat-chip:hover { background: rgba(255, 255, 255, .35); color: #fff; }
.cat-chip.chip-alt { background: #fff; color: var(--primary-dark, #D66F00); border-color: #fff; font-weight: 800; }
.cat-chip.chip-alt:hover { color: var(--primary, #F88200); }

.cat-chip.chip-cart { background: #fff; color: var(--tertiary, #151525); border-color: #fff; font-weight: 800; }
.cat-chip.chip-cart:hover { color: var(--primary, #F88200); }
.cat-chip .chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 .3rem;
    margin-left: .3rem;
    border-radius: 1rem;
    background: #e53935;
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1;
}

/* En móvil: barra fija abajo de la pantalla, deslizable lateralmente */
@media (max-width: 768px) {
    .cats-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1040;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, .2);
    }

    .cats-scroll { padding: .45rem .75rem; }

    body { padding-bottom: 52px; }

    /* Elevar botones flotantes por encima de la barra fija */
    #btn-back-to-top { bottom: 62px !important; }
    #btn-wa-float { bottom: 132px !important; }
}

/* ---------- Pasos del pedido ---------- */
.pedido-pasos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin: .5rem 0 1.2rem;
    flex-wrap: wrap;
}
.paso {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    font-weight: 700;
    color: #999;
}
.paso i {
    font-style: normal;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    background: #e0e0e0;
    color: #888;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 800;
}
.paso.activo { color: var(--tertiary, #151525); }
.paso.activo i { background: var(--primary, #F88200); color: #fff; }
.paso.hecho i { background: #27ae60; color: #fff; }
.paso-sep { width: 2rem; height: 2px; background: #ddd; border-radius: 2px; }

/* ---------- Toast propio (feedback al agregar) ---------- */
.pedido-toast {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%) translateY(20px);
    background: var(--tertiary, #151525);
    color: #fff;
    padding: .6rem 1.2rem;
    border-radius: 2rem;
    font-size: .88rem;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
    opacity: 0;
    transition: opacity .25s, transform .25s;
    z-index: 3000;
    max-width: 90vw;
    text-align: center;
    pointer-events: none;
}
.pedido-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.pedido-toast.pedido-toast-success { background: #27ae60; }
.pedido-toast.pedido-toast-error { background: #e53935; }
@media (max-width: 768px) {
    .pedido-toast { bottom: 68px; }
}

/* ---------- Carrito de pedido ---------- */
.cart-list { display: flex; flex-direction: column; gap: .7rem; }

.cart-item {
    display: flex;
    align-items: center;
    gap: .8rem;
    background: #fff;
    border-radius: 1rem;
    padding: .7rem;
    border: 1px solid #ececec;
}

.cart-item-img { width: 64px; height: 64px; flex: 0 0 64px; background: #f5f5f5; border-radius: 8px; overflow: hidden; }
.cart-item-img img { width: 100%; height: 100%; object-fit: contain; }
.cart-item-img .img-fallback { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 1.6rem; color: #bbb; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info h3 { font-size: .9rem; font-weight: 600; margin: 0 0 .15rem; }
.precio-unit { font-size: .8rem; color: #888; }
.cart-item-subtotal { font-weight: 800; min-width: 4.5rem; text-align: right; }

.qty-stepper {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 2rem;
    overflow: hidden;
    background: #fff;
}

.qty-stepper button {
    border: 0;
    background: transparent;
    width: 2rem;
    height: 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
}

.qty-stepper button:hover { background: #f6f6f7; }
.qty-stepper span { min-width: 2rem; text-align: center; font-weight: 700; }

.btn-remove {
    border: 0;
    background: transparent;
    color: #bbb;
    font-size: 1.1rem;
    padding: .3rem;
    cursor: pointer;
}

.btn-remove:hover { color: #e74c3c; }

/* ---------- Resumen / formularios ---------- */
.resumen-card, .form-card, .pedido-card {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid #ececec;
    padding: 1.2rem;
    box-shadow: 0 2px 10px rgba(21, 21, 37, .05);
}

.form-card { margin-bottom: 1rem; }
.pedido-card { margin-bottom: 1rem; }
.resumen-card h2, .form-card h2 { font-size: 1.05rem; font-weight: 800; margin-bottom: .8rem; color: #151525; }

.resumen-items { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .8rem; max-height: 300px; overflow-y: auto; }
.resumen-item { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; }
.resumen-linea {
    display: flex;
    justify-content: space-between;
    padding-top: .6rem;
    margin-top: .4rem;
    border-top: 1px solid #eee;
    font-size: 1rem;
}
.resumen-linea.total strong { font-size: 1.4rem; color: var(--primary, #F88200); }

.opcion-radio {
    display: flex;
    align-items: center;
    gap: .8rem;
    border: 1.5px solid #e5e5e5;
    border-radius: .8rem;
    padding: .7rem .9rem;
    margin-bottom: .6rem;
    cursor: pointer;
    background: #fff;
}

.opcion-radio:has(input:checked) { border-color: var(--primary, #F88200); background: #fff8f2; }
.opcion-radio input { accent-color: var(--primary, #F88200); }
.opcion-info { flex: 1; display: flex; flex-direction: column; }
.opcion-info small { color: #888; }
.opcion-costo { font-weight: 800; }

/* ---------- Botones ---------- */
.btn-cta {
    display: block;
    width: 100%;
    background: var(--primary, #F88200);
    color: #fff;
    border: 0;
    border-radius: .8rem;
    padding: .85rem;
    font-weight: 800;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    margin-top: 1rem;
    box-shadow: 0 3px 0 rgba(0, 0, 0, .12);
    cursor: pointer;
}

.btn-cta:hover { background: var(--primary-dark, #D66F00); color: #fff; }
.btn-wa { background: var(--wa, #25d366); color: #fff; }
.btn-wa:hover { background: #1eb856; color: #fff; }

.btn-secundario {
    display: block;
    width: 100%;
    text-align: center;
    color: #151525;
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
    padding: .6rem;
    margin-top: .4rem;
}

.btn-secundario:hover { color: var(--primary, #F88200); }

/* ---------- Confirmación ---------- */
.confirmado-wrap { max-width: 560px; margin: 0 auto; text-align: center; }
.confirmado-icono {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    background: var(--wa, #25d366);
    color: #fff;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem auto 1rem;
}
.confirmado-wrap h1 { font-size: 1.5rem; font-weight: 800; }

/* ---------- Estado de pedidos ---------- */
.estado-pendiente { background: #fff3cd; color: #856404; }
.estado-procesando { background: #cfe2ff; color: #084298; }
.estado-entregado { background: #d1e7dd; color: #0f5132; }
.estado-cancelado { background: #f8d7da; color: #842029; }
.estado-pagado { background: #d1e7dd; color: #0f5132; }

/* ---------- Varios ---------- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.empty-state i { font-size: 3rem; display: block; margin-bottom: .8rem; }

.pedido-badge {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: .5rem;
    font-size: .75rem;
    font-weight: 700;
}

@media (max-width: 600px) {
    .cart-item { flex-wrap: wrap; }
    .cart-item-subtotal { min-width: auto; }
}

/* Link consulta pedido */
.link-consulta { display: block; text-align: center; margin-top: 10px; color: var(--primary); font-size: .9rem; text-decoration: underline; }

/* Seguimiento del pedido (mis_pedidos) */
.proceso-track { display: flex; gap: 0; margin: 12px 0 4px; }
.paso { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #ccc; font-size: .68rem; position: relative; padding-top: 2px; }
.paso i { font-size: 1.05rem; width: 30px; height: 30px; border-radius: 50%; background: #eee; display: flex; align-items: center; justify-content: center; }
.paso::before { content: ''; position: absolute; top: 16px; left: -50%; width: 100%; height: 3px; background: #eee; z-index: -1; }
.paso:first-child::before { display: none; }
.paso.hecho { color: #27ae60; font-weight: 700; }
.paso.hecho i { background: #27ae60; color: #fff; }
.paso.hecho::before { background: #27ae60; }
