/* styles.css - Glasscor Railing - Estilos principales */

/* ===== VARIABLES ===== */
:root {
  --navy: #0a1628;
  --navy-mid: #1e3a5f;
  --blue: #2563eb;
  --blue-light: #3b82f6;
  --blue-glass: #60a5fa;
  --white: #ffffff;
  --light: #f0f6ff;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-500: #64748b;
  --gray-700: #334155;
  --text: #0f172a;
  --text-light: #475569;
  --gold: #c9a227;
  --radius: 10px;
  --radius-lg: 18px;
  --shadow: 0 4px 24px rgba(10, 22, 40, 0.10);
  --shadow-lg: 0 12px 48px rgba(10, 22, 40, 0.18);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-w: 1200px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  color-scheme: light;
}

/* ===== BASE ===== */
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { text-wrap: balance; }

::selection { background: var(--blue); color: var(--white); }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section-padding {
  padding: 96px 0;
  contain: layout style;
}

/* ===== HEADER & NAVEGACION ===== */
.topbar {
  background: var(--navy);
  color: var(--white);
  font-size: 0.82rem;
  padding: 8px 0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar a {
  color: var(--blue-glass);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.topbar a:hover { color: var(--white); }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  transition: var(--transition);
  will-change: transform;
}
.header.scrolled {
  box-shadow: var(--shadow);
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 32px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo img {
  height: 44px;
  width: auto;
}
.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}
.logo-text span { color: var(--blue); }

/* Navegacion principal */
.nav { display: flex; align-items: center; gap: 4px; }
.nav-item { position: relative; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  border-radius: var(--radius);
  transition: var(--transition);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  background: var(--light);
  color: var(--blue);
}
.nav-link svg { width: 14px; height: 14px; flex-shrink: 0; transition: var(--transition); }
.nav-item:hover .nav-link svg { transform: rotate(180deg); }

/* Submenú desplegable */
.submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 100;
}
.nav-item:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.submenu a {
  display: block;
  padding: 10px 18px;
  font-size: 0.875rem;
  color: var(--gray-700);
  transition: var(--transition);
  border-radius: 0;
}
.submenu a:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.submenu a:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.submenu a:hover { background: var(--light); color: var(--blue); padding-left: 24px; }

/* Botones CTA header */
.header-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Hamburguesa (móvil) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  padding: 0;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ===== BOTONES ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover {
  background: var(--navy-mid);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.45);
  transform: translateY(-2px);
}
.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--gray-300);
}
.btn-secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--light);
  transform: translateY(-2px);
}
.btn-white {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow);
}
.btn-white:hover {
  background: var(--light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.6);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
  transform: translateY(-2px);
}
.btn-sm { padding: 8px 20px; font-size: 0.82rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../assets/img/barandillas-vidrio.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.38;
  transform: scale(1.04);
  transition: transform 8s ease;
}
.hero.loaded .hero-bg { transform: scale(1); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 22, 40, 0.85) 0%,
    rgba(30, 58, 95, 0.65) 50%,
    rgba(10, 22, 40, 0.70) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  color: var(--white);
  max-width: 760px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(96, 165, 250, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.35);
  color: var(--blue-glass);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.hero h1 span { color: var(--blue-glass); }
.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 40px;
  max-width: 600px;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.stat-item { text-align: center; }
.stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}
.stat-num span { color: var(--blue-glass); }
.stat-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  animation: bounce 2s infinite;
}
.hero-scroll svg { width: 20px; height: 20px; }
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== SECCIÓN INTRO ===== */
.intro-section {
  background: var(--navy);
  color: var(--white);
  padding: 72px 0;
}
.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.intro-item {
  padding: 40px 32px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.intro-item:last-child { border-right: none; }
.intro-icon {
  width: 56px;
  height: 56px;
  background: rgba(96, 165, 250, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--blue-glass);
}
.intro-icon svg { width: 26px; height: 26px; }
.intro-item h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.intro-item p { font-size: 0.9rem; color: rgba(255,255,255,0.65); line-height: 1.65; }

/* ===== TITULOS SECCIÓN ===== */
.section-title {
  text-align: center;
  margin-bottom: 64px;
}
.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}
.section-title h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-title p {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}
.section-title.left { text-align: left; }
.section-title.left p { margin: 0; }

/* ===== PRODUCTOS ===== */
.productos-section { background: var(--light); }
.productos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.producto-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--gray-200);
}
.producto-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-light);
}
.producto-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.producto-card:hover .producto-img { transform: scale(1.05); }
.producto-img-wrap { overflow: hidden; }
.producto-body { padding: 24px; }
.producto-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--light);
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.producto-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.3;
}
.producto-body p {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.65;
  margin-bottom: 20px;
}
.producto-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--gray-200);
}
.producto-precio { font-size: 1.3rem; font-weight: 800; color: var(--navy); }
.producto-precio small {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-light);
  display: block;
  line-height: 1;
}

/* ===== PROYECTOS GALERIA ===== */
.gallery-tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.tab-btn {
  padding: 8px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-500);
  background: var(--gray-100);
  border-radius: 50px;
  transition: var(--transition);
}
.tab-btn.active, .tab-btn:hover {
  background: var(--blue);
  color: var(--white);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px;
  gap: 12px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
}
.gallery-item.wide { grid-column: span 2; }
.gallery-item.tall { grid-row: span 2; }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,22,40,0.85) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-label {
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
}

/* ===== SOBRE NOSOTROS ===== */
.about-section { background: var(--white); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-img-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-img { width: 100%; height: 540px; object-fit: cover; }
.about-badge-float {
  position: absolute;
  bottom: 28px;
  right: -20px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--gray-200);
}
.about-badge-num { font-size: 2rem; font-weight: 800; color: var(--blue); }
.about-badge-text { font-size: 0.8rem; color: var(--text-light); line-height: 1.4; }
.about-content h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 20px;
}
.about-content p {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.75;
  margin-bottom: 16px;
}
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 32px 0; }
.about-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  background: var(--light);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}
.about-feature-icon {
  width: 38px;
  height: 38px;
  background: var(--blue);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--white);
}
.about-feature-icon svg { width: 18px; height: 18px; }
.about-feature-text h4 { font-size: 0.875rem; font-weight: 700; color: var(--navy); margin-bottom: 3px; }
.about-feature-text p { font-size: 0.8rem; color: var(--text-light); }

/* ===== SISTEMAS ===== */
.sistemas-section { background: var(--navy); color: var(--white); }
.sistemas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.sistema-card {
  padding: 48px 36px;
  background: rgba(255,255,255,0.03);
  transition: var(--transition);
  position: relative;
}
.sistema-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--blue-glass));
  opacity: 0;
  transition: var(--transition);
}
.sistema-card:hover { background: rgba(255,255,255,0.07); }
.sistema-card:hover::before { opacity: 1; }
.sistema-num {
  font-size: 3rem;
  font-weight: 800;
  color: rgba(96,165,250,0.2);
  line-height: 1;
  margin-bottom: 16px;
}
.sistema-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; }
.sistema-card p { font-size: 0.9rem; color: rgba(255,255,255,0.65); line-height: 1.7; margin-bottom: 20px; }
.sistema-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(96,165,250,0.12);
  border: 1px solid rgba(96,165,250,0.25);
  color: var(--blue-glass);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 50px;
}

/* ===== CTA SECCIÓN ===== */
.cta-section {
  background: linear-gradient(135deg, var(--blue) 0%, var(--navy-mid) 100%);
  padding: 96px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.cta-section h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  position: relative;
}
.cta-section p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.82);
  max-width: 560px;
  margin: 0 auto 40px;
  position: relative;
}
.cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}
.cta-contact-info {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.15);
  flex-wrap: wrap;
  position: relative;
}
.cta-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
}
.cta-contact-item svg { width: 20px; height: 20px; color: var(--blue-glass); flex-shrink: 0; }
.cta-contact-item a:hover { color: var(--blue-glass); }

/* ===== TESTIMONIOS ===== */
.testimonios-section { background: var(--light); }
.testimonios-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.testimonio-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}
.testimonio-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.testimonio-stars { display: flex; gap: 4px; color: var(--gold); margin-bottom: 16px; }
.testimonio-stars svg { width: 18px; height: 18px; fill: currentColor; }
.testimonio-text {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 24px;
  font-style: italic;
}
.testimonio-text::before { content: '"'; font-size: 2rem; color: var(--blue-light); line-height: 0; vertical-align: -0.4em; }
.testimonio-author { display: flex; align-items: center; gap: 12px; }
.testimonio-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--navy-mid));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.testimonio-name { font-weight: 700; font-size: 0.9rem; color: var(--navy); }
.testimonio-role { font-size: 0.78rem; color: var(--text-light); }

/* ===== CONTACTO SECTION ===== */
.contact-section { background: var(--white); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
  align-items: start;
}
.contact-info h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 16px;
  line-height: 1.2;
}
.contact-info > p {
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 36px;
}
.contact-items { display: flex; flex-direction: column; gap: 20px; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--light);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}
.contact-item:hover { border-color: var(--blue-light); background: #eff6ff; }
.contact-item-icon {
  width: 44px;
  height: 44px;
  background: var(--blue);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  flex-shrink: 0;
}
.contact-item-icon svg { width: 20px; height: 20px; }
.contact-item-text .label { font-size: 0.78rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.contact-item-text a, .contact-item-text span { font-size: 0.95rem; font-weight: 600; color: var(--navy); }
.contact-item-text a:hover { color: var(--blue); }
.contact-messenger { display: flex; gap: 10px; margin-top: 28px; }

/* Formulario */
.form-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
}
.form-card h3 { font-size: 1.4rem; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.form-card > p { font-size: 0.9rem; color: var(--text-light); margin-bottom: 28px; }
.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-group label .required { color: #ef4444; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
  appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group.checkbox { display: flex; align-items: flex-start; gap: 10px; }
.form-group.checkbox input { width: auto; margin-top: 2px; accent-color: var(--blue); }
.form-group.checkbox label {
  font-size: 0.82rem;
  color: var(--text-light);
  font-weight: 400;
  margin: 0;
  line-height: 1.5;
}
.form-group.checkbox label a { color: var(--blue); text-decoration: underline; }
.form-error { font-size: 0.78rem; color: #ef4444; margin-top: 4px; display: none; }
.form-error.visible { display: block; }
.form-success {
  display: none;
  padding: 16px 20px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: var(--radius);
  color: #166534;
  font-size: 0.9rem;
  margin-top: 16px;
}
.form-success.visible { display: flex; align-items: center; gap: 10px; }

/* ===== BLOG ===== */
.blog-section { background: var(--light); }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.blog-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.blog-img { width: 100%; height: 200px; object-fit: cover; transition: transform 0.5s ease; }
.blog-card:hover .blog-img { transform: scale(1.05); }
.blog-img-wrap { overflow: hidden; }
.blog-body { padding: 24px; }
.blog-cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin-bottom: 10px;
}
.blog-body h3 { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-bottom: 10px; line-height: 1.35; }
.blog-body p { font-size: 0.875rem; color: var(--text-light); line-height: 1.65; margin-bottom: 18px; }
.blog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-light);
  border-top: 1px solid var(--gray-200);
  padding-top: 14px;
}
.blog-meta a { color: var(--blue); font-weight: 600; display: flex; align-items: center; gap: 4px; }

/* ===== FOOTER ===== */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
}
.footer-main { padding: 80px 0 48px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
}
.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.7;
  margin: 16px 0 24px;
  max-width: 300px;
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.65);
  transition: var(--transition);
}
.footer-social a:hover { background: var(--blue); color: var(--white); }
.footer-social svg { width: 18px; height: 18px; }
.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-col ul li a:hover { color: var(--blue-glass); padding-left: 4px; }
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.875rem;
}
.footer-contact-item svg { width: 16px; height: 16px; color: var(--blue-glass); flex-shrink: 0; margin-top: 2px; }
.footer-contact-item a:hover { color: var(--blue-glass); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 24px 0;
}
.footer-bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom-text { font-size: 0.8rem; color: rgba(255,255,255,0.45); }
.footer-bottom-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-bottom-links a {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  transition: var(--transition);
}
.footer-bottom-links a:hover { color: var(--blue-glass); }
.footer-logo { height: 38px; width: auto; filter: brightness(0) invert(1); opacity: 0.9; }

/* ===== COOKIE BANNER ===== */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 560px;
  margin: 0 auto;
  background: var(--navy);
  color: var(--white);
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.12);
  z-index: 9999;
  transform: translateY(120%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.cookie-banner p { font-size: 0.82rem; color: rgba(255,255,255,0.72); line-height: 1.6; margin-bottom: 20px; }
.cookie-banner p a { color: var(--blue-glass); text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-btn-accept { background: var(--blue); color: var(--white); padding: 10px 22px; border-radius: 50px; font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: var(--transition); border: none; }
.cookie-btn-accept:hover { background: var(--blue-light); }
.cookie-btn-reject { background: transparent; color: rgba(255,255,255,0.6); padding: 10px 22px; border-radius: 50px; font-size: 0.875rem; cursor: pointer; transition: var(--transition); border: 1px solid rgba(255,255,255,0.25); }
.cookie-btn-reject:hover { color: var(--white); border-color: rgba(255,255,255,0.5); }
.cookie-btn-settings { color: rgba(255,255,255,0.5); font-size: 0.78rem; background: transparent; border: none; cursor: pointer; text-decoration: underline; }
.cookie-btn-settings:hover { color: var(--white); }

/* ===== LINK COOKIES FLOTANTE ===== */
.cookie-settings-link {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9998;
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  font-size: 0.72rem;
  padding: 8px 14px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: var(--transition);
  display: none;
}
.cookie-settings-link:hover { color: var(--white); border-color: rgba(255,255,255,0.4); }
.cookie-settings-link.visible { display: flex; align-items: center; gap: 6px; }

/* ===== PAGINACION INTERNA (breadcrumb) ===== */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 80px 0 60px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/img/GI.png') right center / contain no-repeat;
  opacity: 0.04;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 16px;
}
.breadcrumb a { color: rgba(255,255,255,0.65); transition: var(--transition); }
.breadcrumb a:hover { color: var(--blue-glass); }
.breadcrumb svg { width: 14px; height: 14px; }
.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.page-hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.75);
  max-width: 600px;
}

/* ===== LEGAL ===== */
.legal-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 80px 24px;
}
.legal-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin: 40px 0 12px;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content li {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 12px;
}
.legal-content ul { padding-left: 20px; list-style: disc; }
.legal-content ul li { margin-bottom: 8px; }
.legal-content strong { color: var(--navy); }
.legal-content a { color: var(--blue); text-decoration: underline; }
.legal-info-box {
  background: var(--light);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}
.legal-info-box p { margin: 0; }

/* ===== FAQ ===== */
.faq-section { background: var(--white); }
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--transition);
}
.faq-item.open { border-color: var(--blue-light); box-shadow: 0 0 0 3px rgba(59,130,246,0.08); }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  text-align: left;
  cursor: pointer;
  background: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  gap: 12px;
  transition: var(--transition);
}
.faq-question:hover { background: var(--light); }
.faq-question svg { width: 18px; height: 18px; color: var(--blue); flex-shrink: 0; transition: transform 0.3s ease; }
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.faq-answer-inner {
  padding: 0 24px 20px;
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.75;
}

/* ===== HERO CAROUSEL ===== */
.hero-carousel {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-slide.active { opacity: 0.42; }

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}
.carousel-prev { left: 24px; }
.carousel-next { right: 24px; }
.carousel-prev:hover,
.carousel-next:hover {
  background: rgba(255,255,255,0.28);
  border-color: var(--white);
  transform: translateY(-50%) scale(1.08);
}
.carousel-prev svg,
.carousel-next svg { width: 20px; height: 20px; }

.carousel-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
  align-items: center;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}
.carousel-dot.active {
  background: var(--white);
  transform: scale(1.5);
}
.carousel-dot:hover { background: rgba(255,255,255,0.75); }

/* ===== CATEGORÍAS PRINCIPALES ===== */
.categorias-section { background: var(--white); }
.categorias-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.categoria-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}
.categoria-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-light);
}
.categoria-img-wrap {
  overflow: hidden;
  height: 260px;
}
.categoria-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.4,0,0.2,1);
}
.categoria-card:hover .categoria-img-wrap img { transform: scale(1.07); }
.categoria-body { padding: 28px; }
.categoria-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
  line-height: 1.25;
}
.categoria-body p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 22px;
}

/* ===== UTILIDADES ===== */
.text-center { text-align: center; }
.text-white { color: var(--white); }
.mt-8 { margin-top: 32px; }
.mb-8 { margin-bottom: 32px; }
.hidden { display: none !important; }

/* ===== ANIMACIONES ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== MEJORAS COMPARTIDAS ===== */

/* 1. Barra de progreso de scroll */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), #2ec4da, var(--blue));
  background-size: 200% 100%;
  z-index: 9999;
  transition: width 0.08s linear;
  animation: progressShimmer 3s linear infinite;
}
@keyframes progressShimmer { 0% { background-position: 0 0; } 100% { background-position: 200% 0; } }

/* 2. Skip-to-content */
.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  background: var(--navy);
  color: var(--white);
  padding: 8px 18px;
  border-radius: 0 0 8px 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  z-index: 10001;
  transition: top 0.2s;
  border: 1px solid rgba(255,255,255,0.15);
}
.skip-link:focus { top: 0; outline: 2px solid var(--blue); }

/* 3. FAB flotantes */
.fab-group {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  z-index: 9991;
}
.fab-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  transition: all 0.25s;
  cursor: pointer;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
}
.fab-btn:hover { transform: scale(1.12); box-shadow: 0 8px 28px rgba(0,0,0,0.3); color: #fff; }
.fab-wa { background: #25d366; }
.fab-tg { background: #0088cc; }
.fab-phone { background: var(--blue); }
.fab-btn:focus-visible { outline-offset: 4px; }
.fab-top {
  background: var(--navy);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.25s;
  font-size: 1.3rem;
}
.fab-top.visible { opacity: 1; pointer-events: auto; }
@media (max-width: 480px) { .fab-group { bottom: 1.2rem; right: 0.8rem; } }

/* 4. Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(4, 10, 18, 0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-dialog {
  position: relative;
  max-width: min(1000px, 94vw);
  max-height: 94vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #071320;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
}
.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  background: #050d18;
  transition: opacity 0.2s;
}
.lightbox-cap {
  padding: 10px 52px 12px 16px;
  color: rgba(255,255,255,0.7);
  font-size: 0.82rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  min-height: 38px;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.22); }
.lightbox-close { top: 10px; right: 10px; width: 36px; height: 36px; font-size: 1.3rem; z-index: 2; }
.lightbox-prev, .lightbox-next { top: calc(50% - 60px); transform: translateY(-50%); width: 40px; height: 40px; font-size: 1.2rem; }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }
.lightbox-counter { position: absolute; top: 10px; left: 14px; background: rgba(0,0,0,0.5); color: rgba(255,255,255,0.7); font-size: 0.75rem; padding: 3px 9px; border-radius: 20px; }

/* 5. Toast */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(14px);
  background: var(--navy);
  color: var(--white);
  padding: 10px 22px;
  border-radius: 30px;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.22s, transform 0.22s;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,0.1);
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 6. Copy-to-clipboard */
[data-copy] { cursor: pointer; position: relative; }
[data-copy]:hover { text-decoration: underline dotted; }

/* Lightbox trigger cursor */
[data-lightbox] { cursor: zoom-in; }

/* ===== PÁGINA PRODUCTOS — MEJORAS ===== */

/* Stats bar */
.prod-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--navy);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 32px 0;
}
.prod-stat-item {
  padding: 22px 16px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.08);
  cursor: default;
  transition: background 0.2s;
}
.prod-stat-item:last-child { border-right: none; }
.prod-stat-item:hover { background: rgba(37,99,235,0.18); }
.prod-stat-val {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 6px;
}
.prod-stat-lbl { display: block; font-size: 0.75rem; color: rgba(255,255,255,0.6); line-height: 1.4; }

/* Quick-links grid */
.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 24px 0;
}
.quick-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 7px;
  padding: 14px 10px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
}
.quick-link-card:hover {
  border-color: var(--blue);
  background: rgba(37,99,235,0.04);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.12);
}
.quick-link-card svg { color: var(--blue); flex-shrink: 0; }
.quick-link-card small { color: var(--text-light); font-size: 0.72rem; font-weight: 400; }

/* Product tabs nav */
.prod-tabs-nav {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--gray-200);
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 72px;
  background: var(--white);
  z-index: 40;
  padding-top: 6px;
  margin: 0 -1px;
}
.prod-tabs-nav::-webkit-scrollbar { display: none; }
.prod-tab-btn {
  padding: 11px 18px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color 0.18s, border-color 0.18s;
  flex-shrink: 0;
}
.prod-tab-btn:hover { color: var(--blue); }
.prod-tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }

.prod-tab-panel { display: none; padding: 36px 0; }
.prod-tab-panel.active { display: block; animation: tabFadeIn 0.3s ease; }
@keyframes tabFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Product gallery */
.prod-gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 20px 0;
}
.prod-gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--light);
}
.prod-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.prod-gallery-item:hover img { transform: scale(1.07); }
.prod-gal-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(4,18,34,0.82) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: flex-end;
  padding: 7px 8px;
}
.prod-gallery-item:hover .prod-gal-overlay { opacity: 1; }
.prod-gal-overlay span { font-size: 0.7rem; color: #fff; font-weight: 600; line-height: 1.3; }

/* CTE callout box */
.cte-callout {
  background: rgba(37,99,235,0.05);
  border: 1px solid rgba(37,99,235,0.2);
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 20px 0;
}
.cte-callout strong { display: block; color: var(--navy); font-size: 0.95rem; margin-bottom: 6px; }
.cte-callout p { margin: 0; color: var(--text-light); font-size: 0.88rem; line-height: 1.65; }

/* Tech specs table */
.tech-spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 14px 0;
}
.tech-spec-table th { background: var(--navy); color: var(--white); padding: 9px 13px; text-align: left; font-size: 0.78rem; }
.tech-spec-table td { padding: 8px 13px; border-bottom: 1px solid var(--gray-200); color: var(--text); vertical-align: middle; }
.tech-spec-table tr:last-child td { border-bottom: none; }
.tech-spec-table tr:nth-child(even) td { background: var(--light); }
.spec-bar-wrap { display: flex; align-items: center; gap: 8px; min-width: 80px; }
.spec-bar { flex: 1; height: 5px; background: var(--gray-200); border-radius: 3px; overflow: hidden; }
.spec-bar-fill { height: 100%; background: linear-gradient(90deg, var(--blue), #2ec4da); border-radius: 3px; }
.tag-green { background: rgba(16,185,129,0.12); color: #059669; font-size: 0.7rem; font-weight: 700; padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
.tag-amber { background: rgba(245,158,11,0.12); color: #d97706; font-size: 0.7rem; font-weight: 700; padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
.tag-red { background: rgba(239,68,68,0.12); color: #dc2626; font-size: 0.7rem; font-weight: 700; padding: 2px 7px; border-radius: 4px; white-space: nowrap; }

/* System cards */
.sys-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 24px 0; }
.sys-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.sys-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.sys-card-img { width: 100%; height: 190px; object-fit: cover; display: block; }
.sys-card-head { background: var(--navy); padding: 13px 16px; }
.sys-card-head h3 { margin: 0 0 3px; font-size: 0.98rem; color: var(--white); }
.sys-card-head p { margin: 0; font-size: 0.76rem; color: rgba(255,255,255,0.65); }
.sys-card-body { padding: 16px; }
.sys-card-body p { font-size: 0.86rem; color: var(--text-light); line-height: 1.65; margin: 0 0 10px; }
.sys-card-price { font-size: 1.3rem; font-weight: 800; color: var(--navy); }
.sys-card-price small { font-size: 0.78rem; font-weight: 400; color: var(--text-light); }

/* Inline FAQ */
.inline-faq { margin: 36px 0 0; }
.inline-faq-title { font-size: 0.77rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--navy); margin: 0 0 14px; }
.ifaq-item { border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; margin-bottom: 8px; }
.ifaq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  cursor: pointer;
  background: var(--light);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  gap: 12px;
  user-select: none;
  transition: background 0.15s;
}
.ifaq-q:hover { background: var(--gray-100); }
.ifaq-toggle {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  transition: transform 0.2s;
  line-height: 1;
}
.ifaq-item.open .ifaq-toggle { transform: rotate(45deg); }
.ifaq-a { display: none; padding: 12px 16px 15px; font-size: 0.86rem; color: var(--text-light); line-height: 1.7; border-top: 1px solid var(--gray-200); }
.ifaq-item.open .ifaq-a { display: block; }

/* Product types grid */
.prod-types-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}
.prod-type-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 7px;
  padding: 9px 13px;
  font-size: 0.83rem;
  color: var(--text);
  display: flex;
  align-items: flex-start;
  gap: 7px;
}
.prod-type-item::before { content: "›"; color: var(--blue); font-weight: 700; font-size: 1rem; flex-shrink: 0; }

/* Cert row */
.cert-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.cert-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(37,99,235,0.06);
  border: 1px solid rgba(37,99,235,0.18);
  color: var(--navy);
  font-size: 0.71rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}
.cert-pill svg { color: var(--blue); flex-shrink: 0; }

/* Product code badge */
.prod-code { font-family: monospace; font-size: 0.82rem; background: var(--light); border: 1px solid var(--gray-200); padding: 2px 7px; border-radius: 4px; color: var(--navy); font-weight: 700; }

/* Legal table of contents */
.legal-toc {
  background: var(--light);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 20px 0 32px;
}
.legal-toc h4 { font-size: 0.82rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
.legal-toc ol { margin: 0; padding-left: 20px; }
.legal-toc li { font-size: 0.875rem; margin-bottom: 4px; }
.legal-toc a { color: var(--blue); text-decoration: none; }
.legal-toc a:hover { text-decoration: underline; }

/* Print button */
.print-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: transparent;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.18s;
}
.print-btn:hover { background: var(--light); color: var(--navy); border-color: var(--gray-300); }

/* Blog reading time */
.reading-time { font-size: 0.78rem; color: var(--text-light); display: inline-flex; align-items: center; gap: 5px; }
[data-reading-time] { font-size: 0.75rem; color: var(--text-light); }
[data-reading-time]:not(:empty)::before { content: '·'; margin-right: 4px; }

/* FAQ search */
.faq-search-wrap { margin-bottom: 28px; }
.faq-search-input {
  width: 100%;
  max-width: 480px;
  padding: 12px 18px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--navy);
  background: var(--white);
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
}
.faq-search-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

/* Responsive adjustments for new components */
@media (max-width: 1024px) {
  .quick-links-grid { grid-template-columns: repeat(3, 1fr); }
  .prod-stats-bar { grid-template-columns: repeat(2, 1fr); }
  .sys-card-grid { grid-template-columns: repeat(2, 1fr); }
  .prod-gallery { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .quick-links-grid { grid-template-columns: repeat(2, 1fr); }
  .prod-tabs-nav { top: 60px; }
  .prod-gallery { grid-template-columns: repeat(3, 1fr); }
  .sys-card-grid { grid-template-columns: 1fr; }
  .prod-stats-bar { grid-template-columns: repeat(2, 1fr); }
  .prod-types-list { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .quick-links-grid { grid-template-columns: repeat(2, 1fr); }
  .prod-gallery { grid-template-columns: repeat(2, 1fr); }
}

@media print {
  #scroll-progress, .fab-group, .lightbox, .toast, .skip-link, .cookie-banner, .cookie-settings-link { display: none !important; }
}

/* ============================================================
   MEJORAS L01–L20 · LAYOUT
   ============================================================ */

/* L01 · Custom scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--blue-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }

/* L02 · Page entrance fade */
@keyframes pageFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
body { animation: pageFadeIn 0.42s ease both; }

/* L03 · Hero h1 span animated gradient */
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}
.hero h1 span {
  background: linear-gradient(135deg, #93c5fd 0%, #38bdf8 30%, var(--blue-light) 60%, #93c5fd 100%);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradientShift 5s ease infinite;
}

/* L04 · Category color coding for filter tabs */
.tab-btn[data-filter="escaleras"].active,
.tab-btn[data-filter="escaleras"]:hover { background: #059669; color: #fff; }
.tab-btn[data-filter="peldanos"].active,
.tab-btn[data-filter="peldanos"]:hover  { background: #d97706; color: #fff; }
.tab-btn[data-filter="inoxidable"].active,
.tab-btn[data-filter="inoxidable"]:hover { background: #475569; color: #fff; }

/* L05 · Gallery / blog empty state */
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  display: none;
  color: var(--text-light);
}
.gallery-empty.visible { display: block; }
.gallery-empty svg  { color: var(--gray-300); margin-bottom: 14px; }
.gallery-empty h3   { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.gallery-empty p    { font-size: 0.9rem; }

/* L06 · Tab count badge */
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 17px;
  padding: 0 5px;
  background: rgba(255,255,255,0.25);
  border-radius: 9px;
  font-size: 0.67rem;
  font-weight: 700;
  margin-left: 5px;
  line-height: 1;
}
.tab-btn:not(.active) .tab-count { background: var(--gray-300); color: var(--gray-700); }

/* L07 · Floating label inputs */
.form-float {
  position: relative;
  margin-bottom: 20px;
}
.form-float input,
.form-float textarea,
.form-float select {
  width: 100%;
  padding: 22px 16px 8px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
  appearance: none;
  font-family: var(--font);
  resize: vertical;
}
.form-float input:focus,
.form-float textarea:focus,
.form-float select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-float label {
  position: absolute;
  left: 16px;
  top: 15px;
  font-size: 0.9rem;
  color: var(--text-light);
  pointer-events: none;
  transition: all 0.18s ease;
  font-weight: 500;
}
.form-float input:focus ~ label,
.form-float input:not(:placeholder-shown) ~ label,
.form-float textarea:focus ~ label,
.form-float textarea:not(:placeholder-shown) ~ label {
  top: 7px;
  font-size: 0.68rem;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.03em;
}
.form-float .char-count {
  position: absolute;
  bottom: 9px;
  right: 13px;
  font-size: 0.69rem;
  color: var(--gray-500);
  pointer-events: none;
}
.form-float .char-count.warning  { color: #d97706; }
.form-float .char-count.exceeded { color: #dc2626; font-weight: 700; }

/* L08 · Form field valid / invalid visual state */
.form-group input.valid,
.form-float  input.valid,
.form-group  textarea.valid { border-color: #10b981 !important; }
.form-group  input.invalid,
.form-float  input.invalid  { border-color: #ef4444 !important; }

/* L09 · Lightbox loading spinner */
.lightbox-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: var(--blue-glass);
  border-radius: 50%;
  animation: lbSpin 0.65s linear infinite;
  display: none;
  z-index: 3;
}
.lightbox.loading .lightbox-spinner { display: block; }
.lightbox.loading .lightbox-img    { opacity: 0.18; }
@keyframes lbSpin { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* L10 · Mobile menu dark overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,22,40,0.55);
  z-index: 996;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.nav-overlay.visible { display: block; animation: fadeOverlay 0.22s ease; }
@keyframes fadeOverlay { from { opacity: 0; } to { opacity: 1; } }

/* L11 · Enhanced keyboard focus styles */
*:focus-visible {
  outline: 2px solid var(--blue) !important;
  outline-offset: 3px !important;
  border-radius: 4px !important;
}

/* L12 · FAB progress ring */
.fab-top-ring {
  position: absolute;
  inset: -2px;
  transform: rotate(-90deg);
  pointer-events: none;
  overflow: visible;
}
.fab-top-ring circle {
  fill: none;
  stroke: var(--blue-glass);
  stroke-width: 2.5;
  stroke-linecap: round;
}
.fab-btn.fab-top { overflow: visible; position: relative; }

/* L13 · Blog card category color coding */
.blog-card[data-cat="barandillas"] .blog-cat { color: var(--blue); }
.blog-card[data-cat="escaleras"]   .blog-cat { color: #059669; }
.blog-card[data-cat="peldanos"]    .blog-cat { color: #d97706; }

/* L14 · Section eyebrow decorative accent */
.section-eyebrow::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 2px;
  background: var(--blue);
  border-radius: 1px;
  vertical-align: middle;
  margin-right: 8px;
}

/* L15 · Footer wave divider */
.footer-wave {
  display: block;
  line-height: 0;
  overflow: hidden;
  margin-bottom: -2px;
  background: var(--white);
}
.footer-wave svg { display: block; width: 100%; }

/* L16 · Share button */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  background: transparent;
  border: 1px solid var(--gray-200);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1;
}
.share-btn:hover { background: var(--blue); color: var(--white); border-color: var(--blue); }
.share-btn svg   { width: 13px; height: 13px; flex-shrink: 0; }

/* L17 · Image zoom hint */
.img-zoom-hint {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(10,22,40,0.72);
  color: rgba(255,255,255,0.92);
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  white-space: nowrap;
}
[data-lightbox]:hover .img-zoom-hint { opacity: 1; }

/* L18 · Blog search */
.blog-search-outer { text-align: center; margin-bottom: 20px; }
.blog-search-wrap  {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 400px;
}
.blog-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
  width: 15px;
  height: 15px;
}
.blog-search-input {
  width: 100%;
  padding: 10px 18px 10px 40px;
  border: 1.5px solid var(--gray-200);
  border-radius: 50px;
  font-size: 0.9rem;
  color: var(--navy);
  background: var(--white);
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
  font-family: var(--font);
}
.blog-search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* L19 · Scroll-to-top arrow pulse */
.btn-scroll-top.show svg { animation: arrowPulse 2s ease infinite; }
@keyframes arrowPulse {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-3px); }
}

/* L20 · Active nav link animated underline */
.nav-link { position: relative; }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--blue);
  border-radius: 1px;
  transform-origin: left;
  animation: navUnderline 0.3s ease forwards;
}
@keyframes navUnderline { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ============================================================
   RESPONSIVE ADDITIONS (mejoras nuevas)
   ============================================================ */
@media (max-width: 480px) {
  .blog-search-wrap { max-width: 100%; }
  .form-float textarea { min-height: 100px; }
}

/* ============================================================
   LANGUAGE SELECTOR (i18n)
   ============================================================ */
/* Topbar inline selector */
.lang-selector-inline {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 12px;
}
.lang-btn-inline {
  background: none;
  border: 1px solid transparent;
  color: rgba(255,255,255,0.55);
  font-size: .7rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: .04em;
  transition: color .2s, border-color .2s;
}
.lang-btn-inline:hover { color: #fff; border-color: rgba(255,255,255,0.35); }
.lang-btn-inline.active { color: var(--blue-light, #7ec8e3); border-color: var(--blue-light, #7ec8e3); }

/* Nav widget (mobile menu) */
.lang-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px 8px;
  border-top: 1px solid rgba(255,255,255,0.07);
  margin-top: 4px;
}
.lang-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: .05em;
  transition: color .2s, border-color .2s, background .2s;
}
.lang-btn:hover { color: #fff; border-color: rgba(255,255,255,0.5); }
.lang-btn.active {
  color: var(--navy, #0a1628);
  background: var(--blue-light, #7ec8e3);
  border-color: var(--blue-light, #7ec8e3);
}
@media (min-width: 992px) {
  .lang-selector { display: none; } /* hide mobile widget on desktop; topbar has it */
}
