/* ============================= */
/* BASE + FULLSCREEN BACKGROUND IMAGE */
/* ============================= */
body {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  color: white;
  background-color: black;
  background-image: url("../img/background.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  background-position: center center;
}

/* ============================= */
/* ESTILOS GLOBALES DE ENLACES */
/* ============================= */
a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: red;
}

a:visited {
  color: lightgray;
}

.inicio-section {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
   margin-bottom: -3rem; /* 👈 controla la separación hacia "Libros" */
}

.banner-img {
  max-width: 80%;
  height: auto;
  display: block;
  margin: -5rem auto 0 auto;
}
@media screen and (max-width: 768px) {
  .banner-img {
    margin-top: -1.2rem;  /* 👈 más suave en móvil */
  
  }
}

/* ============================= */
/* STICKY HEADER */
/* ============================= */
.sticky-header {
  position: sticky;
  top: 0;
  background-color: rgba(0, 0, 0, 0.63);
  height: 63px;
  display: flex;
  justify-content: center; /* centers the entire header content */
  align-items: center;
  padding: 0 2rem;
  z-index: 1000;
}


/* ============================= */
/* TOP MENU CONTAINER */
/* ============================= */
.nav-container {
  display: flex;
  justify-content: center; /* centers the nav links */
  align-items: center;
  position: relative; /* allows .nav-contact to be positioned right */
  width: 100%;
}

/* ============================= */
/* NAV LINKS SECTION */
/* ============================= */
.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links li {
  list-style: none; /* 🔧 Fuerza que no aparezcan puntos incluso si algún estilo externo los mete */
}

.nav-links li a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: red !important; /* 🔥 Forzamos para que funcione en todos los navegadores */
}

.nav-links li a:visited {
  color: lightgray;
}

/* ============================= */
/* NAV CONTACT (RIGHT SIDE) */
/* ============================= */
.nav-contacto {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: absolute;
  right: 2rem;
}

.flag {
  width: 25px;
  height: auto;
  transition: opacity 0.3s ease;
}


/* 🎯 ESTILOS PARA EL ENLACE DE "CONTÁCTANOS" */
.nav-contacto a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-contacto a:hover {
  color: red !important;
}

.nav-contacto a:visited {
  color: lightgray;
}
/* ============================= */
/* PRODUCT ROW LAYOUT */
/* ============================= */
.product-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start; /* 👈 ESTO es clave */
  gap: 0.5rem 7.5rem;  /* 👈 AQUÍ CAMBIAS ESTA LÍNEA */
  padding: 0.5rem 0;
}

/* ============================= */
/* ROLLOVER CONTROL + DIMENSIONES */
/* ============================= */
.rollover-container {
  display: block;
  position: relative;
  width: 225px;
  height: 325px;
  overflow: hidden;
}

.rollover-container img {
  position: absolute;
  width: 225px;
  height: 325px;
  object-fit: cover;
  top: 0;
  left: 0;
  transition: opacity 0.4s ease-in-out;
}

/* Imagen frontal visible por defecto */
.rollover-container .img-front {
  opacity: 1;
  z-index: 2;
}

/* Imagen hover inicialmente invisible */
.rollover-container .img-hover {
  opacity: 0;
  z-index: 1;
}

/* Cuando pasas el mouse, invierte opacidades */
.rollover-container:hover .img-front {
  opacity: 0;
}

.rollover-container:hover .img-hover {
  opacity: 1;
}


/* ============================= */
/* PRODUCT CARD FIXED SIZE */
/* ============================= */
.product-card {
  width: 225px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem; /* nuevo espaciado entre filas */
}

/* ============================= */
/* PRODUCT IMAGE BOX */
/* ============================= */
.product-image {
  width: 225px;
  height: 325px;
  color: black;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* ============================= */
/* PRODUCT TEXT BOX */
/* ============================= */
.product-desc {
  width: 225px;
  min-height: 111px; /* opcional para mantener base */
  height: auto;      /* deja que crezca si hay más texto */
  background-color: #222;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1rem;
  box-sizing: border-box;
}

/* ============================= */
/* PRODUCT TEXT INNER SPACING FIX */
/* ============================= */
.product-desc h3 {
  margin: 0 0 0.25rem 0;
}

.product-desc p {
  margin: 0;
}

/* ============================= */
/* RESPONSIVE RULES */
/* ============================= */

/* 4 per row (desktop and tablet landscape) */
@media screen and (min-width: 1025px) {
  .product-card {
    width: 225px;
  }
}

/* 2 per row (tablet portrait and mobile landscape) */
@media screen and (max-width: 678px) {
  .banner-img {
  max-width: 80%;
  height: auto;
  display: block;
  margin: -2rem auto 0 auto;
} 
}


/* 1 per row (mobile portrait) */
@media screen and (max-width: 768px) {
  .product-card {
    width: 100%;
  }
}

@media screen and (max-width: 768px) {
  .banner-img {
    width: 90%;
  }
}

.seccion333 {
  padding: -2rem;
  display: flex;
  justify-content: space-between;
}

.seccion333-content {
  display: flex;
  gap: 2rem;
}

.seccion333 .texto {
  flex: 1;
}

/* ============================= */
/* HAMBURGER MENU BUTTON */
/* ============================= */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  position: absolute;
  left: 2rem;
  top: 1rem;
  z-index: 2000;
}

/* ============================= */
/* MOBILE MENU CONTAINER */
/* ============================= */
.mobile-menu {
  display: none;
  position: fixed;
  top: 63px;
  left: 0;
  width: 100%;
  height: calc(100% - 63px);
  background-color: rgba(0, 0, 0, 0.755);
  z-index: 1500;
  padding: 2rem;
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
}

.mobile-menu li {
  margin-bottom: 1.5rem;
}

.mobile-menu a {
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
}

/* ============================= */
/* RESPONSIVE TOGGLE */
/* ============================= */

@media screen and (max-width: 991px) {
  .hamburger {
    display: block;
  }

  .nav-links,
  .nav-contacto {
    display: none;
  }

  .sticky-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0.5rem 1rem;
    background: transparent; /* 👈 quita el fondo */
    box-shadow: none;
  }
}



/* ============================= */
/* HAMBURGER FLAGS STYLE */
/* ============================= */
.hamburger-flags {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.hamburger-flags img.flag {
  height: 10px;
}

/* ============================= */
/* HAMBURGER FLAG HOVER LOGIC */
/* ============================= */

/* Por defecto: cambia la imagen si NO es la activa */
.flag-es:not(.activo):hover {
  content: url("img/flags_spain.jpg");
}

.flag-us:not(.activo):hover {
  content: url("img/flags_usaoff.jpg");
}

/* También, si la activa se pasa por encima, cambia a la desactivada */
.flag-es.activo:hover {
  content: url("img/flags_spainoff.jpg");
}

.flag-us.activo:hover {
  content: url("img/flags_usa.jpg");
}

/* ============================= */
/* RESPONSIVE TOGGLE */
/* ============================= */

/* Show hamburger and hide top menu + contact area */
@media screen and (max-width: 991px) {
  .hamburger {
    display: block;
  }

  .nav-links,
  .nav-contacto {
    display: none;
  }
}

/* ============================= */
/* SECTION TITLE CENTERING */
/* ============================= */
.product-section h2 {
  text-align: center;
}

/* ============================= */
/* SECTION SPACING CONTROL */
/* ============================= */







/* ============================= */
/* BOTTOM SPACING AFTER PRODUCT GRID */
/* ============================= */




/* ============================= */
/* EXTRA SPACING WHEN SINGLE COLUMN */
/* ============================= */
@media screen and (max-width: 768px) {
  

  
}

@media screen and (max-width: 768px) {
  .product-row {
    gap: 0.5rem 0.5rem; /* menos separación en mobile */
  }
}

/* ============================= */
/* SECTION 333 DESIGN & SPACING */
/* ============================= */


.seccion333 {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.seccion333-content {
  display: flex;
  gap: 2rem;
  max-width: 960px;
  width: 100%;
  justify-content: space-between;
  flex-wrap: wrap;
}

.seccion333 .texto {
  color: #ffffff;
  padding: 39px;
  width: 560px;
  height: 321px;
  box-sizing: border-box;
}

.seccion333 .texto h3 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 1rem;
}

..seccion333 .texto p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.seccion333 .ilustracion {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  flex: 1;
  height: auto;
}

/* Imagen dentro: tamaño exacto */
.seccion333 .ilustracion img {
  height: 463px;      /* 👈 altura fija como antes */
  width: auto;
  object-fit: contain;
}



/* Control directo del tamaño de la imagen */
.seccion333 .ilustracion img {
  max-width: 100%;   /* no más grande que su contenedor */
  height: auto;
  width: auto;
  max-height: 463px; /* ✅ controla la altura máxima visible */
  object-fit: contain; /* mantiene proporción dentro del área */
}

/* Responsive (stack columns) */
@media screen and (max-width: 992px) {
  .seccion333-content {
    flex-direction: column;
    align-items: center;
  }

  .seccion333 .texto,
  .seccion333 .ilustracion {
    width: 100%;
    max-width: 560px;
  }
}

/* Responsive (stack columns) */
@media screen and (max-width: 992px) {
  .seccion333-invertida-content {
    flex-direction: column;
    align-items: center;
  }

  .seccion333-invertida .texto,
  .seccion333-invertida .ilustracion {
    width: 100%;
    max-width: 560px;
  }
}

@media screen and (max-width: 768px) {
  .banner-img {
    max-width: 100%;
    margin-top: -2rem;
  }
}

/* ============================= */
/* HIDE INICIO SECTION (BANNER) ON MOBILE */
/* ============================= */
@media screen and (max-width: 768px) {
  .inicio-section {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* ============================= */
/* ESPACIOS UNIFORMES DE SECCIONES */
/* ============================= */

/* Título de cada sección */
.seccion-pagina h2 {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Contenido general de cada sección */
.seccion-pagina .contenido-seccion {
  margin-bottom: 3.5rem;
}

/* Eliminar espacio adicional innecesario */
.product-row,
.product-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

.product-card:last-child {
  margin-bottom: 0;
}

.contenido-seccion > *:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Mejora accesibilidad en el foco de los enlaces (para SEO y ADA) */
a:focus {
  outline: 2px dashed red;
  outline-offset: 3px;
}
/* ============================= */
/* CONTACTO FORM SECTION */
/* ============================= */
#contacto {
  padding: 2rem;
  margin-bottom: 11.19rem; /* ✅ Agrega espacio debajo del formulario */
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#contacto .contenido-seccion {
  max-width: 600px;
  width: 100%;
  margin: 0 auto; /* ✅ Asegura el centrado */
  background-color: rgba(255, 255, 255, 0.05); /* Sutil fondo para contraste */
  padding: 2rem;
  border-radius: 8px;
  box-sizing: border-box;
}

#contacto label {
  display: block;
  margin-bottom: 0.75rem; /* ✅ Ajustado para evitar espacio excesivo */
  color: white;
}

#contacto input[type="email"],
#contacto textarea {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  box-sizing: border-box;
  margin-top: 0.25rem;
  margin-bottom: 1rem; /* ✅ Añade separación entre campos */
}

#contacto button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  background-color: white;
  color: black;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

