:root {
    --bg-color: #F4F6F8;
    --card-bg: #FFFFFF;
    --text-primary: #1A1A1A;
    --text-secondary: #6B7280;
    --accent-color: #E63946;
    --border-radius: 20px;
    --font-main: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    margin: 0;
    background: var(--bg-color);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* SPLASH */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient(circle at center, #E63946 0%, #B8242F 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 1s ease, visibility 1s ease;
    overflow: hidden;
}

#splash-screen.oculto {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#splash-screen .splash-content {
    text-align: center;
    color: #FFFFFF;
    padding: 20px;
    z-index: 2;
    width: 100%;
    max-width: 500px;
}

#splash-screen .escenario-platillos {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#splash-screen .platillo-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 6rem;
    opacity: 0;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    animation-duration: 8s;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}

#splash-screen .platillo-1 {
    animation-name: platilloAparece;
    animation-delay: 0s;
}

#splash-screen .platillo-2 {
    animation-name: platilloAparece;
    animation-delay: 0.9s;
}

#splash-screen .platillo-3 {
    animation-name: platilloAparece;
    animation-delay: 1.8s;
}

#splash-screen .platillo-4 {
    animation-name: platilloAparece;
    animation-delay: 2.7s;
}

#splash-screen .platillo-5 {
    animation-name: platilloAparece;
    animation-delay: 3.6s;
}

#splash-screen .platillo-6 {
    animation-name: platilloAparece;
    animation-delay: 4.5s;
}

@keyframes platilloAparece {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3) rotate(-20deg);
    }

    15% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1) rotate(0deg);
    }

    25% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }

    40% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }

    55% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.4) rotate(10deg);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3) rotate(20deg);
    }
}

#splash-screen .logo-final {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    animation: logoAparece 8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    z-index: 3;
}

#splash-screen .logo-img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: contain;
    background: transparent;
    padding: 0;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.35));
}

@keyframes logoAparece {

    0%,
    60% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }

    70% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }

    78% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.95);
    }

    85% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

#splash-screen .splash-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
    opacity: 0;
    animation: fadeInText 0.8s ease-out 1s forwards;
}

#splash-screen .splash-subtitle {
    font-size: 0.95rem;
    font-style: italic;
    opacity: 0;
    margin-bottom: 40px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    animation: fadeInText 0.8s ease-out 1.5s forwards;
}

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 0.95;
        transform: translateY(0);
    }
}

#splash-screen .barra-progreso {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    margin: 0 auto 15px;
    overflow: hidden;
}

#splash-screen .barra-relleno {
    width: 0%;
    height: 100%;
    background: white;
    border-radius: 4px;
    animation: llenarBarra 8s ease-in-out forwards;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

@keyframes llenarBarra {
    0% {
        width: 0%;
    }

    20% {
        width: 25%;
    }

    50% {
        width: 60%;
    }

    80% {
        width: 90%;
    }

    100% {
        width: 100%;
    }
}

#splash-screen .loading-text {
    font-size: 0.85rem;
    opacity: 0.85;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: parpadeo 1.5s ease-in-out infinite;
}

@keyframes parpadeo {

    0%,
    100% {
        opacity: 0.85;
    }

    50% {
        opacity: 0.5;
    }
}

@media (max-width: 480px) {
    #splash-screen .escenario-platillos {
        width: 160px;
        height: 160px;
    }

    #splash-screen .platillo-item {
        font-size: 5rem;
    }

    #splash-screen .logo-img {
        width: 120px;
        height: 120px;
    }

    #splash-screen .splash-title {
        font-size: 1.5rem;
    }

    #splash-screen .splash-subtitle {
        font-size: 0.85rem;
    }
}

/* HEADER */
.main-header {
    text-align: center;
    padding: 30px 20px 20px;
    background: white;
    border-bottom: 1px solid #EAEAEA;
}

.header-logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    background: white;
    border: 3px solid #EAEAEA;
    margin: 0 auto 12px;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.main-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--accent-color);
}

.main-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

/* CONTENIDO */
.main-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 25px 20px 40px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 25px 0;
    color: var(--text-primary);
}

/* GRID DE CATEGORÍAS */
.categorias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.categoria-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    border: 1px solid #EAEAEA;
    display: flex;
    flex-direction: column;
}

.categoria-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.categoria-card:active {
    transform: translateY(-2px) scale(0.98);
}

.categoria-imagen-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #FEF3F4 0%, #F9FAFB 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.categoria-imagen-wrap img {
    width: 75%;
    height: 75%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: transform 0.4s ease;
}

.categoria-card:hover .categoria-imagen-wrap img {
    transform: scale(1.08);
}

.categoria-info {
    padding: 14px 12px 16px;
    text-align: center;
}

.categoria-nombre {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.categoria-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* MODAL */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 100;
    align-items: flex-end;
    justify-content: center;
}

.modal-sheet {
    background: white;
    width: 100%;
    max-width: 100%;
    border-radius: 25px 25px 0 0;
    padding: 20px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #EAEAEA;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.close-modal-productos {
    background: none;
    border: none;
    font-size: 2rem;
    color: #9CA3AF;
    cursor: pointer;
    line-height: 1;
}

.close-modal-productos:hover {
    color: var(--text-primary);
}

.lista-productos-modal {
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 10px;
}

.producto-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #F9FAFB;
    border-radius: 14px;
    align-items: center;
}

.producto-imagen {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.producto-info {
    flex: 1;
}

.producto-nombre {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.producto-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.3;
}

.producto-precio {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--accent-color);
}

/* FOOTER */
.main-footer {
    text-align: center;
    font-size: 0.8rem;
    color: #9CA3AF;
    padding: 20px;
    border-top: 1px solid #EAEAEA;
    background: white;
}

/* RESPONSIVE */
@media (min-width: 768px) {
    .modal-overlay {
        align-items: center;
        padding: 20px;
    }

    .modal-sheet {
        max-width: 600px;
        border-radius: var(--border-radius);
        max-height: 80vh;
        animation: fadeInScale 0.3s ease-out;
    }

    @keyframes fadeInScale {
        from {
            opacity: 0;
            transform: scale(0.95);
        }

        to {
            opacity: 1;
            transform: scale(1);
        }
    }

    .main-header h1 {
        font-size: 2rem;
    }

    .categorias-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 400px) {
    .categorias-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .categoria-nombre {
        font-size: 0.9rem;
    }
}