:root {
  --parchment: #f0ead2;
  --tea-green: #dde5b6;
  --olivine: #adc178;
  --chamoisee: #a98467;
  --umber: #6c584c;
}

body {
  font-family: 'Quicksand', sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--parchment);
  color: var(--umber);
}

header {
  background-color: var(--tea-green);
  text-align: center;
  padding: 2rem;
  color: var(--umber);
}

nav {
  background-color: var(--olivine);
  padding: 1rem;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav a {
  text-decoration: none;
  color: white;
  font-weight: bold;
}

.contenedor {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 4rem;
}

section h2 {
  text-align: left;
  font-size: 1.6rem;
  margin-bottom: 1rem;
  border-left: 5px solid var(--olivine);
  padding-left: 1rem;
  color: var(--umber);
}

#inicio {
  background: url('img/banner-plantitas-urbanas.jpg') center/cover no-repeat;
  height: 400px;
}

#productos {
  padding: 2rem 0;
}

.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card img {
  width: 200px;
  height: auto;
  object-fit: cover;
  display: block;
  margin: 0 auto 0.5rem;
  border-radius: 8px;
}

.card h3 {
  margin: 0.5rem 0 0.2rem;
  color: var(--umber);
  font-size: 1.1rem;
}

.card p {
  margin: 0.3rem 0;
  font-size: 0.95rem;
  color: var(--umber);
}

.precio {
  font-weight: bold;
  color: var(--chamoisee);
  font-size: 1rem;
}

form {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: auto;
}

input,
textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #fff;
  font-family: 'Quicksand', sans-serif;
}

button {
  background-color: var(--olivine);
  color: white;
  padding: 0.8rem;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  font-size: 1rem;
}

button:hover {
  background-color: var(--chamoisee);
}

footer {
  background-color: var(--umber);
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
}

#reseñas {
  padding: 2rem 0;
}

.grid-reseñas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.reseña {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  font-style: italic;
}

.reseña span {
  display: block;
  margin-top: 1rem;
  font-weight: bold;
  color: var(--chamoisee);
}

/* =====================
   Carrito lateral fijo
===================== */

#carrito {
  position: fixed;
  top: 100px;
  right: 0;
  width: 300px;
  max-height: 80vh;
  overflow-y: auto;
  background-color: white;
  border-left: 2px solid var(--olivine);
  box-shadow: -2px 0 6px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  z-index: 999;
  border-radius: 10px 0 0 10px;
  transition: transform 0.3s ease-in-out;
}

#carrito h2 {
  font-size: 1.2rem;
  margin-top: 0;
}

.carrito-contenedor {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

#lista-carrito {
  list-style: none;
  padding: 0;
  margin: 0;
}

#lista-carrito li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

#lista-carrito img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 0.5rem;
}

#total-carrito {
  font-weight: bold;
  text-align: right;
  margin-top: 1rem;
}

#vaciar-carrito {
  background-color: var(--chamoisee);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 5px;
  cursor: pointer;
  align-self: flex-end;
}

#vaciar-carrito:hover {
  background-color: var(--umber);
}

/* Botón flotante para abrir/cerrar carrito en mobile */
#toggle-carrito {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--olivine);
  color: white;
  border: none;
  border-radius: 50%;
  padding: 1rem;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 1000;
  display: none;
}

#toggle-carrito:hover {
  background-color: var(--chamoisee);
}

#carrito.oculto {
  transform: translateX(100%);
}

/* =====================
   Media Queries
===================== */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    align-items: center;
  }

  .contenedor {
    padding: 1rem;
  }

  form {
    width: 90%;
  }

  iframe {
    width: 100%;
    height: auto;
  }

  #toggle-carrito {
    display: block;
  }

  #carrito {
    top: 0;
    right: 0;
    bottom: 0;
    height: 100vh;
    max-height: none;
    width: 100%;
    border-radius: 0;
    box-shadow: none;
    padding: 2rem 1rem;
  }
}