/* Basic Reset & Font */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    overflow: hidden;
    position: fixed;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    touch-action: none;
}

body {
    font-family: 'Figtree', sans-serif;
    background-color: #045160; /* Dark teal background (was #333) */
    color: #fff;
    display: flex; /* Center the frame */
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Ensure body takes full height */
}

/* Mobile Frame Simulation */
#mobile-frame {
    width: 100%;
    max-width: 420px; /* Typical mobile width */
    height: 100vh; /* Fill viewport height */
    max-height: 900px; /* Optional: Limit max height */
    background-color: #045160; /* Dark teal background (was #111) */
    overflow: hidden; /* Hide anything outside the frame */
    position: relative; /* Anchor point for absolute positioned children */
    box-shadow: 0 0 20px rgba(0,0,0,0.5); /* Optional: visual effect */
    border-radius: 10px; /* Optional: rounded corners */
    transform: translateZ(0); /* Create containing block for fixed children */
}

/* Fixed Header - NOW BELOW FILTERS */
#main-header {
    position: absolute;
    /* Increased spacing between filters and header */
    top: 60px; 
    left: 0;
    width: 100%;
    padding: 15px 15px 15px 15px; 
    /* Remove background */
    background: none; 
    z-index: 10;
    display: flex;
    align-items: center; /* Vertically align logo and potentially hamburger space */
    justify-content: center;
}

#header-logo {
    height: 18px;
    width: auto;
}

/* Intro Screen */
#intro-screen {
    position: absolute; /* Position relative to mobile-frame */
    top: 0;
    left: 0;
    width: 100%; /* Full width of frame */
    height: 100%; /* Full height of frame */
    background-color: #045160; /* Dark teal background (was #111) */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    /* Faster fade-out, starts as logo animation finishes (0.1s + 0.5s = 0.6s) */
    transition: opacity 0.3s ease-out 0.6s; 
}

#intro-logo {
    max-width: 50%; /* Reduced from 60% */
    max-height: 50vh;
    /* Updated simple animation */
    opacity: 0; /* Start hidden */
    transform: scale(0.95) translateY(-2vh); /* Bajado de -10vh a -2vh */
    animation: subtleFadeScaleIn 0.5s ease-out forwards; /* Faster animation: 0.5s */
    animation-delay: 0.1s; 
}

/* Updated subtle animation keyframes */
@keyframes subtleFadeScaleIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-2vh); /* Bajado de -10vh a -2vh */
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(-2vh); /* Bajado de -10vh a -2vh */
    }
}

/* Main Menu Container (TikTok Style) */
#product-list {
    position: absolute;
    /* Start at the top */
    top: 0; 
    left: 0;
    width: 100%;
    /* Occupy full height */
    height: 100%; 
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Para mejor desplazamiento en iOS */
    overscroll-behavior: contain; /* Previene el scroll en cascada al navegador */
    &::-webkit-scrollbar { display: none; }
    scrollbar-width: none;
    /* Ensure it's behind header/filters */
    z-index: 1;
    touch-action: pan-y; /* Solo permitir scroll vertical */
}

/* Individual Product Item */
.product-item {
    /* Should fill the product-list container */
    height: 100%; 
    width: 100%;
    margin-top: 0;
    margin-bottom: 0;
    scroll-snap-align: start; 
    position: relative; 
    background-color: #045160; /* Dark teal background (was #111) */
    transition: opacity 0.3s ease, max-height 0.4s ease, 
                padding 0.3s ease, margin 0.3s ease, border 0.3s ease;
    overflow: hidden; /* Keep overflow hidden */
    opacity: 1;
}

/* Style for hiding filtered product items */
.product-item.hidden {
    /* Use max-height for transition */
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin: 0; 
    padding-top: 0;
    padding-bottom: 0;
    border: none; /* Remove border if any */
    /* Ensure the transition is smooth */
    transition: opacity 0.3s ease, max-height 0.4s ease, 
                padding 0.3s ease, margin 0.3s ease, border 0.3s ease;
    /* Important for scroll snap */
    scroll-snap-align: none; 
}

/* Media Container - Ensure it covers the item */
.media-container {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #045160; /* Dark teal as fallback (was #1a1a1a) */
    z-index: 1; /* Behind info/actions within the item */
}

.media-container img,
.media-container video,
.image-carousel img /* Asegurar que las imágenes del carrusel también cubran */ {
    display: block; /* Previene espacios extra debajo de la imagen */
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que cubra el área */
}

/* Add a loading animation for videos */
.lazy-load-video {
    opacity: 0; /* Start invisible */
    transition: opacity 0.5s ease-in-out;
}

.lazy-load-video[src] {
    opacity: 1; /* Fade in when src is set */
}

/* Improve poster image for videos */
.lazy-load-video[poster] {
    object-fit: cover;
    background-size: cover;
    background-position: center;
}

/* Add loading spinner for videos */
.product-item[data-has-video="true"] .media-container::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(219, 214, 176, 0.3);
    border-radius: 50%;
    border-top-color: #DBD6B0;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
    z-index: 2;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Show spinner only when video is loading */
.product-item[data-has-video="true"] .media-container:has(video[src]) .media-container::after,
.product-item[data-has-video="true"] .media-container:has(.lazy-load-video[src])::after {
    opacity: 0;
}

/* Dish Info Overlay - Use more adaptive positioning */
.dish-info {
    position: absolute;
    bottom: 8vh; /* Bajado de 10vh a 8vh */
    left: 0;
    width: 100%;
    z-index: 2;
    padding: 20px 80px 8vh 20px; /* Purely viewport-based padding */
    /* Extended gradient with more coverage at the bottom */
    background: linear-gradient(to top, 
        rgba(4, 81, 96, 1) 0%,
        rgba(4, 81, 96, 0.95) 5%,
        rgba(4, 81, 96, 0.9) 15%, 
        rgba(4, 81, 96, 0.7) 35%,
        rgba(4, 81, 96, 0.6) 50%, 
        rgba(4, 81, 96, 0) 90%);
}

/* Add a pseudo-element to extend the gradient further down */
.dish-info::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -200px; /* Extend well below the visible area */
    height: 200px; /* Tall enough to cover any gap */
    background: rgba(4, 81, 96, 1); /* Solid color matching the gradient base */
    z-index: -1; /* Behind the main content */
}

/* Special Price Styling with better contrast but no shadows */
.dish-info .price {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #045160; /* Dark teal */
    background-color: #A4D4C9; /* Solid mint/aqua color */
    padding: 4px 10px;
    border-radius: 15px;
    margin-bottom: 8px; /* Reduced from 12px to 8px */
    line-height: 1.1;
    border: none;
    box-shadow: none; /* Removed shadow completely */
}

.dish-info h2 {
    font-family: 'Poppins', sans-serif; /* Use Poppins for titles */
    font-size: calc(1.2rem + 0.4vh); /* Responsive font size */
    font-weight: 600; /* Reduced weight from 700 */
    margin-bottom: 4px; /* Reduced from 6px */
    line-height: 1.1; /* Reduced line height */
}

.dish-info .description {
    font-size: calc(0.85rem + 0.2vh); /* Responsive font size */
    font-weight: 300;
    margin-bottom: 5px; /* Reduced from 10px */
    max-width: 100%; /* Allow full width within padded area */
    line-height: 1.3;
    max-height: none; /* Remove any height restriction */
    overflow: visible; /* Ensure text isn't cut off */
}

/* Media queries for different screen heights - REMOVING THESE */
@media (max-height: 700px) {
    .dish-info {
        bottom: 40px; /* Less bottom space on shorter screens */
        padding-bottom: 40px;
    }
    
    .actions {
        bottom: 120px; /* Adjusted for shorter screens */
    }
    
    .dish-info .description {
        font-size: 0.9rem; /* Smaller font on shorter screens */
        line-height: 1.3;
        margin-bottom: 4px;
    }
    
    .dish-info h2 {
        font-size: 1.3rem; /* Smaller title on shorter screens */
        margin-bottom: 3px;
    }
}

/* Even shorter screens - REMOVING THESE */
@media (max-height: 600px) {
    .dish-info {
        bottom: 30px;
        padding-bottom: 30px;
    }
    
    .actions {
        bottom: 100px;
        gap: 10px; /* Tighter button spacing */
    }
    
    .action-btn {
        width: 40px; /* Smaller buttons */
        height: 40px;
    }
    
    .dish-info .price {
        font-size: 1rem;
        padding: 3px 8px;
        margin-bottom: 5px;
    }
}

/* Very small height screens - REMOVING THESE */
@media (max-height: 500px) {
    .dish-info {
        bottom: 20px;
        padding-bottom: 20px;
    }
    
    .actions {
        bottom: 80px;
    }
    
    .dish-info .description {
        font-size: 0.85rem;
        line-height: 1.2;
    }
}

/* Replacing fixed media queries with fully responsive properties */
.dish-info {
    position: absolute;
    bottom: 8vh; /* Bajado de 10vh a 8vh */
    left: 0;
    width: 100%;
    z-index: 2;
    padding: 20px 80px 8vh 20px; /* Purely viewport-based padding */
    /* Extended gradient with more coverage at the bottom */
    background: linear-gradient(to top, 
        rgba(4, 81, 96, 1) 0%,
        rgba(4, 81, 96, 0.95) 5%,
        rgba(4, 81, 96, 0.9) 15%, 
        rgba(4, 81, 96, 0.7) 35%,
        rgba(4, 81, 96, 0.6) 50%, 
        rgba(4, 81, 96, 0) 90%);
}

/* Action Buttons - Use adaptive positioning */
.actions {
    position: absolute;
    right: 15px;
    bottom: 20vh; /* Bajado de 22vh a 20vh */
    display: flex;
    flex-direction: column;
    align-items: center; 
    gap: calc(10px + 1vh); /* Responsive gap */
    z-index: 3;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* No cursor/hover on the item itself, only on the button */
}

/* Button now only contains the icon */
.action-btn {
    background: rgba(219, 214, 176, 0.8); /* Increased opacity for better contrast */
    border: none;
    color: #045160; /* Dark teal for better contrast */
    border-radius: 50%;
    width: 45px; /* Reduced from 50px */
    height: 45px; /* Reduced from 50px */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 0;
    margin: 0;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: none; /* Removed shadow completely */
}

.action-btn:hover {
    background: #DBD6B0; /* Solid color on hover */
    transform: scale(1.1);
    box-shadow: none; /* Removed shadow completely */
}

.action-btn svg.icon {
    width: 24px;
    height: 24px;
    stroke: #045160; /* Dark teal color */
    fill: none; 
    stroke-width: 2.2; /* Thicker stroke for visibility */
}

/* Liked state for like button icon */
.action-btn.like-btn.liked {
    background: #A4D4C9; /* Solid color for better visibility */
    border: none; /* Removed border */
}

.action-btn.like-btn.liked svg.icon-heart {
    fill: #045160;
    stroke: #045160;
}

/* Label/Count Text below the button */
.action-label {
    color: #ffffff;
    font-size: 0.85rem; /* Slightly larger */
    font-weight: 600; /* Bolder */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); /* Enhanced shadow for better readability */
    margin-top: 6px;
    text-align: center;
}

.action-label.count {
    font-weight: 700; /* Extra bold */
}

/* --- Estilos del Carrusel de Imágenes --- */

/* Contenedor específico para el carrusel y sus flechas */
.image-carousel-container {
    position: relative; /* Permite posicionar flechas dentro de él */
    width: 100%;
    height: 100%; /* Ocupa toda la altura del media-container */
}

/* El div que contiene las imágenes y es scrollable */
.image-carousel {
    display: flex;              /* Pone imágenes en fila */
    overflow-x: auto;           /* Habilita scroll horizontal */
    scroll-behavior: smooth;    /* Animación suave al usar flechas/JS */
    scroll-snap-type: x mandatory; /* Fuerza el 'snap' a una imagen */
    -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
    scrollbar-width: none;      /* Oculta scrollbar en Firefox */
    width: 100%;                /* Ocupa todo el ancho */
    height: 100%;               /* Ocupa toda la altura */
}

/* Oculta scrollbar en Chrome, Safari, Edge */
.image-carousel::-webkit-scrollbar {
    display: none;
}

/* Estilo de cada imagen dentro del carrusel */
.image-carousel img {
    width: 100%;            /* Cada imagen ocupa el 100% del ancho del *contenedor* */
    height: 100%;           /* Cada imagen ocupa el 100% de la altura */
    object-fit: cover;      /* Cubre el espacio sin distorsionar la imagen */
    flex-shrink: 0;         /* Evita que las imágenes se encojan */
    scroll-snap-align: center; /* Alinea la imagen al centro al hacer 'snap' */
    scroll-snap-stop: always; /* Asegura que siempre se detenga en una imagen */
}

/* Estilos base de las flechas de navegación */
.arrow {
    position: absolute;             
    top: 50%; /* Bajado de 48% a 50% */
    transform: translateY(-50%);    
    z-index: 10;                    
    background-color: rgba(165, 212, 201, 0.9); /* Increased opacity */
    border: none;
    color: #045160;
    padding: 0;
    border-radius: 50%;             
    cursor: pointer;                
    width: 35px;                    
    height: 35px;                   
    display: flex;                  
    align-items: center;            
    justify-content: center;        
    opacity: 1;                     
    visibility: visible;            
    transition: background-color 0.2s ease, opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: none; /* Removed shadow completely */
}

/* Media query para dispositivos móviles - Mover flechas de navegación más arriba */
@media (max-width: 767px) {
    .arrow {
        top: 35%; /* Bajado de 30% a 35% */
    }
}

/* Ocultar flechas con JS usando display: none (se mantiene igual) */
/* No necesitamos la regla .arrow.hidden si JS maneja display */

/* Estilo al pasar el ratón sobre una flecha */
.arrow:hover {
    background-color: #DBD6B0; /* Solid color on hover */
    box-shadow: none; /* Removed shadow completely */
}

/* Estilos para el icono SVG dentro de la flecha */
.arrow svg {
    width: 18px;
    height: 18px;
    stroke: #045160; /* Explicit color instead of inheriting */
    stroke-width: 3; /* Thicker stroke for better visibility */
}

/* Posición específica de la flecha izquierda */
.left-arrow {
    left: 20px; /* Más hacia el centro */
}

/* Posición específica de la flecha derecha */
.right-arrow {
    right: 20px; /* Más hacia el centro */
}

/* Estilos opcionales para el placeholder si no hay imagen/video */
.placeholder-media {
    width: 100%;
    height: 100%;
    min-height: 200px; /* Ejemplo: dale una altura mínima */
    background: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    text-align: center;
    padding: 10px;
}

/* --- Hamburger Menu & Sidebar --- */

/* Hamburger Menu Button */
#hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 1.6rem; 
    height: 1.6rem;
    padding: 0;
    position: absolute; 
    /* Lower position for better alignment */
    top: 12px; /* Increased from 0px to move it lower */
    right: 20px; 
    z-index: 1050; 
}

#hamburger-menu span {
    display: block;
    width: 1.6rem;
    height: 0.2rem; 
    background: #EAEAE8; /* Light gray (was white) */ 
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* Hamburger animation when sidebar is open */
#hamburger-menu.open span:nth-child(1) {
    transform: rotate(45deg);
}

#hamburger-menu.open span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

#hamburger-menu.open span:nth-child(3) {
    transform: rotate(-45deg);
}

/* Sidebar Navigation Panel */
#sidebar-nav {
    height: 100%; /* Full height */
    width: 250px; /* Sidebar width */
    position: fixed; /* Fixed position on screen */
    top: 0;
    right: -250px; /* Start off-screen to the right */
    background-color: #7D7159; /* Brown background (was #1a1a1a) */
    padding-top: 60px; /* Space for close button */
    transition: right 0.3s ease; /* Smooth slide animation */
    z-index: 1040; /* Below hamburger icon */
    overflow-y: auto; /* Allow scrolling if content exceeds height */
    color: #EAEAE8; /* Light gray text */
    box-shadow: -5px 0 15px rgba(0,0,0,0.3); /* Add shadow for depth */
}

#sidebar-nav.open {
    right: 0; /* Slide in */
}

/* Close Button inside Sidebar */
#close-sidebar {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 36px;
    background: none;
    border: none;
    color: #EAEAE8; /* Light gray (was #ccc) */
    cursor: pointer;
    transition: color 0.2s ease;
}
#close-sidebar:hover {
    color: white;
}

/* Sidebar List Styling (ul/li/a) */
#sidebar-nav ul {
    list-style: none;
    padding: 0px 25px;
    margin-top: 0px; /* Space below close button */
    /* Added for scrolling */
    overflow-y: auto;
    max-height: 50vh; /* Limit height to allow scrolling */
}

#sidebar-nav li {
    margin-bottom: 10px; /* REDUCED from original value (assumed > 10px) */
}

#sidebar-nav a {
    text-decoration: none;
    font-size: 18px;
    color: #DBD6B0; /* Light beige/tan (was #aaa) */
    display: block;
    transition: 0.3s;
    padding: 5px 0;
}

#sidebar-nav a:hover,
#sidebar-nav a:focus {
    color: #EAEAE8; /* Light gray on hover/focus (was #f1f1f1) */
}

/* Social Links inside Sidebar */
#sidebar-nav .social-links {
    padding: 30px 15px 20px 15px; 
    /* text-align: center; */ /* Removed to align left */
    border-top: 1px solid #DBD6B0; /* Light beige/tan border (was #333) */
    margin-top: 20px;
}

#sidebar-nav .social-links a {
    display: inline-block;
    margin: 0 12px; /* Adjust spacing */
    font-size: 1.2em; /* Slightly larger text/icon size */
    color: #DBD6B0; /* Light beige/tan (was #aaa) */
}

#sidebar-nav .social-links a:hover,
#sidebar-nav .social-links a:focus {
     color: #EAEAE8; /* Light gray on hover/focus (was #f1f1f1) */
}

#sidebar-nav .social-links a img {
    height: 24px; /* Adjust logo size as needed */
    width: auto;
    vertical-align: middle; /* Align icons nicely if text were beside them */
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

#sidebar-nav .social-links a:hover img,
#sidebar-nav .social-links a:focus img {
    opacity: 1;
}

/* Specific size for Facebook logo */
#sidebar-nav .social-links a[aria-label="Facebook"] img {
    height: 28px; /* Slightly larger */
}

/* Overlay for background dimming and closing sidebar */
#sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(4, 81, 96, 0.6); /* Dark teal overlay (was rgba(0, 0, 0, 0.6)) */
    z-index: 1030; /* Below sidebar, above main content */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s; /* Fade out and hide */
}

#sidebar-overlay.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s; /* Fade in and show */
}

/* Prevent body scroll when sidebar is open */
body.sidebar-open {
    overflow: hidden;
}

/* --- Category Filters - NOW AT TOP --- */
#category-filters {
    position: absolute;
    top: 10px; /* Keep at 10px */
    left: 0;
    width: 100%;
    padding: 10px 0; 
    background: none; /* Removed background */
    overflow-x: scroll; /* Changed from 'auto' to 'scroll' to ensure scrolling is available */
    white-space: nowrap;
    text-align: center; 
    padding-left: max(15px, env(safe-area-inset-left));
    padding-right: max(15px, env(safe-area-inset-right));
    scrollbar-width: none; 
    -webkit-overflow-scrolling: touch; /* Added for better scroll on iOS */
    &::-webkit-scrollbar { display: none; } 
    z-index: 5; 
    /* Add touch scrolling indicator */
    position: relative; /* Ensure position is set for absolute children */
    touch-action: pan-x; /* Explicitly allow horizontal panning */
}

/* Remove the gradient indicator */
/* #category-filters::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to right, rgba(4, 81, 96, 0), rgba(4, 81, 96, 0.2));
    pointer-events: none;
    z-index: 6;
} */

/* Filter buttons with improved contrast */
.filter-button {
    /* Default/Unselected state */
    background-color: rgba(4, 81, 96, 0.4); /* Reduced opacity */
    color: #EAEAE8; /* Light gray text */
    border: none;
    padding: 6px 14px;
    margin: 0 4px;
    cursor: pointer;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600; /* Slightly bolder text */
    transition: background-color 0.2s, color 0.2s;
    display: inline-block;
    white-space: nowrap;
    box-shadow: none;
}

.filter-button:hover {
    /* Hover state for UNSELECTED buttons */
    background-color: rgba(125, 113, 89, 0.9); /* Almost solid brown */
    color: #EAEAE8;
}

.filter-button.active {
    /* Active state with better contrast */
    background-color: #A4D4C9; /* Solid mint/aqua color */
    color: #045160; /* Dark teal text */
    font-weight: 700;
    border: none;
    box-shadow: none;
}

/* Hover state for the ACTIVE button */
.filter-button.active:hover {
    background-color: #DBD6B0; /* Light beige/tan */
    color: #045160;
}

/* Style for hiding filtered product items */
.product-item.hidden {
    /* Use max-height for transition */
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin: 0; 
    padding-top: 0;
    padding-bottom: 0;
    border: none; /* Remove border if any */
    /* Ensure the transition is smooth */
    transition: opacity 0.3s ease, max-height 0.4s ease, 
                padding 0.3s ease, margin 0.3s ease, border 0.3s ease;
    /* Important for scroll snap */
    scroll-snap-align: none; 
}

/* Add transition to the non-hidden state too */
.product-item {
    /* Ensure height is explicitly 100% of the container */
    height: 100%; 
    width: 100%; /* Ensure full width too */
    /* Explicitly remove vertical margins */
    margin-top: 0;
    margin-bottom: 0;
    /* Add scroll-snap-align here for clarity */
    scroll-snap-align: start; 
    position: relative; /* Needed for absolute children */
    background-color: #045160; /* Dark teal (was #111) */
    /* Keep existing transitions */
    transition: opacity 0.3s ease, max-height 0.4s ease, 
                padding 0.3s ease, margin 0.3s ease, border 0.3s ease;
    overflow: hidden; 
    max-height: 100vh; /* Or a sufficiently large value when visible */
    opacity: 1;
}

/* ----- Tags Styling ----- */
.price-tags-container {
    display: flex;
    flex-direction: row; /* Cambiado de column a row para que estén en línea */
    align-items: center; /* Centrar verticalmente */
    flex-wrap: wrap; /* Permitir que se envuelvan si el espacio es limitado */
    gap: 10px; /* Espacio entre precio y tags */
    margin-bottom: 6px; /* Reduced from 8px */
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Tags without borders or shadows */
.tag {
    display: inline-block;
    background-color: #EAEAE8;
    color: #045160;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    white-space: nowrap;
    border: none; /* Removed border */
    box-shadow: none; /* Removed shadow completely */
}

/* Estilos para el precio para que combine mejor con los tags */
.dish-info .price {
    font-weight: bold;
    margin: 0; /* Eliminar márgenes para mejor alineación */
}

/* Estilos específicos para tags comunes */
.tag[data-tag-name="Vegetariano"] {
    background-color: #A4D4C9; /* Mint/aqua (was #4CAF50) */
    color: #045160; /* Dark teal (was white) */
}

.tag[data-tag-name="Vegano"] {
    background-color: #7D7159; /* Brown (was #388E3C) */
    color: #EAEAE8; /* Light gray (was white) */
}

.tag[data-tag-name="Sin TACC"] {
    background-color: #DBD6B0; /* Light beige/tan (was #FFC107) */
    color: #045160; /* Dark teal (was #333) */
}

.tag[data-tag-name="Picante"] {
    background-color: #7D7159; /* Brown (was #F44336) */
    color: #EAEAE8; /* Light gray (was white) */
}

.tag[data-tag-name="Nuevo"] {
    background-color: #A4D4C9; /* Mint/aqua (was #2196F3) */
    color: #045160; /* Dark teal (was white) */
}

.tag[data-tag-name="Especialidad de la Casa"] {
    background-color: #7D7159; /* Brown (was #9C27B0) */
    color: #EAEAE8; /* Light gray (was white) */
}

.tag[data-tag-name="Para Compartir"] {
    background-color: #DBD6B0; /* Light beige/tan (was #FF9800) */
    color: #045160; /* Dark teal (was #333) */
}

.tag[data-tag-name="Sin Lactosa"] {
    background-color: #A4D4C9; /* Mint/aqua (was #8BC34A) */
    color: #045160; /* Dark teal (was #333) */
}

.tag[data-tag-name="Ligero"] {
    background-color: #A4D4C9; /* Mint/aqua (was #03A9F4) */
    color: #045160; /* Dark teal (was white) */
}

.tag[data-tag-name="Contundente"] {
    background-color: #7D7159; /* Brown (was #795548) */
    color: #EAEAE8; /* Light gray (was white) */
}

.tag[data-tag-name="Casero"] {
    background-color: #DBD6B0; /* Light beige/tan (was #FF5722) */
    color: #045160; /* Dark teal (was white) */
}

/* ----- Toast Notification ----- */
#toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 2000;
    transition: transform 0.3s ease;
    text-align: center;
    max-width: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#toast-notification.visible {
    transform: translateX(-50%) translateY(0);
}

/* ----- Comentarios (Modal y Estilo) ----- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    justify-content: center;
    align-items: center;
}

.modal.visible {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: #1c1c1e;
    border-radius: 16px;
    width: 90%;
    max-width: 420px; /* Ajustar al ancho del frame mobile */
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.close-modal {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.close-modal:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.comentarios-container {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
    max-height: 50vh;
}

.loading-comentarios, .no-comentarios {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    padding: 20px 0;
}

.comentario-item {
    margin-bottom: 16px;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.comentario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.comentario-autor {
    font-weight: 600;
    color: #ffffff;
    font-size: 14px;
}

.comentario-fecha {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.comentario-texto {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    line-height: 1.4;
}

.comentario-form {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comentario-form input,
.comentario-form textarea {
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px 16px;
    color: white;
    font-size: 14px;
    width: 100%;
    font-family: inherit;
}

.comentario-form input:focus,
.comentario-form textarea:focus {
    outline: none;
    border-color: var(--primary-color, #0066ff);
}

.comentario-form textarea {
    resize: none;
    min-height: 80px;
}

.comentario-form input::placeholder,
.comentario-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.comentario-form button {
    background-color: var(--primary-color, #0066ff);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
    margin: 0 auto;
    display: block;
    width: 100%;
    max-width: 250px;
}

.comentario-form button:hover {
    background-color: var(--primary-color-hover, #0052cc);
}

.comentario-form button:disabled {
    background-color: rgba(0, 102, 255, 0.5);
    cursor: not-allowed;
}

/* Asegurar que los iconos de comentarios se vean correctamente */
.icon-message-circle {
    color: white;
    transition: color 0.3s ease;
}

.comment-btn:hover .icon-message-circle {
    color: var(--primary-color, #0066ff);
}

/* Estilos para la confirmación de comentario enviado */
.comentario-confirmacion {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 15px;
}

.comentario-confirmacion svg {
    margin-bottom: 15px;
}

.comentario-confirmacion h3 {
    margin: 0 0 10px 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
}

.comentario-confirmacion p {
    margin: 0 0 20px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.4;
}

.comentario-confirmacion .submit-button {
    background-color: var(--primary-color, #0066ff);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
}

.comentario-confirmacion .submit-button:hover {
    background-color: var(--primary-color-hover, #0052cc);
}

/* Double Tap Heart Animation */
.double-tap-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 120px;
    height: 120px;
    color: #A4D4C9; /* Cambiado a color menta/aqua del branding */
    filter: none; /* Quitada la sombra */
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    animation: heart-pop 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Ajustar posición del corazón en dispositivos móviles */
@media (max-width: 767px) {
    .double-tap-heart {
        top: 40%; /* Mover el corazón más arriba en móviles */
    }
}

.double-tap-heart svg {
    filter: none; /* Quitada la sombra blanca */
}

@keyframes heart-pop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    15% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }
    30% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    75% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0;
    }
}

/* Like Button Fadeout Animation */
.like-btn-fadeout {
    animation: like-button-fade 0.6s ease-in-out forwards;
}

@keyframes like-button-fade {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.3);
        filter: brightness(1.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: brightness(1);
    }
}

/* Keep only width-based media query for truly small screens */
@media (max-width: 380px) {
    .dish-info {
        bottom: 4vh; /* Bajado de 5vh a 4vh */
        padding-bottom: 7vh;
    }
    
    .actions {
        bottom: 18vh; /* Bajado de 20vh a 18vh */
    }
}

/* Media query para pantallas altas */
@media (min-height: 750px) {
    /* Dish info - ajustar más abajo en pantallas altas */
    .dish-info {
        bottom: 0vh; /* Al borde inferior */
    }
    
    /* Action buttons - ajustar más abajo en pantallas altas */
    .actions {
        bottom: 8vh; /* Reducido drásticamente */
    }
}

/* Media query para pantallas muy altas */
@media (min-height: 900px) {
    /* Dish info - ajustar aún más abajo en pantallas muy altas */
    .dish-info {
        bottom: -2vh; /* Valor negativo para posicionar por debajo del borde */
        padding-bottom: 12vh; /* Aumentar padding para compensar */
    }
    
    /* Action buttons - ajustar aún más abajo en pantallas muy altas */
    .actions {
        bottom: 5vh; /* Reducido drásticamente */
    }
}

/* Media query para pantallas extremadamente altas */
@media (min-height: 1100px) {
    /* Dish info - ajustar aún más abajo en pantallas extremadamente altas */
    .dish-info {
        bottom: -5vh; /* Muy por debajo del borde */
        padding-bottom: 15vh; /* Aumentar padding para compensar */
    }
    
    /* Action buttons - ajustar aún más abajo en pantallas extremadamente altas */
    .actions {
        bottom: 2vh; /* Casi al borde inferior */
    }
}

/* Star Rating Component Styles */
.rating-container {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rating-container p {
    margin-bottom: 8px;
    font-weight: 500;
}

.star-rating {
    display: flex;
    gap: 5px;
}

.star-rating .star {
    font-size: 28px;
    cursor: pointer;
    color: #ccc;
    transition: color 0.2s ease;
}

.star-rating .star.hover,
.star-rating .star.selected {
    color: #FFD700; /* Gold color for stars */
}

.comentario-rating {
    margin: 8px 0;
}

.comentario-rating .star {
    font-size: 20px;
    color: #ccc;
}

.comentario-rating .star.star-filled {
    color: #FFD700;
}

.rating-feedback {
    margin: 10px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

.rating-feedback-5 {
    background-color: #2d2d2d;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    color: #ffffff;
}

.rating-feedback-5 h4 {
    color: #ffffff;
    margin-bottom: 10px;
}

.rating-feedback-5 p {
    color: rgba(255, 255, 255, 0.9);
}

.google-review-btn {
    display: inline-block;
    background-color: #4285F4;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 10px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    width: 100%;
    max-width: 250px;
    text-align: center;
}

.google-review-btn:hover {
    background-color: #3367D6;
}

/* Scroll Hint Styles */
#scroll-hint {
    position: absolute;
    bottom: auto;
    top: 55%;  /* Position slightly lower (was 45%) */
    left: 0;
    right: 0;
    text-align: center;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

#scroll-hint.visible {
    opacity: 1;
    transform: translateY(0);
}

#scroll-hint.hiding {
    opacity: 0;
    transform: translateY(20px);
}

/* Updated hint content with better visibility */
.hint-content {
    display: inline-flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px; /* Smaller padding (was 10px 20px) */
    border-radius: 20px; /* Smaller radius (was 24px) */
    font-size: 12px; /* Smaller font (was 14px) */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px; /* Reduced space (was 30px) */
}

.hint-content svg {
    margin-right: 6px; /* Reduced margin (was 8px) */
    width: 20px; /* Smaller icon (not previously specified) */
    height: 20px; /* Smaller icon (not previously specified) */
    animation: bounce 1.5s ease infinite;
}

/* Ensure proper positioning across all devices */
#mobile-frame #scroll-hint {
    position: absolute; /* Position relative to mobile-frame */
    max-width: 100%; /* Ensure it doesn't overflow container */
}

/* In case it gets appended to body, ensure it shows within mobile frame */
body > #scroll-hint {
    width: 100%;
    max-width: 420px; /* Same as mobile-frame max-width */
    left: 50%;
    top: 55%; /* Match the top value (was 45%) */
    transform: translateX(-50%) translateY(20px); /* Center horizontally and move down */
}

body > #scroll-hint.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0); /* Center horizontally and normal position */
}

body > #scroll-hint.hiding {
    opacity: 0;
    transform: translateX(-50%) translateY(20px); /* Center horizontally and move down */
}

/* Bounce animation for the hint */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-8px);}
    60% {transform: translateY(-4px);}
}

/* Bounce hint animation for product list */
.bounce-hint {
    animation: product-bounce 1.5s ease-in-out;
}

@keyframes product-bounce {
    0% {transform: translateY(0);}
    20% {transform: translateY(0);}
    40% {transform: translateY(-25px);}
    70% {transform: translateY(-15px);}
    85% {transform: translateY(-20px);}
    100% {transform: translateY(0);}
}