:root {
  --background-primary: #f4f4f7; /* Gris claro de fondo */
  --background-secondary: #ffffff; /* Blanco para contenido */
  --text-primary: #222222; /* Texto principal oscuro */
  --text-secondary: #666666; /* Texto secundario gris */
  --accent-color: #005ce6; /* Azul de acento */
  --accent-color-hover: #004ab3; /* Azul de acento (hover) */
  --border-color: #dddddd; /* Borde gris claro */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Poppins', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Offset for sticky header */
}

body {
  font-family: var(--font-body);
  background-color: var(--background-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 0;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 {
  font-size: 3.8rem;
}

h2 {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

/* Scroll Animation */
.fade-in-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}


/* Header */
.header {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  padding: 1.2rem 5%;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-bottom-color 0.3s ease;
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom-color: var(--border-color);
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  z-index: 1010;
  font-family: var(--font-heading);
}

.logo span {
  color: var(--accent-color);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.3s ease;
  position: relative;
  padding-bottom: 8px;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-color);
    transition: width 0.3s ease-out;
}

.nav-links a:hover::after {
    width: 100%;
}


.header-contact {
  background-color: transparent;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  padding: 0.7rem 1.4rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
  cursor: pointer;
}

.header-contact:hover {
  background-color: var(--accent-color);
  color: #ffffff;
}

.hamburger-menu {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1010;
  padding: 0;
  width: 25px;
  height: 21px;
}

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-primary);
  margin: 5px 0;
  transition: all 0.3s ease-in-out;
  border-radius: 2px;
  transform-origin: center;
}

.nav-contact-mobile {
  display: none;
}


/* Estilos para la sección hero */
.hero {
  position: relative; /* Clave para que los elementos hijos se posicionen respecto a este contenedor */
  overflow: hidden; /* Evita que la imagen se salga si es muy grande */
  /* Ajusta estos valores según el diseño, pueden ser más altos para una imagen grande */
  min-height: 500px; 
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 50px 20px;
  color: white; /* Color del texto para que contraste con el fondo oscuro */
}

/* Estilos para la imagen de fondo */
.hero-background-image {
  position: absolute; /* Coloca la imagen de forma flotante */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Asegura que la imagen cubra todo el espacio sin distorsionarse */
  z-index: 1; /* La capa z-index es baja, para que la superposición y el texto estén encima */
}

/* Superposición para oscurecer la imagen y mejorar la legibilidad del texto */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Color negro semi-transparente (ajusta el 0.5 si quieres más o menos oscuridad) */
  z-index: 2; /* Mayor que la imagen, menor que el texto */
}

/* Asegura que el texto y el párrafo tengan un z-index más alto que la superposición y la imagen */
.hero h1,
.hero p {
  position: relative;
  z-index: 3; /* El más alto para asegurar que el texto se vea por encima de todo */
  color: white; /* <-- AÑADIDO: Texto h1 en blanco */
}

/* Opcional: ajustar el tamaño de la fuente para que destaque */
.hero h1 {
  font-size: 3rem; /* O el tamaño que uses */
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.hero p {
  font-size: 1.3rem;
  color: white; /* <-- AÑADIDO: Texto p en blanco */
  max-width: 650px;
  margin-bottom: 2.5rem;
  font-weight: 600; /* <-- AÑADIDO: Texto más grueso */
  text-shadow: 2px 2px 8px rgba(0,0,0,0.6); /* <-- AÑADIDO: Sombra de texto */
}

.hero-cta {
  background-color: var(--accent-color);
  color: #ffffff;
  padding: 1rem 2.5rem;
  border-radius: 5px;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-cta:hover {
  background-color: var(--accent-color-hover);
  transform: translateY(-3px);
}

.hero-cta:disabled {
    background-color: #cccccc;
    color: #777777;
    cursor: not-allowed;
    transform: none;
}


/* Stock Section */
.carousel-container {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.coming-soon-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    background-color: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
}

.coming-soon-placeholder h3 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.coming-soon-placeholder p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 450px;
}

/* About Section */
.about-section {
    background-color: var(--background-secondary);
    padding: 0; /* Container inside will handle padding */
}

.about-content {
    display: flex;
    gap: 4rem;
    align-items: center;
}

.about-image-container {
    flex: 1;
    min-width: 300px;
}

.about-image-container img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.about-text-container {
    flex: 1.2;
}

.about-text-container h2 {
    text-align: left;
    margin-bottom: 1.5rem;
}

.about-text-container h2::after {
    left: 0;
    transform: translateX(0);
}

.about-text-container h3 {
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
}

.about-text-container p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Search Section */
#search {
    background-color: var(--background-primary);
}

.search-intro {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 4rem auto;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.search-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem;
    max-width: 900px;
    margin: 0 auto;
}

.search-form .form-group.full-width {
    grid-column: 1 / -1;
}

.search-form-button {
    grid-column: 1 / -1;
    justify-self: center;
    width: auto;
    padding: 1.1rem 3.5rem;
}

/* Footer */
.footer {
  background-color: var(--background-secondary);
  border-top: 1px solid var(--border-color);
  padding: 5rem 5% 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-section h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.footer-section p, .footer-section ul {
  color: var(--text-secondary);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.8rem;
}

.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--accent-color);
}

.footer-section.contact-section {
    cursor: pointer;
    padding: 1rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    margin: -1rem; /* counteract padding */
}

.footer-section.contact-section:hover {
    background-color: var(--background-primary);
}

.contact-prompt {
    font-style: italic;
    font-size: 0.8rem;
    margin-top: 1rem;
    color: var(--accent-color);
    opacity: 0.8;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 992px) {
  .hamburger-menu {
    display: block;
  }
  
  .hamburger-menu.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger-menu.open span:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .header nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--background-secondary);
    transition: left 0.35s ease-in-out;
    padding-top: 8rem;
  }
  
  .header nav.nav-open {
    left: 0;
  }
  
  .nav-links {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    gap: 2.5rem;
  }

  .nav-links a {
    font-size: 1.8rem;
    color: var(--text-primary);
  }

  .header-contact.desktop-only {
    display: none;
  }
  
  .nav-contact-mobile {
    display: block;
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2.8rem; }
  .hero h1 { font-size: 3.2rem; }
  h2 { font-size: 2.2rem; }

  .search-form {
    grid-template-columns: 1fr;
  }
  .search-form .form-group.full-width,
  .search-form-button {
    grid-column: 1;
  }
  .about-content {
    flex-direction: column;
    gap: 3rem;
  }
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none; /* Changed to none */
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.modal-container {
  /* Estilo del contenedor del modal ajustado a la imagen (fondo más claro, padding más grande) */
  background-color: var(--background-secondary);
  padding: 3rem 4rem; 
  border-radius: 8px;
  width: 90%;
  max-width: 600px; /* Ancho ajustado */
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--border-color);
  transform: scale(0.95) translateY(10px);
  animation: scaleIn 0.3s forwards;
}

@keyframes scaleIn {
  to {
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0; /* El margen lo da el texto introductorio */
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--accent-color); /* Borde inferior de acento */
}

.modal-title {
  font-size: 2.2rem;
  color: var(--text-primary);
  margin: 0;
}

.modal-close-button {
  background: none;
  border: none;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease;
  padding: 0;
}

.modal-close-button:hover {
  color: var(--accent-color);
  transform: rotate(90deg);
}

.modal-body {
  color: var(--text-secondary);
}

.modal-body h4 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.modal-body p {
  margin-bottom: 1rem;
}

.modal-body ul {
  list-style-position: inside;
  padding-left: 1rem;
}

.modal-body li {
  margin-bottom: 1.2rem;
}

.modal-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ======================================================== */
/* 1. ESTILOS GENÉRICOS DE FORMULARIO (para sección #search) */
/* ======================================================== */
.form-group {
    display: flex;
    flex-direction: column;
    /* El espaciado en la sección de búsqueda se controla por el 'gap' del grid */
}

.form-group label {
    margin-bottom: 0.6rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 400;
}

/* Inputs y Selects por defecto (oscuros) para la sección #search */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"], /* <-- Importante: Incluye Tel para el formulario de búsqueda si existe */
textarea,
select {
    background-color: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 0.9rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    height: 52px; /* Standard height */
}

/* Foco genérico */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 92, 230, 0.2);
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%23999'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m19.5 8.25-7.5 7.5-7.5-7.5' /%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
}

textarea {
    resize: vertical;
    min-height: 130px;
    height: auto;
}

/* ======================================================== */
/* 2. ESTILOS DEL MODAL DE CONTACTO (SOBRESCRITOS)         */
/* ======================================================== */

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0; /* El espaciado lo dan los .form-group */
}

/* Espaciado de los grupos dentro del modal de contacto */
.contact-form .form-group {
    margin-bottom: 25px; 
    width: 100%;
}

/* Etiqueta del modal (texto claro y en negrita) */
.contact-form .form-group label {
    color: var(--text-primary); 
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px; 
}

/* Estilo para los inputs OSCUROS (Nombre, Email, Teléfono) y Textarea (Mensaje) */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"], /* <--- AHORA EN NEGRO DE FONDO (background-color: var(--background-dark)) */
.contact-form textarea {
    background-color: var(--background-primary); 
    color: var(--text-primary);
    border: 1px solid var(--border-color); 
    border-radius: 4px; 
    padding: 15px; 
    height: 55px; /* Altura estándar para inputs */
    box-sizing: border-box; 
    transition: all 0.2s ease-in-out;
}

/* Foco de todos los campos del modal */
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color); 
    box-shadow: 0 0 0 1px var(--accent-color); /* Foco más delgado */
}

/* Ajuste de altura para el textarea de mensaje */
.contact-form textarea {
    min-height: 150px; 
    height: auto;
}


/* Texto de introducción del modal */
.contact-form-intro {
    text-align: left;
    margin-bottom: 2rem; 
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Botón 'ENVIAR MENSAJE' */
.contact-form-button {
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 1.1rem 3rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.1rem;
    align-self: stretch; /* Se estira a todo el ancho */
    margin-top: 2rem; 
}

.contact-success {
    text-align: center;
    padding: 2rem 0;
}
.contact-success h4 {
    color: var(--accent-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}


/* Custom Select Dropdown (Manteniendo estilos originales) */
.custom-select {
    position: relative;
    width: 100%;
    font-family: var(--font-body);
}
.select-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 0 0.9rem;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
    height: 52px;
}
.select-selected:hover, .select-selected.open {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 92, 230, 0.2);
}
.select-arrow {
    width: 1.2em;
    height: 1.2em;
    color: #999;
    transition: transform 0.3s ease;
}
.select-selected.open .select-arrow {
    transform: rotate(180deg);
}
.select-items {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background-color: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    z-index: 10;
    max-height: 250px;
    overflow-y: auto;
}
.select-item, .select-item-display {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.select-item {
    padding: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.select-item:hover {
    background-color: var(--accent-color);
    color: #ffffff;
}
.select-item:hover span {
    color: #ffffff;
}
.brand-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}
.select-selected span {
    color: var(--text-secondary);
}
.select-item-display span {
    color: var(--text-primary);
}


/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    background-color: var(--background-secondary);
    color: var(--text-primary);
    padding: 1.2rem 1.8rem;
    border-radius: 6px;
    border-left: 5px solid var(--accent-color); /* Color cambiado para coincidir con el tema */
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    z-index: 3000;
    transform: translateY(150%); /* Animación cambiada para aparecer desde abajo */
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease-in-out;
    text-align: center; /* Texto centrado */
}
.toast-notification.show {
    transform: translateY(0); /* Estado final de la animación */
    opacity: 1;
}


@media (max-width: 768px) {
  .modal-container {
    padding: 1.5rem;
    width: 95%;
    max-height: 90vh;
  }
  .modal-title {
    font-size: 1.5rem;
  }
}