body { 
  font-family: Arial, sans-serif; 
  margin: 0; 
  padding: 0; 
}

header { 
  display: flex; 
  justify-content: space-between; 
  padding: 10px 20px; 
  background: #4CAF50; 
  color: white; 
  flex-wrap: wrap;
  align-items: center;
}

header .logo { 
  font-weight: bold; 
  font-size: 20px; 
}

header nav a { 
  margin-left: 15px; 
  color: white; 
  text-decoration: none; 
}

/* MAIN */
main { 
  padding: 20px; 
}

/* PRODUCTOS - GRID PRO */
#productos { 
  display: grid; 
  grid-template-columns: repeat(5, 1fr); /* 💻 5 columnas */
  gap: 10px; 
}

/* TARJETAS IGUALES */
.producto { 
  border: 1px solid #ccc; 
  padding: 10px; 
  width: auto; /* 🔥 IMPORTANTE PARA GRID */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
  background:#fff;
  border-radius:12px;
  box-shadow:0 8px 20px rgba(0,0,0,0.08);
  transition:0.3s;
}

.producto:hover{
  transform:translateY(-5px);
}

/* IMAGEN */
.producto img { 
  max-width: 100%; 
  height: 150px; 
  object-fit: cover;
  display: block; 
  margin-bottom: 10px; 
  border-radius:8px;
  cursor:pointer;
}

/* BOTONES COMPARTIR */
.compartir{
  margin-top:10px;
  display:flex;
  gap:10px;
  justify-content:center;
  flex-wrap:wrap;
}

.btn-share{
  padding:8px 10px;
  border-radius:20px;
  color:#fff;
  text-decoration:none;
  font-size:13px;
  transition:0.3s;
  min-width:100px;
  text-align:center;
}

/* FACEBOOK */
.btn-share.fb{
  background:linear-gradient(90deg,#1877f2,#0f5cc0);
}

/* WHATSAPP */
.btn-share.wa{
  background:linear-gradient(90deg,#25d366,#1da851);
}

/* COPIAR */
.btn-share.copy{
  background:#555;
  border:none;
  cursor:pointer;
}

/* HOVER BOTONES */
.btn-share:hover{
  transform:scale(1.05);
}

/* TEXTO SOLO 1 LINEA */
.descripcion{
  display:-webkit-box;
  -webkit-line-clamp:1;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* BOTÓN VER MÁS */
.ver-mas{
  margin-top:8px;
  background:none;
  border:none;
  color:#2e7d32;
  font-weight:bold;
  cursor:pointer;
}

/* MODAL POPUP */
.modal-texto{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.6);
  display:flex;
  justify-content:center;
  align-items:center;
  z-index:9999;
}

.modal-contenido{
  background:#fff;
  padding:20px;
  border-radius:15px;
  max-width:500px;
  width:90%;
  max-height:80%;
  overflow-y:auto;
  text-align:left;
}

.modal-contenido h2{
  margin-top:0;
}

.modal-contenido .cerrar{
  margin-top:15px;
  padding:10px 20px;
  border:none;
  background:#2e7d32;
  color:#fff;
  border-radius:10px;
  cursor:pointer;
}

/* RESPONSIVE */
@media (max-width:1024px){
  #productos{
    grid-template-columns: repeat(3, 1fr); /* tablet */
  }
}

@media (max-width:600px){
  header{
    flex-direction:column;
    gap:10px;
    text-align:center;
  }

  header nav a{
    display:inline-block;
    margin:5px;
  }

  #productos{
    grid-template-columns: repeat(2, 1fr); /* 📱 2 columnas */
  }

  .producto{
    width:100%;
  }
}