@font-face {
  font-family: 'Made';
  src: url('/Fonts/MADE_Tommy_Soft_Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  font-family: 'Made', sans-serif;
}

/* Encabezado */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 95px;
  padding: 30px;
  background-image: url('/images/RECTANGULO\ DE\ ARRIBA-12.png');
  background-size: cover;
  background-position: center;
  color: #fff;
  position: relative;
  z-index: 10;
}

.logo {
  position: absolute; /* corregido */
  top: 0;
  left: 0;
  padding: 10px;
  z-index: 3;
}

.logo img {
  height: 125px;
  width: auto;
}

nav {
  position: absolute;
  top: 0;
  right: 20px;
  margin-top: 120px;
  z-index: 11;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

nav ul li {
  margin: 0 10px;
  position: relative;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  padding: 10px 15px;
  position: relative;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: #4CAF50;
}

nav ul li a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 10px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 0px 0px 10px 10px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

nav ul li a:hover::after {
  transform: scaleX(1);
}

/* Carrusel Principal */
#inicio {
  position: relative;
  width: 100%;
  height: calc(100vh - 100px);
  margin-top: -100px;
  margin-bottom: 0;
  z-index: 1;
}

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

.carousel-container {
  margin-bottom: 0;
  padding-bottom: 0;
}

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  padding: 10px 15px;
  cursor: pointer;
}

.carousel-prev {
  left: 20px;
}

.carousel-next {
  right: 20px;
}

/* Contenido */
.content {
  padding: 50px 20px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.company-description,
.contact {
  flex: 1 1 calc(50% - 20px);
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
}

.company-description h2,
.contact h2 {
  font-size: 28px;
  color: #4CAF50;
  margin-bottom: 15px;
}

.company-description p,
.contact p {
  font-size: 16px;
  line-height: 1.6;
  color: #666;
}

/* Footer */
footer {
  background: linear-gradient(to right, #333333, #4CAF50);
  color: #fff;
  padding: 5px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer .social-links {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 5px;
}

footer .social-links img {
  height: 35px;
  width: 35px;
}

footer p {
  font-size: 12px;
  text-align: right;
  margin: 0;
}

/* Sección de Servicios */
.servicios {
  padding: 50px 20px;
  background-color: #ffffff;
  margin-top: 0;
  border-top: 0;
}

.servicios h2 {
  padding-top: 20px;
}

.servicios-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 30px;
}

.servicio-item {
  flex: 1;
  min-width: 300px;
  max-width: 350px;
  text-align: center;
}

.servicio-imagen {
  width: 300px;
  height: 300px;
  overflow: hidden;
  margin: 0 auto 20px;
}

.servicio-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.servicio-titulo {
  color: #4CAF50;
  font-size: 24px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.servicio-descripcion {
  color: #666;
  line-height: 1.6;
  padding: 0 15px;
}

/* Sección de Productos */
.productos-section {
  width: 100%;
  background: #f5f5f5;
  padding: 40px 0;
  overflow: hidden;
}

.productos-carousel {
  position: relative;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

.productos-track {
  display: flex;
  gap: 20px;
  padding: 0 40px;
  transition: transform 0.5s ease;
}

.producto-slide {
  position: relative;
  min-width: 300px;
  height: 200px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.producto-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.producto-slide:hover img {
  transform: scale(1.1);
}

.producto-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(76, 175, 80, 0.9);
  padding: 10px 20px;
  border-radius: 25px;
  white-space: nowrap;
}

.producto-overlay h3 {
  color: white;
  margin: 0;
  font-size: 16px;
  text-transform: uppercase;
  font-weight: 600;
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-button:hover {
  background: white;
}

.carousel-button.prev {
  left: 10px;
}

.carousel-button.next {
  right: 10px;
}

/* Media queries para responsividad */
@media (max-width: 768px) {
  .producto-slide {
    min-width: 250px;
    height: 180px;
  }

  .productos-track {
    gap: 15px;
    padding: 0 30px;
  }
}

@media (max-width: 480px) {
  .producto-slide {
    min-width: 200px;
    height: 150px;
  }

  .productos-track {
    gap: 10px;
    padding: 0 20px;
  }
}

/* Responsive para productos */
@media (max-width: 768px) {
  .productos-grid {
    grid-template-columns: 1fr;
  }
}

.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 992px) {
  .productos-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991px) and (min-width: 768px) {
  .productos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Header y logo en móviles */
@media (max-width: 768px) {
  header {
    position: relative !important;
    height: auto !important;
    padding: 10px 15px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .logo {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    padding: 0 !important;
  }

  .logo img {
    height: 80px !important;
  }

  nav {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    margin-top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.95);
    display: none;
  }

  nav.active {
    display: flex !important;
    justify-content: center;
    align-items: center;
  }

  nav ul {
    flex-direction: column;
    gap: 20px;
  }

  #inicio {
    margin-top: 0 !important; /* eliminamos el margin negativo */
    height: auto !important;
  }

  .carousel-container img {
    height: 300px !important;
    object-fit: cover !important;
  }
}

/* Ajuste para tablets */
@media screen and (max-width: 1024px) {
  .carousel {
    margin-top: -10px; /* lo sube un poco más */
  }
}

/* Ajuste para móviles */
@media screen and (max-width: 768px) {
  .carousel {
    margin-top: -15px; /* lo sube más todavía */
  }
}

/* Ajuste para móviles pequeños */
@media screen and (max-width: 480px) {
  .carousel {
    margin-top: -20px; /* lo mete bien debajo del header */
  }
}

@media (max-width: 767px) {
  .productos-grid {
    grid-template-columns: 1fr;
  }
}

/* Carrusel marcas */
.productos-marca {
  margin-top: 40px;
  text-align: center;
}

#dynamic-carousel {
  width: 100vw;
  overflow: hidden;
  position: relative;
  margin-top: 20px;
}

.carousel-containerM {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel-containerM img {
  width: 100%;
  max-width: 200px;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  margin-top: 10px;
}

/* Botones de navegación */
.nav-buttons {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 15px;
  margin-right: 15px;
  margin-top: 9px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: background-color 0.3s;
}

.rrhh-btn,
.login-btn {
  background-color: transparent;
  color: black;
}

.rrhh-btn:hover,
.login-btn:hover {
  background-color: #4CAF50;
}

.nav-btn img {
  width: 20px;
  height: 20px;
}

/* Menú móvil */
.menu-toggle,
.close-menu {
  display: none;
}

@media screen and (max-width: 1024px) {
  header {
    flex-wrap: wrap;
    height: auto;
    padding: 15px;
    position: relative;
  }

  .menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 30px;
    color: black;
    cursor: pointer;
    padding: 10px;
    position: absolute;
    right: 20px;
    top: 70px;
    z-index: 1001;
  }

  nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    margin: 0;
    padding: 20px;
    z-index: 1000;
  }

  nav.active {
    display: block;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
    padding-top: 60px;
  }

  nav ul li {
    margin: 15px 0;
  }

  nav ul li a {
    font-size: 1.2em;
    padding: 15px;
  }

  .close-menu {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    background: none;
    border: none;
    cursor: pointer;
  }

  nav.active .close-menu {
    display: block;
  }

  .nav-buttons {
    position: absolute;
    top: 15px;
    right: 20px;
    display: flex;
    flex-direction: row;
    gap: 15px;
    z-index: 1001;
  }

  .nav-btn {
    background-color: transparent;
    padding: 8px 12px;
  }

  .nav-btn img {
    width: 18px;
    height: 18px;
  }

  .nav-btn p {
    font-size: 12px;
    margin: 0;
  }
}

/* Ajustes extra responsive omitidos aquí para brevedad... */

/* Última media query corregida */
@media (min-width: 1600px) {
  body {
    width: 100vw;
    font-size: 18px;
  }

  .contenedor-principal {
    padding: 0 80px;
    gap: 40px;
  }

  h1 {
    font-size: 3rem;
  }
  /* ========================================
   SOLUCIÓN URGENTE - AGREGAR AL FINAL DEL CSS
   ======================================== */

/* CORRECCIÓN INMEDIATA PARA PANTALLAS GRANDES */
@media (min-width: 1440px) {
  
  /* EVITAR OVERFLOW HORIZONTAL */
  html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }
  
  /* CORREGIR HEADER */
  header {
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
  }
  
  /* CORREGIR NAVEGACIÓN */
  nav {
    position: absolute !important;
    right: 2% !important;
    max-width: 50% !important;
    top: 0 !important;
    margin-top: 120px !important;
  }
  
  nav ul {
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
  }
  
  nav ul li {
    margin: 0 8px !important;
  }
  
  nav ul li a {
    font-size: 14px !important;
    padding: 8px 12px !important;
  }
  
  /* CORREGIR BOTONES DE NAVEGACIÓN */
  .nav-buttons {
    position: absolute !important;
    top: 20px !important;
    right: 2% !important;
    max-width: 30% !important;
    gap: 10px !important;
  }
  
  /* CORREGIR CARRUSEL PRINCIPAL */
  #inicio {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  
  .carousel-container {
    width: 100% !important;
    overflow: hidden !important;
  }
  
  .carousel-container img {
    width: 100% !important;
    max-width: 100% !important;
    object-fit: cover !important;
  }
  
  /* CORREGIR CONTENIDO PRINCIPAL */
  .content {
    max-width: 1200px !important;
    margin: 0 auto !important;
    width: 100% !important;
    padding: 50px 40px !important;
  }
  
  /* CORREGIR SERVICIOS */
  .servicios {
    width: 100% !important;
    max-width: 100% !important;
    padding: 50px 40px !important;
  }
  
  .servicios-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    width: 100% !important;
  }
  
  /* CORREGIR PRODUCTOS */
  .productos-section {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  
  .productos-carousel {
    max-width: 1200px !important;
    margin: 0 auto !important;
  }
  
  /* CORREGIR CARRUSEL DE MARCAS */
  #dynamic-carousel {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  
  .carousel-containerM {
    max-width: 1200px !important;
    margin: 0 auto !important;
  }
  
  /* CORREGIR FOOTER */
  footer {
    width: 100% !important;
    max-width: 100% !important;
    padding: 15px 40px !important;
  }
}

/* PARA PANTALLAS MUY GRANDES (17+ pulgadas) */
@media (min-width: 1680px) {
  
  .content,
  .servicios-container,
  .productos-carousel,
  .carousel-containerM {
    max-width: 1400px !important;
  }
  
  .servicios,
  .content {
    padding: 60px 80px !important;
  }
  
  footer {
    padding: 20px 80px !important;
  }
}

/* PARA PANTALLAS ULTRA GRANDES (19+ pulgadas) */
@media (min-width: 1920px) {
  
  .content,
  .servicios-container,
  .productos-carousel,
  .carousel-containerM {
    max-width: 1600px !important;
  }
  
  .servicios,
  .content {
    padding: 80px 100px !important;
  }
  
  footer {
    padding: 25px 100px !important;
  }
}

/* CORRECCIÓN UNIVERSAL PARA EVITAR ELEMENTOS QUE SE SALEN */
* {
  box-sizing: border-box !important;
}

*:not(html):not(body):not(header):not(footer):not(#inicio):not(.productos-section):not(#dynamic-carousel) {
  max-width: 100% !important;
}
}