/* ====== Estilos globales ====== */
:root {
  --rosa: #F4ACB7;        /* color principal */
  --turquesa: #2EC3B5;    /* acento complementario */
  --verde-oscuro: #2F433A; /* fondo elegante */
  --blanco: #ffffff;      /* contraste */
  --gris: #555555;        /* texto secundario */
}

body {
  margin: 0;
  font-family: 'Lato', sans-serif;
  background: var(--blanco);
  color: var(--verde-oscuro);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  margin: 0;
}

/* ====== Hero principal ====== */
.hero {
  position: relative;
  min-height: 100vh;
  background: url('/img/hero.jpg') no-repeat center center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blanco);
  overflow: hidden;
}

.hero .overlay {
  position: absolute;
  inset: 0;
  background: rgba(47,67,58,0.6); /* verde oscuro translúcido */
  z-index: 1;
}

.hero-content {
  position: relative;
  text-align: center;
  z-index: 2;
  max-width: 800px;
  padding: 20px;
}

.hero-content h1 {
  font-size: 4em;
  margin-bottom: 20px;
  color: var(--rosa);
}

.hero-content p {
  font-size: 1.5em;
  margin-bottom: 30px;
  color: var(--blanco);
}

.hero-content .btn {
  background: var(--turquesa);
  color: var(--blanco);
  padding: 15px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2em;
  transition: all 0.3s ease;
}
.hero-content .btn:hover {
  background: var(--rosa);
  color: var(--verde-oscuro);
}

/* ====== Logo en el Hero ====== */
.hero-content .logo {
  width: 120px;
  margin-bottom: 20px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}
.hero-content .logo:hover { transform: scale(1.1); }

/* ====== Productos ====== */
.productos { padding: 60px 20px; text-align: center; }
.productos h2 { font-size: 2.5em; color: var(--rosa); margin-bottom: 40px; }
.grid { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }

.card {
  background: var(--blanco);
  border: 2px solid var(--rosa);
  border-radius: 12px;
  width: 250px;
  padding: 20px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.12);
  transition: transform 0.3s ease;
}
.card:hover { transform: translateY(-5px); }
.card img { width: 100%; border-radius: 8px; }
.card h3 { color: var(--verde-oscuro); margin: 15px 0 10px; }
.card p { color: var(--gris); }

.btn-producto {
  display: inline-block;
  margin-top: 15px;
  background: var(--rosa);
  color: var(--blanco);
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
}
.btn-producto:hover { background: var(--turquesa); color: var(--blanco); }

/* ====== Historia ====== */
.historia { background: var(--gris-claro); padding: 60px 20px; text-align: center; }
.historia h2 { font-size: 2.5em; color: var(--rosa); margin-bottom: 30px; }
.historia p { max-width: 800px; margin: 15px auto; font-size: 1.2em; color: var(--verde-oscuro); line-height: 1.8; }
.historia-img { margin-top: 30px; max-width: 600px; width: 100%; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

/* ====== CTA Intermedio ====== */
.cta-intermedio {
  background: linear-gradient(135deg, var(--rosa), var(--turquesa));
  color: var(--blanco);
  text-align: center;
  padding: 60px 20px;
  margin: 40px 0;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}
.cta-box h2 { font-size: 2.2em; margin-bottom: 20px; }
.cta-box p { font-size: 1.3em; margin-bottom: 30px; }
.btn-cta {
  background: var(--blanco);
  color: var(--verde-oscuro);
  padding: 15px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2em;
  transition: all 0.3s ease;
}
.btn-cta:hover { background: var(--rosa); color: var(--blanco); }

/* ====== Footer ====== */
.footer { background: var(--verde-oscuro); color: var(--blanco); text-align: center; padding: 40px 20px; }
.footer-contenido h3 { font-family: 'Playfair Display', serif; font-size: 1.8em; margin-bottom: 15px; color: var(--rosa); }
.footer-contenido p { margin: 8px 0; font-size: 1.1em; }
.redes { margin-top: 20px; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.redes a img { width: 32px; height: 32px; transition: transform 0.3s ease; }
.redes a img:hover { transform: scale(1.2); }
.footer-copy { margin-top: 25px; font-size: 0.9em; color: var(--turquesa); }

/* ====== Carrito flotante ====== */
.cart-fab {
  position: fixed;
  bottom: 20px; left: 20px;
  background: var(--turquesa);
  color: var(--blanco);
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
  cursor: pointer;
  z-index: 10001;
}
.cart-fab #cart-badge {
  margin-left: 6px;
  background: var(--rosa);
  color: var(--verde-oscuro);
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
}

/* Overlay detrás del carrito */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  z-index: 9999;
}

/* Panel del carrito */
.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 340px;
  max-width: 100%;
  height: 100%;
  background: var(--blanco);
  border-left: 2px solid var(--rosa);
  box-shadow: -4px 0 12px rgba(0,0,0,.22);
  display: flex;
  flex-direction: column;
  z-index: 10000;
}

/* Header fijo arriba */
.cart-header {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  padding: 12px;
  color: var(--verde-oscuro);
  border-bottom: 1px solid #eee;
  background: var(--blanco);
  position: sticky;
  top: 0;
  z-index: 10;
}
.close-cart {
  background: transparent;
  border: none;
  font-size: 1.4em;
  cursor: pointer;
  color: var(--rosa);
  transition: transform 0.2s ease, color 0.2s ease;
}
.close-cart:hover {
  transform: scale(1.2);
  color: var(--turquesa);
}

/* Contenido scrollable */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}
.cart-item {
  margin: 10px 0;
  padding: 8px;
  border-bottom: 1px solid #eee;
}
.cart-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--rosa);
}

/* Controles de cantidad */
.cart-controls {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.cart-controls button {
  background: var(--rosa);
  color: var(--blanco);
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.cart-controls button:hover {
  background: var(--turquesa);
  color: var(--blanco);
}

/* Footer fijo abajo del carrito */
.cart-footer {
  flex-shrink: 0;
  border-top: 1px solid #eee;
  padding: 12px;
  background: var(--blanco);
}
.cart-total {
  font-size: 1.1em;
  color: var(--rosa);
  margin-bottom: 10px;
  text-align: right;
}
#checkout {
  background: var(--turquesa);
  color: var(--blanco);
  padding: 12px;
  border-radius: 25px;
  font-weight: bold;
  width: 100%;
  cursor: pointer;
  transition: background 0.3s ease;
}
#checkout:hover {
  background: var(--rosa);
  color: var(--verde-oscuro);
}

/* ====== Responsive general ====== */
@media (max-width: 768px) {
  .hero-content h1 { font-size: 2.2em; }
  .hero-content p { font-size: 1.1em; }
  .hero-content .btn { font-size: 1em; padding: 12px 20px; }
  .hero-content .logo { width: 80px; }
  .grid { flex-direction: column; align-items: center; }
  .card { width: 90%; max-width: 320px; }

  /* Carrito ocupa toda la pantalla en móviles */
  .cart-panel {
    width: 100%;
    left: 0;
    right: 0;
    border-left: none;
    border-radius: 0;
  }
  .cart-fab {
    bottom: 10px;
    left: 10px;
    padding: 8px 12px;
    font-size: 0.9em;
  }
}

/* ====== Corrección para ocultar carrito y overlay ====== */
.cart-panel[hidden],
.cart-overlay[hidden] {
  display: none !important;
}
.footer-copy {
  margin-top: 25px;
  font-size: 0.9em;
  color: var(--turquesa);
}

.footer-copy .credit {
  margin-top: 8px;
  font-size: 0.85em;
  color: var(--rosa);
}

.footer-copy .credit a {
  color: var(--turquesa);
  text-decoration: none;
  font-weight: bold;
}

.footer-copy .credit a:hover {
  color: var(--rosa);
  text-decoration: underline;
}
