/* === RESETEO GENERAL === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #f6f3eb url('imagenes/texture.jpg');
  color: #2f3e2f;
  overflow-x: hidden;
}

/* === ENCABEZADO === */
header {
  text-align: center;
  padding: 60px 20px;
  animation: fadeIn 1.5s ease-in-out;
}

header img {
  width: 180px;
  margin-bottom: 15px;
  animation: fadeInDown 2s ease;
}

header h1 {
  font-size: 2.5em;
  letter-spacing: 2px;
  color: #3d694c;
}

header p {
  font-size: 1.2em;
  margin-top: 10px;
}

/* === CARRUSEL === */
.carrusel {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.carrusel img {
  width: 100%;
  max-height: 480px;
  object-fit: contain; /* 🔹 evita que se corten las imágenes */
  background-color: #f6f3eb; /* color de fondo para bordes */
  display: none;
  transition: opacity 1s ease-in-out;
}

.carrusel img.activa {
  display: block;
  opacity: 1;
}

.controles {
  position: absolute;
  width: 100%;
  top: 50%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
}

.controles button {
  background-color: rgba(0,0,0,0.4);
  border: none;
  color: #fff;
  font-size: 24px;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s;
}

.controles button:hover {
  background-color: rgba(0,0,0,0.7);
}

.puntos {
  text-align: center;
  margin-top: 10px;
}

.punto {
  height: 12px;
  width: 12px;
  margin: 0 5px;
  background-color: #ccc;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
}

.punto.activo {
  background-color: #4a7c59;
}

/* === NAVEGACIÓN === */
nav {
  background: #4a7c59;
  text-align: center;
  padding: 15px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav a {
  color: #fff;
  text-decoration: none;
  margin: 0 15px;
  font-weight: 500;
  transition: 0.3s;
}

nav a:hover {
  color: #d2f3ce;
}

/* === SECCIONES === */
section {
  padding: 60px 20px;
  max-width: 1100px;
  margin: auto;
  animation: fadeInUp 1.2s ease;
}

h2 {
  text-align: center;
  margin-bottom: 25px;
  color: #4a7c59;
}

/* === PRODUCTOS === */
.productos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform .3s;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card h3 {
  padding: 10px;
  color: #4a7c59;
}

.card p {
  padding: 0 10px 15px;
  color: #555;
}

/* === PIE DE PÁGINA === */
footer {
  background: #4a7c59;
  color: #fff;
  text-align: center;
  padding: 30px 15px;
  margin-top: 50px;
}

footer p {
  margin: 10px 0;
}

/* === BOTÓN WHATSAPP FLOTANTE === */
.whatsapp {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.whatsapp img {
  width: 60px;
  height: 60px;
  cursor: pointer;
  transition: transform .3s;
}

.whatsapp img:hover {
  transform: scale(1.1);
}

/* === ANIMACIONES === */
@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

@keyframes fadeInUp {
  from {opacity: 0; transform: translateY(40px);}
  to {opacity: 1; transform: translateY(0);}
}

@keyframes fadeInDown {
  from {opacity: 0; transform: translateY(-40px);}
  to {opacity: 1; transform: translateY(0);}
}

/* === RESPONSIVO === */
@media (max-width: 768px) {
  header h1 {
    font-size: 2em;
  }
  .carrusel img {
    max-height: 320px;
  }
  .card img {
    height: 160px;
  }
}
