/* Reset y variables */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #1a2533;
  background: #f5f6f8;
  overflow-x: hidden;
}

:root {
  --color-bg: #f5f6f8;
  --color-bg-alt: #0d2137;
  --color-text: #1a2533;
  --color-text-alt: #fff;
  --color-muted: #5a6578;
  --color-accent: #c41e3a;
  --color-accent-hover: #a01830;
  --color-border: #dde1e6;
  --font-display: 'Syne', sans-serif;
  --max-width: 1200px;
  --space: clamp(1.5rem, 4vw, 3rem);
  --space-lg: clamp(3rem, 8vw, 6rem);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(245, 246, 248, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.header.scrolled { border-bottom-color: var(--color-border); }

.logo img {
  height: 42px;
  width: auto;
  display: block;
  filter: invert(1);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav a {
  font-weight: 500;
  font-size: 0.95rem;
}
.nav a:hover { color: var(--color-accent); }
.btn-nav {
  background: var(--color-text);
  color: var(--color-text-alt) !important;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
}
.btn-nav:hover {
  background: var(--color-accent);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  min-height: 100vh;
  padding: calc(80px + var(--space-lg)) var(--space) var(--space-lg);
  max-width: var(--max-width);
  margin: 0 auto;
}
.hero-badge {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 1rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 1.5rem;
}
.hero-title em { font-style: italic; color: var(--color-accent); }
.hero-desc {
  font-size: 1.1rem;
  color: var(--color-muted);
  max-width: 480px;
  margin-bottom: 2rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.hero-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-image img {
  max-height: 70vh;
  object-fit: contain;
}

/* Botones */
.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover { background: var(--color-accent-hover); }
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-text);
}
.btn-secondary:hover {
  background: var(--color-text);
  color: #fff;
}

/* Intro */
.intro {
  padding: var(--space-lg) var(--space);
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}
.intro-text {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.intro-sub {
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}
.link-arrow {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.link-arrow::after {
  content: '→';
}
.link-arrow:hover { color: var(--color-accent); }

/* Productos */
.products {
  padding: var(--space-lg) var(--space);
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}
.product-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}
.product-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
.product-card.featured .product-image img { max-height: 320px; margin: 0 auto; }
.product-image {
  padding: 2rem;
  background: linear-gradient(180deg, #f5f5f5 0%, #fff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}
.product-image img { max-height: 200px; object-fit: contain; }
.product-info { padding: 1.5rem 2rem; }
.product-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}
.product-tag.new { color: #0d2137; }
.product-info h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}
.product-link {
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.25rem;
}
.product-link:hover { color: var(--color-accent); }
.product-price { font-size: 0.9rem; color: var(--color-muted); margin: 0; }

/* Bundle */
.bundle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-lg) var(--space);
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--color-bg-alt);
  color: var(--color-text-alt);
}
.bundle-tag {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}
.bundle h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 1rem;
}
.bundle p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 1.5rem;
}
.bundle-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.bundle-visual img { max-height: 320px; object-fit: contain; }

/* Tech */
.tech {
  padding: var(--space-lg) var(--space);
  max-width: var(--max-width);
  margin: 0 auto;
}
.tech-header {
  text-align: center;
  margin-bottom: 3rem;
}
.tech-icon { color: var(--color-accent); font-size: 1.5rem; }
.tech-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  margin: 0.5rem 0 0.25rem;
}
.tech-header p { color: var(--color-muted); margin: 0; }
.tech-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.tech-col h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.tech-col p { color: var(--color-muted); margin: 0; }
.tech-image {
  border-radius: 16px;
  overflow: hidden;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.tech-image img { max-height: 400px; object-fit: contain; }

/* Brand block */
.brand-block {
  padding: var(--space-lg) var(--space);
  text-align: center;
  background: linear-gradient(180deg, #f0f0f0 0%, var(--color-bg) 100%);
}
.brand-block-content { max-width: 560px; margin: 0 auto; }
.brand-block h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin: 0 0 0.25rem;
}
.brand-country {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 0.5rem;
}
.brand-desc { color: var(--color-muted); margin-bottom: 1rem; }

/* Nuestra Historia */
.history {
  padding: var(--space-lg) var(--space);
  max-width: var(--max-width);
  margin: 0 auto;
}
.history-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 2rem;
  text-align: center;
}
.history-content {
  max-width: 720px;
  margin: 0 auto;
}
.history-content p {
  margin: 0 0 1.25rem;
  color: var(--color-text);
  line-height: 1.7;
}
.history-niu {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}
.history-niu h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--color-text);
}
.history-niu p {
  margin: 0 0 1rem;
}

.history-certificados {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}
.history-certificados h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
  color: var(--color-text);
}
.certificados-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.certificado-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--color-border);
}
.certificado-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Stories */
.stories {
  padding: var(--space-lg) var(--space);
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}
.section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}
.stories h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
}
.stories p { color: var(--color-muted); margin: 0; }

/* CTA final */
.cta-final {
  padding: var(--space-lg) var(--space);
  text-align: center;
  background: var(--color-bg-alt);
  color: var(--color-text-alt);
}
.cta-final h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
}
.cta-final p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 1.5rem;
}
.cta-final .btn-primary:hover { background: #fff; color: var(--color-text); }

/* Footer */
.footer {
  padding: 2rem var(--space);
  text-align: center;
  border-top: 1px solid var(--color-border);
}
.footer-logo img {
  height: 36px;
  width: auto;
  margin: 0 auto 1rem;
  display: block;
  filter: invert(1);
}
.footer-copy { font-size: 0.9rem; color: var(--color-muted); margin: 0; }

/* Página Fábrica */
.hero-fabrica {
  grid-template-columns: 1fr;
  text-align: center;
}
.hero-fabrica .hero-content { max-width: 640px; margin: 0 auto; }
.hero-fabrica .hero-desc { margin-left: auto; margin-right: auto; }

.page-section {
  padding: var(--space-lg) var(--space);
  max-width: var(--max-width);
  margin: 0 auto;
}
.intro-fabrica-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
.intro-fabrica-item {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--color-border);
  background: #fff;
}
.intro-fabrica-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 2rem;
  text-align: center;
  color: var(--color-text);
}

.factory-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-lg) var(--space);
  max-width: var(--max-width);
  margin: 0 auto;
}
.factory-block-alt { direction: rtl; }
.factory-block-alt > * { direction: ltr; }
.factory-content h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--color-text);
}
.factory-content p { color: var(--color-muted); margin: 0; line-height: 1.7; }
.factory-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--color-muted);
  line-height: 1.8;
}
.factory-list li { margin-bottom: 0.5rem; }
.factory-image {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
.factory-image img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.factory-grid {
  padding: var(--space-lg) var(--space);
  max-width: var(--max-width);
  margin: 0 auto;
}
.factory-grid .section-title { margin-bottom: 2rem; }
.factory-grid-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}
.factory-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--color-border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.factory-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}
.factory-card-image {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--color-border);
}
.factory-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.factory-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  padding: 1.25rem 1.5rem;
  color: var(--color-text);
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 900px) {
  .nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    box-shadow: -4px 0 24px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    gap: 1rem;
  }
  .nav.open { transform: translateX(0); }
  .menu-toggle { display: flex; }
  .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .menu-toggle.active span:nth-child(2) { opacity: 0; }
  .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
  .menu-toggle span { transition: transform 0.2s, opacity 0.2s; }
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-image { order: -1; }
  .hero-image img { max-height: 50vh; }
  .product-card.featured {
    grid-template-columns: 1fr;
  }
  .bundle { grid-template-columns: 1fr; text-align: center; }
  .tech-cols { grid-template-columns: 1fr; }
  .factory-block { grid-template-columns: 1fr; }
  .factory-block-alt { direction: ltr; }
  .intro-fabrica-gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .intro-fabrica-gallery { grid-template-columns: 1fr; }
  .intro-fabrica-item img { height: 180px; }
  .header { padding: 1rem; }
  .products { grid-template-columns: 1fr; }
}
