/* MenuApp — estilos propios sobre Bootstrap 5 */
:root {
    --brand: #e4572e;
    --brand-contrast: #fff;
}

body { background: var(--bs-tertiary-bg); }

.btn-brand {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-color: var(--brand-contrast);
    --bs-btn-hover-bg: color-mix(in srgb, var(--brand) 85%, #000);
    --bs-btn-hover-border-color: color-mix(in srgb, var(--brand) 85%, #000);
    --bs-btn-hover-color: var(--brand-contrast);
    --bs-btn-active-bg: color-mix(in srgb, var(--brand) 75%, #000);
    --bs-btn-disabled-bg: var(--brand);
    --bs-btn-disabled-border-color: var(--brand);
}
.text-brand { color: var(--brand) !important; }
.bg-brand { background: var(--brand) !important; color: var(--brand-contrast); }

/* ---------- Menú público ---------- */
.menu-hero { background: var(--brand); color: var(--brand-contrast); }
.menu-hero .logo { width: 64px; height: 64px; object-fit: cover; border-radius: 16px; background: #fff; }
.category-nav { position: sticky; top: 0; z-index: 1020; background: var(--bs-body-bg); border-bottom: 1px solid var(--bs-border-color); }
.category-nav .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.category-nav .nav::-webkit-scrollbar { display: none; }
.category-nav .nav-link { white-space: nowrap; color: var(--bs-body-color); border-radius: 2rem; }
.category-nav .nav-link.active { background: var(--brand); color: var(--brand-contrast); }
section.menu-category { scroll-margin-top: 64px; }

.product-card { cursor: pointer; transition: transform .1s; border: 0; }
.product-card:hover { transform: translateY(-2px); }
.product-card .thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bs-secondary-bg); }
.product-card .thumb-placeholder { display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: var(--bs-secondary-color); }
.product-card.unavailable { cursor: not-allowed; opacity: .55; }
.product-card.unavailable .thumb { filter: grayscale(1); }
.product-card .sold-out { position: absolute; top: .5rem; left: .5rem; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.option-row { display: flex; align-items: center; justify-content: space-between; padding: .6rem 0; border-bottom: 1px solid var(--bs-border-color-translucent); }
.option-row.disabled { opacity: .45; }
.option-row .stepper { display: flex; align-items: center; gap: .5rem; }
.option-row .stepper .btn { width: 2rem; height: 2rem; padding: 0; border-radius: 50%; }
.group-header { position: sticky; top: -1px; background: var(--bs-body-bg); z-index: 2; padding: .5rem 0; }

.cart-fab { position: fixed; left: 50%; transform: translateX(-50%); bottom: 1rem; z-index: 1030; width: min(92vw, 520px); box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.25); }
body.has-cart-fab { padding-bottom: 5rem; }

/* ---------- Seguimiento ---------- */
.timeline { list-style: none; padding-left: 0; }
.timeline li { position: relative; padding-left: 2rem; padding-bottom: 1rem; }
.timeline li::before { content: ""; position: absolute; left: .55rem; top: 1.4rem; bottom: 0; width: 2px; background: var(--bs-border-color); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: .2rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--bs-secondary-bg); border: 2px solid var(--bs-border-color); }
.timeline li.done .dot { background: var(--bs-success); border-color: var(--bs-success); }
.timeline li.current .dot { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 25%, transparent); }

.chat-box { height: 280px; overflow-y: auto; background: var(--bs-tertiary-bg); border-radius: .5rem; padding: .75rem; }
.chat-msg { max-width: 85%; margin-bottom: .5rem; padding: .4rem .7rem; border-radius: .8rem; font-size: .925rem; }
.chat-msg.mine { margin-left: auto; background: var(--brand); color: var(--brand-contrast); border-bottom-right-radius: .2rem; }
.chat-msg.theirs { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-bottom-left-radius: .2rem; }
.chat-msg.system { margin: .5rem auto; text-align: center; background: none; color: var(--bs-secondary-color); font-size: .8rem; max-width: 100%; }
.chat-msg .meta { font-size: .7rem; opacity: .75; }

.star-input { display: inline-flex; flex-direction: row-reverse; gap: .25rem; }
.star-input input { display: none; }
.star-input label { font-size: 2.2rem; color: var(--bs-secondary-bg); cursor: pointer; line-height: 1; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: #f5b301; }

/* ---------- Panel ---------- */
.admin-sidebar { width: 240px; min-height: 100vh; }
.admin-sidebar .nav-link { color: rgba(255,255,255,.8); border-radius: .4rem; }
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active { background: rgba(255,255,255,.12); color: #fff; }
.admin-sidebar .nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: rgba(255,255,255,.45); margin: 1rem .75rem .25rem; }
@media (max-width: 991.98px) { .admin-sidebar { width: auto; min-height: auto; } }

.board-col { min-height: 60vh; background: var(--bs-secondary-bg); border-radius: .75rem; }
.order-ticket { border-left: 4px solid var(--bs-border-color); }
.order-ticket.ch-delivery { border-left-color: #0d6efd; }
.order-ticket.ch-pickup { border-left-color: #6f42c1; }
.order-ticket.ch-table { border-left-color: #198754; }
.order-ticket.attention { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(228,87,46,.5); } 50% { box-shadow: 0 0 0 6px rgba(228,87,46,0); } }

.stat-card .value { font-size: 1.75rem; font-weight: 700; }
.qr-sheet .qr-card { break-inside: avoid; page-break-inside: avoid; }
@media print { .no-print { display: none !important; } body { background: #fff; } }

/* ---------- Portada del comercio ---------- */
.storefront .entry-btn { display: flex; align-items: center; gap: 1rem; text-align: left; padding: 1rem 1.25rem; border-radius: 1rem; }
.storefront .entry-btn i { width: 2.5rem; text-align: center; }
