
/* ── Catálogo ─────────────────────────────────────────────────────── */
.catalogo-header { background:#2c5aa0; color:#fff; padding:15px 0; }
.catalogo-top { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; max-width:1200px; margin:0 auto; padding:0 1rem; }
.cliente-info { display:flex; align-items:center; gap:8px; font-size:.95rem; }
.badge-mayorista { background:#ffd700; color:#333; padding:2px 8px; border-radius:12px; font-size:.75rem; font-weight:700; }
.btn-carrito { background:#fff; color:#2c5aa0; border:none; border-radius:8px; padding:8px 16px; font-weight:600; cursor:pointer; display:flex; align-items:center; gap:6px; text-decoration:none; }
.carrito-count { background:#e53e3e; color:#fff; border-radius:50%; width:20px; height:20px; display:inline-flex; align-items:center; justify-content:center; font-size:.7rem; font-weight:700; }
.search-form { max-width:1200px; margin:12px auto 0; padding:0 1rem; }
.search-row { display:flex; gap:8px; flex-wrap:wrap; }
.search-input { flex:1; padding:9px 12px; border:1px solid #ccc; border-radius:8px; font-size:.9rem; min-width:160px; }
.category-select { padding:9px 12px; border:1px solid #ccc; border-radius:8px; font-size:.9rem; }
.btn-buscar { padding:9px 16px; background:#fff; color:#2c5aa0; border:none; border-radius:8px; cursor:pointer; font-weight:600; }
.btn-limpiar { padding:9px 16px; background:rgba(255,255,255,.2); color:#fff; border:none; border-radius:8px; cursor:pointer; text-decoration:none; }
.catalogo-actions { max-width:1200px; margin:10px auto 0; padding:0 1rem; }
.btn-pdf { color:#fff; text-decoration:none; font-size:.85rem; opacity:.9; }
.catalogo-body { padding:20px 1rem; max-width:1200px; margin:0 auto; }
.result-count { color:#666; font-size:.85rem; margin-bottom:12px; }
.productos-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:16px; }
.producto-card { background:#fff; border:1px solid #e0e0e0; border-radius:10px; overflow:hidden; transition:box-shadow .2s; }
.producto-card:hover { box-shadow:0 4px 12px rgba(0,0,0,.1); }
.producto-card.agotado { opacity:.6; }
.producto-imagen-wrap { position:relative; width:100%; aspect-ratio:1; background:#f5f5f5; }
.producto-imagen { width:100%; height:100%; object-fit:cover; }
.badge-agotado { position:absolute; top:6px; left:6px; background:#e53e3e; color:#fff; padding:2px 8px; border-radius:4px; font-size:.7rem; font-weight:700; }
.badge-bajo-stock { position:absolute; top:6px; left:6px; background:#f6ad55; color:#333; padding:2px 8px; border-radius:4px; font-size:.7rem; font-weight:700; }
.producto-info { padding:12px; }
.producto-codigo { font-size:.75rem; color:#999; margin-bottom:4px; }
.producto-nombre { font-size:.875rem; font-weight:600; color:#333; margin-bottom:6px; }
.producto-categoria { font-size:.75rem; color:#666; margin-bottom:6px; }
.producto-precio { font-size:1.1rem; font-weight:700; color:#2c5aa0; margin-bottom:10px; }
.sin-stock { color:#e53e3e; font-size:.85rem; text-align:center; padding:8px 0; }
.cantidad-control { display:flex; align-items:center; gap:6px; margin-bottom:8px; }
.btn-qty { width:28px; height:28px; border:1px solid #ccc; border-radius:4px; background:#f5f5f5; cursor:pointer; font-size:1rem; font-weight:700; }
.qty-input { width:50px; text-align:center; border:1px solid #ccc; border-radius:4px; padding:4px; font-size:.9rem; }
.btn-agregar { width:100%; padding:8px; background:#2c5aa0; color:#fff; border:none; border-radius:8px; cursor:pointer; font-size:.85rem; font-weight:600; }
.btn-agregar:hover { background:#1e3a6f; }
.empty-state { text-align:center; padding:60px 20px; color:#999; }
.empty-state i { font-size:4rem; margin-bottom:16px; display:block; }
.toast { position:fixed; bottom:20px; right:20px; background:#333; color:#fff; padding:12px 20px; border-radius:10px; z-index:9999; font-size:.9rem; }
.toast.success { background:#38a169; }
.toast.error { background:#e53e3e; }

/* ── Carrito ──────────────────────────────────────────────────────── */
.carrito-page { max-width:1100px; margin:30px auto; padding:0 1rem; }
.carrito-page h2 { margin-bottom:20px; font-size:1.5rem; color:#333; }
.carrito-layout { display:grid; grid-template-columns:1fr 320px; gap:24px; }
.carrito-table { width:100%; border-collapse:collapse; background:#fff; border-radius:10px; overflow:hidden; box-shadow:0 1px 4px rgba(0,0,0,.08); }
.carrito-table th { background:#2c5aa0; color:#fff; padding:12px; text-align:left; font-size:.85rem; }
.carrito-table td { padding:12px; border-bottom:1px solid #f0f0f0; vertical-align:middle; font-size:.9rem; }
.item-producto { display:flex; align-items:center; gap:10px; }
.item-img { width:50px; height:50px; object-fit:cover; border-radius:6px; }
.qty-control { display:flex; align-items:center; gap:6px; }
.qty-control button { width:28px; height:28px; border:1px solid #ccc; border-radius:4px; cursor:pointer; background:#f5f5f5; font-weight:700; }
.btn-eliminar { background:none; border:none; color:#e53e3e; cursor:pointer; font-size:1rem; }
.carrito-resumen { background:#fff; border-radius:10px; padding:20px; box-shadow:0 1px 4px rgba(0,0,0,.08); height:fit-content; }
.carrito-resumen h3 { margin-bottom:16px; font-size:1rem; color:#333; }
.resumen-row { display:flex; justify-content:space-between; margin-bottom:12px; font-size:.9rem; color:#666; }
.resumen-mayorista { margin-bottom:12px; }
.btn-confirmar { width:100%; padding:13px; background:#38a169; color:#fff; border:none; border-radius:8px; font-size:1rem; font-weight:700; cursor:pointer; margin-bottom:8px; }
.btn-seguir { display:block; text-align:center; color:#2c5aa0; font-size:.85rem; text-decoration:none; }

/* ── Pedidos ──────────────────────────────────────────────────────── */
.historial-page,.detalle-page { max-width:900px; margin:30px auto; padding:0 1rem; }
.historial-page h2 { margin-bottom:20px; }
.historial-topbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.historial-topbar h2 { margin:0; }
.notif-bell { position:relative; width:40px; height:40px; border:1px solid #d1d5db; background:#fff; border-radius:999px; cursor:pointer; color:#1f2937; }
.notif-bell i { font-size:1rem; }
.notif-bell.ring { animation: bellRing .85s ease; }
.notif-count { position:absolute; top:-4px; right:-4px; background:#dc2626; color:#fff; border-radius:999px; min-width:18px; height:18px; padding:0 5px; font-size:.7rem; font-weight:700; display:flex; align-items:center; justify-content:center; }
@keyframes bellRing {
    0% { transform: rotate(0deg); }
    20% { transform: rotate(16deg); }
    40% { transform: rotate(-12deg); }
    60% { transform: rotate(8deg); }
    80% { transform: rotate(-6deg); }
    100% { transform: rotate(0deg); }
}
.notificaciones-card { background:#fff; border-radius:10px; padding:16px; margin-bottom:16px; box-shadow:0 1px 4px rgba(0,0,0,.08); }
.notificaciones-card h3 { margin:0 0 12px; font-size:1rem; color:#1e3a6f; }
.notificaciones-list { display:flex; flex-direction:column; gap:10px; }
.notificacion-item { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; border:1px solid #e5e7eb; border-radius:8px; padding:10px; }
.notificacion-main { flex:1; }
.notificacion-titulo { margin:0 0 4px; font-weight:700; color:#111827; font-size:.9rem; }
.notificacion-mensaje { margin:0 0 4px; color:#374151; font-size:.87rem; }
.notificacion-fecha { margin:0; color:#6b7280; font-size:.78rem; }
.notificacion-link { color:#2c5aa0; text-decoration:none; font-weight:600; font-size:.82rem; white-space:nowrap; }
.pedido-card { background:#fff; border-radius:10px; padding:16px; margin-bottom:12px; box-shadow:0 1px 4px rgba(0,0,0,.08); }
.pedido-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.pedido-numero { font-weight:700; color:#2c5aa0; }
.pedido-body { display:flex; justify-content:space-between; color:#666; font-size:.9rem; margin-bottom:10px; }
.pedido-total { font-weight:700; color:#333; }
.btn-ver-detalle { color:#2c5aa0; text-decoration:none; font-size:.85rem; font-weight:600; }
.estado { padding:3px 10px; border-radius:20px; font-size:.75rem; font-weight:700; }
.estado-pendiente { background:#fff3cd; color:#856404; }
.estado-en_proceso { background:#cce5ff; color:#004085; }
.estado-listo { background:#d4edda; color:#155724; }
.estado-entregado { background:#d1ecf1; color:#0c5460; }
.estado-cancelado { background:#f8d7da; color:#721c24; }
.detalle-header { display:flex; align-items:center; gap:12px; margin-bottom:20px; flex-wrap:wrap; }
.btn-back { color:#2c5aa0; text-decoration:none; font-size:.9rem; }
.detalle-info { background:#fff; border-radius:10px; padding:16px; margin-bottom:16px; box-shadow:0 1px 4px rgba(0,0,0,.08); }
.detalle-table { width:100%; border-collapse:collapse; background:#fff; border-radius:10px; overflow:hidden; box-shadow:0 1px 4px rgba(0,0,0,.08); }
.detalle-table th { background:#2c5aa0; color:#fff; padding:10px 12px; text-align:left; font-size:.85rem; }
.detalle-table td { padding:10px 12px; border-bottom:1px solid #f0f0f0; font-size:.9rem; }
.confirmado-page { max-width:600px; margin:60px auto; padding:0 1rem; text-align:center; }
.confirmado-card { background:#fff; border-radius:16px; padding:40px; box-shadow:0 4px 20px rgba(0,0,0,.1); }
.confirmado-icon { font-size:5rem; color:#38a169; margin-bottom:16px; }
.confirmado-card h2 { font-size:1.5rem; margin-bottom:12px; color:#333; }
.confirmado-msg { color:#666; margin-bottom:24px; }
.confirmado-actions { display:flex; gap:12px; justify-content:center; }
.btn-primary { display:inline-block; padding:12px 24px; background:#2c5aa0; color:#fff; border-radius:8px; text-decoration:none; font-weight:600; border:none; cursor:pointer; }
.btn-secondary { display:inline-block; padding:12px 24px; background:#6c757d; color:#fff; border-radius:8px; text-decoration:none; font-weight:600; border:none; cursor:pointer; }

@media(max-width:768px){
    .carrito-layout { grid-template-columns:1fr; }
    .productos-grid { grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); }
    .search-row { flex-direction:column; }
}
