@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* ---------------- PANTALLA DE CARGA ---------------- */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeOut 3s forwards;
}

.preloader-logo {
  width: 150px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    visibility: visible;
  }

  100% {
    opacity: 0;
    visibility: hidden;
  }
}

/* ---------------- RESETEO ---------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  list-style: none;
}


body {
  font-family: 'Poppins', sans-serif;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ---------------- HEADER ---------------- */
.header {
  min-height: 10vh;
  display: flex;
  align-items: center;
}


.header-txt {
  text-align: center;
}

/* Ajuste responsivo del header-content */
.header-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  /* Acomoda el texto, botón y logos en columna */
  justify-content: center;
  align-items: center;
  text-align: center;

  box-sizing: border-box;
}

.header-txt h1 {
  font-size: clamp(28px, 6vw, 70px);
  /* Ajuste automático de tamaño */
  ;
  color: #6c8d43;
}

.header-txt p {
  font-size: clamp(14px, 2.5vw, 18px);
  color: #6c8d43;
}

.header-txt h2 {
  font-size: clamp(20px, 4vw, 50px);
  color: #6c8d43;
}

@media (max-width: 768px) {
  .header-content {
    padding: 100px 15px;
  }

}

/* Extra ajuste para pantallas muy pequeñas (teléfonos) */
@media (max-width: 480px) {
  .header-content {
    padding: 80px 10px;
  }

  .header-txt h1 {
    font-size: 26px;
  }

  .header-txt h2 {
    font-size: 20px;
  }

}

.menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  backdrop-filter: blur(2px);
  /* opcional efecto difuminado */
  ;
}

.logo img {
  height: 70px;
  transition: transform 0.3s ease;
}

.menu .navbar ul li {
  position: relative;
  float: left;
}

.menu .navbar ul li a {
  font-size: 18px;
  padding: 20px;
  color: #6c8d43;
  font-weight: 600;
}

#menu {
  display: none;
}

.menu-icon {
  width: 50px;
  height: auto;
}

.menu label {
  cursor: pointer;
  display: none;
}

/* Estilo general del menú */
.navbar {
  display: flex;
  gap: 20px;
}


.navbar li {
  position: relative;
}

/* Link principal */
.navbar a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 15px;
  display: block;
}



/* Estilo del desplegable oculto */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  /* debajo del enlace padre */
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  z-index: 1000;
  max-height: 250px;
  /* puedes ajustar según tu diseño */
  overflow-y: auto;
  /* ancho fijo */
}

/* Poner las opciones en columna */
.dropdown-menu li {
  width: 100%;
}

.dropdown-menu li a {
  padding: 10px 15px;
  color: #fff;
  display: block;
  text-align: left;
}

.dropdown-menu li a:hover {
  background: #d7e2c9;
  color: #333;
}

/* Mostrar el menú al pasar mouse */
.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu::-webkit-scrollbar {
  width: 8px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: #999;
}


/* Menú responsive */
/* Ocultar menú por defecto en móvil */
.menu label {
  cursor: pointer;
  display: none;
}

#menu {
  display: none;
}

@media(max-width: 991px) {
  .menu label {
    display: block;
    /* El ícono del menú aparece */
  }

  .navbar {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    display: none;
    flex-direction: column;
  }

  #menu:checked~.navbar {
    display: flex;
    /* Muestra el menú al hacer click en el ícono */
  }

  .navbar ul {
    width: 100%;
    flex-direction: column;
  }

  .navbar li {
    width: 100%;
  }

  .navbar li a {
    padding: 15px;
    display: block;
    color: #6c8d43;
  }
}



/* -------- PRODUCTO DETALLE -------- */
.producto-detalle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 50px auto;
}

.galeria {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.slider {
  display: flex;
  width: 300%;
  animation: cambio 12s infinite;
}

.slide {
  width: 100%;
  flex-shrink: 0;
}

.slide img {
  width: 35%;
  display: block;
}

@keyframes cambio {

  0%,
  30% {
    transform: translateX(0%);
  }

  35%,
  65% {
    transform: translateX(-100%);
  }

  70%,
  100% {
    transform: translateX(-200%);
  }
}

.indicadores {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.indicadores span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
}

.indicadores span:nth-child(1) {
  animation: activeDot 12s infinite;
}

.indicadores span:nth-child(2) {
  animation: activeDot 12s infinite 4s;
}

.indicadores span:nth-child(3) {
  animation: activeDot 12s infinite 8s;
}

@keyframes activeDot {

  0%,
  30% {
    background: #6c8d43;
  }

  35%,
  100% {
    background: #ddd;
  }
}

.descripcion {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-align: justify;
}

.descripcion h2 {
  color: #6c8d43;
  margin-bottom: 10px;
}

.descripcion ul {
  margin-top: 15px;
  padding-left: 20px;
}

.descripcion li {
  margin-bottom: 8px;
}

.descripcion a {
  color: #ffffff;
  background-color: #6b8e23;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
}

.descripcion a:hover {
  background-color: #557a1f;
}

/* ====== BOTÓN DESCARGAR RESPONSIVO ====== */
.btn-descargar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #6b8e23;
  /* verde institucional */
  color: #ffffff;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.btn-descargar:hover {
  background-color: #557a1f;
}

/* Ícono inicialmente oculto */
.btn-descargar i {
  display: none;
  font-size: 18px;
}

/* Texto visible normalmente */
.btn-descargar .texto {
  display: inline;
}

/* En pantallas pequeñas: mostrar solo el ícono */
@media (max-width: 600px) {
  .btn-descargar .texto {
    display: none;
  }

  .btn-descargar i {
    display: inline;
  }
}



/* -------- FOOTER -------- */
footer {
  text-align: center;
  padding: 20px;
  border-top: 1px solid #ddd;
  margin-top: 40px;
}

footer p {
  color: #6c8d43;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 900px) {
  .producto-detalle {
    grid-template-columns: 1fr;
  }
}