* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Estilos generales */
body {
  font-family: Arial, sans-serif;
  background-color: #fff0f5;
}

/* Encabezado */
header {
  background-color: #ff69b4;
  color: white;
  padding: 20px;
  text-align: center;
}

header img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover; /* Para asegurarte de que no se deforme */
}

/* Navegación */
nav {
  background-color: #ff1493;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

nav li {
  margin: 0 15px;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

/* Contenido principal */
main {
  padding: 20px;
}

section h2 {
  text-align: center;
  color: #cc0066;
}

article {
  text-align: center;
  margin-bottom: 20px;
}

/* Galería de flores */
.galeria {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.caja {
  width: 200px;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px;
  background-color: #fff;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.caja:hover {
  transform: scale(1.05);
}

.caja img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.caja figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: #555;
}

/* Aside */
aside {
  background-color: #ffe4f2;
  padding: 15px;
  margin-top: 20px;
  border-radius: 10px;
  text-align: center;
}

/* Formulario de contacto */
form {
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

input,
textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
}

button {
  background-color: #ff69b4;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #ff1493;
}

/* Pie de página */
footer {
  background-color: #ff69b4;
  color: white;
  text-align: center;
  padding: 15px;
  margin-top: 30px;
  position: relative;
  bottom: 0;
  width: 100%;
}

/* Carrito de compras */
#carrito div {
  margin-bottom: 10px;
  padding: 8px;
  background: #fff0f5;
  border: 1px solid #ffc0cb;
  border-radius: 5px;
}

#carrito button {
  background-color: #ff4d6d;
  color: white;
  border: none;
  padding: 5px 8px;
  margin-left: 10px;
  border-radius: 5px;
  cursor: pointer;
}

#carrito button:hover {
  background-color: #cc0033;
}

#formPedido {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}

#formPedido input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

#formPedido button {
  background-color: #ff69b4;
  color: white;
  font-weight: bold;
  border: none;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
}

#formPedido button:hover {
  background-color: #ff1493;
}

#respuesta {
  margin-top: 10px;
  font-weight: bold;
}

.mensaje-carrito {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  padding: 10px;
  margin: 10px 20px;
  border-radius: 4px;
  display: none;
  text-align: center;
  font-weight: bold;
}

/* WhatsApp flotante */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 4px 6px 12px rgba(0, 0, 0, 0.35);
}

.whatsapp-icon {
  width: 40px;
  height: 40px;
}

/* ==========================
   MEDIA QUERIES RESPONSIVE
   ========================== */

/* Dispositivos móviles (≤767px) */
@media (max-width: 767px) {
  nav ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .galeria {
    flex-direction: column;
    align-items: center;
  }

  .caja {
    width: 90%;
  }

  form,
  #formPedido {
    width: 90%;
  }

  .mensaje-carrito {
    margin: 10px;
  }

  #tidio-chat {
    right: auto !important;
    left: 10px !important;
    bottom: 10px !important;
  }

  .whatsapp-float {
    bottom: 70px;
  }
  
}

.toast {
  visibility: hidden;
  min-width: 280px;
  background-color: #28a745;
  color: white;
  text-align: center;
  border-radius: 8px;
  padding: 16px;
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.5s ease-in-out, visibility 0s linear 0.5s;
}

.toast.mostrar {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}


/* Tablets (768px a 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  nav ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .caja {
    width: 45%;
  }

  .galeria {
    justify-content: space-around;
  }

  form,
  #formPedido {
    width: 80%;
  }
}

/* Escritorio (≥1024px) */
@media (min-width: 1024px) {
  .caja {
    width: 200px;
  }

  .galeria {
    justify-content: center;
  }

  form,
  #formPedido {
    width: 400px;
  }
}
