* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
/* Eliminar cualquier desbordamiento horizontal inesperado */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: sans-serif;
}

/* Barra amarilla */
.barra-top {
  background-color: #ffd33d;
  color: #002855;
  padding: 6px 15px;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  justify-content: space-between; /* Cambié a 'space-between' para separar el título y los mensajes */
  align-items: center;
  flex-wrap: wrap; /* Para que los elementos se acomoden bien */
}

/* Título dentro de la barra */
.barra-top h1 {
  font-size: 18px;  /* Ajuste el tamaño del texto */
  font-weight: bold;
  color: #000;
  margin: 0; /* Elimina margen para ajustarlo bien en el espacio */
}

/* Mensajes dentro de barra amarilla */
.barra-top .mensaje-rotativo span {
  margin: 0 30px;  /* Aumenté el margen entre las frases */
  font-size: 14px;  /* Asegúrate de que los textos de los mensajes sean de un tamaño adecuado */
}

/* Mensaje rotativo animado en la barra amarilla */
.mensaje-rotativo {
  display: inline-block;
  white-space: nowrap;
  animation: scroll-mensaje 20s linear infinite;
}

.mensaje-rotativo span {
  display: inline-block;
  padding: 0 80px;  /* Aumenté el espacio entre las frases */
}

/* Animación de desplazamiento horizontal */
@keyframes scroll-mensaje {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Barra azul fija */
.navbar {
  background-color: #002855;
  color: white;
  padding: 10px 15px;
  position: sticky;      /* Se fija al hacer scroll */
  top: 0;                /* Se adhiere arriba */
  z-index: 9999;          /* Se muestra por encima del contenido */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Contenido dentro de la navbar */
.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Íconos de redes sociales */
.redes-sociales {
  display: flex;
  flex-direction: row;   /* Asegura que estén en fila */
  gap: 10px;             /* Espaciado entre íconos */
  align-items: center;
}

.icono-red {
  background-color: white;
  color: #002855;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 16px;
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

/* Efecto de zoom y color por red social al pasar el mouse */
.icono-red:hover {
  transform: scale(1.15);
}

/* Facebook */
.icono-red.facebook:hover {
  background-color: #1877f2;
  color: white;
}

/* Instagram */
.icono-red.instagram:hover {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  color: white;
}

/* TikTok */
.icono-red.tiktok:hover {
  background-color: #000000;
  color: #69C9D0; /* color azul tiktok */
}


/* Buscador */
.search-container {
  flex: 1;
  display: flex;
  justify-content: center;
  margin: 10px 0;
}

.search-box {
  background-color: white;
  border-radius: 30px;
  display: flex;
  align-items: center;
  padding: 8px 15px;
  width: 100%;
  max-width: 600px;
}

.search-box input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 16px;
}

.search-icon {
  margin-right: 10px;
  color: gray;
}

/* Contador de visitas */
.visitas {
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}

.visitas strong {
  background-color: limegreen;
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
}

/* barra 3 */
.barra-categorias {
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center; /* Cambiado de space-between a center */
  padding: 8px 0;
  border-bottom: 1px solid #ddd;
  position: relative;
  z-index: 1000;
}

/* Logo más pegado a la izquierda */
.barra-categorias .contenedor-logo {
  position: absolute;
  left: 20px;
}

.contenedor-logo img {
  height: 34px;
}

.menu-categorias {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.menu-categorias li a {
  text-decoration: none;
  color: #222;
  font-weight: 600;
  font-size: 15px;
  font-family: 'Segoe UI', sans-serif;
  transition: color 0.2s ease;
}

.menu-categorias li a:hover {
  color: #e60023;
}
body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  background: #f4f4f4;
}

header {
  background: #005baa;
  color: white;
  padding: 1em;
  text-align: center;
}

.titulo-principal {
  font-size: 2rem;
  margin: 0;
}

.filtros {
  background: white;
  padding: 1em;
  display: flex;
  justify-content: center;
  gap: 1em;
  flex-wrap: wrap;
  border-bottom: 1px solid #ddd;
}

.filtros select,
.filtros button {
  padding: 0.5em;
  font-size: 1em;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.filtros button {
  background: #005baa;
  color: white;
  cursor: pointer;
}
/* Contenedor de filtros */
.filtro-categoria {
  display: flex;
  gap: 20px;
  margin: 20px 0;
  justify-content: center;
  align-items: center;
}

/* Estilo general para los selectores */
.filtro-categoria select {
  padding: 10px;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  width: 250px;
  background-color: #fff;
  color: #333;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

/* Estilo para el select cuando se hace hover */
.filtro-categoria select:hover {
  border-color: #0070c0;
}

/* Estilo para el botón de filtro */
.filtro-categoria button {
  padding: 10px 15px;
  font-size: 1rem;
  background-color: #0070c0;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* Estilo para el botón cuando se hace hover */
.filtro-categoria button:hover {
  background-color: #005ea6;
}

/* Estilo del contenedor del producto y los filtros */
.grid-productos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
  justify-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
.paginacion {
    text-align: center;
    margin-top: 20px;
}

.paginacion a {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    background-color: #f2f2f2;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.paginacion a:hover {
    background-color: #0070c0;
    color: white;
}

.paginacion .active {
    background-color: #0070c0;
    color: white;
    border-radius: 4px;
}

.paginacion .pagina-primera,
.paginacion .pagina-ultima {
    font-weight: bold;
}

.paginacion .pagina-anterior,
.paginacion .pagina-siguiente {
    font-size: 18px;
}

.paginacion a:disabled {
    background-color: #ddd;
    color: #aaa;
    pointer-events: none;
}


/* Contenedor general de la tarjeta */
.producto-card {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  max-width: 320px;
  margin: 10px auto;
}

.producto-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Enlace envolvente */
.producto-enlace {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Imagen */
.producto-imagen img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid #ddd;
  display: block;
}

/* Información del producto */
.producto-detalles {
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: 'Poppins', sans-serif;
}

.producto-titulo {
  font-size: 1.2rem;
  font-weight: 600;
  color: #222;
  margin: 0 0 8px;
  line-height: 1.3;
}

.producto-referencia {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 10px;
  font-weight: 500;
}

/* Lista de especificaciones */
.producto-especificaciones {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
  font-size: 0.88rem;
  color: #333;
}

.producto-especificaciones li {
  margin-bottom: 4px;
}

/* Precio y condición */
.producto-precio {
  font-size: 1.2rem;
  font-weight: bold;
  color: #0070c0;
  margin-bottom: 6px;
}

.producto-condicion {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 12px;
  font-weight: 500;
}

/* Botón de "Ver detalles" */
.ver-detalles {
  margin-top: auto;
  font-size: 0.95rem;
  text-align: center;
  padding: 8px;
  background-color: #0070c0;
  color: white;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.ver-detalles:hover {
  background-color: #005ea6;
}

/* Contenedor principal de la tienda */
.grid-productos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
  justify-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

/* Descripción larga */
.producto-descripcion-larga {
  font-size: 0.95rem;
  color: #555;
  margin: 8px 0;
  line-height: 1.4;
  height: 100px; /* Limitar altura para que no ocupe demasiado espacio */
  overflow: hidden; /* Ocultar el texto que excede */
  text-overflow: ellipsis; /* Agregar puntos suspensivos si el texto es muy largo */
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Limitar el texto a 3 líneas */
  -webkit-box-orient: vertical;
}

.producto-card .ver-detalles {
  margin-top: auto;
  font-size: 0.95rem;
  text-align: center;
  padding: 8px;
  background-color: #0070c0;
  color: white;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.producto-card .ver-detalles:hover {
  background-color: #005ea6;
}

/* Estilos para la parte de abajo */
.footer {
  background-color: #001a3a;
  color: white;
  font-family: 'Segoe UI', sans-serif;
  padding: 40px 20px 20px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-column {
  flex: 1 1 220px;
  margin: 10px 15px;
}

.footer-column h4 {
  color: #ffc107;
  font-size: 18px;
  margin-bottom: 15px;
  border-bottom: 1px solid #444;
  padding-bottom: 5px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
}

.footer-column ul li {
  margin-bottom: 8px;
}

.footer-column ul li a {
  color: #ccc;
  text-decoration: none;
  font-size: 14px;
}

.footer-column ul li a:hover {
  color: #ffc107;
}

.footer-column p {
  font-size: 14px;
  margin: 6px 0;
}

.footer-column a {
  color: #ccc;
  text-decoration: none;
}

.footer-column a:hover {
  color: #ffc107;
}
/* Estilos para las categorías */
.footer-categories {
  display: flex;
  justify-content: space-between;
}

.footer-categories-column {
  width: 48%; /* Cada columna de categorías ocupa el 48% del ancho */
}

.footer-categories li {
  list-style: none;
}

.footer-categories a {
  color: #333;
  text-decoration: none;
}

.footer-categories a:hover {
  color: #4CAF50;
}

.social-icons {
  margin-top: 10px;
}

.social-icons a {
  color: white;
  margin-right: 12px;
  font-size: 20px;
  transition: transform 0.3s ease, color 0.3s;
}

.social-icons a:hover {
  color: #ffc107;
  transform: scale(1.2);
}


.social-icons img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
  transition: transform 0.2s ease;
}

.social-icons img:hover {
  transform: scale(1.1);
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  font-size: 13px;
  color: #aaa;
}
