html { overflow-anchor: none; }

/* ============================= */
/* VARIABLES DE MARCA */
/* ============================= */

:root {
    --negro:    #0d0d0d;
    --verde:    #467235;
    --gris-osc: #595959;
    --gris-cla: #d0d1cd;
    --blanco:   #f2f2f2;
    --verde-cla: #c5d9bb;
    --bg:       #edeee9;
}

/* ============================= */
/* STAR MENU — LAYOUT BASE       */
/* ============================= */

.star-menu {
    width: min(1180px, 92%);
    margin: 0 auto;
    padding: 60px 0 80px;
    font-family: 'DM Sans', 'Helvetica Neue', sans-serif;
}

/* ============================= */
/* HERO DEL MENÚ                 */
/* ============================= */

.star-hero {
    text-align: left;
    margin-bottom: 38px;
}

.star-hero p {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gris-osc);
    margin-bottom: 10px;
}

.star-hero h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(64px, 11vw, 130px);
    font-weight: 300;
    color: var(--negro);
    margin: 0;
    line-height: 0.9;
    letter-spacing: -0.02em;
}

.star-hero span {
    display: block;
    margin-top: 16px;
    color: var(--gris-osc);
    font-size: 15px;
    font-weight: 300;
    letter-spacing: 0.02em;
}

/* ============================= */
/* TABS DE CATEGORÍAS            */
/* ============================= */

.star-tabs {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    gap: 8px;
    padding: 16px 0;
    margin-bottom: 52px;
    background: var(--bg);
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid var(--gris-cla);
    touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.star-tabs::-webkit-scrollbar { display: none; }

.btnCategorias {
    display: inline-block;
    padding: 7px 18px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    transition: background 0.25s ease, border-color 0.25s ease;
    white-space: nowrap;
    cursor: pointer;
}

.btnCategorias a {
    text-decoration: none;
    color: var(--negro);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.25s ease;
    white-space: nowrap;
}

.btnCategorias:hover {
    background-color: var(--negro);
    border-color: var(--negro);
}

.btnCategorias:hover a {
    color: var(--blanco);
}

/* ============================= */
/* SECCIONES DEL MENÚ            */
/* ============================= */

.star-section {
    margin-bottom: 80px;
    scroll-margin-top: 90px;
}

.star-section-title {
    border-top: 1px solid var(--gris-osc);
    border-bottom: 1px solid var(--gris-osc);
    padding: 20px 0;
    margin-bottom: 36px;
}

.star-section-title h2 {
    margin: 0;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 300;
    color: var(--negro);
    letter-spacing: 0.02em;
}

/* ============================= */
/* GRID DE CATEGORÍAS            */
/* ============================= */

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 44px 32px;
}

.category-card {
    text-align: center;
    cursor: pointer;
    transition: transform 0.28s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card img {
    width: min(220px, 100%);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 70%;
    margin: 0 auto;
    display: block;
    transition: box-shadow 0.28s ease;
}

.category-card img.img-cafe{
    object-position: center 55%;
}

.category-card img.img-bobaE{
    object-position: center 90%;
}

.category-card:hover img {
    box-shadow: 0 12px 36px rgba(70, 114, 53, 0.22);
}

.category-card h3 {
    margin: 16px 0 0;
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 500;
    color: var(--negro);
    letter-spacing: 0.01em;
}

/* ============================= */
/* MODALES — BASE                */
/* ============================= */

.menu-modal {
    position: fixed;
    inset: 0;
    background: rgba(13, 13, 13, 0.55);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 4000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ============================= */
/* MODALES — CONTENIDO           */
/* ============================= */

.menu-modal-content {
    background: var(--blanco);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 28px 28px 0 0;
    padding: 32px 28px 40px;
    position: relative;
    transform: translateY(100%);
    transition: transform 0.38s cubic-bezier(.22,.68,0,1);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* Pastilla indicadora superior */
.menu-modal-content::before {
    content: "";
    width: 42px;
    height: 4px;
    background: var(--gris-cla);
    border-radius: 99px;
    display: block;
    margin: 0 auto 18px;
}

.menu-modal.show .menu-modal-content {
    transform: translateY(0);
}

/* Botón cerrar */
.close-modal {
    position: sticky;
    top: 0;
    float: right;
    border: none;
    background: var(--negro);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: var(--verde);
    transform: scale(1.05);
}

/* Título del modal */
.menu-modal-content h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(36px, 7vw, 58px);
    font-weight: 300;
    color: var(--verde);
    margin: 0 0 8px;
    line-height: 1;
    letter-spacing: -0.01em;
    clear: both;
}

.modal-desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 300;
    color: var(--gris-osc);
    margin: 0 0 22px;
    line-height: 1.55;
}

/* Lista de rellenos (burritos, etc.) */
.modal-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.modal-list span {
    background: var(--gris-cla);
    color: var(--negro);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 400;
}

/* ============================= */
/* MODALES — ENCABEZADO TAMAÑOS  */
/* ============================= */


.modal-subtitle{
    font-size: 30px;
    color: var(--gris-osc);
    font-family: 'Cormorant Garamond', serif;
}

.modal-sizes {
    display: grid;
    padding: 10px 0 8px;
    margin-bottom: 0;
    border-bottom: 1.5px solid var(--verde);
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--verde);
}

.modal-sizes.three {
    grid-template-columns: 1fr 64px 64px 64px;
}

.modal-sizes.two {
    grid-template-columns: 1fr 72px 72px;
}

.modal-sizes.one-col {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 10px 0 4px;
    border-bottom: 1px solid var(--gris-cla);
    margin-top: 8px;
}
.modal-sizes.one-col strong {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--verde);
    text-align: right;
    min-width: 80px;
}
.modal-prices.grid p:has(> strong.price-cols.single) {
    grid-template-columns: 1fr 80px;
}
.modal-prices.grid p strong.price-cols.single {
    display: contents;
}
.modal-prices.grid p strong.price-cols.single b {
    text-align: right;
}

.modal-sizes strong {
    text-align: center;
    color: var(--verde);
    font-weight: 600;
}

/* ============================= */
/* MODALES — LISTA DE PRECIOS    */
/* ============================= */

.modal-prices p {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    border-bottom: 1px solid rgba(208, 209, 205, 0.7);
    padding: 13px 0;
    margin: 0;
    font-family: 'DM Sans', sans-serif;
}

/* Precios en grid (con columnas de tamaño) */
.modal-prices.grid p {
    display: grid;
    align-items: flex-start;
    gap: 0;
}

.modal-prices.grid p strong.price-cols {
    display: contents;
}

.modal-prices.grid p strong.price-cols.two {
    display: contents;
}

/* Columnas three */
.modal-prices.grid p {
    grid-template-columns: 1fr 64px 64px 64px;
}

/* Columnas two */
.modal-prices.grid p:has(strong.price-cols.two) {
    grid-template-columns: 1fr 72px 72px;
}

.modal-prices.grid p strong.price-cols b,
.modal-prices.grid p strong.price-cols.two b {
    text-align: center;
    font-weight: 600;
    color: var(--verde);
    white-space: nowrap;
}

/* Nombre del ítem */
.modal-prices span {
    font-size: 15px;
    font-weight: 500;
    color: var(--negro);
    line-height: 1.4;
}

/* Descripción en cursiva */
.modal-prices em {
    display: block;
    margin-top: 3px;
    font-style: normal;
    font-size: 12px;
    font-weight: 300;
    color: var(--gris-osc);
    line-height: 1.4;
}

/* Precio simple (sin columnas) */
.modal-prices strong {
    font-family: 'DM Sans', sans-serif;
    color: var(--verde);
    font-weight: 600;
    white-space: nowrap;
    font-size: 15px;
    flex-shrink: 0;
}

/* ============================= */
/* FOOTER (heredado del index)   */
/* ============================= */

.footer {
    margin-top: 40px;
}

/* ============================= */
/* RESPONSIVE — TABLET           */
/* ============================= */

@media (max-width: 900px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 36px 22px;
    }
}

/* ============================= */
/* RESPONSIVE — MÓVIL            */
/* ============================= */

@media (max-width: 650px) {
    .star-menu {
        width: 100%;
        padding: 36px 18px 70px;
        box-sizing: border-box;
    }

    .star-hero h1 { font-size: 60px; }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px 16px;
    }

    .category-card img { width: 140px; }

    .category-card h3 { font-size: 16px; }

    /* Nombre del ítem en precios: no cortar palabras */
    .modal-prices span {
        font-size: 14px;
        word-break: break-word;
        flex: 1;
        min-width: 0;
    }

    .modal-prices.grid p span {
        font-size: 14px;
    }

    /* Modal ocupa toda la pantalla en mobile */
    .menu-modal {
        align-items: flex-end;
        padding: 0;
    }

    .menu-modal-content {
        width: 100%;
        max-height: 88vh;
        border-radius: 26px 26px 0 0;
        padding: 24px 18px 36px;
    }

    /* En mobile, las columnas de precio se apilan */
    .modal-prices p {
        flex-direction: column;
        gap: 4px;
    }

    .modal-prices strong {
        text-align: left;
    }

    /* Grid de precios en mobile: texto + precio simple */
    .modal-prices.grid p {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .modal-prices.grid p strong.price-cols,
    .modal-prices.grid p strong.price-cols.two {
        display: flex;
        gap: 12px;
    }

    .modal-prices.grid p strong.price-cols b,
    .modal-prices.grid p strong.price-cols.two b {
        text-align: left;
    }

    /* Encabezados de tamaño en mobile: mostrar alineados con los precios */
    .modal-sizes.three {
        display: grid;
        grid-template-columns: 1fr 52px 52px 52px;
        font-size: 11px;
    }

    .modal-sizes.two {
        display: grid;
        grid-template-columns: 1fr 60px 60px;
        font-size: 11px;
    }

    /* Ajustar columnas de precios para que coincidan */
    .modal-prices.grid p {
        display: grid;
        grid-template-columns: 1fr 52px 52px 52px;
        gap: 0;
        flex-direction: unset;
    }

    .modal-prices.grid p:has(strong.price-cols.two) {
        grid-template-columns: 1fr 60px 60px;
    }

    .modal-prices.grid p strong.price-cols,
    .modal-prices.grid p strong.price-cols.two {
        display: contents;
    }

    .modal-prices.grid p strong.price-cols b,
    .modal-prices.grid p strong.price-cols.two b {
        text-align: center;
    }
}

@media (max-width: 380px) {
    .category-card img { width: 120px; }
    .category-card h3  { font-size: 14px; }
}

/* ============================= */
/* RESPONSIVE MÓVIL — STICKY TOP */
/* ============================= */

@media (max-width: 768px) {
    .star-tabs {
        top: 72px; /* Altura del header mobile fijo */
        margin-bottom: 36px;
    }

    .star-section {
        scroll-margin-top: 145px; /* header + tabs */
    }
}
