/* =====================================================
   QRANDA - ADMIN
===================================================== */


/* =====================================================
   FONDO GENERAL
===================================================== */

body.toplevel_page_qranda,
body.qranda_page_qranda-operacion {
    background: #ffffff;
}


/* =====================================================
   TIPOGRAFÍA
===================================================== */

html,
body {
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;

    color: #1d2327;
    background: #ffffff;
}

h1,
h2,
h3,
h4,
h5 {
    font-weight: 700;
    color: #1d2327;
}

p,
span,
button,
input,
select {
    font-family: inherit;
}


/* =====================================================
   CONTENEDOR
===================================================== */

.qranda-wrap {
    max-width: 1700px;
    margin: 20px auto;
}


/* =====================================================
   HEADER
===================================================== */

.qranda-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.qranda-header h1 {
    margin: 0;
    font-size: 36px;
}

.qranda-status {
    display: inline-block;

    background: #eef5ff;
    color: #2271b1;

    padding: 4px 10px;

    border-radius: 20px;

    font-size: 12px;
    font-weight: 600;
}


/* =====================================================
   LAYOUT
===================================================== */

.qranda-main {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 25px;
    align-items: start;
}

.qranda-left,
.qranda-right {
    min-width: 0;
}


/* =====================================================
   TARJETAS / PANELES
===================================================== */

.qr-card {
    width: 100%;
    box-sizing: border-box;

    background: #ffffff;

    border-radius: 18px;

    padding: 22px;

    margin-bottom: 22px;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.qr-card h2 {
    margin-top: 0;
}


/* =====================================================
   SELECT DE TARJETA
===================================================== */

#qranda_tarjeta {
    width: 100%;
    height: 48px;

    font-size: 16px;
}

#qranda_categoria_mobile {
    display: none;
}


/* =====================================================
   CATEGORÍAS
===================================================== */

.qranda-categoria {
    margin-bottom: 35px;
}

.qranda-categoria h2 {
    font-size: 24px;

    border-left: 5px solid #f4b400;

    padding-left: 12px;

    margin-bottom: 18px;
}


/* =====================================================
   PRODUCTOS
===================================================== */

.qranda-productos {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 15px;

    width: 100%;
}


/* =====================================================
   PRODUCTO BASE
===================================================== */

.qranda-producto {
    width: 100%;
    min-width: 0;

    min-height: 82px;

    box-sizing: border-box;

    background: #ffffff;

    border: 1px solid #e4e4e4;

    border-radius: 12px;

    padding: 14px 12px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    color: #1d2327;
}

.qranda-producto:hover {
    background: #f8fafc;

    border-color: #2271b1;

    transform: translateY(-2px);

    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}


/* =====================================================
   NOMBRE DEL PRODUCTO
===================================================== */

.qranda-producto strong {
    display: block;

    width: 100%;

    font-size: 15px;

    line-height: 1.3;

    text-align: center;

    margin-bottom: 4px;
}


/* =====================================================
   PRECIO DEL PRODUCTO
===================================================== */

.qranda-producto span {
    display: block;

    width: 100%;

    font-size: 14px;

    line-height: 1.2;

    font-weight: 700;

    text-align: center;
}


/* =====================================================
   PRODUCTOS CON IMAGEN
===================================================== */

.qranda-producto.con-imagen {
    min-height: 220px;

    justify-content: flex-start;

    padding: 12px;
}


/* =====================================================
   IMAGEN DEL PRODUCTO
===================================================== */

.qranda-producto-imagen {
    width: 100%;

    height: 140px;

    overflow: hidden;

    border-radius: 8px;

    margin-bottom: 10px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;
}

.qranda-producto-imagen img {
    width: 100%;

    height: 100%;

    object-fit: contain;
}


/* =====================================================
   PRODUCTOS SIN IMAGEN
===================================================== */

.qranda-producto.sin-imagen {
    min-height: 82px;

    padding: 14px 12px;

    justify-content: center;
}

.qranda-producto.sin-imagen strong {
    margin-bottom: 4px;
}

.qranda-producto.sin-imagen span {
    font-size: 14px;
}


/* =====================================================
   TABS
===================================================== */

.qranda-tabs {
    display: flex;

    gap: 10px;

    margin-bottom: 25px;

    flex-wrap: wrap;
}

.qranda-tab {
    border: 0;

    background: #e9eef5;

    padding: 12px 18px;

    border-radius: 30px;

    cursor: pointer;

    font-weight: 600;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.qranda-tab:hover {
    background: #2271b1;
    color: #ffffff;
}

.qranda-tab.activa {
    background: #2271b1;
    color: #ffffff;
}


/* =====================================================
   PEDIDO
===================================================== */

#pedido_actual {
    min-height: 250px;

    font-size: 16px;
}

.pedido-item {
    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 12px 0;

    border-bottom: 1px solid #ececec;
}

.pedido-item strong {
    flex: 1;
}

.pedido-vacio {
    color: #888888;
}


/* =====================================================
   TOTAL
===================================================== */

#qranda_total {
    font-size: 28px;
    font-weight: 700;
}


/* =====================================================
   BOTONES QRANDA
===================================================== */

.button,
.button-primary,
.button-large {
    background: #2271b1 !important;

    color: #ffffff !important;

    border: none !important;

    border-radius: 12px;

    height: 48px;

    padding: 0 22px;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;

    box-shadow:
        0 4px 10px rgba(34, 113, 177, 0.18);
}

.button:hover,
.button-primary:hover,
.button-large:hover {
    background: #135e96 !important;

    color: #ffffff !important;

    transform: translateY(-2px);

    box-shadow:
        0 8px 18px rgba(34, 113, 177, 0.25);
}

.button:active,
.button-primary:active,
.button-large:active {
    transform: translateY(0);
}


/* =====================================================
   BOTÓN ENVIAR PEDIDO
===================================================== */

#qranda_enviar_pedido {
    width: 100%;

    height: 56px;

    margin-top: 15px;

    font-size: 18px;
}


/* =====================================================
   BOTONES COMANDA
===================================================== */

#qranda_nueva_comanda,
#qranda_cobrar {
    width: 100%;

    margin-top: 15px;
}


/* =====================================================
   MODALES QRANDA
===================================================== */

.qranda-modal {
    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.45);

    display: flex;

    justify-content: center;

    align-items: center;

    z-index: 99999;

    animation: qrandaFade 0.18s ease;
}

.qranda-modal-contenido {
    width: 95%;

    max-width: 430px;

    background: #ffffff;

    border-radius: 18px;

    padding: 25px;

    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.18);

    box-sizing: border-box;
}

.qranda-modal h2 {
    margin-top: 0;

    margin-bottom: 20px;
}

.qranda-modal input,
.qranda-modal select {
    width: 100%;

    height: 46px;

    margin-bottom: 15px;

    border: 1px solid #dcdcde;

    border-radius: 10px;

    padding: 0 14px;

    font-size: 15px;

    box-sizing: border-box;
}

.qranda-modal-botones {
    display: flex;

    justify-content: flex-end;

    gap: 10px;

    margin-top: 20px;
}

.qranda-modal-botones .button {
    min-width: 120px;
}


/* =====================================================
   INPUT QRANDA
===================================================== */

.qranda-input {
    width: 100%;

    height: 46px;

    padding: 0 14px;

    margin-bottom: 15px;

    border: 1px solid #dcdcde;

    border-radius: 10px;

    font-size: 15px;

    box-sizing: border-box;
}


/* =====================================================
   ANIMACIÓN MODAL
===================================================== */

@keyframes qrandaFade {

    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }

}


/* =====================================================
   RESPONSIVE - TABLET
===================================================== */

@media (max-width: 1200px) {

    .qranda-productos {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


/* =====================================================
   RESPONSIVE - TABLET PEQUEÑA
===================================================== */

@media (max-width: 900px) {

    .qranda-productos {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* =====================================================
   RESPONSIVE - CELULARES
===================================================== */

@media (max-width: 768px) {

    /* Header */

    .qranda-header {
        flex-direction: column;

        align-items: flex-start;

        gap: 15px;
    }

    .qranda-header h1 {
        font-size: 28px;
    }


    /* Layout */

    .qranda-main {
        display: flex;

        flex-direction: column;

        gap: 15px;
    }


    /* Cards */

    .qr-card {
        width: 100%;

        margin-bottom: 15px;

        padding: 18px;

        box-sizing: border-box;
    }


    /* Productos */

    .qranda-productos {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 10px;
    }

    .qranda-producto {
        min-height: 90px;

        padding: 12px;
    }

    .qranda-producto strong {
        font-size: 13px;
    }

    .qranda-producto span {
        font-size: 15px;
    }


    /* Productos con imagen */

    .qranda-producto.con-imagen {
        min-height: 180px;

        padding: 12px;
    }

    .qranda-producto-imagen {
        height: 70px;

        display: flex;

        align-items: center;

        justify-content: center;
    }

    .qranda-producto-imagen img {
        max-height: 70px;

        width: auto;

        object-fit: contain;
    }


    /* Categorías */

    #qranda_categoria_mobile {
        display: block;

        width: 100%;

        height: 46px;

        margin-bottom: 20px;

        font-size: 16px;
    }


    /* Tabs */

    .qranda-tabs {
        display: none;
    }


    /* Pedido */

    #pedido_actual {
        min-height: auto;
    }


    /* Botones */

    .button,
    .button-primary,
    .button-large {
        width: 100%;
    }

    .button-large {
        height: 50px;

        font-size: 16px;
    }


    /* Contenedor */

    .qranda-wrap {
        margin: 10px;
    }

}


/* =====================================================
   RESPONSIVE - CELULARES PEQUEÑOS
===================================================== */

@media (max-width: 600px) {

    .qranda-productos {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .qranda-producto.con-imagen {
        min-height: 180px;
    }

    .qranda-producto-imagen {
        height: 105px;
    }

}

/* =====================================================
   QRANDA - OCULTAR CERRAR MENÚ
   ===================================================== */

#collapse-menu {
    display: none !important;
}


/* =====================================================
   QRANDA - OCULTAR TEXTO SUPERIOR
===================================================== */

/*
 * El nombre QRANDA que aparece debajo del logo
 * pertenece al elemento superior del menú.
 */

#adminmenuwrap .qranda-menu-title,
#adminmenuwrap .qranda-title,
#adminmenuwrap .qranda-brand {
    display: none !important;
}