* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #0064a1;
    --primary-light: #4a8cbb;
    --primary-dark: #004275;
    --secondary: #e6f2ff;
    --accent: #ff9e1b;
    --dark: #2c3e50;
    --light: #f8f9fa;
    --gray: #6c757d;
}

body {
    background-color: #f9fbfd;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header y Navegación */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
}

.logo i {
    margin-right: 10px;
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s;
    padding: 8px 12px;
    border-radius: 6px;
}

.nav-links a:hover, .nav-links a.active {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.user-actions {
    display: flex;
    align-items: center;
}

.btn {
    padding: 10px 20px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    box-shadow: 0 4px 10px rgba(255, 158, 27, 0.3);
}

.btn-primary:hover {
    background-color: #e88c00;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 158, 27, 0.4);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid white;
    color: white;
    margin-right: 10px;
}

.btn-outline:hover {
    background-color: white;
    color: var(--primary);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1565299624946-b28f40a0ae38?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NXx8bWV4aWNhbiUyMGZvb2R8ZW58MHx8MHx8fDA%3D&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light) 0%, transparent 100%);
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 40px;
    font-weight: 300;
}

.search-bar {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    overflow: hidden;
}

.search-bar input {
    flex: 1;
    padding: 18px 25px;
    border: none;
    font-size: 16px;
}

.search-bar input:focus {
    outline: none;
}

.search-bar button {
    padding: 18px 30px;
    background-color: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.search-bar button:hover {
    background-color: #e88c00;
}

/* Filtros */
.filters {
    background-color: white;
    padding: 25px;
    border-radius: 12px;
    margin: 40px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--primary);
}

.filter-title {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.filter-title h2 {
    font-size: 24px;
    margin-right: 15px;
    color: var(--dark);
    display: flex;
    align-items: center;
}

.filter-title h2 i {
    margin-right: 10px;
    color: var(--primary);
}

.filter-title a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.filter-title a:hover {
    text-decoration: underline;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-option {
    background-color: var(--secondary);
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: var(--dark);
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    border: 2px solid transparent;
}

.filter-option i {
    margin-right: 8px;
    font-size: 14px;
}

.filter-option:hover {
    background-color: var(--primary-light);
    color: white;
    transform: translateY(-2px);
}

.filter-option.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary-dark);
    box-shadow: 0 4px 10px rgba(0, 100, 161, 0.2);
}

/* Restaurantes */
.restaurants {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.restaurant-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    position: relative;
}

.restaurant-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.restaurant-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.restaurant-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.restaurant-card:hover .restaurant-image img {
    transform: scale(1.1);
}

.restaurant-info {
    padding: 25px;
}

.restaurant-info h3 {
    font-size: 22px;
    margin-bottom: 12px;
    color: var(--dark);
    font-weight: 600;
}

.restaurant-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    color: var(--gray);
    font-size: 14px;
    align-items: center;
}

.rating {
    display: flex;
    align-items: center;
    color: #f39c12;
    font-weight: 600;
}

.rating i {
    margin-right: 5px;
}

.price {
    font-weight: 600;
    color: var(--primary);
}

.restaurant-description {
    margin-bottom: 15px;
    color: var(--gray);
    line-height: 1.5;
}

.restaurant-address {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: var(--gray);
    font-size: 14px;
}

.restaurant-address i {
    margin-right: 10px;
    color: var(--primary);
}

.restaurant-map {
    height: 200px;
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
}

.category-badge {
    display: inline-block;
    padding: 6px 14px;
    background-color: var(--secondary);
    color: var(--primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.no-results {
    text-align: center;
    padding: 60px 40px;
    background-color: white;
    border-radius: 12px;
    margin: 40px 0;
    grid-column: 1 / -1;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.no-results i {
    font-size: 60px;
    color: var(--primary-light);
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--dark);
}

.no-results p {
    color: var(--gray);
    max-width: 500px;
    margin: 0 auto;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    padding: 60px 0 20px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    font-size: 22px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
    font-weight: 600;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: var(--accent);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.footer-links a i {
    margin-right: 10px;
    font-size: 14px;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s;
    font-size: 18px;
}

.social-icons a:hover {
    background-color: var(--accent);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    margin-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .navbar {
        padding: 10px 0;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 80px 0;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .search-bar {
        flex-direction: column;
        border-radius: 12px;
    }
    
    .search-bar input {
        border-radius: 12px 12px 0 0;
        text-align: center;
    }
    
    .search-bar button {
        border-radius: 0 0 12px 12px;
    }
    
    .restaurants {
        grid-template-columns: 1fr;
    }
    
    .filter-options {
        justify-content: center;
    }
    
    .user-actions {
        display: none;
    }
}

/* Mensajes de alerta */
.alert {
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Iconos para categorías */
.icon-tacos:before { content: "🌮"; }
.icon-barbacoa:before { content: "🍖"; }
.icon-tortas:before { content: "🥪"; }
.icon-pozole:before { content: "🍲"; }
.icon-tamales:before { content: "🫔"; }


.recommendations {
    text-align: center;
    margin: 40px auto;
    position: relative;
    max-width: 900px;
}

.recommendations .section-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.carousel-item {
    display: none;              /* ocultamos todos */
    text-align: center;
    transition: opacity 0.5s ease-in-out;
}

.carousel-item.active {
    display: block;             /* solo el activo se ve */
}

.carousel-item img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.2);
}


.carousel h3 {
    margin-top: 10px;
    font-size: 1.3rem;
}

.carousel-btn {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    font-size: 2rem;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s;
}

.carousel-btn:hover {
    background: rgba(0,0,0,0.7);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  width: 400px;
  max-width: 90%;
  box-shadow: 0px 4px 10px rgba(0,0,0,0.3);
  animation: fadeIn 0.3s ease-in-out;
}

.close-btn {
  float: right;
  font-size: 24px;
  cursor: pointer;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.search-history {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.search-history h3 {
    margin-bottom: 10px;
    font-size: 18px;
    color: #333;
}

.search-history ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-history li {
    margin-bottom: 8px;
}

.search-history li a {
    text-decoration: none;
    color: #007bff;
    transition: color 0.2s;
}

.search-history li a:hover {
    color: #0056b3;
}

.category-label {
    background: #eee;
    color: #555;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 5px;
}


.search-history-dropdown {
    display: none; /* Oculto por defecto */
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-top: 5px;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.search-history-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-history-dropdown li a {
    display: block;
    padding: 10px 12px;
    color: #333;
    text-decoration: none;
}

.search-history-dropdown li a:hover {
    background: #f0f0f0;
}

.category-label {
    background: #eee;
    color: #555;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 5px;
}

/* Modal */
.modal {
  display: none; 
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.modal-content h2 {
  margin-top: 0;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #000;
}

#historial-list li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

#historial-list li .fecha {
  float: right;
  color: #888;
  font-size: 0.85em;
}

/* Botón historial en el header */
.btn-historial-header {
    background-color: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-historial-header:hover {
    color: #ffd700; /* color al pasar el mouse */
}

