/* Variables de Diseño */
:root {
    --bg-color: #181919;
    --primary-color: #fffae6;
    --primary-op-80: rgba(255, 250, 230, 0.8);
    --primary-op-50: rgba(255, 250, 230, 0.5);
    --primary-op-15: rgba(255, 250, 230, 0.15);
    --primary-op-08: rgba(255, 250, 230, 0.08);
    --primary-op-03: rgba(255, 250, 230, 0.03);
    
    --title-font: 'Bad Script', cursive;
    --body-font: 'Roboto', sans-serif;
    
    --header-height: 70px;
    --glass-blur: blur(12px);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35);
}

/* Reset de Estilos */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
}

body {
    background-color: var(--bg-color);
    color: var(--primary-color);
    font-family: var(--body-font);
    font-weight: 300; /* Roboto Light */
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scrollbar Personalizado */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: var(--primary-op-15);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-op-50);
}

/* 1. Pantalla de Bienvenida (Splash Screen) */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s ease;
}

.splash-bg-glow {
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(255, 250, 230, 0.08) 0%, rgba(24, 25, 25, 0) 60%);
    animation: pulseGlow 8s ease-in-out infinite alternate;
}

.splash-content {
    text-align: center;
    z-index: 2;
    padding: 20px;
}

.splash-logo-wrapper {
    margin-bottom: 25px;
    opacity: 0;
    transform: scale(0.85);
    animation: logoIntro 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.splash-logo {
    max-width: 180px;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.5));
}

.splash-title {
    font-family: var(--title-font);
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    opacity: 0;
    transform: translateY(20px);
    animation: textFadeIn 1.5s cubic-bezier(0.16, 1, 0.3, 1) 1.2s forwards;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.splash-tagline {
    font-size: 0.95rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(15px);
    animation: textFadeIn 1.5s cubic-bezier(0.16, 1, 0.3, 1) 1.8s forwards;
    color: var(--primary-op-80);
}

/* Transiciones de Salida del Splash */
.splash-screen.fade-out {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
}

/* 2. Contenedor de la Aplicación */
.app-content {
    opacity: 1;
    transition: opacity 1s ease;
    padding-top: var(--header-height);
}

.app-content.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Header Fijo Superior */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(24, 25, 25, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--primary-op-08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.header-logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.header-brand-name {
    font-family: var(--title-font);
    font-size: 1.6rem;
    color: var(--primary-color);
}

/* Botón Hamburguesa */
.menu-toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    outline: none;
}

.menu-toggle-btn .bar {
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle-btn:hover .bar {
    background-color: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-color);
}

/* 3. Menú Lateral (Drawer) */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-drawer {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background-color: rgba(24, 25, 25, 0.96);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-left: 1px solid var(--primary-op-15);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
}

.sidebar-drawer.active {
    right: 0;
}

.drawer-header {
    padding: 30px 20px 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--primary-op-08);
}

.drawer-header h3 {
    font-family: var(--title-font);
    font-size: 1.6rem;
    color: var(--primary-color);
    font-weight: normal;
}

.close-sidebar-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.3s;
}

.close-sidebar-btn:hover {
    transform: rotate(90deg);
}

.drawer-links {
    padding: 20px 0;
    flex-grow: 1;
    overflow-y: auto;
}

.drawer-link {
    display: block;
    padding: 15px 25px;
    color: var(--primary-op-80);
    text-decoration: none;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(255, 250, 230, 0.03);
    transition: all 0.3s;
}

.drawer-link:hover {
    color: var(--primary-color);
    background-color: rgba(255, 250, 230, 0.05);
    padding-left: 30px;
}

.drawer-footer-tribal {
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--primary-op-08);
}

.tribal-decor-s {
    max-width: 120px;
    height: auto;
    opacity: 0.6;
    object-fit: contain;
}

/* Banner Superior Decorativo */
.main-banner {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px 0 10px 0;
    overflow: hidden;
}

.tribal-banner {
    max-width: 80%;
    height: auto;
    object-fit: contain;
    opacity: 0.85;
}

/* 4. Cuerpo de Menú */
.menu-main {
    max-width: 680px;
    margin: 0 auto;
    padding: 10px 20px 40px 20px;
}

.category-section {
    padding-top: 40px;
    margin-bottom: 40px;
}

.category-header {
    text-align: center;
    margin-bottom: 30px;
}

.category-tribal-top, .category-tribal-bottom {
    max-width: 160px;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    opacity: 0.4;
}

.category-tribal-top {
    margin-bottom: 5px;
}

.category-tribal-bottom {
    margin-top: 5px;
}

.category-title {
    font-family: var(--title-font);
    font-size: 2.4rem;
    color: var(--primary-color);
    font-weight: normal;
    display: inline-block;
    padding: 0 15px;
    letter-spacing: 1px;
}

/* Items Grid */
.items-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.empty-category-text {
    text-align: center;
    font-style: italic;
    opacity: 0.6;
    padding: 20px;
}

/* Tarjeta del Platillo (Glassmorphism) */
.item-card {
    background-color: var(--primary-op-03);
    border: 1px solid var(--primary-op-08);
    border-radius: 14px;
    overflow: hidden;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
    display: flex;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s;
    animation: itemReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px 0 rgba(0,0,0,0.5);
    border-color: var(--primary-op-15);
    background-color: var(--primary-op-08);
}

/* Efecto de Aparición del Elemento */
@keyframes itemReveal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Imagen del Platillo */
.item-image-container {
    width: 110px;
    min-width: 110px;
    height: 110px;
    overflow: hidden;
    position: relative;
    background-color: rgba(0,0,0,0.2);
    border-right: 1px solid var(--primary-op-08);
}

.item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.item-image.loaded {
    opacity: 1;
}

/* Shimmer Loader para Lazy Loading */
.shimmer-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 250, 230, 0.05), transparent);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.item-image.loaded + .shimmer-effect {
    display: none;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Detalles del Platillo */
.item-details {
    padding: 16px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.item-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}

.item-name {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--primary-color);
}

.item-price {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--primary-color);
    background-color: var(--primary-op-08);
    padding: 2px 10px;
    border-radius: 20px;
    border: 1px solid var(--primary-op-15);
}

.item-description {
    font-size: 0.9rem;
    color: var(--primary-op-80);
    line-height: 1.4;
}

/* 5. Sección de Reseñas */
.reviews-section {
    padding-top: 40px;
}

.reviews-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.review-form-panel {
    background-color: var(--primary-op-03);
    border: 1px solid var(--primary-op-08);
    border-radius: 14px;
    padding: 25px;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    opacity: 0.95;
    letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background-color: rgba(24, 25, 25, 0.7);
    border: 1px solid var(--primary-op-15);
    border-radius: 8px;
    color: var(--primary-color);
    font-family: var(--body-font);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(255, 250, 230, 0.15);
}

/* Selector Estrellas Interactivas */
.rating-stars-wrapper {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
}

.star-radio {
    display: none;
}

.star-label {
    font-size: 2rem;
    color: var(--primary-op-15);
    cursor: pointer;
    transition: color 0.25s, transform 0.25s;
    user-select: none;
}

/* Hover e interactividad */
.star-label:hover,
.star-label:hover ~ .star-label,
.star-radio:checked ~ .star-label {
    color: #fcc419; /* Dorado */
}

.star-label:active {
    transform: scale(1.3);
}

.btn-submit-review {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: var(--bg-color);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit-review:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 250, 230, 0.3);
}

/* Panel de Reseñas Aprobadas */
.approved-reviews-panel {
    background-color: var(--primary-op-03);
    border: 1px solid var(--primary-op-08);
    border-radius: 14px;
    padding: 25px;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
}

.approved-reviews-panel h3 {
    font-family: var(--title-font);
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
    font-weight: normal;
}

.reviews-slider {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.review-card {
    background-color: rgba(255, 250, 230, 0.02);
    border: 1px solid rgba(255, 250, 230, 0.05);
    border-radius: 10px;
    padding: 15px;
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.reviewer-name-display {
    font-weight: 500;
}

.review-date-display {
    opacity: 0.6;
}

.review-stars-display {
    color: #fcc419;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.review-comment-display {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--primary-op-80);
}

/* 6. Sección: Nuestro Local */
.local-section {
    padding-top: 40px;
}

.local-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.local-card {
    background-color: var(--primary-op-03);
    border: 1px solid var(--primary-op-08);
    border-radius: 14px;
    padding: 25px;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
}

.local-card h3 {
    font-family: var(--title-font);
    font-size: 1.6rem;
    margin-bottom: 15px;
    font-weight: normal;
    border-bottom: 1px solid var(--primary-op-08);
    padding-bottom: 8px;
}

.local-address p {
    font-size: 0.95rem;
    line-height: 1.5;
}

.hours-list {
    list-style: none;
}

.hours-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(255, 250, 230, 0.05);
    font-size: 0.95rem;
}

.hours-list li:last-child {
    border-bottom: none;
}

.hours-day {
    font-weight: 400;
}

.hours-time {
    opacity: 0.9;
}

/* Botón WhatsApp */
.whatsapp-btn-wrapper {
    text-align: center;
    margin: 30px 0;
}

.whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #25d366; /* Verde whatsapp */
    color: #fff;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s;
}

.whatsapp-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    filter: brightness(1.05);
}

.wa-icon {
    font-size: 1.2rem;
}

/* 7. Mensaje Final y Footer */
.final-commitment {
    text-align: center;
    padding: 50px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.tribal-divider {
    max-width: 180px;
    height: auto;
    opacity: 0.3;
    margin: 0 auto 20px auto;
    display: block;
}

.tribal-divider-large {
    max-width: 80%;
    height: auto;
    opacity: 0.6;
    margin: 30px auto 0 auto;
    display: block;
}

.commitment-quote {
    font-family: var(--title-font);
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--primary-color);
    opacity: 0.9;
}

.app-footer {
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid var(--primary-op-08);
    font-size: 0.8rem;
    opacity: 0.6;
    letter-spacing: 0.5px;
}

/* Modal de Notificación */
.review-modal-notice {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.modal-notice-content {
    background-color: var(--bg-color);
    border: 1px solid var(--primary-op-15);
    border-radius: 14px;
    padding: 35px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-notice-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-op-08);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    margin: 0 auto 20px auto;
}

.modal-notice-content h3 {
    font-family: var(--title-font);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.modal-notice-content p {
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 25px;
    line-height: 1.5;
}

.close-notice-btn {
    padding: 10px 30px;
    background-color: var(--primary-color);
    color: var(--bg-color);
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.close-notice-btn:hover {
    box-shadow: 0 4px 12px rgba(255, 250, 230, 0.25);
}

/* ANIMACIONES */
@keyframes pulseGlow {
    from { transform: scale(0.9); opacity: 0.8; }
    to { transform: scale(1.1); opacity: 1; }
}

@keyframes logoIntro {
    0% { opacity: 0; transform: scale(0.85) rotate(-3deg); }
    70% { transform: scale(1.02) rotate(1deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes textFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE MEDIA QUERIES */
@media (max-width: 680px) {
    .local-grid {
        grid-template-columns: 1fr;
    }
    
    .item-card {
        flex-direction: column;
    }
    
    .item-image-container {
        width: 100%;
        height: 160px;
        border-right: none;
        border-bottom: 1px solid var(--primary-op-08);
    }
    
    .category-title {
        font-size: 2.1rem;
    }
}

@media (min-width: 681px) and (max-width: 992px) {
    .items-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .item-card {
        flex-direction: column;
    }
    
    .item-image-container {
        width: 100%;
        height: 140px;
        border-right: none;
        border-bottom: 1px solid var(--primary-op-08);
    }
}

@media (min-width: 993px) {
    .items-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .item-card {
        flex-direction: row;
    }
    
    .item-image-container {
        width: 110px;
        height: 110px;
        border-right: 1px solid var(--primary-op-08);
        border-bottom: none;
    }
}
