/* Estilos generales */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #fff;
  color: #222;
  line-height: 1.5;
}

body.menu-open {
  overflow: hidden;
  height: 100vh;
}

header {
  position: absolute;
  top: 0;
  width: 100%;
  left: 0;
  background-color: rgba(255, 255, 255, 0);
  box-shadow: none;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
}

.nav-links {
  padding: 0px;
  font-size: 20px;
}

.logo {
  height: 350px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

.search-bar {
  position: relative;
  width: 100%;
  max-width: 300px;
}

.search-bar input {
  width: 100%;
  padding: 10px 40px 10px 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
  background-color: rgba(255, 255, 255, 0.8);
}

.search-bar input:focus {
  border-color: #007bff;
}

.search-button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #555;
  font-size: 18px;
}

.search-button:hover {
  color: #007bff;
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 25px;
}

.navbar a {
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  transition: color 0.3s;
}

.navbar a:hover {
  color: #f58220;
}

.hamburger {
  display: none;
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  background-image: url("../images/fondo/Imagen\ 3-1024w.webp");
  background-image: -webkit-image-set(url("../images/fondo/Imagen\ 3-1024w.webp") 1x,
      url("../images/fondo/Imagen\ 3-1440w.webp") 2x);
  background-image: image-set(url("../images/fondo/Imagen\ 3-1024w.webp") 1x,
      url("../images/fondo/Imagen\ 3-1440w.webp") 2x);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 28px);
  color: #fff;
  padding-top: 0;
  padding-bottom: 50px;
}

@media (max-width: 600px) {
  .hero {
    background-image: url("../images/fondo/Imagen\ 3-480w.webp");
    background-image: -webkit-image-set(url("../images/fondo/Imagen\ 3-480w.webp") 1x,
        url("../images/fondo/Imagen\ 3-768w.webp") 2x);
    background-image: image-set(url("../images/fondo/Imagen\ 3-480w.webp") 1x,
        url("../images/fondo/Imagen\ 3-768w.webp") 2x);
  }
}

/* Capa Oscura para mejorar la legibilidad del texto */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.25);
  z-index: 1;
}

/* Estilos para el Contenido del Hero */
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
  padding: 0 20px;
}

.hero h5 {
  font-size: 1rem;
  margin-bottom: 10px;
  letter-spacing: 2px;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
}

.hero p {
  font-size: 1.5rem;
  opacity: 1;
  font-weight: 300;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

/* Sección nosotros */
.nosotros-section {
  max-width: 1200px;
  margin: 20px auto 20px;
  padding: 20px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 60px;
}

.nosotros-section img {
  width: 480px;
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.nosotros-text {
  flex: 1;
  min-width: 300px;
}

.nosotros-text h2 {
  font-size: 2.5rem;
  color: #000;
  margin-bottom: 15px;
  border-left: 6px solid #f58220;
  padding-left: 14px;
}

.nosotros-text h3 {
  font-size: 1.5rem;
  color: #f58220;
  margin-bottom: 10px;
}

.nosotros-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
  margin-bottom: 20px;
  text-align: justify;
}

.nosotros-text strong {
  color: #f58220;
}

@media (max-width: 768px) {
  .nosotros-section {
    flex-direction: column;
    text-align: center;
  }

  .nosotros-text h2 {
    font-size: 2rem;
  }

  .nosotros-text p {
    font-size: 1rem;
  }
}

/* Sección productos */
.productos-main-section {
  padding-bottom: 40px;
}

.productos-hero {
  text-align: center;
  padding: 0px 20px 15px;
}

.productos-hero h2 {
  font-size: 2.6rem;
  color: #f58220;
  font-weight: 800;
}

.productos-hero p {
  font-size: 1.2rem;
  color: #444;
  margin-top: 8px;
}

/* Grilla de productos */
.cards-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 32px;
}

/* Estilo para las tarjetas de producto */
.card-producto {
  padding: 30px 25px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  text-align: left;
}

.card-producto:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* Imagen en las cards de producto */
.card-producto .card-icon {
  width: 300px;
  height: 300px;
  margin: 0 auto 18px;
  display: block;
  object-fit: contain;
  border-radius: 15px;
}

/* Titulo en las cards de producto */
.card-producto h4 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #f58220;
  font-weight: 700;
}

/* Lista en las cards de producto */
.card-producto ul {
  padding-left: 20px;
  color: #333;
  margin-bottom: 22px;
  line-height: 1.55em;
}

/* Botón en las cards de producto */
.btn-card {
  display: inline-block;
  background: #f58220;
  color: #fff;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.25s ease;
}

.btn-card:hover {
  background: #d66d12;
}

/* Sección proveedores */
.proveedores-section {
  max-width: 1200px;
  margin: 0px auto;
  padding: 0 20px;
  text-align: center;
}

.proveedores-section h3 {
  font-size: 2.6rem;
  color: #f58220;
  margin-bottom: 5px;
  font-weight: 800;
}

/* Carousel */
.carousel {
  white-space: nowrap;
  margin: 30px auto 80px;
  width: 90%;
  display: flex;
  overflow: hidden;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.marcas-carrusel {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  animation: scroll-marcas 30s infinite linear;
  padding: 20px 20px 20px 0;
  flex-shrink: 0;
}

.carousel:hover .marcas-carrusel,
.marcas-carrusel.paused {
  animation-play-state: paused;
}

.logo-item {
  width: 180px;
  flex-shrink: 0;
  height: 80px;
  padding: 10px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-item img,
.logo-blanco-a-negro img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-blanco-a-negro {
  filter: invert(1);
  opacity: 0.6;
  transition: opacity 0.5s ease;
  width: 180px;
  flex-shrink: 0;
  height: 80px;
  padding: 10px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes scroll-marcas {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

/* Sección contacto */
.cta-contact-section {
  background-color: grey;
  color: #fff;
  padding: 80px 20px;
  text-align: center;
  margin-top: 60px;
}

.cta-contact-section h3 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.cta-contact-section p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.8;
}

.btn-cta {
  display: inline-block;
  background: #f58220;
  color: #fff;
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  transition:
    background 0.3s ease,
    transform 0.3s ease;
}

.btn-cta:hover {
  background: #d66d12;
  transform: translateY(-2px);
}

/* Footer y responsive */
footer {
  background: #f58220;
  color: #fff;
  text-align: center;
  padding: 20px 0;
  font-size: 0.9rem;
  margin-top: 0;
}

@media (max-width: 768px) {
  .logo {
    height: 200px;
  }

  .hero {
    min-height: 70vh;
    margin-top: -80px;
  }

  /* Mobile menu overlay */
  .navbar ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
    padding: 80px 20px 40px;
  }

  .navbar ul.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .navbar ul li {
    width: 100%;
    max-width: 320px;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .navbar ul.active li {
    opacity: 1;
    transform: translateY(0);
  }

  .navbar ul.active li:nth-child(1) {
    transition-delay: 0.1s;
  }

  .navbar ul.active li:nth-child(2) {
    transition-delay: 0.2s;
  }

  .navbar ul.active li:nth-child(3) {
    transition-delay: 0.3s;
  }

  .navbar ul.active li:nth-child(4) {
    transition-delay: 0.4s;
  }

  .navbar ul li a {
    display: block;
    padding: 18px 10px;
    font-size: 1.3rem;
    color: #fff;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: color 0.3s ease, background 0.3s ease;
    text-decoration: none;
  }

  .navbar ul li:last-child a {
    border-bottom: none;
  }

  .navbar ul li a:hover,
  .navbar ul li a:active {
    color: #f58220;
    background: rgba(245, 130, 32, 0.08);
  }

  /* Hamburger button */
  .hamburger {
    position: fixed;
    top: 50px;
    left: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 10px 9px;
    z-index: 2000;
    transition: background 0.3s ease, top 0.3s ease;
  }

  .hamburger.sticky {
    top: 10px;
  }

  .hamburger:hover {
    background: rgba(245, 130, 32, 0.7);
  }

  .hamburger span {
    display: block;
    height: 3px;
    width: 24px;
    background: #fff;
    margin: 3px 0;
    border-radius: 3px;
    transition: transform 0.35s ease, opacity 0.25s ease, background 0.3s ease;
    transform-origin: center;
  }

  /* Hamburger → X animation */
  .hamburger.active {
    background: rgba(245, 130, 32, 0.85);
  }

  .hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .search-bar {
    display: none;
  }

  .top-bar .container {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }
}

.top-bar {
  background-color: #f58220;
  color: #fff;
  font-size: 0.95rem;
  padding: 8px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.top-bar .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-item img.whatsapp-icon {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
}

.contact-item strong {
  font-weight: 600;
}

.contact-item a {
  color: inherit;
  text-decoration: none;
  font-weight: bold;
}

@media (max-width: 768px) {
  .top-bar {
    font-size: 0.85rem;
  }

  .top-bar .container {
    flex-direction: row;
    text-align: center;
    gap: 6px;
  }

  .nav-container {
    margin: auto;
  }

  .contact-item-label {
    display: none;
  }
}

/* Landscape orientation on mobile devices */
@media (max-width: 1024px) and (orientation: landscape) {
  .logo {
    height: 220px;
  }

  .hero {
    min-height: 100vh;
    padding-bottom: 30px;
  }

  .hero-content {
    padding-top: 140px;
  }

  .nav-container {
    padding: 0px;
  }
}

/* Utility: visually hidden (accessible to screen readers and crawlers) */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}