/* ===== RESET Y VARIABLES ===== */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    :root {
      --primary: #f75c2f;
      --primary-dark: #e04a1e;
      --verde: #2b7a4b;
      --light: #fcf9f7;
      --white: #ffffff;
      --dark: #1f2a2f;
      --gray: #f0eae6;
      --gray-dark: #5f5a55;
      --shadow: 0 20px 35px -15px rgba(0,0,0,0.05);
      --shadow-hover: 0 25px 40px -15px rgba(247,92,47,0.2);
      --radius: 28px;
      --radius-sm: 16px;
    }

    body {
      font-family: 'Inter', sans-serif;
      background-color: var(--light);
      color: var(--dark);
      line-height: 1.5;
      overflow-x: hidden;
    }
    .mobile-cart {
  display: none;
}

.desktop-cart {
  display: flex;
  align-items: center;
}
    /* ===== HEADER FIJO CON LOGO ===== */
    .header {
      position: sticky;
      top: 0;
      background: rgba(255,255,255,0.8);
      backdrop-filter: blur(15px);
      -webkit-backdrop-filter: blur(15px);
      padding: 1rem 6%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      z-index: 100;
      border-bottom: 1px solid rgba(0,0,0,0.03);
    }

    .logo-wrap {
      display: flex;
      align-items: center;
      gap: 15px;
    }
    .logo-img {
      height: 50px;
      width: auto;
      border-radius: 30px;
      object-fit: cover;
    }
    .logo-text {
      font-size: 2rem;
      font-weight: 700;
      letter-spacing: -0.02em;
    }
    .logo-text span {
      color: var(--primary);
    }
    .logo-tagline {
      font-size: 0.9rem;
      color: #5b4f47;
      border-left: 2px solid var(--primary);
      padding-left: 12px;
      margin-left: 5px;
    }

    .nav-links {
      display: flex;
      gap: 40px;
      align-items: center;
    }
    .nav-links a {
      text-decoration: none;
      color: var(--dark);
      font-weight: 600;
      font-size: 1rem;
      border-bottom: 2px solid transparent;
      padding-bottom: 4px;
      transition: 0.2s;
    }
    .nav-links a:hover,
    .nav-links a.active {
      border-bottom-color: var(--primary);
    }

    .cart-icon {
      position: relative;
      font-size: 1.5rem;
      color: var(--dark);
      cursor: pointer;
    }
    .cart-count {
      position: absolute;
      top: -10px;
      right: -12px;
      background: var(--primary);
      color: white;
      font-size: 0.7rem;
      font-weight: 600;
      padding: 3px 7px;
      border-radius: 40px;
      border: 2px solid white;
    }

    .menu-toggle {
      display: none;
      flex-direction: column;
      gap: 6px;
      cursor: pointer;
    }
    .menu-toggle span {
      width: 28px;
      height: 2px;
      background: var(--dark);
      border-radius: 10px;
    }

    @media (max-width: 700px) {
      .logo-tagline {
        display: none;
      }
      .menu-toggle {
        display: flex;
      }
      .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        gap: 25px;
        padding: 35px 0;
        box-shadow: 0 30px 30px -10px rgba(0,0,0,0.1);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease;
        z-index: 99;
      }
      .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
      }
    }

    @media (min-width: 701px) {
      .nav-links {
        display: flex !important;
        clip-path: none !important;
        position: static !important;
        background: transparent;
        box-shadow: none;
      }
    }

    /* ===== CONTENEDOR PRINCIPAL ===== */
    .container {
      max-width: 1400px;
      margin: 0 auto;
      padding: 0 6%;
    }

    /* ===== CARRUSEL CON TÍTULO ===== */
    .carousel-section {
      margin: 30px 0 40px;
    }
    
    .carousel-title {
      font-size: 1.8rem;
      font-weight: 600;
      margin-bottom: 20px;
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .carousel-title i {
      color: var(--primary);
    }

    .carousel {
      display: flex;
      gap: 25px;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      padding: 15px 0 30px;
      scrollbar-width: thin;
      scrollbar-color: var(--primary) #ddd;
    }
    .carousel::-webkit-scrollbar { height: 6px; }
    .carousel::-webkit-scrollbar-track { background: #efebe9; border-radius: 20px; }
    .carousel::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 20px; }

    .carousel-item {
      flex: 0 0 85%;
      max-width: 360px;
      scroll-snap-align: start;
      border-radius: var(--radius);
      overflow: hidden;
      background: var(--white);
      box-shadow: var(--shadow);
      border: 1px solid #f0e6e0;
      cursor: pointer;
      transition: transform 0.2s;
    }
    .carousel-item:hover {
      transform: translateY(-4px);
    }
    @media (min-width: 640px) { .carousel-item { flex-basis: 45%; } }
    @media (min-width: 1024px) { .carousel-item { flex-basis: 28%; } }

    .carousel-img {
      width: 100%;
      height: 210px;
      object-fit: cover;
    }
    .carousel-caption {
      padding: 18px 22px 22px;
    }
    .carousel-caption h3 {
      font-size: 1.4rem;
      font-weight: 600;
      margin-bottom: 5px;
    }
    .carousel-precio {
      font-size: 1.8rem;
      font-weight: 700;
      color: var(--primary);
    }

    /* ===== FILTROS ===== */
    .filters-section {
      margin: 40px 0 30px;
      display: flex;
      flex-wrap: wrap;
      gap: 20px;
      align-items: center;
      justify-content: space-between;
    }
    
    .search-box {
      flex: 1;
      min-width: 280px;
      display: flex;
      align-items: center;
      background: white;
      border-radius: 60px;
      padding: 5px 5px 5px 20px;
      border: 1px solid #e0d6d0;
    }
    .search-box i {
      color: var(--gray-dark);
    }
    .search-box input {
      flex: 1;
      border: none;
      padding: 12px 15px;
      font-size: 1rem;
      background: transparent;
      outline: none;
    }
    .search-box button {
      background: var(--primary);
      border: none;
      color: white;
      padding: 12px 25px;
      border-radius: 60px;
      font-weight: 600;
      cursor: pointer;
    }
    
    .category-filters {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
    }
    .filter-chip {
      background: white;
      border: 1px solid #e0d6d0;
      padding: 10px 22px;
      border-radius: 40px;
      font-weight: 500;
      cursor: pointer;
      transition: 0.2s;
    }
    .filter-chip:hover {
      border-color: var(--primary);
    }
    .filter-chip.active {
      background: var(--primary);
      color: white;
      border-color: var(--primary);
    }

    /* ===== SECCIONES DEL MENÚ ===== */
    .section-title {
      font-size: 2.3rem;
      font-weight: 600;
      margin: 50px 0 30px;
      display: flex;
      align-items: center;
      gap: 15px;
    }
    .section-title i { color: var(--primary); }

    .category-title {
      font-size: 1.8rem;
      font-weight: 500;
      margin: 40px 0 20px;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .category-title i { color: var(--verde); }

    .menu-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
      gap: 30px;
    }

    .menu-card {
      background: var(--white);
      border-radius: var(--radius);
      overflow: hidden;
      box-shadow: var(--shadow);
      transition: 0.25s;
      border: 1px solid #f0eae4;
      display: flex;
      flex-direction: column;
      cursor: pointer;
    }
    .menu-card:hover {
      transform: translateY(-5px);
      box-shadow: var(--shadow-hover);
      border-color: var(--primary);
    }
    .menu-card .card-img {
      width: 100%;
      height: 200px;
      object-fit: cover;
      pointer-events: none;
    }
    .card-content {
      padding: 20px 22px 24px;
      flex: 1;
      display: flex;
      flex-direction: column;
      pointer-events: none;
    }
    .card-content h4 {
      font-size: 1.4rem;
      font-weight: 600;
      margin-bottom: 8px;
    }
    .descripcion-container {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-desc {
    color: #5f5a55;
    font-weight: 300;
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
    transition: all 0.3s ease;
}

/* Estilo para descripciones largas (truncadas) */
.card-desc.descripcion-larga {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(1.5em * 3);
}


.card-desc.expandido {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
    overflow: visible;
    max-height: none;
}

/* Botón Ver más/Ver menos */
.ver-mas-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0 8px 0;
    text-align: left;
    pointer-events: auto;
    transition: color 0.2s;
    align-self: flex-start;
}

.ver-mas-btn:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

    .card-footer-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .card-precio {
      font-size: 1.9rem;
      font-weight: 700;
      color: var(--primary);
    }
    .add-btn {
      background: var(--dark);
      color: white;
      border: none;
      width: 50px;
      height: 50px;
      border-radius: 60px;
      font-size: 1.8rem;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: 0.2s;
      box-shadow: 0 5px 12px rgba(0,0,0,0.1);
      pointer-events: auto;
    }
    .add-btn:hover {
      background: var(--primary);
      transform: scale(1.05);
    }
  .menu-grid::after {
    content: '';
    display: none;
  }
 
@media (max-width: 768px) {
    /* Convertir el grid en carrusel horizontal */
    .menu-grid {
        display: flex !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 15px;
        padding: 10px 5px 20px;
        scrollbar-width: thin;
        scrollbar-color: var(--primary) #ddd;
        -webkit-overflow-scrolling: touch;
        grid-template-columns: none !important; /* Anular grid */
    }
    
    /* Estilo del scroll */
    .menu-grid::-webkit-scrollbar {
        height: 4px;
    }
    
    .menu-grid::-webkit-scrollbar-track {
        background: #efebe9;
        border-radius: 10px;
    }
    
    .menu-grid::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 10px;
    }
    
    /* Tarjetas como items del carrusel */
    .menu-card {
        flex: 0 0 85%;
        max-width: 300px;
        scroll-snap-align: start;
        flex-direction: column !important; /* Forzar vertical */
        margin-right: 0;
        min-width: 260px; /* Ancho mínimo */
    }
    
    /* Ajustar imagen para que ocupe todo el ancho */
    .menu-card .card-img {
        width: 100% !important;
        height: 160px;
        border-radius: var(--radius) var(--radius) 0 0 !important;
    }
    
    /* Ajustar contenido */
    .card-content {
        padding: 12px;
    }
    
    .card-content h4 {
        font-size: 1.1rem;
        margin-bottom: 4px;
    }
    
    .card-desc {
        -webkit-line-clamp: 2;
        line-clamp: 2;
        min-height: calc(1.5em * 2);
        font-size: 0.85rem;
        margin-bottom: 10px;
    }
    
    .card-desc.descripcion-larga {
        -webkit-line-clamp: 2;
        line-clamp: 2;
        min-height: calc(1.5em * 2);
    }
    
    .card-footer-row {
        margin-top: 5px;
    }
    
    .card-precio {
        font-size: 1.3rem;
    }
    
    .add-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .ver-mas-btn {
        font-size: 0.75rem;
        padding: 2px 0;
    }
    
    /* Ajustar títulos de categoría */
    .category-title {
        font-size: 1.4rem;
        margin: 25px 0 15px;
    }
    
    /* Contenedor principal con padding */
    .container {
        padding: 0 4%;
    }
    
    /* Indicador de deslizar */
    .menu-grid::after {
        content: '← Desliza →';
        position: absolute;
        right: 10px;
        bottom: -20px;
        font-size: 0.7rem;
        color: #999;
        background: rgba(255,255,255,0.9);
        padding: 4px 10px;
        border-radius: 20px;
        pointer-events: none;
    }
    
    .menu-grid {
        position: relative;
        margin-bottom: 30px;
    }
   .image-modal-content {
        max-width: 95%;
    }
    
    .image-modal-content img {
        max-height: 55vh;
    }
    
    .image-modal-info {
        padding: 15px 20px;
        gap: 15px;
    }
    
    .image-modal-info h3 {
        font-size: 1.2rem;
        white-space: normal;
        word-break: break-word;
    }
    
    .image-modal-info p {
        font-size: 1.4rem;
    }
    
    .close-image-modal {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

 
@media (min-width: 769px) {
    .menu-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 30px;
    }
    
     
    .menu-grid::after {
        display: none;
    }
}
@media (max-width: 480px) {
    .menu-card {
        flex: 0 0 90%;
        max-width: 280px;
    }
    
    .menu-card .card-img {
        height: 140px;
    }
    .image-modal-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 15px;
    }
    
    .image-modal-info h3 {
        font-size: 1.1rem;
    }
    
    .image-modal-info p {
        font-size: 1.3rem;
        align-self: flex-end;
    }
}
/* ===== MODAL DE IMAGEN  ===== */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.active {
    display: flex;
    opacity: 1;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    background: white; /* Fondo blanco para el contenedor */
    display: flex;
    flex-direction: column;
}

.image-modal.active .image-modal-content {
    transform: scale(1);
}

.image-modal-content img {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    display: block;
    background: #f8f8f8; /* Fondo gris claro para la imagen */
    padding: 10px;
}

/* Contenedor de información debajo de la imagen */
.image-modal-info {
    background: white;
    color: var(--dark);
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    border-top: 1px solid #f0f0f0;
}

.image-modal-info h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    color: var(--dark);
    flex: 1;
}

.image-modal-info p {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    white-space: nowrap;
}

.close-image-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.close-image-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: scale(1.1);
    border-color: var(--primary);
}
    /* ===== MODAL DEL CARRITO ===== */
    .cart-modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0,0.5);
      backdrop-filter: blur(5px);
      z-index: 1500;
      align-items: center;
      justify-content: center;
    }
    
    .cart-modal.active {
      display: flex;
    }
    
    .cart-modal-content {
      background: white;
      width: 90%;
      max-width: 500px;
      border-radius: 40px;
      max-height: 80vh;
      overflow: hidden;
      box-shadow: 0 30px 60px rgba(0,0,0,0.3);
    }
    
    .cart-modal-header {
      padding: 25px 30px;
      background: var(--dark);
      color: white;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .cart-modal-header h3 {
      font-size: 1.5rem;
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .close-modal {
      background: rgba(255,255,255,0.1);
      border: none;
      color: white;
      width: 40px;
      height: 40px;
      border-radius: 30px;
      font-size: 1.5rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    .cart-modal-body {
      padding: 20px;
      max-height: 50vh;
      overflow-y: auto;
    }
    
    .cart-modal-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 15px;
      border-bottom: 1px solid #eee;
    }
    .cart-modal-item-info h4 {
      font-size: 1.1rem;
      margin-bottom: 5px;
    }
    .cart-modal-item-info p {
      color: var(--primary);
      font-weight: 600;
    }
    .cart-modal-item-remove {
      background: #fee;
      border: none;
      color: #f00;
      width: 36px;
      height: 36px;
      border-radius: 30px;
      cursor: pointer;
    }
    
    .cart-modal-footer {
      padding: 25px 30px;
      background: #f8f8f8;
      border-top: 1px solid #eee;
    }
    .cart-total-row {
      display: flex;
      justify-content: space-between;
      font-size: 1.3rem;
      font-weight: 600;
      margin-bottom: 20px;
    }
    .cart-wa-btn {
      width: 100%;
      background: var(--primary);
      border: none;
      color: white;
      padding: 18px;
      border-radius: 60px;
      font-weight: 700;
      font-size: 1.2rem;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      cursor: pointer;
    }

    /* ===== PÁGINA SOBRE NOSOTROS ===== */
    .about-page {
      display: none;
      padding: 40px 6% 60px;
      max-width: 1300px;
      margin: 0 auto;
    }
    .about-page.active-page {
      display: block;
    }
    .home-page {
      display: block;
    }
    .home-page.hidden {
      display: none;
    }

    .about-hero {
      background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), url('https://images.unsplash.com/photo-1589301760014-d929f3979dbc?w=1400&auto=format');
      background-size: cover;
      background-position: center 35%;
      height: 350px;
      border-radius: 50px;
      display: flex;
      align-items: flex-end;
      padding: 50px;
      margin-bottom: 60px;
      color: white;
    }
    .about-hero h1 {
      font-size: 4rem;
      font-weight: 700;
    }

    .about-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 60px;
      margin: 50px 0;
    }
    .about-text-block {
      flex: 2 1 400px;
    }
    .about-text-block h2 {
      font-size: 2.5rem;
      font-weight: 600;
      margin-bottom: 30px;
    }
    .about-text-block p {
      font-size: 1.2rem;
      color: #3d3d3d;
      font-weight: 300;
      margin-bottom: 30px;
      line-height: 1.6;
    }
    .about-features {
      display: flex;
      gap: 40px;
      flex-wrap: wrap;
      margin: 40px 0;
    }
    .feature {
      background: var(--white);
      padding: 25px;
      border-radius: 32px;
      flex: 1 1 180px;
      box-shadow: var(--shadow);
    }
    .feature i {
      font-size: 2.2rem;
      color: var(--primary);
      margin-bottom: 15px;
    }
    .contact-about {
      background: var(--white);
      padding: 40px;
      border-radius: 48px;
      margin-top: 40px;
    }
    .back-home {
      display: inline-block;
      margin: 40px 0;
      background: var(--primary);
      color: white;
      padding: 16px 36px;
      border-radius: 60px;
      text-decoration: none;
      font-weight: 600;
    }

    footer {
      text-align: center;
      padding: 40px 0 80px;
      color: #8b8078;
    }

    /* ===== CORRECCIÓN DEL BOTÓN DE BÚSQUEDA EN MÓVILES ===== */
@media (max-width: 700px) {
  .filters-section {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  
  .search-box {
    width: 100%;
    min-width: auto;
    padding: 3px 3px 3px 15px;
  }
  
  .search-box input {
    padding: 10px 10px;
    font-size: 0.95rem;
    min-width: 0; /* Permite que el input se encoja */
  }
  
  .search-box button {
    padding: 10px 18px;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0; /* Evita que el botón se encoja demasiado */
  }
  
  .category-filters {
    width: 100%;
    justify-content: center;
  }
  
  .filter-chip {
    padding: 8px 16px;
    font-size: 0.9rem;
    flex: 0 1 auto; /* Permite que los chips se ajusten */
  }
   .mobile-cart {
    display: flex;
    align-items: center;
    margin-right: 10px;
  }
  
  .desktop-cart {
    display: none;
  }
  
  /* Ajustamos el header para móvil */
  .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .logo-wrap {
    flex: 1;
  }
  
  .menu-toggle {
    order: 3;
  }
  
  .mobile-cart {
    order: 2;
  }
  
  /* El nav sigue oculto hasta que se active */
  .nav-links {
    order: 4;
  }
}

/* Ajuste adicional para pantallas muy pequeñas */
@media (max-width: 480px) {
  .search-box button {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
  
  .filter-chip {
    padding: 6px 12px;
    font-size: 0.85rem;
  }
}


/* Loader styles */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary, #f75c2f);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-container p {
    color: var(--dark, #333);
    font-size: 1.1rem;
    font-weight: 500;
}