:root {
    --azul-oscuro: #062f59;
    --azul: #084b8f;
    --azul-claro: #1da7e1;
    --azul-card: #123f6d;
    --blanco: #ffffff;
    --fondo-input: #ffffff;
    --texto: #072b50;
    --gris: #8390a0;
    --gris-claro: #eef2f6;
    --borde: rgba(255,255,255,.28);
    --rojo: #f04f4f;
    --verde: #13a95b;
    --amarillo: #ffb82e;
    --radio: 16px;
}


* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}


html,
body {
    margin: 0;
    width: 100%;
    min-height: 100%;
    font-family:
        Inter,
        Arial,
        Helvetica,
        sans-serif;
    background: var(--azul-oscuro);
    color: var(--blanco);
}


body {
    min-height: 100vh;
}


button,
input {
    font-family: inherit;
}


button {
    cursor: pointer;
}


.oculto {
    display: none !important;
}


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

.header-app {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    z-index: 50;

    height: 68px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 28px;

    background:
        rgba(6, 47, 89, .96);
}


.header-logo {
    border: 0;
    background: transparent;

    color: white;

    font-size: 24px;
    font-weight: 900;

    letter-spacing: 1px;
}


.header-cart {
    border: 0;

    min-width: 72px;
    height: 48px;

    padding: 0 16px;

    border-radius: 24px;

    background:
        rgba(255,255,255,.10);

    color: white;

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

    gap: 8px;

    font-size: 18px;
    font-weight: 800;
}


.cart-icon {
    font-size: 22px;
}


/* ============================================================
   ESTRUCTURA
   ============================================================ */

.pantalla {
    display: none;

    min-height: 100vh;

    background:
        linear-gradient(
            180deg,
            #062f59 0%,
            #0b4e94 100%
        );

    padding:
        96px 24px 50px;
}


.pantalla.activa {
    display: block;
}


.pantalla-bienvenida {
    padding: 20px;

    background:
        linear-gradient(
            155deg,
            #062a4e 0%,
            #0b4e95 100%
        );
}


.pantalla-bienvenida.activa {
    display: flex;

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


.contenedor {
    width: min(1040px, 100%);
    margin: 0 auto;
}


.ancho-rubros {
    width: min(1100px, 100%);
}


.contenedor-productos {
    width: min(1180px, 100%);
}


.contenedor-carrito {
    width: min(760px, 100%);
}


.contenedor-form {
    width: min(760px, 100%);
}


.contenedor-confirmacion {
    width: min(720px, 100%);
}


/* ============================================================
   BIENVENIDA
   ============================================================ */

.bienvenida-centro {
    width: min(760px, 100%);

    text-align: center;
}


.marca-bienvenida {
    margin-bottom: 40px;

    font-size: 24px;
    font-weight: 900;

    letter-spacing: 2px;

    opacity: .95;
}


.bienvenida-centro h1 {
    margin:
        0 0 14px;

    font-size:
        clamp(38px, 5vw, 58px);

    line-height: 1;

    font-weight: 900;
}


.bienvenida-centro p {
    max-width: 620px;

    margin:
        0 auto 38px;

    color:
        rgba(255,255,255,.72);

    font-size:
        clamp(18px, 2.2vw, 24px);

    line-height: 1.4;
}


.acciones-bienvenida {
    display: flex;
    justify-content: center;

    gap: 14px;

    flex-wrap: wrap;
}


.btn-retomar {
    margin-top: 22px;

    padding:
        11px 22px;

    border:
        1px solid rgba(255,255,255,.25);

    border-radius: 22px;

    background:
        rgba(255,255,255,.08);

    color: white;

    font-size: 15px;
    font-weight: 700;
}


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

.btn {
    border: none;

    min-height: 54px;

    padding:
        0 24px;

    border-radius: 12px;

    font-size: 17px;
    font-weight: 800;

    transition:
        transform .12s ease,
        opacity .12s ease;
}


.btn:active {
    transform:
        scale(.98);
}


.btn:disabled {
    opacity: .55;
    cursor: default;
}


.btn-grande {
    min-width: 260px;
    min-height: 66px;

    border-radius: 34px;

    font-size: 20px;
}


.btn-blanco {
    background: white;
    color: var(--texto);
}


.btn-transparente {
    border:
        1px solid rgba(255,255,255,.28);

    background:
        rgba(255,255,255,.11);

    color: white;
}


.btn-celeste {
    background:
        var(--azul-claro);

    color:
        white;
}


.btn-amarillo {
    background:
        var(--amarillo);

    color:
        #050505;
}


.btn-secundario {
    margin-top: 12px;

    border:
        1px solid rgba(255,255,255,.42);

    background:
        rgba(255,255,255,.14);

    color:
        white;
}


.btn-outline {
    margin-top: 12px;

    border:
        1px solid rgba(255,255,255,.35);

    background:
        transparent;

    color:
        white;
}


.btn-full {
    width: 100%;
}


.btn-volver,
.btn-inicio-mini {
    padding: 0;

    border: none;

    background: transparent;

    color: white;

    font-size: 15px;
    font-weight: 700;
}


.btn-inicio-mini {
    opacity: .72;
}


/* ============================================================
   TITULOS
   ============================================================ */

.titulo-central {
    margin:
        0 0 42px;

    text-align: center;

    font-size:
        clamp(28px, 4vw, 38px);
}


.titulo-seccion {
    margin:
        18px 0 26px;

    font-size:
        clamp(30px, 4vw, 42px);

    line-height: 1.1;
}


.barra-simple {
    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* ============================================================
   RUBROS
   ============================================================ */

.grid-rubros {
    display: grid;

    grid-template-columns:
        repeat(6, 1fr);

    gap:
        30px 28px;
}


.rubro-card {
    border: none;

    background:
        transparent;

    color: white;

    text-align: center;
}


.rubro-icono {
    width: 104px;
    height: 104px;

    margin:
        0 auto 12px;

    border:
        1.5px solid
        rgba(255,255,255,.85);

    border-radius:
        50%;

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

    font-size: 42px;

    transition:
        transform .15s ease,
        background .15s ease;
}


.rubro-card:active
.rubro-icono {
    transform:
        scale(.96);

    background:
        rgba(255,255,255,.10);
}


.rubro-nombre {
    font-size: 14px;
    font-weight: 900;

    text-transform: uppercase;

    line-height: 1.25;
}


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

.barra-productos {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 26px;
}


.buscador-wrap {
    width: min(360px, 100%);

    min-height: 52px;

    padding:
        0 16px;

    border-radius: 12px;

    background:
        white;

    display: flex;
    align-items: center;

    gap: 10px;

    color:
        var(--texto);
}


.buscador-wrap input {
    width: 100%;
    height: 50px;

    border: none;
    outline: none;

    font-size: 16px;

    color:
        var(--texto);
}


.grid-productos {
    display: grid;

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

    gap: 18px;
}


.producto-card {
    min-width: 0;

    overflow: hidden;

    border-radius: 13px;

    background: white;

    color:
        #0a0a0a;

    box-shadow:
        0 12px 30px
        rgba(0,0,0,.10);
}


.producto-img {
    width: 100%;
    aspect-ratio: 1 / 1;

    background:
        #f4f6f8;

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

    overflow: hidden;

    font-size: 46px;
}


.producto-img img {
    width: 100%;
    height: 100%;

    object-fit: contain;
}


.producto-info {
    padding: 16px;
}


.producto-descripcion {
    min-height: 44px;

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

    line-height: 1.3;
}


.producto-sku {
    margin-top: 5px;

    color: #728095;

    font-size: 12px;
}


.producto-footer {
    margin-top: 18px;

    display: flex;

    align-items: center;
    justify-content: space-between;
}


.producto-precio {
    color:
        var(--texto);

    font-size: 20px;
    font-weight: 900;
}


.btn-sumar-producto {
    width: 42px;
    height: 42px;

    border: none;

    border-radius: 50%;

    background:
        var(--azul-oscuro);

    color: white;

    font-size: 28px;
    line-height: 1;
}


.producto-agotado {
    opacity: .55;
}


/* ============================================================
   CARRITO
   ============================================================ */

.lista-carrito {
    display: flex;
    flex-direction: column;

    gap: 12px;
}


.carrito-item {
    padding:
        18px 20px;

    border-radius:
        12px;

    background:
        white;

    color:
        #111;

    display: grid;

    grid-template-columns:
        1fr auto;

    align-items: center;

    gap: 16px;
}


.carrito-item-nombre {
    font-size: 16px;
    font-weight: 600;
}


.carrito-item-precio {
    margin-top: 4px;

    color:
        var(--texto);

    font-weight: 900;
}


.carrito-controles {
    display: flex;
    align-items: center;

    gap: 15px;
}


.control-cantidad {
    width: 38px;
    height: 38px;

    border: none;

    border-radius:
        50%;

    font-size: 20px;
    font-weight: 700;
}


.control-menos {
    background:
        #f1f1f1;

    color:
        #444;
}


.control-mas {
    background:
        var(--azul-oscuro);

    color:
        white;
}


.control-eliminar {
    border: none;

    background:
        transparent;

    color:
        var(--rojo);

    font-size: 20px;
}


.total-carrito {
    margin-top: 22px;

    padding:
        24px;

    border-radius:
        12px;

    background:
        white;

    color:
        var(--texto);

    display: flex;
    align-items: center;
    justify-content: space-between;

    font-size: 22px;
    font-weight: 800;
}


.total-carrito strong {
    font-size: 26px;
}


.contenedor-carrito
> .btn-celeste {
    margin-top: 16px;
}


/* ============================================================
   FACTURACION
   ============================================================ */

.selector-factura {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 14px;

    margin-bottom: 22px;
}


.tipo-factura {
    min-height: 116px;

    padding:
        18px;

    border:
        1px solid rgba(255,255,255,.32);

    border-radius:
        13px;

    background:
        transparent;

    color:
        white;

    text-align: left;
}


.tipo-factura.activo {
    border-color:
        var(--azul-claro);

    background:
        rgba(57, 126, 187, .35);
}


.tipo-icono {
    margin-bottom: 10px;

    font-size: 30px;
}


.tipo-factura strong {
    display: block;

    font-size: 17px;
}


.tipo-factura small {
    display: block;

    margin-top: 4px;

    color:
        rgba(255,255,255,.72);

    font-size: 13px;
}


.panel-form {
    padding: 24px;

    border-radius:
        14px;

    background:
        white;

    color:
        #111;
}


.panel-form label {
    display: block;

    margin:
        14px 0 7px;

    font-size: 13px;
    font-weight: 700;
}


.panel-form input {
    width: 100%;
    height: 54px;

    padding:
        0 15px;

    border:
        1px solid #d7dce3;

    border-radius:
        8px;

    outline: none;

    background:
        white;

    font-size:
        16px;
}


.panel-form input:focus {
    border-color:
        var(--azul-claro);

    box-shadow:
        0 0 0 2px
        rgba(29,167,225,.12);
}


.fila-doble {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 14px;
}


.panel-form
.btn-celeste {
    margin-top: 18px;
}


/* ============================================================
   GOOGLE AUTOCOMPLETE
   ============================================================ */

.google-autocomplete {
    width: 100%;
}


gmp-place-autocomplete {
    width: 100%;

    min-height: 54px;

    border:
        1px solid #d7dce3;

    border-radius:
        8px;

    background:
        white;

    color:
        #111;

    font-size:
        16px;
}


.direccion-fallback {
    display: none;
}


/* ============================================================
   CONFIRMACION
   ============================================================ */

.panel-confirmacion {
    padding: 24px;

    border-radius:
        14px;

    background:
        white;

    color:
        #111;
}


.resumen-cliente small {
    display: block;

    margin-bottom: 8px;

    color:
        #777;
}


.resumen-cliente strong {
    display: block;

    margin-bottom: 5px;

    font-size: 17px;
}


.resumen-cliente p {
    margin:
        2px 0;

    color:
        #69717e;

    font-size:
        13px;
}


.separador {
    height: 1px;

    margin:
        18px 0;

    background:
        #dde1e6;
}


.resumen-linea {
    display: flex;
    justify-content: space-between;

    gap: 16px;

    margin:
        13px 0;

    font-size:
        15px;
}


.confirmacion-total {
    display: flex;
    justify-content: space-between;

    margin-bottom: 20px;

    color:
        var(--texto);

    font-size: 21px;
    font-weight: 900;
}


.nota-pago {
    margin:
        14px 0 0;

    text-align: center;

    color:
        #777;

    font-size:
        11px;
}


/* ============================================================
   QR
   ============================================================ */

.pantalla-qr {
    position: relative;
}


.qr-cancelar {
    position: absolute;

    top: 50px;
    left: 50px;
}


.qr-centro {
    width: min(520px, 100%);

    margin:
        0 auto;

    text-align: center;
}


.qr-centro h2 {
    margin:
        0 0 8px;

    font-size:
        34px;
}


.qr-centro > p {
    margin:
        0 0 20px;

    color:
        rgba(255,255,255,.72);

    font-size: 16px;
}


.qr-card {
    width:
        min(390px, 100%);

    margin:
        0 auto;

    padding:
        24px;

    border-radius:
        16px;

    background:
        white;

    color:
        var(--texto);
}


.qr-card img {
    display: block;

    width: 100%;
    max-width: 300px;

    aspect-ratio: 1 / 1;

    margin:
        0 auto;

    object-fit:
        contain;
}


.qr-total {
    display: flex;

    justify-content: space-between;

    font-size: 19px;
    font-weight: 900;
}


.contador-qr {
    margin-top: 18px;

    font-size: 24px;
    font-weight: 900;
}


.esperando-pago {
    margin-top: 12px;

    color:
        rgba(255,255,255,.90);

    font-size: 14px;
}


/* ============================================================
   APROBADO
   ============================================================ */

#pantallaAprobado.activa {
    display: flex;

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


.aprobado-card {
    width:
        min(620px, 100%);

    padding:
        48px;

    border-radius:
        24px;

    background:
        white;

    color:
        var(--texto);

    text-align:
        center;
}


.check-aprobado {
    width: 130px;
    height: 130px;

    margin:
        0 auto 26px;

    border-radius:
        50%;

    background:
        var(--verde);

    color:
        white;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    font-size:
        88px;
}


.aprobado-card h2 {
    margin:
        0 0 16px;

    font-size:
        46px;
}


.aprobado-card p {
    margin:
        0 0 16px;

    font-size:
        21px;
}


.numero-pedido {
    display:
        block;

    margin-bottom:
        28px;

    font-size:
        26px;
}


/* ============================================================
   ERROR
   ============================================================ */

#pantallaError.activa {
    display: flex;

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


.mensaje-card {
    width:
        min(540px, 100%);

    padding:
        40px;

    border-radius:
        18px;

    background:
        white;

    color:
        var(--texto);

    text-align:
        center;
}


.icono-error {
    width: 70px;
    height: 70px;

    margin:
        0 auto 20px;

    border-radius:
        50%;

    background:
        var(--rojo);

    color:
        white;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    font-size:
        40px;

    font-weight:
        900;
}


/* ============================================================
   MODAL
   ============================================================ */

.modal {
    position:
        fixed;

    inset: 0;

    z-index:
        1000;

    display:
        none;

    align-items:
        center;

    justify-content:
        center;

    padding:
        20px;

    background:
        rgba(0,0,0,.60);
}


.modal.activo {
    display:
        flex;
}


.modal-box {
    width:
        min(500px, 100%);

    padding:
        36px;

    border-radius:
        18px;

    background:
        white;

    color:
        var(--texto);

    text-align:
        center;
}


/* ============================================================
   TOAST
   ============================================================ */

.toast {
    position:
        fixed;

    z-index:
        1200;

    left:
        50%;

    bottom:
        28px;

    transform:
        translate(-50%, 30px);

    padding:
        13px 20px;

    border-radius:
        25px;

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

    color:
        white;

    font-weight:
        700;

    opacity:
        0;

    pointer-events:
        none;

    transition:
        all .2s ease;
}


.toast.activo {
    opacity:
        1;

    transform:
        translate(-50%, 0);
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 1050px) {

    .grid-rubros {
        grid-template-columns:
            repeat(4, 1fr);
    }

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


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 720px) {

    .header-app {
        height:
            60px;

        padding:
            0 14px;
    }

    .header-logo {
        font-size:
            18px;
    }

    .header-cart {
        min-width:
            62px;

        height:
            42px;
    }

    .pantalla {
        padding:
            82px 16px 32px;
    }

    .pantalla-bienvenida {
        padding:
            24px 16px;
    }

    .marca-bienvenida {
        margin-bottom:
            28px;

        font-size:
            19px;
    }

    .acciones-bienvenida {
        display:
            grid;

        grid-template-columns:
            1fr;

        width:
            100%;
    }

    .btn-grande {
        width:
            100%;

        min-width:
            0;
    }

    .grid-rubros {
        grid-template-columns:
            repeat(3, 1fr);

        gap:
            24px 12px;
    }

    .rubro-icono {
        width:
            82px;

        height:
            82px;

        font-size:
            34px;
    }

    .rubro-nombre {
        font-size:
            11px;
    }

    .barra-productos {
        align-items:
            stretch;

        flex-direction:
            column;
    }

    .buscador-wrap {
        width:
            100%;
    }

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

        gap:
            12px;
    }

    .producto-info {
        padding:
            12px;
    }

    .producto-descripcion {
        font-size:
            13px;
    }

    .producto-precio {
        font-size:
            17px;
    }

    .carrito-item {
        grid-template-columns:
            1fr;
    }

    .carrito-controles {
        justify-content:
            flex-end;
    }

    .selector-factura {
        grid-template-columns:
            1fr 1fr;
    }

    .fila-doble {
        grid-template-columns:
            1fr;
    }

    .panel-form {
        padding:
            16px;
    }

    .qr-cancelar {
        top:
            24px;

        left:
            20px;
    }

    .qr-centro h2 {
        font-size:
            28px;
    }

    .aprobado-card {
        padding:
            34px 20px;
    }

    .aprobado-card h2 {
        font-size:
            36px;
    }
}


/* ============================================================
   MOBILE PEQUEÑO
   ============================================================ */

@media (max-width: 430px) {

    .grid-rubros {
        grid-template-columns:
            repeat(2, 1fr);
    }

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

    .selector-factura {
        grid-template-columns:
            1fr;
    }
}


/* ============================================================
   AJUSTE BUSCADOR PRODUCTOS
   ============================================================ */

.barra-productos {
    position: relative;
    display: block;
    min-height: 110px;
}

.barra-productos > div:first-child {
    max-width: 420px;
}

.buscador-wrap {
    position: absolute;

    left: 50%;
    top: 26px;

    transform: translateX(-50%);

    width: min(460px, 42vw);
}

.sin-resultados {
    grid-column: 1 / -1;

    min-height: 180px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 8px;

    color: rgba(255,255,255,.85);

    text-align: center;
}

.sin-resultados strong {
    font-size: 22px;
}

.sin-resultados span {
    font-size: 14px;
    opacity: .75;
}


@media (max-width: 720px) {

    .barra-productos {
        min-height: 160px;
    }

    .buscador-wrap {
        position: relative;

        top: auto;
        left: auto;

        transform: none;

        width: 100%;

        margin-top: 20px;
    }
}


/* ============================================================
   AJUSTE BUSCADOR PRODUCTOS
   ============================================================ */

.barra-productos {
    position: relative;
    display: block;
    min-height: 110px;
}

.barra-productos > div:first-child {
    max-width: 420px;
}

.buscador-wrap {
    position: absolute;

    left: 50%;
    top: 26px;

    transform: translateX(-50%);

    width: min(460px, 42vw);
}

.sin-resultados {
    grid-column: 1 / -1;

    min-height: 180px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 8px;

    color: rgba(255,255,255,.85);

    text-align: center;
}

.sin-resultados strong {
    font-size: 22px;
}

.sin-resultados span {
    font-size: 14px;
    opacity: .75;
}


@media (max-width: 720px) {

    .barra-productos {
        min-height: 160px;
    }

    .buscador-wrap {
        position: relative;

        top: auto;
        left: auto;

        transform: none;

        width: 100%;

        margin-top: 20px;
    }
}


/* ============================================================
   QR VENCIDO / CANCELADO
   ============================================================ */

#pantallaQRVencido.activa {
    min-height: calc(100vh - 1px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-sizing: border-box;
}

#pantallaQRVencido .mensaje-card {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    box-sizing: border-box;
    text-align: center;
}

#pantallaQRVencido .icono-error {
    margin-left: auto;
    margin-right: auto;
}

#pantallaQRVencido .btn-full {
    width: 100%;
    margin-top: 14px;
}

#pantallaQRVencido h2 {
    text-align: center;
}

#pantallaQRVencido p {
    text-align: center;
}


/* ============================================================
   PAGO APROBADO DETALLADO
   ============================================================ */

#pantallaAprobado.activa {
    min-height: calc(100vh - 1px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    box-sizing: border-box;
}

.aprobado-detalle {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    box-sizing: border-box;
    text-align: center;
}

.aprobado-subtitulo {
    margin-bottom: 22px;
}

.clave-retiro-box {
    background: #062f59;
    color: #ffffff;
    border-radius: 18px;
    padding: 22px;
    margin: 20px 0 24px;
    text-align: center;
}

.clave-retiro-box span {
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.8px;
    opacity: .75;
    margin-bottom: 8px;
}

.clave-retiro-box strong {
    display: block;
    font-size: clamp(27px, 5vw, 42px);
    line-height: 1.1;
    text-transform: uppercase;
}

.pago-datos-finales {
    border: 1px solid #e3e7eb;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 22px;
    text-align: left;
}

.pago-dato {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 13px 16px;
    border-bottom: 1px solid #e9ecef;
}

.pago-dato:last-child {
    border-bottom: 0;
}

.pago-dato span {
    color: #68717d;
    font-size: 14px;
}

.pago-dato strong {
    color: #15202b;
    font-size: 15px;
    text-align: right;
    word-break: break-word;
}

.pago-retorno-auto {
    margin-top: 15px;
    font-size: 13px;
    color: #7b8490;
}

@media (max-width: 600px) {

    .pago-dato {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .pago-dato strong {
        text-align: left;
    }
}

