/* ===================================
   VARIABLES DE COLORES
   =================================== */
   :root {
    /* Colores vibrantes de comidas rápidas */
    --red-hot: #E63946;           /* Rojo vibrante */
    --orange-spicy: #FF6B35;      /* Naranja intenso */
    --yellow-mustard: #F7B801;    /* Amarillo mostaza */
    --brown-savory: #8B4513;      /* Marrón sabroso */
    --cream-soft: #F8E5D5;        /* Crema suave */
    --dark-text: #2D2424;         /* Texto oscuro */
    --bg-cream: #FFF8F0;          /* Fondo crema */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    
    /* Colores de fondo y texto (light mode por defecto) */
    --bg-primary: #FFF8F0;
    --bg-secondary: #FFE8D6;
    --bg-card: #FFFFFF;
    --text-primary: #2D2424;
    --text-secondary: #718096;
    --text-muted: #A0AEC0;
    --header-bg: rgba(255, 255, 255, 0.95);
}

/* Modo Oscuro */
body.dark-mode {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: #0f3460;
    --text-primary: #eaeaea;
    --text-secondary: #b8b8b8;
    --text-muted: #8a8a8a;
    --header-bg: rgba(15, 52, 96, 0.95);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ===================================
   ESTILOS GENERALES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ===================================
   FORMAS ANIMADAS DE FONDO
   =================================== */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: float 20s infinite ease-in-out;
}

.shape:nth-child(1) {
    width: 300px;
    height: 300px;
    background: var(--red-hot);
    top: 10%;
    left: -5%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 200px;
    height: 200px;
    background: var(--orange-spicy);
    top: 60%;
    right: -3%;
    animation-delay: 3s;
}

.shape:nth-child(3) {
    width: 250px;
    height: 250px;
    background: var(--yellow-mustard);
    bottom: 10%;
    left: 50%;
    animation-delay: 6s;
}

@keyframes float {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg); 
    }
    33% { 
        transform: translate(30px, -50px) rotate(120deg); 
    }
    66% { 
        transform: translate(-20px, 30px) rotate(240deg); 
    }
}

/* ===================================
   HEADER Y NAVEGACIÓN
   =================================== */
header {
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.5s ease-out;
    transition: background 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    order: 2;
}

.logo {
    font-family: 'Fredoka', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--red-hot), var(--orange-spicy));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: transform 0.3s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.logo:hover {
    transform: scale(1.05) rotate(-2deg);
}

/* ===================================
   BOTÓN DE CAMBIO DE TEMA
   =================================== */
.theme-toggle {
    background: var(--bg-card);
    border: 2px solid var(--text-muted);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--orange-spicy);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
    font-size: 1.5rem;
    position: absolute;
    transition: all 0.3s ease;
}

.theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

body.dark-mode .theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

body.dark-mode .theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--red-hot), var(--orange-spicy));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-menu a:hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.mobile-toggle span {
    width: 30px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ===================================
   SECCIÓN HERO
   =================================== */
.hero {
    position: relative;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 4rem 2rem;
    text-align: center;
    z-index: 1;
}

.hero h1 {
    font-family: 'Fredoka', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--red-hot), var(--orange-spicy), var(--yellow-mustard));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    animation: fadeInUp 0.8s ease-out 0.2s both;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   PESTAÑAS DE CATEGORÍAS
   =================================== */
.category-tabs {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.tab-button {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.tab-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.tab-button:hover::before {
    width: 300px;
    height: 300px;
}

.tab-button span {
    position: relative;
    z-index: 1;
}

.tab-button.active {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.tab-button:nth-child(1) {
    background: var(--red-hot);
    color: white;
}

.tab-button:nth-child(2) {
    background: var(--orange-spicy);
    color: white;
}

.tab-button:nth-child(3) {
    background: var(--yellow-mustard);
    color: #2D2424;
}

.tab-button:nth-child(4) {
    background: #c32033;
    color: white;
}

.tab-button:nth-child(5) {
    background: var(--brown-savory);
    color: white;
}

/* ===================================
   CONTENEDOR DEL MENÚ
   =================================== */
.menu-container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem 4rem;
    position: relative;
    z-index: 1;
}

.menu-section {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.menu-section.active {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

/* ===================================
   ITEMS DEL MENÚ (SIN BOTÓN AGREGAR)
   =================================== */
.menu-item {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Botón de favoritos */
.favorite-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    background: var(--bg-card);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    padding: 0;
}

.favorite-button:active {
    transform: scale(0.9);
}

.favorite-button.is-favorite {
    animation: heartbeat 0.3s ease;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--red-hot), var(--orange-spicy), var(--yellow-mustard));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.menu-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.menu-item:hover::before {
    transform: translateX(0);
}

.item-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--red-hot), var(--orange-spicy));
    border-radius: 15px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    transition: transform 0.3s ease;
}

.menu-item:hover .item-image {
    transform: scale(1.05);
}

.item-name {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.item-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.item-footer {
    display: flex;
    justify-content: center;
    align-items: center;
}

.item-price {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-text);
    background: linear-gradient(135deg, var(--red-hot), var(--orange-spicy));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* ===================================
   FOOTER
   =================================== */
footer {
    background: var(--header-bg);
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    transition: background 0.3s ease;
}

footer p {
    color: var(--text-secondary);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* ===================================
   REDES SOCIALES
   =================================== */
.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.social-link svg {
    width: 24px;
    height: 24px;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
    z-index: 1;
}

.social-link:hover::before {
    transform: scale(1);
}

.social-link:hover svg {
    transform: scale(1.1);
}

.social-link:active {
    transform: scale(0.95);
}

/* WhatsApp */
.social-link.whatsapp {
    background: #25D366;
    color: white;
}

.social-link.whatsapp::before {
    background: #128C7E;
}

/* Instagram */
.social-link.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.social-link.instagram::before {
    background: linear-gradient(45deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
}

/* Facebook */
.social-link.facebook {
    background: #1877F2;
    color: white;
}

.social-link.facebook::before {
    background: #0d5dbf;
}

/* Animación de entrada */
@keyframes socialFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.social-link {
    animation: socialFadeIn 0.5s ease-out;
}

.social-link:nth-child(1) {
    animation-delay: 0.1s;
}

.social-link:nth-child(2) {
    animation-delay: 0.2s;
}

.social-link:nth-child(3) {
    animation-delay: 0.3s;
}

/* ===================================
   RESPONSIVE - TABLETS
   =================================== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 1rem;
        padding: 1rem 0;
        order: 3;
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-toggle {
        display: flex;
    }
    
    .nav-controls {
        order: 2;
    }
    
    .theme-toggle {
        width: 45px;
        height: 45px;
    }

    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .menu-section.active {
        grid-template-columns: 1fr;
    }

    .category-tabs {
        gap: 0.5rem;
    }

    .tab-button {
        font-size: 0.95rem;
        padding: 0.8rem 1.3rem;
    }
}

/* ===================================
   RESPONSIVE - MÓVILES
   =================================== */
@media (max-width: 480px) {
    nav {
        padding: 1rem;
    }

    .hero {
        padding: 2rem 1rem;
        margin: 2rem auto;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .menu-container {
        padding: 0 1rem 2rem;
    }
    
    .item-price {
        font-size: 1.5rem;
    }
    
    .social-links {
        gap: 1rem;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
    }
    
    .social-link svg {
        width: 22px;
        height: 22px;
    }
}

/* ===================================
   MEJORAS PARA DISPOSITIVOS MÓVILES
   =================================== */
* {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

body * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

button, .tab-button, .mobile-toggle, a {
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

/* Asegurar que el menú móvil sea clickeable */
.mobile-toggle {
    z-index: 1001;
    position: relative;
    cursor: pointer;
}

/* Mejorar área de toque en móviles */
@media (max-width: 768px) {
    .mobile-toggle {
        padding: 10px;
        min-width: 50px;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .tab-button {
        min-height: 48px;
        touch-action: manipulation;
    }
}

/* ===================================
   SECCIÓN DE FAVORITOS INDEPENDIENTE
   =================================== */
.favoritos-section {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    z-index: 999;
    transition: background 0.3s ease;
}

.favoritos-header {
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    transition: background 0.3s ease;
}

.favoritos-title-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-button {
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    transition: transform 0.2s ease;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.back-button:active {
    transform: scale(0.9);
}

.favoritos-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--red-hot), var(--orange-spicy));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.favoritos-container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem 4rem;
    position: relative;
    z-index: 1;
}

.favoritos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

@media (max-width: 768px) {
    .favoritos-grid {
        grid-template-columns: 1fr;
    }
    
    .favoritos-title {
        font-size: 1.5rem;
    }
    
    .favoritos-header {
        padding: 1rem;
    }
}