/* ─── COMPONENTES GLOBALES — DISTRIBUIDORA ÓPTICA ───────────── */

/* NAV -------------------------------------------------------- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

nav.scrolled {
  background: rgba(255,255,255,0.98);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
  overflow: visible;
}

/* LOGO ------------------------------------------------------- */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
  font-family: var(--tight);
  font-weight: 800;
  font-size: 20px;
  color: var(--brand);
  letter-spacing: -0.3px;
}

.logo-img {
  height: 72px;
  max-height: 72px;
  width: auto;
  max-width: none;
  display: block;
  flex-shrink: 0;
}

.logo span {
  color: var(--accent);
}

/* NAV LINKS -------------------------------------------------- */
.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  align-items: center;
}

.nav-links > li > a {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: rgba(255,255,255,0.92);
  padding: 11px 22px;
  border-radius: 999px;
  transition: background var(--transition), color var(--transition);
  display: block;
  text-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

nav.scrolled .nav-links > li > a {
  color: var(--gray-dk);
  text-shadow: none;
}

.nav-links > li > a:hover {
  color: var(--white);
  background: rgba(var(--brand-rgb), 0.35);
}

nav.scrolled .nav-links > li > a:hover {
  color: var(--brand);
  background: rgba(var(--brand-rgb), 0.12);
}

.nav-cta {
  background: var(--brand) !important;
  color: var(--white) !important;
  padding: 12px 26px !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
  text-shadow: none !important;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition) !important;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--brand-dk) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-brand) !important;
}

/* NAV TOGGLE (mobile) --------------------------------------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

nav.scrolled .nav-toggle span,
nav.menu-open .nav-toggle span {
  background: var(--dark);
  box-shadow: none;
}

/* BUTTONS ---------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: 2px solid transparent;
  white-space: nowrap;
  font-family: var(--sans);
  line-height: 1;
}

.btn-primary {
  background: var(--brand);
  color: var(--white);
  border-color: var(--brand);
}
.btn-primary:hover {
  background: var(--brand-dk);
  border-color: var(--brand-dk);
  transform: translateY(-2px);
  box-shadow: var(--shadow-brand);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 16px;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* SECTION HEADERS ------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--brand);
  flex-shrink: 0;
}

.eyebrow--white { color: rgba(255,255,255,0.7); }
.eyebrow--white::before { background: rgba(255,255,255,0.5); }

.eyebrow--center { justify-content: center; }

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--dark);
  margin-bottom: 18px;
}

.section-title--white { color: var(--white); }

.section-desc {
  font-size: 17px;
  color: var(--mid);
  max-width: 600px;
  line-height: 1.8;
}

.section-desc--white { color: rgba(255,255,255,0.72); }

.text-center { text-align: center; margin-left: auto; margin-right: auto; }

/* ICON BOX -------------------------------------------------- */
.icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--brand-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.icon-box svg {
  width: 26px;
  height: 26px;
  stroke: var(--brand);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─── HERO CARRUSEL ──────────────────────────────────────────── */
.hero-section {
  position: relative;
  height: 92vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--dark-bg);
  display: flex;
  align-items: center;
}

.hero-section > .container {
  padding-top: 40px;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,14,14,0.25) 0%, rgba(10,14,14,0.55) 100%);
}

.hero-content {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  max-width: 720px;
  padding-top: 24px;
}

.hero-eyebrow {
  color: var(--accent);
}
.hero-eyebrow::before { background: var(--accent); }

.hero-title {
  font-size: clamp(32px, 5.5vw, 58px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 20px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.45);
}

.hero-subtitle {
  font-size: 18px;
  color: rgba(255,255,255,0.92);
  max-width: 560px;
  line-height: 1.75;
  margin-bottom: 36px;
  text-shadow: 0 1px 10px rgba(0,0,0,0.4);
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-dots {
  position: absolute;
  bottom: 32px;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  padding: 0;
}

.hero-dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  cursor: pointer;
  transition: background var(--transition);
}
.hero-arrow:hover { background: rgba(255,255,255,0.25); }
.hero-arrow--prev { left: 24px; }
.hero-arrow--next { right: 24px; }
.hero-arrow svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ─── NOSOTROS ───────────────────────────────────────────────── */
.nosotros-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.nosotros-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent-dk) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nosotros-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nosotros-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.stat-num {
  font-size: 36px;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--mid);
}

/* ─── CATEGORÍAS ─────────────────────────────────────────────── */
.categoria-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.categoria-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--brand-lt);
}

.categoria-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}

.categoria-card p {
  font-size: 14px;
  color: var(--mid);
  line-height: 1.7;
}

/* Grilla de categorías con foto de producto */
.grid-cat {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .grid-cat { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .grid-cat { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .grid-cat { grid-template-columns: 1fr; }
}

.categoria-card--img {
  padding: 0;
  overflow: hidden;
  text-align: center;
}

.categoria-card__img {
  aspect-ratio: 1/1;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.categoria-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.categoria-card--img h3 {
  margin: 0;
  padding: 16px 12px;
  font-size: 17px;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ─── CONTACTO ───────────────────────────────────────────────── */
.contacto-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
}

.contacto-text h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  margin-bottom: 18px;
}

.contacto-text p {
  color: var(--mid);
  line-height: 1.8;
}

.contacto-datos p {
  font-size: 15px;
  color: var(--gray-dk);
  margin-bottom: 10px;
}

.contacto-datos a { color: var(--brand); font-weight: 600; }

.contacto-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-dk);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--dark);
  background: var(--light);
  transition: border-color var(--transition), background var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--white);
}

.form-group textarea { resize: vertical; }

.form-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.form-check input { margin-top: 3px; flex-shrink: 0; accent-color: var(--brand); }

.form-check label {
  font-size: 12px;
  color: var(--mid);
  line-height: 1.6;
}

.form-confirmation {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--brand-lt);
  color: var(--brand-dk);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
footer {
  background: var(--dark-bg);
  color: rgba(255,255,255,0.6);
}

.footer-top {
  padding: 64px 0 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand {
  font-family: var(--tight);
  font-weight: 800;
  font-size: 22px;
  color: var(--white);
}

.footer-brand span { color: var(--accent); }

.footer-brand p {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,0.45);
  line-height: 1.8;
  margin-top: 18px;
  max-width: 300px;
}

.footer-col h5 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 20px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 12px; }

.footer-col a {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.28);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-social {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  transition: background var(--transition), color var(--transition);
}
.footer-social a:hover { background: var(--brand); color: var(--white); }

.footer-social svg { width: 16px; height: 16px; fill: currentColor; }

.footer-social svg.icon-outline {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─── SCROLL REVEAL ──────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* Fade-in lento con entrada lateral */
[data-reveal].reveal-right {
  transform: translateX(60px);
  transition: opacity 1.4s ease, transform 1.4s ease;
}
[data-reveal].reveal-left {
  transform: translateX(-60px);
  transition: opacity 1.4s ease, transform 1.4s ease;
}
[data-reveal].reveal-right.revealed,
[data-reveal].reveal-left.revealed {
  opacity: 1;
  transform: none;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 960px) {
  .nav-inner { overflow: hidden; }

  nav.menu-open {
    background: var(--white);
    border-bottom-color: var(--border);
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    z-index: 99;
    overflow-y: auto;
    text-align: center;
  }

  .nav-links.open { display: flex; }
  .nav-links > li { width: 100%; max-width: 320px; }
  .nav-links > li > a,
  nav.scrolled .nav-links > li > a {
    padding: 18px 20px;
    border-radius: var(--radius);
    color: var(--gray-dk);
    font-size: 20px;
    text-shadow: none;
    text-align: center;
  }
  .nav-links > li > a:hover,
  nav.scrolled .nav-links > li > a:hover {
    color: var(--brand);
    background: var(--brand-lt);
  }
  .nav-links .nav-cta {
    margin-top: 16px;
    text-align: center;
    font-size: 16px;
  }
  .nav-toggle { display: flex; z-index: 101; }
  nav.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  nav.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  nav.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nosotros-grid { grid-template-columns: 1fr; }
  .nosotros-stats { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .contacto-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero-arrow { display: none; }
}

@media (max-width: 600px) {
  .footer-top { grid-template-columns: 1fr; }
  .nosotros-stats { grid-template-columns: 1fr; gap: 20px; text-align: left; }
}
