/* ================================================
   SOY+ Food Ingredients - Estilos
   ================================================ */

/* Tipografía: Nexa via Adobe Fonts (Typekit)
   El <link> a Typekit se carga desde cada HTML.
   - Nexa Rust Sans (weight 900) → títulos
   - Nexa (weight 600 = Bold) → texto destacado
   - Nexa (weight 500 = SemiBold) → cuerpo */

/* ================================================
   VARIABLES
   ================================================ */
:root {
  /* Colores del diseño */
  --dorado: #A87F35;
  --dorado-claro: #BC9145;
  --dorado-suave: #D4AB5C;
  --magenta: #B22A6F;
  --magenta-oscuro: #9C2461;
  --crema: #F5EFE0;
  --crema-claro: #FAF6EC;
  --beige-tarjeta: #E8E2D5;
  --texto-oscuro: #2D2D2D;
  --texto-medio: #555;
  --blanco: #FFFFFF;

  /* Tipografía Nexa via Adobe Fonts
     --font-display: títulos (font-weight: 900)
     --font-body: texto general (font-weight: 500 cuerpo, 600 destacado) */
  --font-display: 'nexa-rust-sans', system-ui, sans-serif;
  --font-body: 'nexa', system-ui, sans-serif;

  /* Layout */
  --max-width: 1280px;
  --header-height: 88px;
}

/* ================================================
   RESET Y BASE
   ================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--texto-oscuro);
  line-height: 1.5;
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* ================================================
   HEADER / NAVBAR
   ================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(178, 131, 56, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* En páginas sin Hero (productos, detalles), el header se ve sobre fondos claros.
   El backdrop-filter hace que se vea elegante sobre cualquier contenido. */

.header-inner {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo-link {
  flex-shrink: 0;
}

.logo-header {
  height: 64px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 38px;
}

.nav a {
  color: var(--blanco);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: opacity 0.2s ease, transform 0.2s ease;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--blanco);
  transition: width 0.3s ease;
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.nav a:hover {
  opacity: 0.9;
}

.lang-switch {
  color: var(--blanco);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s ease;
}

.lang-switch:hover {
  opacity: 0.85;
}

/* Menú mobile */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--blanco);
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  border-radius: 2px;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ================================================
   HERO HOME
   ================================================ */
.hero {
  position: relative;
  height: 75vh;
  min-height: 520px;
  margin-top: 0;
  background: url('assets/img/hero-tvp.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(65, 64, 66, 0.5);
}

.hero-logo {
  width: min(340px, 50vw);
  position: relative;
  z-index: 2;
  animation: fadeInScale 1s ease both;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ================================================
   TAGLINE BAR
   ================================================ */
.tagline {
  background: var(--dorado);
  padding: 56px 32px;
  text-align: center;
}

.tagline p {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--blanco);
  font-size: 19px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  max-width: 780px;
  margin: 0 auto;
  line-height: 1.4;
}

/* ================================================
   NOSOTROS - VALORES / MISIÓN / VISIÓN
   ================================================ */
.nosotros {
  position: relative;
  padding: 100px 32px;
  background: url('assets/img/tvp-madera.jpg') center/cover no-repeat;
}

.nosotros::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
}

.cards {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
}

.card {
  background: rgba(232, 226, 213, 0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 16px;
  padding: 48px 32px;
  text-align: center;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
}

.card-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-bottom: 28px;
}

.card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--dorado);
  font-size: 28px;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.card p {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--dorado);
  font-size: 15px;
  line-height: 1.5;
}

/* ================================================
   CALIDAD
   ================================================ */
.calidad {
  position: relative;
  padding: 100px 32px;
  background: var(--crema-claro);
  overflow: hidden;
}

.calidad::before,
.calidad::after {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  background: var(--dorado);
  opacity: 0.08;
  border-radius: 50%;
  filter: blur(60px);
}

.calidad::before {
  top: 50px;
  left: -100px;
}

.calidad::after {
  bottom: 50px;
  right: -100px;
}

.calidad-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.calidad h2 {
  text-align: center;
  font-size: clamp(38px, 5vw, 52px);
  color: #C8E835;
  margin-bottom: 56px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.calidad-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}

.calidad-content p {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--texto-oscuro);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 18px;
}

.calidad-content p .highlight {
  color: var(--magenta);
  font-weight: 600;
}

.certs {
  padding-top: 40px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.certs-logos {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 32px;
  flex-wrap: wrap;
}

.certs-logos img {
  height: 80px;
  width: auto;
  object-fit: contain;
  opacity: 0.95;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.certs-logos img:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* ================================================
   FOOTER / CONTACTO
   ================================================ */
.footer {
  background: var(--magenta);
  color: var(--blanco);
  padding: 80px 32px 48px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1.4fr;
  gap: 56px;
}

.footer h2 {
  font-family: var(--font-display);
  font-size: 38px;
  margin-bottom: 32px;
  letter-spacing: 0.02em;
}

.footer-info h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
  opacity: 0.95;
}

.footer-info address {
  font-style: normal;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: 32px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.footer-contact a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--blanco);
  transition: opacity 0.2s ease;
}

.footer-contact a:hover {
  opacity: 0.85;
}

.footer-contact img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.footer-logo {
  width: 110px;
  margin-top: 16px;
}

/* Form */
.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form input,
.form textarea {
  background: var(--crema-claro);
  border: none;
  border-radius: 6px;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--texto-oscuro);
  outline: none;
  transition: box-shadow 0.2s ease;
}

.form input::placeholder,
.form textarea::placeholder {
  color: var(--magenta);
  opacity: 0.7;
  font-weight: 600;
}

.form input:focus,
.form textarea:focus {
  box-shadow: 0 0 0 3px rgba(255,255,255,0.4);
}

.form textarea {
  resize: vertical;
  min-height: 110px;
  font-family: var(--font-body);
}

.form button {
  background: var(--dorado);
  color: var(--blanco);
  border: none;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 6px;
  cursor: pointer;
  align-self: flex-start;
  margin-top: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.form button:hover {
  background: var(--dorado-claro);
  transform: translateY(-1px);
}

.form-status {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  min-height: 20px;
}

.form-status.success {
  color: #B6FFC7;
}

.form-status.error {
  color: #FFD0D0;
}

/* Mapa */
.map {
  width: 100%;
  height: 280px;
  border-radius: 8px;
  border: none;
  background: var(--crema-claro);
}

/* ================================================
   PÁGINA PRODUCTOS - LISTADO
   ================================================ */
.productos-grid {
  margin-top: var(--header-height);
  background: var(--crema-claro);
  padding: 100px 32px 0;
  position: relative;
  background-image: url('assets/img/fondo-soja-semillas.jpg');
  background-size: cover;
  background-position: center;
}

.productos-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.7);
}

.productos-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.productos-grid h1 {
  text-align: center;
  font-size: clamp(40px, 5.5vw, 60px);
  color: var(--dorado);
  margin-bottom: 80px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.productos-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  padding-bottom: 120px;
}

.producto-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  transition: transform 0.4s ease;
}

.producto-card:hover {
  transform: translateY(-8px);
}

.producto-card-icon {
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin-bottom: 32px;
}

.producto-card h2 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--dorado);
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin-bottom: 24px;
  min-height: 64px;
}

.btn-ver {
  background: var(--blanco);
  color: var(--dorado);
  padding: 10px 28px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.02em;
  border: 1px solid rgba(194, 152, 69, 0.2);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-ver:hover {
  background: var(--dorado);
  color: var(--blanco);
  box-shadow: 0 6px 20px rgba(194, 152, 69, 0.35);
}

/* ================================================
   PÁGINA DETALLE PRODUCTO
   ================================================ */
.producto-detail {
  margin-top: var(--header-height);
}

.producto-detail-section {
  position: relative;
  padding: 72px 32px;
}

.producto-detail-section.bg-tvp {
  background: url('assets/img/tvp-madera.jpg') center/cover no-repeat;
}

.producto-detail-section.bg-tvp::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.6);
}

.producto-detail-section.bg-light {
  background: var(--crema-claro);
}

.producto-detail-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.producto-titulo-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 40px;
}

.producto-detail h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  color: var(--dorado);
  letter-spacing: 0.01em;
  line-height: 1.05;
  text-transform: uppercase;
}

.producto-detail h1 .soy-suffix {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
}

.producto-detail h1 .soy-suffix img {
  display: inline-block;
  height: 0.8em;
  vertical-align: baseline;
}

.producto-image-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.producto-image-wrap .flecha {
  position: absolute;
  left: -60px;
  top: 50%;
  transform: translateY(-50%);
  width: 100px;
  pointer-events: none;
}

.producto-image-wrap .producto-foto {
  max-width: 100%;
  height: auto;
}

.producto-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}

.producto-block h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--dorado);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.producto-block p,
.producto-block li {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.65;
  color: var(--texto-oscuro);
  margin-bottom: 8px;
}

.producto-block ul {
  list-style: none;
  padding-left: 0;
}

.producto-block ul li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
}

.producto-block ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 18px;
  height: 18px;
  background: url('assets/logos/favicon.png') center/contain no-repeat;
}

.producto-block + .producto-block {
  margin-top: 32px;
}

.producto-grid-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-top: 40px;
  align-items: start;
}

/* Sección "ver otros productos" */
.otros-productos {
  background: var(--crema-claro);
  padding: 80px 32px;
  text-align: center;
}

.otros-productos h3 {
  font-family: var(--font-display);
  color: var(--dorado);
  font-size: 28px;
  margin-bottom: 32px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.otros-productos a {
  display: inline-block;
  background: var(--dorado);
  color: var(--blanco);
  padding: 14px 32px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s ease, transform 0.2s ease;
}

.otros-productos a:hover {
  background: var(--dorado-claro);
  transform: translateY(-2px);
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 960px) {
  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(178, 131, 56, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 16px 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  .nav.open {
    transform: translateX(0);
  }

  .nav a {
    width: 100%;
    padding: 14px 32px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
  }

  .nav a::after {
    display: none;
  }

  .lang-switch {
    width: 100%;
    padding: 14px 32px;
  }

  .menu-toggle {
    display: block;
  }

  .cards,
  .productos-cards {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .calidad-content,
  .producto-titulo-row,
  .producto-content,
  .producto-grid-bottom {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .producto-image-wrap .flecha {
    display: none;
  }

  .certs-logos {
    justify-content: center;
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 0 16px;
  }

  .logo-header {
    height: 44px;
  }

  .hero {
    min-height: 500px;
  }

  .tagline,
  .nosotros,
  .calidad,
  .footer,
  .productos-grid,
  .producto-detail-section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .nosotros,
  .calidad,
  .producto-detail-section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .footer h2 {
    font-size: 30px;
  }

  .productos-grid h1 {
    margin-bottom: 48px;
  }

  .producto-detail h1 {
    font-size: 32px;
  }

  .certs-logos img {
    height: 60px;
  }
}
