/* =========================
   🌍 RESET GENERAL
========================= */
body{
    padding-top:60px;
    font-family: Arial, sans-serif;
    margin:0;
    background:#eee;
}

.logo-restaurante{
width:70px;
height:70px;
object-fit:cover;
border-radius:15px;
display:block;
margin:0 auto 10px auto;
background:#fff;
padding:3px;
box-shadow:0 2px 8px rgba(0,0,0,.15);
}

/* =========================
   📦 CONTENEDOR
========================= */
.container{
    max-width:900px;
    margin:auto;
    padding:15px;
    background:#fafafa;
    border-radius:16px;
    box-shadow:0 4px 20px rgba(0,0,0,0.05);
}

@media(max-width:768px){
    .container{
        max-width:100%;
        padding:10px;
    }
}

/* =========================
   🧾 HEADER
========================= */
.header-menu{
    text-align:center;
    padding:20px;
    background:#fff;
    border-bottom:1px solid #ddd;
}

.header-menu h1{
    margin:0;
}

.mesa{
    color:#ff9800;
    font-weight:bold;
    margin-top:5px;
}

.titulo-menu{
    text-align:center;
    font-size:32px;
    font-weight:700;
    margin:15px 0;
}

/* =========================
   🔍 BUSCADOR
========================= */
.buscador{
    width:90%;
    max-width:500px;
    margin:15px auto;
    display:block;
    padding:10px;
    border-radius:10px;
    border:1px solid #ccc;
}

*{
    box-sizing:border-box;
}

body{
    margin:0;
    min-height:100vh;
    background:#f8fafc;
    font-family:Arial, Helvetica, sans-serif;
    color:#1e293b;
}

.error-container{
    width:90%;
    max-width:450px;
    background:white;
    padding:40px 30px;
    border-radius:20px;
    text-align:center;
    box-shadow:0 10px 35px rgba(0,0,0,.10);
}

.error-icon{
    font-size:70px;
    margin-bottom:15px;
}

.error-container h1{
    margin:0 0 12px;
    font-size:26px;
    color:#111827;
}

.error-container p{
    margin:0;
    color:#64748b;
    font-size:16px;
    line-height:1.6;
}

.error-line{
    width:60px;
    height:4px;
    background:#f97316;
    border-radius:10px;
    margin:20px auto;
}

/* =========================
   ⭐ RECOMENDADOS
========================= */
.recomendados{
    margin: 20px 0;
}

/* =========================
   📂 CATEGORÍAS
========================= */
.categoria{
    padding:15px;
    font-size:20px;
    font-weight:bold;
}

.mod-obligatorio {
    color: #ef4444;
    font-weight: normal;
}

.mod-opcional {
    color: #94a3b8;
    font-weight: normal;
}

/* =========================
   🍔 ITEMS DEL MENÚ
========================= */
.plato-item{
    display:flex;
    align-items:center;
    justify-content:space-between;
    background:#fff;
    margin:10px 0;
    padding:12px;
    border-radius:12px;
    box-shadow:0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.25s ease;
}

.plato-item:hover{
    transform: translateY(-3px);
    box-shadow:0 6px 15px rgba(0,0,0,0.1);
}

.plato-item:active{
    transform: scale(0.98);
}

/* =========================
   🧾 CONTENIDO IZQUIERDA
========================= */
.plato-info{
    display:flex;
    align-items:center;
    gap:12px;
}

/* =========================
   🖼️ IMAGEN
========================= */
.plato-img{
    width:70px;
    height:70px;
    object-fit:cover;
    border-radius:10px;
    transition: transform 0.3s ease;
}

.plato-item:hover .plato-img{
    transform: scale(1.15);
}

/* =========================
   📝 TEXTO
========================= */
.plato-texto{
    font-size:14px;
}

.plato-texto b{
    font-size:15px;
}

/* =========================
   💲 PRECIO
========================= */
.plato-precio{
    color:#2e7d32;
    font-weight:bold;
    margin-bottom:5px;
}

/* =========================
   💲 ACCIÓN DERECHA
========================= */
.plato-accion{
    width:70px;
    min-width:70px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
}

/* =========================
   ➕ BOTÓN AGREGAR
========================= */
.btn-agregar{
    background:#ff9800;
    border:none;
    color:#fff;
    padding:8px 12px;
    border-radius:50%;
    cursor:pointer;
    font-size:16px;
    transition: all 0.2s ease;
}

.btn-agregar:hover{
    background:#e68900;
    transform: scale(1.1);
}

/* =========================
   🛒 BOTÓN FLOTANTE
========================= */
#btnCarrito{
    position:fixed;
    bottom:20px;
    left:50%;
    transform:translateX(-50%);
    background:#000;
    color:#fff;
    padding:12px 20px;
    border-radius:25px;
    cursor:pointer;
    display:none;
    z-index:999;
}

/* =========================
   🛒 PANEL CARRITO
========================= */
.carrito{
    position:fixed;
    right:0;
    top:0;
    width:100%;
    max-width:320px;
    height:100%;
    background:#fff;
    box-shadow:-3px 0 10px rgba(0,0,0,0.1);
    padding:15px;
    overflow-y:auto;
    overflow-x:hidden;
    z-index:1000;
    display:none;
    box-sizing:border-box;
}

.carrito.activo{
    display:block;
}

/* =========================
   📋 LISTA CARRITO
========================= */
#listaCarrito{
    padding: 0;
    margin: 0;
}

.item-carrito{
    border-bottom:1px solid #eee;
    padding:10px 0;
    width:100%;
    box-sizing:border-box;
    overflow:hidden;
}

.fila-top{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:10px;
    width:100%;
}

.nombre{
    font-weight:bold;
    flex:1;
    white-space:normal;
    word-break:break-word;
    overflow-wrap:anywhere;
}

.precio{
    font-size:13px;
    color:#555;
}

.btn-eliminar{
    background:#333;
    flex-shrink:0;
    color:#fff;
    border:none;
    width:26px;
    height:26px;
    border-radius:6px;
    cursor:pointer;
}

/* =========================
   💰 TOTAL
========================= */
.total-box{
    font-size:18px;
    font-weight:bold;
    text-align:right;
    margin-top:10px;
}

/* =========================
   📤 BOTONES CARRITO
========================= */
.btn-enviar{
    width:100%;
    padding:12px;
    margin-top:10px;
    border:none;
    background:#222;
    color:#fff;
    border-radius:8px;
    cursor:pointer;
}

.cerrar-carrito{
    width:100%;
    margin-top:5px;
    background:#ccc;
    color:#000;
    border:none;
    padding:10px;
    border-radius:8px;
    cursor:pointer;
}

/* =========================
   📂 BARRA DEL MENÚ
========================= */

.cats-bar{
    display:flex;
    align-items:center;
    gap:8px;

    width:100%;

    padding:10px 15px;

    background:#fff;
    border-bottom:1px solid #ddd;

    position:fixed;
    top:0;
    left:0;
    right:0;
    z-index:8000;
    box-shadow:0 2px 8px rgba(0,0,0,.10);

    box-sizing:border-box;
}

.cats-spacer{
    flex:1;
    min-width:5px;
}


/* =========================
   ☰ BOTÓN CATEGORÍAS
========================= */

.btn-categorias{
    display:inline-flex;

    align-items:center;
    justify-content:center;

    padding:9px 14px;

    border:none;
    border-radius:9px;

    background:#ff9800;
    color:#fff;

    font-size:14px;
    font-weight:bold;

    cursor:pointer;

    white-space:nowrap;

    box-shadow:0 2px 6px rgba(0,0,0,.12);
}

.btn-categorias:hover{
    background:#f57c00;
}


/* =========================
   BOTONES DERECHA
========================= */

.cats-acciones{
    display:flex;
    align-items:center;
    gap:7px;

    flex-shrink:0;
}

.btn-nuevo-pedido,
.btn-volver-mesas,
.btn-volver-panel{

    display:inline-flex;

    align-items:center;
    justify-content:center;

    white-space:nowrap;

    padding:9px 13px;

    border-radius:8px;

    font-size:13px;
    font-weight:600;

    text-decoration:none;

    border:none;

    cursor:pointer;

    box-sizing:border-box;
}

.btn-nuevo-pedido{
    background:#16a34a;
    color:#fff;
}

.btn-volver-mesas{
    background:#111827;
    color:#fff !important;
}

.btn-volver-mesas:hover{
    background:#1f2937;
    color:#fff !important;
}

.btn-volver-panel{
    background:#2563eb;
    color:#fff !important;
}


/* =========================
   📂 SIDEBAR CATEGORÍAS
========================= */

.menu-lateral{

    position:fixed;

    top:0;
    left:-300px;

    width:280px;
    max-width:85vw;

    height:100vh;

    background:#fff;

    z-index:9000;

    box-shadow:3px 0 15px rgba(0,0,0,.20);

    padding:20px 12px;

    overflow-y:auto;

    transition:left .3s ease;

    box-sizing:border-box;
}

.menu-lateral.abierto{
    left:0;
}


/* =========================
   ENCABEZADO SIDEBAR
========================= */

.menu-lateral h3{
    display:flex;
    align-items:center;
    justify-content:space-between;

    margin:0 0 8px;

    padding:0 4px 12px;

    font-size:18px;

    border-bottom:1px solid #ddd;
}


/* =========================
   ✕ CERRAR
========================= */

.btn-cerrar-lateral{

    border:none;

    background:transparent;

    color:#64748b;

    font-size:22px;

    line-height:1;

    cursor:pointer;

    padding:2px 5px;
}


/* =========================
   📂 LISTA DE CATEGORÍAS
========================= */

.cat-lateral{
    display:block;
    width:100%;

    padding:11px 8px;
    margin:0;

    border:none;
    border-bottom:1px solid #eeeeee;
    border-radius:0;

    background:#fff;
    color:#333;

    text-align:left;

    cursor:pointer;

    font-size:15px;
    font-weight:normal;

    box-sizing:border-box;

    transition:background .2s, color .2s;
}

.cat-lateral:hover{
    background:#fff3e0;
    color:#e65100;
}

.cat-lateral.activo{
    background:#ff9800;
    color:#fff;
}


/* =========================
   🌑 OVERLAY
========================= */

.overlay-lateral{

    display:none;

    position:fixed;

    top:0;
    left:0;

    width:100%;
    height:100%;

    background:rgba(0,0,0,.5);

    z-index:8999;
}

.overlay-lateral.activo{
    display:block;
}


/* =========================
   📱 RESPONSIVE
========================= */

@media(max-width:768px){

    .cats-bar{
        padding:8px 10px;
        gap:6px;
    }

    .btn-categorias{
        padding:8px 11px;
        font-size:13px;
    }

    .cats-acciones{
        gap:5px;
    }

    .btn-nuevo-pedido,
    .btn-volver-mesas,
    .btn-volver-panel{
        padding:8px 10px;
        font-size:12px;
    }

    .plato-item{
        margin:8px;
        padding:10px;
    }

    .plato-img{
        width:60px;
        height:60px;
    }

    .plato-texto{
        font-size:13px;
    }

    .btn-agregar{
        padding:6px 10px;
    }

    .carrito{
        width:100%;
    }
}


@media(max-width:480px){

    html,
    body{
        overflow-x:hidden;
    }

    .cats-bar{
        padding:7px 8px;
        gap:5px;
    }

    .btn-categorias{
        padding:8px 9px;
        font-size:12px;
    }

    .btn-nuevo-pedido,
    .btn-volver-mesas,
    .btn-volver-panel{
        padding:8px 7px;
        font-size:10px;
    }

    .plato-item{
        flex-direction:row;
    }

    .plato-info{
        gap:8px;
    }

    .plato-img{
        width:55px;
        height:55px;
    }

    .plato-texto b{
        font-size:14px;
    }

    .categoria{
        font-size:18px;
    }

    .header-menu{
        padding:15px;
    }

    .carrito{
        max-width:100%;
    }
}

/* =========================
   🔥 MODAL
========================= */
.modal{
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.6);
    z-index:9999;
    justify-content:center;
    align-items:center;
}

.modal.activo{
    display:flex;
}

.modal-contenido{
    background:white;
    width:100%;
    max-width:470px;
    border-radius:16px;
    overflow:hidden;
    max-height:95vh;
    display:flex;
    flex-direction:column;
    animation:fadeIn .2s ease;
}

@keyframes zoom{
    from{transform:scale(0.8); opacity:0;}
    to{transform:scale(1); opacity:1;}
}

.modal-body{
    overflow-y:auto;
    padding:20px;
    flex:1;
}

.modal-footer{
    padding:15px 20px;
    border-top:1px solid #eee;
    background:white;
    display:flex;
    justify-content:center;
}

.modal-body::-webkit-scrollbar{
    width:6px;
}

.modal-body::-webkit-scrollbar-thumb{
    background:#ccc;
    border-radius:10px;
}

.modal-img{
    width:100%;
    height:200px;
    object-fit:cover;
    border-radius:10px;
}

.cerrar-modal{
    float:right;
    cursor:pointer;
    font-size:18px;
}

.modal-contenido h2{
    margin:10px 0 5px;
}

.modal-contenido p{
    font-size:14px;
    color:#555;
}

.modal-contenido h3{
    color:#2e7d32;
}

.mod-grupo{
    background:#fafafa;
    border-radius:10px;
    padding:10px;
    margin-top:12px;
}

.mod-titulo{
    text-align:center;
    font-weight:bold;
    margin-bottom:8px;
    font-size:16px;
    color:#333;
}

.mod-opcion{
    display:flex !important;
    align-items:center;
    gap:8px;
    text-align:left;
    margin:7px 0;
    color:#111;
    font-size:15px;
}

.mod-opcion input{
    width:auto !important;
    margin:0 !important;
}

.mod-opcion span{
    display:inline-block;
    color:#111;
}

/* =========================
   🛍️ MODAL PARA LLEVAR
========================= */

.modal-llevar{
    display:none;

    position:fixed;
    inset:0;

    width:100%;
    height:100%;

    background:rgba(0,0,0,.55);

    z-index:10000;

    align-items:center;
    justify-content:center;

    padding:20px;

    box-sizing:border-box;
}

.modal-llevar-box{
    width:100%;
    max-width:420px;

    background:#fff;

    border-radius:16px;

    padding:25px;

    box-sizing:border-box;

    box-shadow:0 12px 40px rgba(0,0,0,.25);
}

.modal-llevar-box h2{
    margin:0 0 10px;
    color:#111827;
}

.modal-llevar-box p{
    margin:0 0 16px;

    color:#64748b;

    font-size:14px;
    line-height:1.5;
}

#referenciaLlevar{
    width:100%;

    padding:12px;

    border:1px solid #d1d5db;
    border-radius:9px;

    font-size:16px;

    box-sizing:border-box;
}

#referenciaLlevar:focus{
    outline:none;
    border-color:#ff9800;
}

.modal-llevar-botones{
    display:flex;

    gap:10px;

    margin-top:20px;
}

.btn-cancelar-llevar,
.btn-continuar-llevar{
    flex:1;

    padding:12px;

    border:none;
    border-radius:9px;

    font-size:15px;
    font-weight:bold;

    cursor:pointer;
}

.btn-cancelar-llevar{
    background:#e5e7eb;
    color:#374151;
}

.btn-continuar-llevar{
    background:#16a34a;
    color:#fff;
}

@media(max-width:480px){

    .modal-llevar{
        padding:15px;
    }

    .modal-llevar-box{
        padding:20px;
        border-radius:14px;
    }

    .modal-llevar-botones{
        flex-direction:column;
    }
}