* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== Tipografía base ===== */
body {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-style: normal;
  background-color: #FAF7F8;

  /* --- INICIO DE CAMBIOS: Layout Flexbox --- */
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* El cuerpo ocupa al menos el 100% de la altura */
  /* --- FIN DE CAMBIOS --- */
}

/* ===== Títulos ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
}

/* ===== Ejemplo de refinamiento ===== */
h1 {
  font-size: 2.5rem;
  letter-spacing: 1px;
}

h2 {
  font-size: 2rem;
}

p {
  font-size: 1rem;
  line-height: 1.6;
}


.navbar {
  width: 100%;
  height: 70px;
  background-color:  #F6DCE2;
  display: flex;
  align-items: center;
  justify-content: space-between; /* separa logo - menú - login */
  padding: 0 40px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
}

.img-logo img {
  height: 60px;
  cursor: pointer;
}

/* Menú principal */
.opciones {
  list-style: none;
  display: flex;
  gap: 30px;
  margin-left: 40px;
  flex: 1;
  justify-content: center;
}

/* Enlaces generales */
.opciones li a,
.login a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}

/* Hover enlaces */
.opciones li a:hover,
.login a:hover {
  color: #FAF7F8;
}

/* --- INICIO CAMBIOS: Botón Carrito (Derecha Navbar) --- */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-carrito {
    display: inline-block;
    background-color: #D4AF7F;
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-carrito:hover {
    background-color: #E38C8C;
    transform: scale(1.05);
    color: white; /* Asegura que el texto siga blanco */
}
/* --- FIN CAMBIOS: Botón Carrito --- */


/* Botón de Iniciar Sesión (Estilo de ejemplo, no usado) */
.login a {
  background-color:  #D4AF7F;
  color: white;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.login a:hover {
  background-color: #E38C8C;
  transform: scale(1.05);
}

/* CONTENEDOR GENERAL */
.container {
  width: 100%;
  display: flex;
  flex-direction: column;  /* apila secciones verticalmente */
  align-items: stretch;
  gap: 40px;
  padding: 100px 0 60px; /* deja espacio por la navbar */
  background-color: #FAF7F8;
  
  /* --- INICIO DE CAMBIOS: Layout Flexbox --- */
  /* flex: 1; hace que el contenido principal crezca
     y empuje el footer hacia abajo */
  flex: 1; 
  /* --- FIN DE CAMBIOS --- */
}

/* SECCIÓN QUIÉNES SOMOS (index.php y contactanos.php) */
.quien-somos {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #FAF7F8;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);

  /* --- INICIO DE CAMBIOS: Contenido Centrado --- */
  max-width: 1200px; /* Ancho máximo para el contenido */
  margin: 0 auto; /* Centra el bloque en la página */
  padding: 40px; /* Padding simplificado para móviles */
  /* --- FIN DE CAMBIOS --- */
}

.info {
  flex: 1;
  max-width: 600px;
}

.info h1 {
  font-size: 2.2rem;
  color:  #E8AEB7;
  margin-bottom: 15px;
}

.info p {
  font-size: 1.1rem;
  color: #3A3A3A;
  line-height: 1.6;
}

.info a {
  display: inline-block;
  background-color:  #D4AF7F ;
  color: white;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.info a:hover {
  background-color: #E38C8C;
  transform: scale(1.05);
}

/* Imagen derecha */
.img-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.img-container img {
  width: 400px;
  height: 400px;
  object-fit: contain;
}

/* SECCIÓN OFERTAS (index.php) */
.ofertas-nuevas {
  width: 100%;
  background: #FAF7F8;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;

  /* --- INICIO DE CAMBIOS: Contenido Centrado --- */
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px;
  /* --- FIN DE CAMBIOS --- */
}

/* Título y texto */
.ofertas-nuevas .info {
  max-width: 900px;
}

.ofertas-nuevas .info h1 {
  font-size: 2rem;
  color:  #E8AEB7;
  margin-bottom: 10px;
}

.ofertas-nuevas .info p {
  color: #3A3A3A;
  line-height: 1.6;
}

.ofertas-nuevas .info a {
  display: inline-block;
  background-color:  #D4AF7F ;
  color: #fff;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .3s ease, transform .2s ease;
}

.ofertas-nuevas .info a:hover {
  background: #E38C8C;
  transform: scale(1.03);
}

/* Grid 2x2 productos */
.ofertas-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 20px;
}

/* Tarjeta de producto (index.php y seccion.php) */
.producto {
  background: #FAF7F8;
  border: 1px solid #f0e7fb;
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  transition: box-shadow .25s ease, transform .2s ease;
  display: flex; /* Para alinear botón al fondo */
  flex-direction: column;
}

.producto:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

.producto img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  margin-bottom: 8px;
}

/* --- INICIO CAMBIO: Imagen de producto clickeable --- */
.producto-imagen-clickable {
    width: 100%;
    height: 180px;
    margin-bottom: 8px;
    cursor: pointer;
    overflow: hidden; /* Para el efecto zoom */
}
.producto-imagen-clickable img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.producto:hover .producto-imagen-clickable img {
    transform: scale(1.05); /* Efecto zoom al pasar sobre la tarjeta */
}
/* --- FIN CAMBIO --- */


.producto h3 {
  font-size: 1rem;
  color: #333;
  margin-bottom: 6px;
}

.producto p {
  font-weight: 600;
  color:  #E8AEB7;
  margin-bottom: 10px;
  flex-grow: 1; /* Empuja el botón hacia abajo */
}

/* Botón "Agregar al carrito" en seccion.php */
.btn-agregar-carrito {
  background: #D4AF7F;
  color: #FAF7F8;
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .3s ease, transform .2s ease;
  width: 100%;
  margin-top: auto; /* Se pega al fondo */
}
.btn-agregar-carrito:hover {
  background: #E38C8C;
  transform: scale(1.03);
}


/* CATEGORÍAS (index.php) */
.categorias {
  width: 100%;
  background: #FAF7F8;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  
  /* --- INICIO DE CAMBIOS: Contenido Centrado --- */
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px;
  /* --- FIN DE CAMBIOS --- */
}

.categorias .info {
  max-width: 900px;
}

.categorias .info h1 {
  font-size: 2rem;
  color:  #E8AEB7;
  margin-bottom: 10px;
}

.categorias .info p {
  color: #3A3A3A;
  line-height: 1.6;
}

/* Grid 3x2 */
.categorias-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 20px;
}

/* Tarjetas individuales */
.categoria {
  background: #FAF7F8;
  border: 1px solid #f0e7fb;
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  transition: box-shadow .25s ease, transform .2s ease;
}

.categoria:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

.categoria img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  margin-bottom: 8px;
}

.categoria h3 {
  font-size: 1rem;
  color: #3A3A3A;
  margin-bottom: 10px;
}

/* Botones de categoría */
.categoria button {
  background:   #D4AF7F ;
  color: #FAF7F8;
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .3s ease, transform .2s ease;
}
.categoria a{
  text-decoration: none;
  color: #FAF7F8;
}
.categoria button:hover {
  background: #E38C8C;
  transform: scale(1.03);
}

/* =========================================
   ===== INICIO: ESTILOS DE PÁGINAS =====
   ========================================= */

/* --- Header de Sección (seccion.php) --- */
.seccion-header {
  background-color: #F6DCE2; /* Color navbar */
  padding: 40px;
  border-radius: 14px;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}
.seccion-header h1 {
  color: #E8AEB7; /* Color título rosa */
}
.seccion-header p {
  color: #3A3A3A;
  font-size: 1.1rem;
}

/* --- Grid de Productos (seccion.php) --- */
.productos-page-grid {
  display: grid;
  /* CAMBIO: 4 columnas para desktop */
  grid-template-columns: repeat(4, minmax(220px, 1fr)); 
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Header del Carrito (carrito.php) --- */
.carrito-header {
  background-color: #FFF;
  padding: 40px;
  border-radius: 14px;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}
.carrito-header h1 {
  color: #E8AEB7;
}
.carrito-header p {
  color: #3A3A3A;
  font-size: 1.1rem;
}

/* --- Contenido del Carrito (carrito.php) --- */
.carrito-contenido {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: flex-start;
}
.carrito-productos {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.carrito-item {
  background: #FFF;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid #f0e7fb;
  display: grid;
  grid-template-columns: 40px 100px 1fr auto;
  gap: 20px;
  align-items: center;
}
.producto-checkbox {
  width: 22px;
  height: 22px;
  cursor: pointer;
}
.carrito-item-imagen {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
}
.carrito-item-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sin-imagen {
  color: #aaa;
  font-size: 12px;
  text-align: center;
  background-color: #f4f4f4;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carrito-item-info h3 {
  font-size: 1.2rem;
  color: #3A3A3A;
}
.carrito-item-info .precio {
  font-weight: 600;
  color: #E8AEB7;
  font-size: 1.3rem;
}
.btn-eliminar {
  background: none;
  border: none;
  color: #E38C8C;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.btn-eliminar:hover {
  transform: scale(1.1);
}

/* Resumen del Carrito */
.carrito-resumen {
  position: sticky;
  top: 90px; /* 70px navbar + 20px margen */
}
.resumen-card {
  background: #FFF;
  padding: 30px;
  border-radius: 14px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  border: 1px solid #f0e7fb;
}
.resumen-card h3 {
  font-size: 1.5rem;
  color: #E8AEB7;
  margin-bottom: 20px;
  border-bottom: 1px solid #f0e7fb;
  padding-bottom: 10px;
}
.resumen-linea {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 1rem;
  color: #3A3A3A;
}
.resumen-linea.total {
  font-size: 1.3rem;
  font-weight: 600;
  border-top: 1px solid #f0e7fb;
  margin-top: 10px;
}
.resumen-linea.total span:last-child {
  color: #E8AEB7;
  font-weight: 700;
}
.btn-whatsapp {
  background: #25D366;
  color: white;
  border: none;
  border-radius: 999px;
  padding: 12px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .3s ease, transform .2s ease;
  width: 100%;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.btn-whatsapp:hover:not(:disabled) {
  background: #128C7E;
  transform: scale(1.03);
}
.btn-whatsapp:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
}
.mensaje-info {
  font-size: 0.9rem;
  color: #7a7a7a;
  margin-top: 15px;
  line-height: 1.5;
  text-align: center;
}
.btn-vaciar {
  background: none;
  border: 1px solid #bdc3c7;
  color: #7a7a7a;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .3s ease;
  width: 100%;
  margin-top: 10px;
}
.btn-vaciar:hover {
  background: #E38C8C;
  color: white;
  border-color: #E38C8C;
}

/* Carrito Vacío */
.carrito-vacio {
  background: #FFF;
  padding: 60px 40px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  max-width: 1200px;
  margin: 0 auto;
}
.carrito-vacio i {
  font-size: 5rem;
  color: #E8AEB7;
  margin-bottom: 20px;
}
.carrito-vacio h3 {
  color: #E8AEB7;
  font-size: 2rem;
  margin-bottom: 10px;
}
.carrito-vacio p {
  color: #3A3A3A;
  margin-bottom: 25px;
  font-size: 1.1rem;
}
.btn-carrito-vacio {
  display: inline-block;
  background-color: #D4AF7F;
  color: white;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
.btn-carrito-vacio:hover {
  background-color: #E38C8C;
  transform: scale(1.05);
}

/* --- Mensaje de 'empty-message' --- */
.empty-message {
    text-align: center;
    padding: 60px 40px;
    color: #7a7a7a;
    font-size: 1.1rem;
    background-color: #FFF;
    border-radius: 14px;
    max-width: 1200px;
    margin: 0 auto;
}

/* =========================================
   ===== INICIO: CSS DEL LIGHTBOX =====
   ========================================= */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lightboxZoom 0.3s ease;
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.lightbox-close:hover {
    background: white;
    transform: rotate(90deg);
}

.lightbox-info {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 14px;
    opacity: 0.8;
}

/* Deshabilitar scroll cuando lightbox está activo */
body.lightbox-open {
    overflow: hidden;
}

/* FOOTER GENERAL */
.footer {
  background-color:  #F6DCE2;
  color: #444;
  padding: 60px 80px 20px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  
  /* El footer ya no necesita position: absolute */
  /* Se alinea al final gracias al flex: 1 del .container */
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

/* Columna logo */
.footer-logo img {
  width: 140px;
  margin-bottom: 10px;
}

.footer-logo p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #3A3A3A;
}

/* Columna enlaces */
.footer-links h3,
.footer-contacto h3,
.footer-redes h3 {
  color:  #E8AEB7;
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 6px;
}

.footer-links a {
  text-decoration: none;
  color: #3A3A3A;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #E38C8C;
}

/* Columna contacto */
.footer-contacto p {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

/* Columna redes */
.social-icons {
  display: flex;
  gap: 12px;
}

.social-icons a {
  font-size: 1.8rem;
  color:  #D4AF7F;
  transition: transform 0.3s ease, color 0.3s ease;
}

.social-icons a:hover {
  color: #E38C8C;
  transform: scale(1.1);
}

/* Línea inferior */
.footer-bottom {
  text-align: center;
  border-top: 1px solid #e6d8f2;
  margin-top: 30px;
  padding-top: 10px;
  font-size: 0.9rem;
  color: #3A3A3A;
}


/* =========================================
===== INICIO: DISEÑO RESPONSIVE =====
=========================================
*/
@media (max-width: 768px) {

  /* --- Navbar --- */
  .navbar {
    height: 60px; /* Navbar más pequeña */
    padding: 0 20px; /* Menos padding */
    justify-content: space-between; /* Asegura espacio entre logo y carrito */
  }
  
  .img-logo img {
    height: 50px; /* Logo más pequeño */
  }
  
  .opciones {
    display: none; /* Oculta los links de texto en móvil */
  }
  
  /* --- CAMBIO: Estilo Carrito en Móvil --- */
  .navbar-right {
    flex: 1; /* Ocupa el espacio restante */
    justify-content: flex-end; /* Empuja el botón a la derecha */
  }
  
  .btn-carrito {
    padding: 6px 14px;
    font-size: 0.9rem;
  }
  /* --- FIN CAMBIO --- */
  
  /* --- Contenedor Principal --- */
  .container {
    /* Reducir padding-top para el navbar más pequeño */
    padding: 80px 0 40px; 
    gap: 20px;
  }
  
  /* --- Secciones Centradas --- */
  .quien-somos,
  .ofertas-nuevas,
  .categorias,
  .seccion-header,
  .carrito-header,
  .carrito-vacio,
  .empty-message {
    /* Menos padding en móvil */
    padding: 30px 20px; 
  }
  
  /* --- Layout Quienes Somos --- */
  .quien-somos {
    flex-direction: column; /* Apila los elementos */
    gap: 30px;
  }
  
  .info {
    max-width: 100%; /* Ocupa todo el ancho */
    text-align: center; /* Centra el texto */
  }
  
  .img-container img {
    width: 100%; /* Imagen se ajusta */
    max-width: 300px; /* Pero no más de 300px */
    height: auto;
  }
  
  /* --- Grids de Productos/Categorías --- */
  .ofertas-grid {
    grid-template-columns: 1fr; /* Una columna */
  }
  
  .categorias-grid {
    grid-template-columns: repeat(2, 1fr); /* Dos columnas */
  }
  
  .productos-page-grid {
    grid-template-columns: repeat(2, 1fr); /* Dos columnas */
    padding: 0 20px;
    max-width: 100%;
  }
  
  /* --- Footer --- */
  .footer {
    padding: 40px 20px 20px;
  }
  
  .footer-container {
    grid-template-columns: 1fr; /* Una columna */
    gap: 30px;
    text-align: center; /* Centra todo en móvil */
  }
  
  .footer-logo img {
    margin: 0 auto 10px; /* Centra el logo */
  }
  
  .social-icons {
    justify-content: center; /* Centra los iconos */
  }

  /* --- Carrito --- */
  .carrito-contenido {
      grid-template-columns: 1fr;
      padding: 0 20px;
      max-width: 100%;
  }
  .carrito-resumen {
      position: static;
  }
  .carrito-item {
      grid-template-columns: 30px 80px 1fr;
      gap: 10px;
  }
  .carrito-item-imagen {
      width: 80px;
      height: 80px;
  }
  .carrito-item-acciones {
      grid-column: 1 / -1;
      text-align: right;
  }

  /* --- Lightbox --- */
  .lightbox-content {
        max-width: 95%;
        max-height: 85vh;
    }
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    .lightbox-info {
        bottom: 10px;
        font-size: 12px;
    }
}

/* Media query para grids más pequeños */
@media (max-width: 480px) {
  .categorias-grid {
    grid-template-columns: 1fr; /* Una columna */
  }
  
  .productos-page-grid {
    grid-template-columns: 1fr;
  }
  
  .navbar {
    padding: 0 10px;
  }
  
  .opciones {
     display: none; /* Confirmado: oculto */
  }

  .btn-carrito {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  h1 {
    font-size: 2rem;
  }

  .info p {
    font-size: 1rem;
  }
}