/* Ocultar menú de escritorio en móviles */
.nav {
  display: none;
}

body, html {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}

.card {
  margin: 0;
  padding: 0;
  width: 100%;
  border: none;
}

.card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.nav, .dropdown-categorias {
  display: none;
}



/* Botón WhatsApp flotante ajustado */
.whatsapp-float {
  width: 59px;       /* Hacemos más grande el círculo verde */
  height: 59px;
  bottom: 14px;
  right: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25D366; /* Verde clásico de WhatsApp */
  z-index: 9999;
}

/* Icono dentro del botón */
.whatsapp-float svg {
  width: 42px;       /* Más grande que antes */
  height: 42px;
  transform: translateY(0.5px);
}


.checkout {
  margin: 1rem;
  padding: 1rem;
}

.checkout-form input,
.checkout-form textarea,
.checkout-form .btn {
  font-size: 0.95rem;
}


/* ====== Pantallas medianas (481px - 768px) ====== */
@media (min-width: 481px) and (max-width: 768px) {

  .productos .grid, .grid, #productosGrid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 15px 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
  }

  .nav.active {
    display: flex;
  }

  .nav a {
    padding: 12px 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
  }

  .nav a:last-child {
    border-bottom: none;
  }

  .search-box {
    flex: 1;
    margin: 10px 0;
    width: 90%;
  }

  .icons {
    margin-top: 10px;
  }

  .carousel button.prev,
  .carousel button.next { 
    width: 34px; 
    height: 34px; 
    font-size: 18px; 
  }
}

/* ====== Tablets / laptops pequeñas (769px - 992px) ====== */
@media (min-width: 769px) and (max-width: 992px) {
  .productos .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ====== Laptops grandes / desktops (993px - 1200px) ====== */
@media (min-width: 993px) and (max-width: 1200px) {
  .productos .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
/* Asegúrate que tu carrito flotante siempre esté visible */
.cart-float, .carrito {
  position: fixed; /* Siempre fijo en la pantalla */
  bottom: 20px;    /* Ajusta según convenga */
  right: 20px;
  width: 56px;
  height: 56px;
  background: #ff6600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;   /* Muy alto para que quede encima de todo */
}

/* Icono dentro del carrito */
.cart-float svg, .carrito svg {
  width: 28px;
  height: 28px;
}
/* Ocultar la barra negra superior en móviles */
@media (max-width: 768px) {
  .top-bar, /* si tu barra tiene esta clase */
  header.top-bar { /* o la clase que tenga tu barra negra */
    display: none !important;
  }
}

/* Móvil */
@media (max-width:768px) {
  .nav {
    display: none;      /* Oculto inicialmente */
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 10px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }

  .nav.active {
    display: flex;      /* Mostrar cuando se haga toggle */
  }

  .hamburger {
    display: block;     /* Mostrar solo en móvil */
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
  }
}
/* Header móvil estilo limpio tipo Temu */
@media (max-width: 768px) {
  /* Ocultar logo */
  .header .logo {
    display: none !important;
  }

  /* Mostrar solo buscador y hamburguesa */
  .header {
    display: flex;
    justify-content: space-between; /* Hamb + buscador */
    align-items: center;
    padding: 10px 15px;
  }

  .search-box {
    flex: 1;
    margin: 0 10px;
  }

  .hamburger {
    font-size: 1.8rem;
    z-index: 1001;
  }

  /* Ajustar íconos del header */
  .icons {
    display: none; /* Ocultamos los demás iconos para simplificar */
  }

  /* Ajuste dropdown nav en móvil */
  .nav {
    position: absolute;
    top: 50px; /* debajo del header */
    left: 0;
    width: 100%;
    background: #fff;
    flex-direction: column;
    display: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
  }

  .nav.active {
    display: flex;
  }
}
@media (max-width: 768px) {
  .search-hamburger {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center; /* centra los elementos dentro del header */
    gap: 10px; /* espacio entre buscador y hamburguesa */
  }

  .search-box {
    flex: 1 1 70%;  /* que el buscador ocupe como máximo 70% */
    max-width: 250px; /* opcional: limitar el tamaño */
    margin: 0;
  }

  .hamburger {
    font-size: 1.8rem;
  }
}

@media (max-width: 768px) {
  .search-box {
    position: relative;
    flex: 1 1 70%;
    max-width: 250px;
  }

  .search-box input {
    width: 100%;
    padding: 8px 40px 8px 10px; /* espacio a la derecha para la lupa */
    border-radius: 9px;
    font-size: 0.95rem;
  }

  .search-box .search-btn {
    position: absolute;
    right: 1px;  /* separación del borde derecho */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    
  }
}

/* Ocultar hero en móviles */
@media (max-width: 768px) {
  .hero {
    display: none !important;
  }
}


/* ====== Estilos móviles (max-width: 768px) ====== */
@media (max-width: 768px) {

  /* Mostrar 2 productos por fila */
  .productos .grid, .grid, #productosGrid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 8px;
  }


  /* Ajustar tamaño de las imágenes de los productos */
  .card img {
    width: 100%; /* ocupar todo el ancho de la columna */
    height: auto;
    object-fit: cover;
    margin-bottom: 0px !important; /* menos espacio debajo de la imagen */
  }

  /* Títulos más pequeños y más cerca de la imagen */
  .card h3 {
    font-size: 1rem;     
    line-height: 1.2rem !important;
    margin: 2px 0 !important; /* menos margen */
    margin-top: 0 !important;
  }

  /* Precio más compacto */
  .card p {
    font-size: 0.85rem;
    margin: 1px 0 3px 0 !important;
    margin-top: 0 !important;
  }

  /* Info general más pegada (si tienes contenedor .card-info) */
  .card-info {
    padding: 4px 6px !important; 
    padding-top: 0 !important;
  }

  /* Ajuste del botón */
  .card .btn {
    font-size: 0.85rem;
    padding: 5px 8px;
    margin: 0 !important;
  }
}




/* Botón de usuario */
.user-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  padding: 6px;
  flex-shrink: 0;
}

.user-btn svg {
  width: 28px;
  height: 28px;
}

/* Contenedor full-width sin espacios extra */
.search-hamburger {
  display: flex;
  align-items: center;
  justify-content: space-between; /* buscador a la izquierda, iconos a la derecha */
  width: 100%;
  padding: 0;      /* eliminamos padding externo */
  margin: 0;       /* eliminamos margen */
  box-sizing: border-box;
}



/* Iconos: usuario, hamburguesa, carrito */
.user-btn,
.hamburger,
.cart-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  padding: 4px;      /* más compacto */
  margin-left: 4px;   /* pequeño espacio entre iconos */
  flex-shrink: 0;
}

.user-btn svg,
.hamburger svg {
  width: 22px;
  height: 22px;
}

.cart-btn svg {
  width: 24px;
  height: 24px;
}

/* Ocultar logo en móviles */
@media (max-width: 768px) {
  .header .logo {
    display: none !important;
  }
}



h2 {
  text-align: center;
  font-size: 20px;
  margin: 20px 0;
  font-weight: bold;
}

/* 🔥 Reset para evitar espacios inesperados */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ✅ Grid ocupa todo el ancho sin márgenes */
.productos .grid, .grid, #productosGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  width: 100%;
  margin: 0;      /* Quitamos auto */
  padding: 0;     /* Quitamos padding */
}



/* Reset total en móvil */
@media (max-width: 768px) {
  html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden; /* evita scroll lateral */
  }

  /* Contenedor principal */
  .container, .grid, .productos {
    width: 100% !important; /* fuerza ocupar todo el ancho */
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
  }

  /* Cards de productos (2 columnas) */
  .grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px; /* ajusta separación */
  }

  .card {
    width: 100% !important;
    margin: 0 !important;
    padding: 3px;
  }

  /* Imágenes ajustadas al 100% */
  .card img {
    width: 100%;
    height: auto;
    display: block;
  }
}

@media (max-width: 768px) {
  .grid {
    gap: 0 !important;      /* quita separación entre productos */
    padding:  0 !important;  /* quita espacio interno del grid */
  }

  .card {
    border: none !important;       /* sin borde */
    box-shadow: none !important;   /* sin sombra */
    padding: 1 !important;         /* sin padding */
    margin: 0 !important;          /* sin márgenes */
  }
}

@media (max-width: 768px) {
  .card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px; /* esquinas apenas redondeadas */
  }

  /* Si quieres que toda la tarjeta tenga esquinas suaves */
  .card {
    border-radius: 5px;
    overflow: hidden; /* asegura que la imagen no sobresalga */
  }
}

.hamburger {
  font-size: 1.8rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;     /* color del ícono */
  text-decoration: none; /* quita el subrayado típico de enlaces */
}

.cart-btn svg {
  stroke: #111;
  transition: transform 0.2s ease, stroke 0.2s ease;
}

.cart-btn:hover svg {
  transform: scale(1.1);
  stroke: #e63946; /* Rojo WALOX */
}

/* Estilo para el botón combinado (⋮☰) */
.hamburger-combined-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;        /* espacio total del botón */
  height: 42px;
  padding: 6px;
  background: #ffffff;   /* fondo blanco (cambiar si quieres) */
  border-radius: 10px;/* suaviza el contorno del botón */
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  text-decoration: none;
  color: #222;        /* color del trazo */
  transition: transform 0.14s ease, box-shadow 0.14s ease, color 0.14s ease;
}

/* Color del SVG: usa currentColor (hereda color) */
.hamburger-combined-btn svg { 
  fill: none;
  stroke: currentColor;
  stroke: #222; /* fallback */
}

/* Hover / active (tap) */
.hamburger-combined-btn:hover,
.hamburger-combined-btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  color: #ff5b00; /* color tipo Temu (ajusta si quieres) */
}

/* En móvil asegúrate que el botón se muestre donde corresponda */
@media (max-width: 768px) {
  .hamburger-combined-btn { width: 40px; height: 40px; }
  .hamburger-combined-btn svg { width: 24px; height: 24px; }
}

.back-btn {
  font-size: 1.5rem;
  color: #333;
  text-decoration: none;
  margin-right: 8px;
  display: flex;
  align-items: center;
}

/* Solo en la página menu.html */
body.menu-page .hamburger-combined-btn svg line,
body.menu-page .hamburger-combined-btn svg circle {
  stroke: #ff6600; /* color naranja */
  fill: #ff6600;
}

/* Menú vertical debajo del header */
.side-menu {
  width: 200px; /* ancho fijo o ajustable */
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  margin: 10px auto; /* centrado horizontal */
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  overflow: hidden;
}

.side-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-menu li {
  border-bottom: 1px solid #f0f0f0;
}

.side-menu li:last-child {
  border-bottom: none;
}

.side-menu a {
  display: block;
  padding: 12px 15px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 0.95rem;
}

.side-menu a:hover {
  background-color: #ff6600;
  color: #fff;
}

/* Mostrar solo en móviles */
@media (max-width: 768px) {
  .mobile-only {
    display: inline-block !important;
    position: relative !important;
    margin-left: 10px !important;
  }

  .user-dropdown {
    display: none !important;
    position: absolute !important;
    top: 40px !important;
    right: 0 !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    min-width: 180px !important;
    z-index: 1000 !important;
  }

  .user-dropdown a {
    display: block !important;
    padding: 10px 15px !important;
    text-decoration: none !important;
    color: #333 !important;
    font-size: 14px !important;
  }

  .user-dropdown a:hover {
    background-color: #f5f5f5 !important;
  }

  .user-menu.active .user-dropdown {
    display: block !important;
  }
}

/* Ocultar "PRODUCTOS DESTACADOS" solo en móviles */
@media (max-width: 768px) {
  h2 {
    display: none;
  }
}

/* Aseguramos que el menú sea horizontal y separado de otros estilos */
.mobile-only.category-scroll {
  display: flex !important;        /* forzamos fila horizontal */
  flex-direction: row !important;  /* izquierda → derecha */
  overflow-x: auto !important;     /* permite scroll horizontal */
  gap: 10px !important;            /* espacio entre items */
  padding: 10px 5px !important;
  background: #fff;
  -webkit-overflow-scrolling: touch; /* suaviza scroll en iOS */
  scrollbar-width: none;           /* Firefox: oculta scrollbar */
}

.mobile-only.category-scroll::-webkit-scrollbar {
  display: none;                    /* Chrome/Safari: oculta scrollbar */
}

.mobile-only.category-item {
  flex: 0 0 auto !important;       /* que no se encojan */
  padding: 8px 15px;
  border-radius: 20px;
  background: #f0f0f0;
  font-size: 0.9rem;
  white-space: nowrap;             /* evita wrap */
  cursor: pointer;
  text-align: center;
}

.mobile-only.category-item.active {
  background: #ff6600;
  color: #fff;
}

.mobile-only.category-item:hover {
  background: #ff6600;
  color: #fff;
}

/* Contenedor principal del buscador + hamburguesa + carrito */
.search-hamburger {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 1px 10px !important;
  gap: 8px !important;
  background: #fff !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 999 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1) !important;
}

/* Para que no tape el menú de categorías */
body {
  padding-top: 25px !important; /* ajusta según la altura de .search-hamburger */
}



/* Botón de búsqueda con ícono sin cambiar color */
.search-box .search-btn {
  padding: 6px 10px !important;
  border-radius: 6px !important;
  border: 1px !important;
  background: #fff !important; /* transparente / blanco */
  color: inherit !important; /* mantiene color negro predeterminado del icono */
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;

}


/* Contenedor de los íconos a la derecha */
.iconos-derecha {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important; /* menos espacio entre íconos */
}

/* Asegura que el botón no tenga fondo */
.hamburger-combined-btn {
  
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* Elimina fondos o colores del ícono dentro (SVG o img) */
.hamburger-combined-btn svg,
.hamburger-combined-btn img,
.hamburger-combined-btn::before,
.hamburger-combined-btn::after {
  background: transparent !important;
  fill: currentColor !important; /* usa el color del texto, sin fondo */
  box-shadow: none !important;
  border: none !important;
}

/* En caso el icono tenga una capa pseudo o un background radial */
.hamburger-combined-btn * {
  background: transparent !important;
  box-shadow: none !important;
}

/* Mueve la hamburguesa más cerca del icono de iniciar sesión en móvil */
@media (max-width: 768px) {
  .hamburger-combined-btn {
    margin-right: -19px !important; /* acercar: puedes ajustar entre -4px y -10px */
  }
}


/* Botón de usuario */
.user-menu {
  position: relative !important;
}

.user-btn {
  padding: 4px !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
}

.user-btn svg {
    width: 25px !important;  /* antes era 24px */
    height: 25px !important;
  }



/* Dropdown usuario */
.user-dropdown {
  display: none !important;
  position: absolute !important;
  top: 110% !important;
  right: 0 !important;
  background: #fff !important;
  border: 1px solid #ccc !important;
  border-radius: 5px !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
  z-index: 100 !important;
}

.user-menu:hover .user-dropdown {
  display: block !important;
}

/* Carrito */
.cart-btn {
  padding: 4px !important;
  border-radius: 8px !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
}



/* Activa: naranja fijo, bordes redondeados y más ancho */
.category-scroll.mobile-only .category-item.active {
  background-color: #ff6600 !important;
  border-radius: 20px !important;
  color: #fff !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
  transition: 0.3s;

}

@media (max-width: 768px) {
  .category-scroll {
    margin-left: 0 !important;
    padding-left: 0 !important;
    
  }

  .category-item {
    margin-left: 0 !important;
    color: #000 !important;
    text-decoration: none !important;
  }
}

@media (max-width: 768px) {
  .category-scroll {
    position: sticky !important;
    top: 0px !important; /* altura del header o buscador */
    z-index: 999 !important;
    background-color: #fff !important; /* para que no se mezcle con el fondo */
    border-bottom: 1px solid #eee !important;
  }
}

@media (max-width: 768px) {
  body, html {
    overflow-x: hidden !important;
  }

  /* Asegurar que el contenedor padre permita sticky */
  main, .container, .content {
    overflow: visible !important;
  }

  /* Fijar el menú de categorías */
  .category-scroll {
    position: fixed !important;
    top: 42px !important; /* ajusta según la altura del header/buscador */
    left: 0;
    right: 0;
    z-index: 999 !important;
    background: #fff !important;
    border-bottom: 1px solid #eee !important;
  }

  /* Evitar que el contenido suba debajo del menú */
  .content, main {
    padding-top: 55px !important; /* da espacio al nuevo menú fijo */
  }
}

@media (max-width: 768px) {
  /* Ajuste para que las imágenes no queden tapadas */
  .main-content, 
  .productos, 
  .banner, 
  .contenedor-imagenes, 
  .hero-section {
    margin-top: 46.5px !important; /* ajusta el valor si aún se ve tapado */
  }
}

@media (max-width: 768px) {
  .search-box input {
    height: 20px !important;
    padding: 4px 8px !important;
   }

  .search-box button {
    height: 25px !important;
    width: 34px !important;
    padding: 0 !important;
  }
}

@media screen and (max-width: 768px) {
  .producto-detalle {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    margin: 20px !important;
    max-width: 95% !important;
  }

  .producto-imagen img {
    width: 100% !important;
    height: auto !important;
  }

  .producto-info h1 {
    font-size: 1.5rem !important;
  }

  .precio {
    font-size: 1.3rem !important;
  }

  .descripcion {
    font-size: 1rem !important;
  }

  .btn {
    width: 100% !important;
    text-align: center !important;
    padding: 12px !important;
    font-size: 1rem !important;
  }
}

.miniaturas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.miniaturas img {
  width: 80px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.3s;
}

.miniaturas img:hover {
  border-color: #e60000;
}

@media (max-width: 768px) {
  .miniaturas-scroll {
    flex-wrap: nowrap;      /* evita varias filas */
  }
}

/* Miniaturas: scroll horizontal solo en móvil */
@media (max-width: 768px) {
  .miniaturas-scroll {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;     /* scroll horizontal */
    -webkit-overflow-scrolling: touch !important; /* suaviza scroll iOS */
    gap: 10px !important;
    padding: 10px 0 !important;
    width: 100% !important;          /* solo ancho del contenedor */
    box-sizing: border-box !important;
    scrollbar-width: none !important;
  }

  .miniaturas-scroll::-webkit-scrollbar {
    display: none !important;
  }

  .miniaturas-scroll img {
    flex: 0 0 auto !important;       /* evita que se encojan */
    width: 80px !important;
    height: 80px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    border: 2px solid transparent !important;
    transition: border-color 0.3s !important;
  }

  .miniaturas-scroll img.active,
  .miniaturas-scroll img:hover {
    border-color: #e60000 !important;
  }
}

.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 0px; /* 6px arriba/abajo, 8px izquierda/derecha */
  border-radius: 6px;
  background: #fff; /* o el color que quieras */
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

/* Por defecto oculto en desktop */
.search-box.mobile-only {
  display: none;
}

/* Visible solo en móviles */
@media screen and (max-width: 768px) {
  .search-box.mobile-only {
    display: flex;
    align-items: center;
    gap: 6px; /* separación entre input y botón */
  }

  .search-box.mobile-only input {
    flex: 1; /* ocupa el espacio disponible */
  }
}

.btn {
  padding: 4px 14px !important;
  font-size: 0.85rem;
  border-radius: 6px;
}

