/* RESET DE APP NATIVA */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* Bloqueo estricto de rebote horizontal */
    position: relative;
    background: #f8f8f8;
    -webkit-tap-highlight-color: transparent; /* Quita el destello azul al tocar en celular */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* Ocultar barra de scroll manteniendo funcionalidad */
::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/* SPLASH SCREEN */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #9c1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.splash-logo {
    width: 180px;
    animation: logoPulse 0.8s ease-in-out infinite;
}

@keyframes logoPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

/* HEADER FIJO ESTILO APP */
.top-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    background: rgba(248, 248, 248, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid #ececec;
    z-index: 1000;
}

header {
    padding: 20px 15px 10px;
}

.title_monse {
    font-size: 16px;
    font-weight: 200;
    color: #c52a23;
    letter-spacing: -0.1px;
}

/* BUSCADOR */
.search-container {
    position: relative;
    width: 100%;
    margin-top: 15px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.search-container input {
    width: 100%;
    height: 35px;
    padding: 0 15px 0 45px;
    border: 1px solid #c7332c3b;
    border-radius: 25px;
    font-size: 13px;
    outline: none;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,.03);
}

/* CATEGORÍAS (Deslizamiento horizontal nativo de App) */
.categories {
    display: flex;
    gap: 0px;
    overflow-x: auto;
    padding: 0px 10px 0px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    background-color: #ffffff;
}

.category {
    min-width: 85px;
    height: 105px;
    border: none;
    background: white;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,.04);
    cursor: pointer;
    flex-shrink: 0;
    overflow: visible; /* Permite que la imagen sobresalga */
}

.category-icon {
    width: 60px;
    height: 60px;
    background: #1a1a1a;
    border-radius: 50px;
    position: relative;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

.category img {
width: 75px;
    height: 75px;
    object-fit: contain;
    position: absolute;
    /* top: -12px; */
    left: 50%;
    transform: translateX(-50%);
}

.category span {
    margin-top: 6px;
    font-size: 9px;
    font-weight: 600;
    color: #222;
}

/* CONTENEDOR PRINCIPAL */
.products-container {
    margin-top: 225px; /* Evita colisión con el menú fijo */
    padding-bottom: 90px;
    width: 100%;
    max-width: 100%;
}

/* GRILLA DE PRODUCTOS FIX REPETICIÓN DE 2 COLUMNAS */
.products {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Estrictamente 2 por fila en móvil */
    gap: 35px 10px; /* Margen vertical alto para las imágenes flotantes */
    padding: 35px 12px;
    width: 100%;
    max-width: 100%;
}

/* TARJETAS ROJAS (Food Cards) */
.food-card {
    width: 100%;
    background: #d51e1e;
    background-position: center;
    background-size: cover;
    border-radius: 20px;
    position: relative;
    overflow: visible;
    padding: 65px 12px 15px;
    min-height: 200px;
    color: white;
    box-shadow: 0 10px 25px rgba(190, 40, 40, .2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.style_entrada
{
    background-image: url("backgoundentrada2.png");
}

.style_desayuno
{
    background-image: url("backgoundentrada3.png");
}

.style_cacus
{
    background-image: url("backgoundentrada4.png");
}

.style_barbacoa
{
    background-image: url("backgoundentrada5.png");

}
.style_comida
{
    background-image: url("backgoundentrada5.png");
}

.style_postre
{
    background-image: url("backgoundentrada6.png");
}

.style_bebida
{
    background-image: url("backgound.png");
}

.food-image {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 100%;
    display: flex;
    justify-content: center;
}

.food-image img {
    width: 85%; /* Se autoajusta proporcionalmente al tamaño de la tarjeta */
    max-width: 130px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,.3));
}

.food-content h3 {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
    z-index: 10;
}

.food-content p {
    color: rgba(255, 255, 255, .85);
    font-size: 0.55rem;
    line-height: 1.3;
}

.food-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 5px;
}

.food-price {
    font-size: 1.6rem;
    font-weight: 900;
    color: white;
}

.food-content{
    display: flex;
    flex-direction: column;
    height: 100%;
}

.food-footer{
    margin-top: auto; /* Empuja el footer al fondo */
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

/* TARJETAS NORMALES (Product Cards) */
.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,.04);
    width: 100%;
}

.product-card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.product-card h3 {
    padding: 10px 10px 2px;
    font-size: 12px;
    font-weight: 600;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Si el nombre es muy largo no deforma la tarjeta */
}

.product-card p {
    padding: 0 10px 12px;
    font-size: 14px;
    font-weight: 700;
    color: #961c16;
}

/* BOTÓN FLOTANTE */
.cart-btn {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: #961c16;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 20px rgba(150,28,22,.35);
    z-index: 2000;
}

/* AJUSTES PARA PANTALLAS GRANDES (PC / TABLET) */
@media (min-width: 768px) {
    .products {
        grid-template-columns: repeat(3, 1fr);
        gap: 70px 20px;
        padding: 40px 20px;
    }
    .food-card { padding: 85px 20px 20px; }
    .food-image img { max-width: 160px; }
    .food-content h3 { font-size: 1.3rem; }
    .food-content p { font-size: 0.75rem; }
}

@media (min-width: 1024px) {
    .products {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1200px;
        margin: auto;
    }
    .top-content {
        max-width: 100%;
    }
    header {
        max-width: 1200px;
        margin: auto;
    }
    .categories {
        justify-content: center;
    }
}

.food-card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .3s ease, transform .3s ease;
}

.food-card.show-card {
    animation: cardAppear .35s ease forwards;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ESTILOS DE PESTAÑA PLATILLO */
.food-modal{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);

    display:flex;
    justify-content:center;
    align-items:center;

    opacity:0;
    visibility:hidden;

    transition:.3s;

    z-index:9999;

    backdrop-filter: blur(6px);
}

.food-modal.active{
    opacity:1;
    visibility:visible;
}

.food-modal-content{
    background:white;
    width:90%;
    max-width:500px;

    min-height:250px;

    border-radius:25px;

    padding:30px;

    position:relative;

    transform:scale(.85);

    transition:.3s;
}

.food-modal.active .food-modal-content{
    transform:scale(1);
}

.food-modal-close{
    position:absolute;
    top:15px;
    right:15px;

    width:40px;
    height:40px;

    border:none;
    border-radius:50%;

    cursor:pointer;

    font-size:24px;

    background:#fe130f;
    color:white;
}

.food-modal-content h2{
    margin-top:20px;
    text-align:center;
}

.food-modal-content p{
    text-align:center;
}