/* Productos */
.productos-destacados {
  background: #333;
  padding: 4rem 2rem;
  text-align: center;
}
.productos-header h2,
.productos-header p {
  color: #fff;
}
.productos-header h2 {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
}
.productos-header p {
  font-size: 1.1rem;
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.productos-grid-nueva {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  max-width: 1500px;
  margin: 0 auto;
}
.producto-box {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
}
.producto-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.producto-img {
  position: relative;
  overflow: hidden;
}
.producto-img img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.5s;
}
.producto-box:hover img {
  transform: scale(1.05);
}
.descripcion-hover {
  position: absolute;
  bottom: 0; left: 0; width: 100%;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 0.9rem;
  padding: 1rem;
  transform: translateY(100%);
  transition: transform 0.3s;
}
.producto-box:hover .descripcion-hover {
  transform: translateY(0);
}
.producto-info { padding: 1rem; }
.producto-info h3 { font-size: 1.3rem; color: #333; }
.ver-todo-btn { margin-top: 3rem; }
.btn-catalogo {
  display: inline-block;
  padding: 12px 30px;
  background: #222;
  color: #ccc;
  border-radius: 30px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s;
}
.btn-catalogo:hover {
  background: #444;
  color: #fff;
}

/* Carrusel de marcas */
.marcas-carousel {
  background: #444;
  padding: 2rem 1rem;
  text-align: center;
  position: relative;
  z-index: 10;
}
.marcas-carousel h3 {
  font-size: 1.8rem;
  color: #ccc;
  margin-bottom: 1.5rem;
}
.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11;
  background: #fff; /* Opcional: mejora contraste si hay overlays */
}
.carousel-track {
  display: flex;
  gap: 2rem;
  overflow: hidden;
  scroll-behavior: smooth;
  padding: 0.5rem 1rem;
  max-width: 90vw;
  height: 100px;
  scrollbar-width: none;
  animation: scroll 30s linear infinite;
  align-items: center;
  min-height: 80px; /* Opcional: asegura que las imágenes no se vean recortadas */
}
.carousel-track::-webkit-scrollbar { display: none; }
.logo-item {
  flex: 0 0 auto;
  width: 130px; height: 80px;
  background: #222;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 6px rgba(0,0,0,0.2);
  transition: transform 0.3s;
}
.logo-item img {
  max-width: 90%;
  max-height: 70%;
  object-fit: contain;
}
.logo-item:hover { transform: scale(1.05); }
.contact-footer {
  background: #000;
  text-align: center;
  padding: 2rem 1rem;
  color: #888;
  font-size: 0.9rem;
}

/* Sección productos */
.productos-filtrables {
  padding: 1rem;
  text-align: center;
  background: #222;
}
.productos-filtrables h2 {
  font-size: 2.5rem;
  color: #ccc;
  margin-bottom: 2rem;
}
.filtros {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.filtros .filtro {
  background: #eee;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 25px;
  cursor: pointer;
  transition: background 0.3s;
  font-weight: bold;
}
.filtros .filtro.active,
.filtros .filtro:hover {
  background: #888;
  color: #000;
}
.grid-productos {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  justify-items: center;
  align-items: start;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
}
@media (max-width:1024px) {.grid-productos{grid-template-columns:repeat(3,1fr);}}
@media (max-width:768px) {.grid-productos{grid-template-columns:repeat(2,1fr);}}
@media (max-width:480px) {.grid-productos{grid-template-columns:1fr;}}

.btn-ver-todos {
  display: none;
  margin: 1rem auto;
  padding: 0.8rem 2rem;
  font-size: 1rem;
  background: #444;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 1;
}
.btn-ver-todos:hover { background: #888; }
.grid-productos.mostrar-todos .producto-card { display: block; }
.producto-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  transition: all 0.3s;
  padding: 1rem;
  display: block;
  width: 100%;
  max-width: 250px;
  box-shadow: 0 4px 18px rgba(34,34,34,0.10), 0 1.5px 6px rgba(153,153,153,0.07);
  border: 1.5px solid #888;
  background: linear-gradient(120deg, #fff 80%, #f7f7f7 100%);
  animation: fadeInProducto 0.7s;
}
.producto-card:hover {
  box-shadow: 0 8px 32px rgba(136,136,136,0.13), 0 2px 12px rgba(200,200,200,0.13);
  border: 1.5px solid #444;
  transform: translateY(-7px) scale(1.03);
}
@keyframes fadeInProducto {
  from { opacity: 0; transform: scale(0.95);}
  to { opacity: 1; transform: scale(1);}
}
.producto-card.mostrar {
  display: block;
  opacity: 1;
  transform: scale(1);
}
.producto-card:hover { transform: translateY(-5px); }
.producto-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
}
.producto-card h3 {
  margin-top: 0.8rem;
  color: #888;
}
.producto-card p {
  font-size: 0.95rem;
  color: #444;
}
.descripcion-categoria {
  margin: 2rem auto 1rem;
  max-width: 900px;
  text-align: center;
  padding: 1rem;
  background: #222;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s, transform 0.5s;
}
.descripcion-categoria.visible {
  opacity: 1;
  transform: translateY(0);
}
.descripcion-categoria h3 {
  color: #fff;
  margin-bottom: 1rem;
}
.descripcion-categoria .items-destacados {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}
.descripcion-categoria .item {
  flex: 1 1 200px;
  font-size: 0.95rem;
  background: #222;
  color: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* HERO ESTÉTICO PARA ACEROS */
.productos-hero-aceros {
  position: relative;
  margin: 90px auto 2.5rem auto; /* Deja espacio para el menú fijo */
  max-width: 1100px;
  min-height: 140px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 6px 32px rgba(0,0,0,0.13);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  background: linear-gradient(120deg, #222 60%, #888 100%);
  animation: fadeInBanner 1s;
}
.productos-hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  width: 100%;
  padding: 2.2rem 2.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.productos-hero-content h3 {
  font-size: 2.1rem;
  font-weight: 900;
  margin-bottom: 0.7rem;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.13);
}
.productos-hero-content p {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 1.2rem;
  color: #fff;
  opacity: 0.96;
}
.productos-hero-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 2.2rem;
  justify-content: center;
  margin-top: 0.7rem;
}
.productos-hero-icons span {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 1.05rem;
  color: #fff;
  font-weight: 600;
  opacity: 0.93;
  min-width: 70px;
  transition: color 0.3s, transform 0.3s;
  cursor: pointer;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.13));
}
.productos-hero-icons i {
  font-size: 2.1rem;
  margin-bottom: 0.3rem;
  color: #ccc;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.13));
  transition: color 0.3s;
}
.productos-hero-icons span:hover i {
  color: #fff;
  transform: scale(1.15);
}
.productos-hero-icons span:hover {
  color: #ccc;
  transform: translateY(-4px) scale(1.07);
}
@media (max-width: 900px) {
  .productos-hero-content { padding: 1.2rem 1rem; }
  .productos-hero-content h3 { font-size: 1.3rem; }
  .productos-hero-icons { gap: 1.1rem; }
  .productos-hero-aceros { margin-top: 70px; }
}
@media (max-width: 600px) {
  .productos-hero-aceros { min-height: 90px; margin-top: 60px; }
  .productos-hero-content { padding: 0.7rem 0.5rem; }
  .productos-hero-icons { gap: 0.7rem; }
  .productos-hero-icons i { font-size: 1.3rem; }
  .productos-hero-icons span { font-size: 0.92rem; }
}

/* Tarjeta de producto animada y responsiva */
.grid-productos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  justify-items: center;
  align-items: stretch;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem;
}
.producto-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
  transition: box-shadow 0.3s, border 0.3s, transform 0.3s;
  padding: 0;
  width: 100%;
  max-width: 320px;
  min-width: 0;
  box-shadow: 0 4px 18px rgba(34,34,34,0.10), 0 1.5px 6px rgba(153,153,153,0.07);
  border: 1.5px solid #888;
  background: linear-gradient(120deg, #fff 80%, #f7f7f7 100%);
  animation: fadeInProducto 0.7s;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.producto-card:hover {
  box-shadow: 0 8px 32px rgba(136,136,136,0.13), 0 2px 12px rgba(200,200,200,0.13);
  border: 1.5px solid #444;
  transform: translateY(-7px) scale(1.03);
}
@keyframes fadeInProducto {
  from { opacity: 0; transform: scale(0.95);}
  to { opacity: 1; transform: scale(1);}
}
.producto-img-acero {
  width: 100%;
  height: 180px;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #eee;
}
.producto-img-acero img {
  width: 80%;
  height: 140px;
  object-fit: contain;
  transition: transform 0.5s;
  margin: 0 auto;
}
.producto-card:hover .producto-img-acero img {
  transform: scale(1.08);
}
.producto-info-acero {
  padding: 1.1rem 1rem 1.3rem 1rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.producto-info-acero h3 {
  margin-top: 0.2rem;
  margin-bottom: 0.7rem;
  color: #888;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.producto-info-acero p {
  font-size: 1.02rem;
  color: #444;
  margin: 0;
  opacity: 0.93;
  font-weight: 500;
}

/* Responsive grid */
@media (max-width: 900px) {
  .grid-productos { grid-template-columns: repeat(2, 1fr); }
  .producto-card { max-width: 98vw; }
}
@media (max-width: 600px) {
  .grid-productos { grid-template-columns: 1fr; padding: 1rem 0.2rem; }
  .producto-card { max-width: 99vw; }
  .producto-img-acero { height: 120px; }
  .producto-img-acero img { height: 90px; }
  .producto-info-acero h3 { font-size: 1.05rem; }
  .producto-info-acero p { font-size: 0.97rem; }
}

/* Asegura que el carrusel de marcas esté por encima de otros elementos */
.marcas-carousel {
  background: #444;
  padding: 2rem 1rem;
  text-align: center;
}

.carousel-wrapper {
  background-color: #444;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-wrapper::-webkit-scrollbar {
  display: none;
}

.carousel-track {
  background-color: #444;
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0.5rem 1rem;
  max-width: 90vw;
  height: 100px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.logo-item {
  flex: 0 0 auto;
  width: 130px;
  height: 80px;
  background: #222;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 6px rgba(0,0,0,0.2);
  transition: transform 0.3s;
}

.logo-item img {
  max-width: 90%;
  max-height: 70%;
  object-fit: contain;
}

.logo-item img:hover {
  transform: scale(1.05);
}