/* Reset y configuración básica */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Nunito', sans-serif;
  background-color: #fdf6f0; /* Crema suave */
  color: #5a4a42; /* Marrón suave */
  line-height: 1.6;
}

/* Cabecera */
header {
  background-color: #f8e9e1; /* Rosa muy claro */
  padding: 1rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1rem;
}

#logo-img {
  width: 80px;
  height: auto;
  border-radius: 50%;
  background: #fff;
  padding: 0 px;
}

header h1 {
  font-size: 3rem;
  font-family: "Patrick Hand", cursive;
  color: #8f5f5f; /* Rosa pastel */
}

/* Menú */
nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: #8b6b6b;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  transition: background 0.3s;
}

nav a:hover {
  background-color: #f0d9d1;
}

/* Carrusel */
.carousel {
  margin: 2rem auto;
  max-width: 600px;
  width: 90%;
  aspect-ratio: 4 / 3;
  position: relative;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
}

/* Opcional: asegurar compatibilidad en móviles antiguos */
@supports not (aspect-ratio: 1) {
  .carousel {
    height: calc(90vw * 3 / 4); /* 90% del viewport width × (3/4) */
    max-height: 450px; /* equivalente a 600px * 3/4 */
  }
}

.carousel-images {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.5s ease-in-out;
}

.carousel-slide {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block; /* evita espacio extra debajo de imágenes inline */
}


/* Contenido */
main {
  padding: 0 1.5rem 2rem;
}

.content-section {
  display: none;
  animation: fadeIn 0.6s ease;
}

.content-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

h2 {
  text-align: center;
  margin-bottom: 1.2rem;
  color: #c98b8b;
}

/* ==== NUEVA SECCIÓN DE PRODUCTOS ==== */
/* ==== PRODUCTOS ==== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 productos en escritorio */
  gap: 1.5rem;
  justify-items: center;
  align-items: start;
  margin-top: 2rem;
}

.product-item {
  text-align: center;
  max-width: 200px; /* más pequeño para que entren los 4 */
}

.product-card h3 {
  font-family: "Patrick Hand", cursive;
  color: #7c7c7c;
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
}

/* Carrusel de productos */
.product-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; /* ahora es cuadrado */
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  margin: 0 auto 0.8rem;
}


.product-carousel .carousel-images {
  display: flex;
  transition: transform 0.4s ease-in-out;
}

.product-carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Botones de navegación */
.product-carousel button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  color: #a87c7c;
  transition: background 0.3s;
}

.product-carousel button:hover {
  background: #f0d9d1;
}

.product-carousel .prev { left: 5px; }
.product-carousel .next { right: 5px; }

.product-item p {
  color: #7a5e5e;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* ====== RESPONSIVE ====== */

/* En tablets: 2 productos por fila */
@media (max-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* En móvil: 1 debajo de otro */
@media (max-width: 600px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}
/*PRECIO*/
.product-price {
  /* 1. Tipografía Grande y Clara */
  font-size: 1.25rem;          /* Tamaño destacado */
  color: #1a1a1a;             /* Negro sólido para lectura fácil */
  font-weight: 700;           /* Negrita */
  line-height: 1;             /* Evita espacios extra arriba/abajo */

  /* 2. El estilo "Tarjeta" o "Etiqueta" */
  background-color: #ffffff;  /* Fondo blanco */
  border: 1px solid #bc5ca1;  /* Borde gris muy sutil para definir la caja */
  border-radius: 8px;         /* Bordes redondeados modernos */
  padding: 6px 12px;          /* Espacio interior (relleno) */

  /* 3. La Sombra (Efecto Elevado) */
  box-shadow: 0 4px 6px -1px rgba(178, 194, 202, 0.55), 
              0 2px 4px -1px rgba(0, 0, 0, 0.06);

  /* 4. Posición y Alineación */
  display: inline-block;      /* Hace que la caja se ajuste al tamaño del número */
  text-align: left;           /* Alineación del texto interno */
  margin-top: 0.5rem;         /* Espacio superior */
  margin-left: 0;             /* Asegura que empiece desde la izquierda */
}
.products-info {
  text-align: center;
  font-size: 0.9rem;
  color: #666666; /* gris suave, no llamativo */
  margin-top: 15px;
  font-style: italic;
}



/* Formulario */
.productos-pedido {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 15px 0;
}

.producto-linea {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 300px;
  gap: 10px;
}
.producto-linea label {
  width: 130px;     /* 👈 todos los textos iguales */
  flex-shrink: 0;   /* evita que se achique */
}

.producto-linea input {
  flex: 1;          /* el input se estira igual en todos */
  max-width: 200px; /* opcional: limita el tamaño */
}

/* ... (el resto del CSS igual) ... */
#order-form {
  max-width: 600px;
  margin: 0 auto;
  background: #fff9f5;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

#order-form label {
  display: block;
  margin: 1rem 0 0.4rem;
  font-weight: 600;
  color: #7a5e5e;
}

#order-form input,
#order-form select {
  width: 100%;
  padding: 10px;
  border: 2px solid #f0d9d1;
  border-radius: 10px;
  font-size: 1rem;
}

#order-form button {
  width: 100%;
  padding: 12px;
  background-color: #d4a5a5;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  cursor: pointer;
  transition: background 0.3s;
}

#order-form button:hover {
  background-color: #c08a8a;
}

/* Mensajes */
.mensaje-oculto {
  display: none;
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
}

.alerta {
  background-color: #fff0f0;
  color: #c0392b;
  border: 1px solid #f5c6cb;
}

/* Footer */
footer {
  background-color: #f8e9e1;
  padding: 1.5rem;
  text-align: center;
  margin-top: 2rem;
  color: #8b6b6b;
}

footer a {
  color: #c98b8b;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
  header h1 {
    font-size: 1.4rem;
  }

  nav ul {
    gap: 1rem;
    flex-direction: column;
    align-items: center;
  }

  .carousel {
    height: 200px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
#mensaje {
  width: 100%;            /* Ocupa todo el ancho del formulario */
  min-height: 150px;      /* Lo hace más alto */
  padding: 15px;          /* Espacio interno cómodo */
  border: 2px solid #ff69b4; /* Borde color llamativo (rosado) */
  border-radius: 10px;    /* Esquinas redondeadas */
  font-size: 1rem;        /* Texto más grande */
  font-family: 'Inter', sans-serif;
  resize: vertical;       /* Solo permite cambiar la altura */
  background-color: #fff0f5; /* Color de fondo suave */
  transition: all 0.3s ease; /* Animación suave al enfocar */
}

#mensaje:focus {
  border-color: #ff1493;  /* Borde más intenso al enfocar */
  box-shadow: 0 0 10px rgba(255, 20, 147, 0.3); /* Brillo alrededor */
  outline: none;           /* Quitar borde azul por defecto */
}

/* ====== HERO (texto centrado siempre) ====== */
.hero-content {
  display: flex;
  align-items: center;       /* centra verticalmente el texto respecto al carrusel */
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;        /* texto centrado horizontalmente dentro de su bloque */
  gap: 5rem;                 /* distancia horizontal entre texto y carrusel */
  max-width: 1200px;
  margin: 0 auto;
}

.hero-text {
  flex: 1 1 400px;           /* ancho relativo del texto */
  color: #7a5e5e;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;   /* centra verticalmente el contenido del texto */
}

.hero-text h2 {
  margin-bottom: 1rem;
}

.hero .carousel {
  flex: 1 1 350px;
  max-width: 500px;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
}




/* Títulos y párrafos */
.hero-text h2 {
  font-family: "Patrick Hand", cursive;
  color: #c98b8b;
  font-size: 2rem;
  margin-bottom: 1rem;
}

#about h2 {
  margin-top: 2rem; /* aumenta el espacio arriba del título */
}
#order h2 {
  margin-top: 2rem;
  margin-bottom: 2.5rem;
}
#products h2 {
  margin-top: 2rem;
  margin-bottom: 2rem;
}
 
.hero-text p {
  font-size: 1.1rem;
  line-height: 1.5;
  max-width: 500px;
  margin: 0 auto; /* centra el bloque de párrafo */
}

/* Carrusel */
.hero .carousel {
  flex: 2 1 500px;   /* ahora ocupa más espacio que el texto */
  aspect-ratio: 4 / 3;
  max-width: 800px;  /* fotos más grandes */
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
}
/* Carrusel del hero */
.hero .carousel-slide {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  flex-shrink: 0; /* ← esto evita compresión */
}


/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        text-align: center;
        margin: 0 auto;
        /* 💡 Clave: asegurar que ocupe todo el ancho y forzar el cálculo de altura */
        width: 100%; 
        min-height: 1px; /* Soluciona muchos bugs de flexbox en Safari */
    }

    .hero .carousel {
        /* Forzamos un ancho para que aspect-ratio funcione */
        width: 90%; 
        max-width: 400px;
        /* Aseguramos que el alto se calcule automáticamente basado en el ancho */
        height: auto; 
    }

  .hero-text {
    flex: unset;
    width: 100%;
    padding: 0 1rem;
  }

  .hero .carousel {
    width: 100%;
    max-width: 400px;
  }
}

.btn-como-funciona {
  display: inline-block !important;       /* fuerza que sea inline-block */
  padding: 12px 24px !important;
  background-color: #d4a5a5 !important;
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  border-radius: 10px !important;
  text-decoration: none !important;       /* elimina cualquier subrayado */
  text-align: center !important;
  cursor: pointer !important;
  transition: background 0.3s !important;
}

.btn-como-funciona:hover {
  background-color: #c08a8a !important;
  text-decoration: none !important;
}

/* Sub-sección ¿Cómo funciona? dentro de Sobre Nosotros */
.content-subsection {
  margin-top: 2rem;
  text-align: center;      /* centra todo el contenido */
}

.content-subsection h3 {
  font-family: 'Nunito', sans-serif;
  color: #c98b8b;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.content-subsection ul {
  display: inline-block;   /* centra la lista */
  text-align: left;        /* viñetas alineadas a la izquierda */
  list-style-type: disc;
  color: #7a5e5e;
  line-height: 1.6;
  margin: 0 auto;          /* centra el bloque */
  padding-left: 1.2rem;    /* espacio para viñetas */
}


/* ====== GRID DE PRODUCTOS ====== */
.products-container {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  justify-items: center;
  align-items: start;
  margin: 2rem auto;
  max-width: 1200px;
}

/* Tarjetas individuales */
.product-card {
  text-align: center;
  background-color: #fff8f8;
  padding: 1rem;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.product-card:hover {
  transform: scale(1.03);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
  .products-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .products-container {
    grid-template-columns: 1fr;
  }
}
/* ====== Sublistas dentro de "¿Cómo funciona?" ====== */
/* Ajuste para listas dentro de "¿Cómo funciona?" */
.content-subsection ul {
  display: block;          /* <-- antes era inline-block */
  text-align: left;
  list-style-type: disc;
  color: #7a5e5e;
  line-height: 1.6;
  margin: 0 auto;
  padding-left: 2rem;      /* un poco más de espacio para viñetas */
  max-width: 700px;        /* mantiene la lista centrada visualmente */
}

/* Sublistas */
.content-subsection ul ul {
  display: block;           /* fuerza que aparezcan debajo */
  list-style: none;
  font-size: 0.95em;
  margin-top: 0.4rem;
  margin-left: 1.2rem;
  color: inherit;
}

.content-subsection ul ul li::before {
  content: "✔";             /* check rosa */
  color: #ff69b4;
  font-weight: bold;
  display: inline-block;
  margin-right: 0.5rem;
  transform: translateY(1px);
}

/* Contenedor flex de Sobre Nosotros */
.about-container {
  display: flex;
  align-items: center;       /* Centra verticalmente el texto y la imagen */
  justify-content: center;   /* Centra horizontalmente todo el bloque */
  gap: 2rem;                 /* Espacio entre imagen y texto */
  flex-wrap: wrap;           /* Para que en móvil se ponga en columna */
  margin-top: 1.5rem;
}

/* Texto dentro del contenedor */
.about-text {
  flex: 1 1 300px;           /* ancho flexible mínimo de 300px */
  max-width: 600px;
  text-align: left;
}

/* Imagen circular */
.about-image img {
  width: 200px;              /* tamaño de la imagen */
  height: 200px;             /* igual altura para que sea cuadrada */
  border-radius: 50%;        /* hace la imagen circular */
  object-fit: cover;         /* recorta la imagen si es necesario */
  border: 4px solid #f0d9d1; /* opcional: borde rosa suave */
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Responsive: en pantallas pequeñas, imagen debajo del texto */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    margin: 0 auto;
    width: 100%;
    min-height: 1px;
    overflow: hidden;
    display: block; /* evita comportamientos extraños de flex children */
  }

  .hero .carousel {
    width: 90vw; /* usa viewport width para mayor control */
    max-width: 400px;
    aspect-ratio: 4 / 3;
  }

  /* Fallback para navegadores que no soportan aspect-ratio */
  @supports not (aspect-ratio: 1) {
    .hero .carousel {
      height: calc(90vw * 3 / 4); /* 75% del ancho */
      max-height: 300px;
    }
  }
}
.hero .carousel {
  min-height: unset;
  height: fit-content;
}
.carousel-images {
  min-height: 0;
}








