/* ==========================================================
   Envagreenpack – estilos
   ========================================================== */

:root {
  --ink: #16211B;          /* texto principal / fondos oscuros */
  --muted: #3E4A43;        /* texto secundario */
  --ground: #F5F6F2;       /* fondo general */
  --white: #FFFFFF;
  --line: #DDE3DA;         /* bordes suaves */
  --line-strong: #B9C4BB;  /* bordes de campos y chips */
  --soft: #EEF2EC;         /* fondo de etiquetas */
  --accent: #1E6B3B;       /* verde de marca */
  --accent-dark: #154D2A;
  --accent-light: #9FD3AE; /* verde sobre fondo oscuro */
  --brand-bright: #5FBF47; /* verde brillante de los títulos de portada */
  --on-dark: #C9D3CB;

  --font-display: "Raleway", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --radius: 10px;
  --radius-sm: 6px;
  --wrap: 1200px;
  --section-y: clamp(56px, 8vw, 88px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--ground);
}

img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1.1; font-variant-numeric: lining-nums; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0; }
figure { margin: 0; }
address { font-style: normal; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.skip {
  position: absolute; left: 16px; top: -60px;
  background: var(--ink); color: var(--white);
  padding: 10px 16px; border-radius: var(--radius-sm); z-index: 100;
}
.skip:focus { top: 16px; color: var(--white); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }
.muted { color: var(--muted); }

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: inherit; font-weight: 600; font-size: 16px;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
}
.btn--lg { min-height: 50px; padding: 13px 26px; font-size: 17px; }
.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover { background: var(--accent-dark); color: var(--white); }
.btn--outline { background: var(--white); color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--white); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Barra superior ---------- */
.topbar { background: var(--ink); color: #E6ECE6; font-size: 14px; position: relative; z-index: 70; }
.topbar a { color: #E6ECE6; text-decoration: none; }
.topbar a:hover { color: var(--white); text-decoration: underline; }
.topbar__inner {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  justify-content: space-between; align-items: center;
  padding-block: 10px;
}
.topbar__group { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* ---------- Encabezado ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-block: 14px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand img { height: 52px; width: auto; max-width: 260px; object-fit: contain; }

.nav { display: flex; align-items: center; gap: 24px; }
.nav a:not(.btn) {
  color: var(--ink); text-decoration: none; font-weight: 600; padding: 10px 0;
  white-space: nowrap;
}
.nav__cta { white-space: nowrap; }
.nav a:not(.btn):hover { color: var(--accent); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; padding: 10px;
  background: none; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  cursor: pointer; flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }

@media (max-width: 1200px) {
  .nav-toggle { display: flex; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav__cta { margin-top: 16px; }
}

/* ---------- Imágenes y respaldo ---------- */
.media {
  background-color: #DDE3DA;
  overflow: hidden;
  position: relative;
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media.is-missing,
.options li.is-missing img {
  background-image: repeating-linear-gradient(135deg, rgba(22,33,27,0.05) 0 12px, transparent 12px 24px);
}
.media.is-missing img { visibility: hidden; }

/* ---------- Portada: carrusel animado ---------- */
.hero {
  position: relative;
  height: clamp(540px, 86vh, 820px);
  background: #5E6B63;
  color: var(--white);
  overflow: hidden;
}
.hero__slides { position: absolute; inset: 0; }

.slide {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  opacity: 0; visibility: hidden;
  transition: opacity 1s ease, visibility 0s linear 1s;
}
.slide.is-active {
  opacity: 1; visibility: visible;
  transition: opacity 1s ease, visibility 0s;
}

/* Foto de fondo con acercamiento lento */
.slide__bg {
  position: absolute; inset: 0;
  background-color: #5E6B63;
  background-size: cover;
  background-position: center;
  transform: scale(1.12);
  transition: transform 9s linear;
}
.slide.is-active .slide__bg { transform: scale(1); }
.slide__bg::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(25, 28, 27, 0.42);
}

/* Texto: entra desde la derecha, sale hacia la izquierda */
.slide__content {
  position: relative; z-index: 1; width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  text-align: center;
  padding-bottom: 48px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}
.slide__content .btn { text-shadow: none; }
.slide__content > * {
  opacity: 0;
  transform: translateX(80px);
  transition: opacity 0.7s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.slide.is-active .slide__content > * { opacity: 1; transform: none; }
.slide.is-active .slide__content > :nth-child(1) { transition-delay: 0.25s; }
.slide.is-active .slide__content > :nth-child(2) { transition-delay: 0.4s; }
.slide.is-active .slide__content > :nth-child(3) { transition-delay: 0.6s; }
.slide.is-active .slide__content > :nth-child(4) { transition-delay: 0.75s; }
.slide.is-leaving .slide__content > * {
  opacity: 0;
  transform: translateX(-80px);
  transition-delay: 0s;
}

.slide__eyebrow {
  font-family: var(--font-display);
  font-weight: 400; font-size: 15px;
  letter-spacing: 0.22em; text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.85);
}
.slide__title {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 6vw, 4.6rem);
  line-height: 1.02;
  text-transform: uppercase;
  max-width: 15em;
  text-wrap: balance;
}
.slide__title .t-light { font-weight: 300; }
.slide__title .t-bold { font-weight: 900; color: var(--brand-bright); }
.slide__text { font-size: 19px; color: #E3E9E4; max-width: 36em; }
.slide__actions { justify-content: center; margin-top: 6px; }

.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.85); }
.btn--ghost:hover { background: var(--white); color: var(--ink); }

/* Controles */
.hero__controls {
  position: absolute; z-index: 2;
  left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
}
.hero__btn {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%; cursor: pointer;
}
.hero__btn:hover { background: rgba(255, 255, 255, 0.2); }
.hero__dots { display: flex; gap: 2px; }
.hero__dot {
  width: 36px; height: 44px; padding: 0;
  background: none; border: none; cursor: pointer;
  position: relative;
}
.hero__dot::before {
  content: "";
  position: absolute; left: 4px; right: 4px; top: 50%;
  height: 3px; margin-top: -1.5px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 2px;
}
.hero__dot[aria-current="true"]::before { background: var(--brand-bright); }
.hero__pause .i-play { display: none; }
.hero__pause[aria-pressed="true"] .i-play { display: block; }
.hero__pause[aria-pressed="true"] .i-pause { display: none; }
.hero :focus-visible { outline-color: var(--white); }

@media (max-width: 560px) {
  .slide__eyebrow { font-size: 13px; letter-spacing: 0.16em; }
  .slide__text { font-size: 17px; }
  .slide__actions .btn { flex: 1 1 100%; }
  .hero__controls { left: 16px; transform: none; gap: 6px; }
  .hero__dot { width: 28px; }
}

/* Sin animaciones para quien lo prefiera */
@media (prefers-reduced-motion: reduce) {
  .slide, .slide.is-active, .slide__bg, .slide__content > * { transition: none !important; }
  .slide__bg, .slide.is-active .slide__bg { transform: none; }
  .slide__content > * { opacity: 1; transform: none; }
}

/* ---------- Secciones ---------- */
.section { padding-block: var(--section-y); }
.section--white { background: var(--white); border-block: 1px solid var(--line); }
.section--dark { background: var(--ink); color: var(--ground); }
.section--dark .eyebrow { color: var(--accent-light); }
.section--dark p { color: var(--on-dark); }

.section__head { display: flex; flex-direction: column; gap: 12px; max-width: 680px; margin-bottom: 40px; }
.section__head--row {
  max-width: none; flex-direction: row; flex-wrap: wrap;
  justify-content: space-between; align-items: flex-end; gap: 16px 48px;
  margin-bottom: 32px;
}
.section__head--row > div { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }

.grid { display: grid; gap: 20px; }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* Empresa */
.split { display: flex; flex-wrap: wrap; gap: 48px; }
.split__intro { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.split__cards { flex: 1 1 520px; min-width: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.panel {
  flex: 1 1 240px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 8px;
}

/* Especialidades */
.spec { display: flex; flex-direction: column; gap: 14px; }
.spec .media { height: 240px; border-radius: var(--radius); }
.spec h3 { font-size: 21px; }
.spec p { font-size: 16px; }

/* Chips */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 6px 14px; font-size: 15px; font-weight: 600;
}

/* Pestañas de catálogo */
.tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding-bottom: 16px; margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  min-height: 44px; padding: 10px 20px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--white); color: var(--ink);
  font-family: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
}
.tabs button:hover { border-color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* Productos */
.product {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.product[hidden] { display: none; }
.product .media { height: 220px; background-color: var(--white); }
.product .media img { object-fit: contain; padding: 12px; }
.product__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); }
.product__body p { color: var(--muted); font-size: 15px; }

/* Diseño a medida */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.step {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 20px;
}
.step h3 { display: flex; align-items: baseline; gap: 12px; font-size: 22px; }
.step__n { font-weight: 800; font-size: 28px; color: var(--accent); }
.options {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.options li {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--soft); border-radius: var(--radius-sm); padding: 10px;
  font-size: 15px; font-weight: 500; line-height: 1.3;
}
.options img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: contain;
  background: var(--white); border-radius: 4px;
}

/* Calidad y certificaciones */
.section__head--center { margin-inline: auto; text-align: center; align-items: center; max-width: 760px; }
.certs {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px;
}
.cert {
  background: var(--white);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 32px 28px 30px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.cert:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 14px 30px rgba(22, 33, 27, 0.08);
}
.cert__logo {
  width: 150px; height: 150px; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: center;
}
.cert__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cert h3 { font-size: 21px; font-weight: 800; }
.cert p { font-size: 16px; max-width: 24em; }

.values {
  margin-top: 48px; padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.values h3 { font-size: 18px; }
.values .chips { justify-content: center; }
.values .chips li { background: var(--white); }

/* Contacto */
.contact { display: flex; flex-wrap: wrap; gap: 48px; }
.contact__form { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
#quote-form { display: flex; flex-wrap: wrap; gap: 16px; }
.field { flex: 1 1 220px; display: flex; flex-direction: column; gap: 6px; }
.field--full { flex-basis: 100%; }
.field label { font-weight: 600; font-size: 15px; }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 16px; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 12px; min-height: 44px; background: var(--white); width: 100%;
}
.field textarea { resize: vertical; }
.field input[aria-invalid="true"] { border-color: #A3261B; }
.form-status { flex-basis: 100%; font-weight: 600; min-height: 0; }
.form-status.is-error { color: #A3261B; }
.form-status.is-ok { color: var(--accent); }

.contact__places { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.place {
  background: var(--ground); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 8px;
}

/* Pie */
.footer { background: var(--ink); color: var(--on-dark); font-size: 15px; }
.footer__inner {
  display: flex; flex-wrap: wrap; gap: 16px 32px;
  justify-content: space-between; align-items: center; padding-block: 40px;
}
.footer__brand { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--ground); }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer a { color: var(--on-dark); }
.footer a:hover { color: var(--white); }

/* Redes sociales: pie de página */
.social { display: flex; gap: 10px; }
.social a {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--white); font-size: 18px; text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.social a:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }

/* Redes sociales: barra lateral fija */
.social-rail {
  position: fixed; left: 0; top: 50%; z-index: 55;
  transform: translateY(-50%);
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line); border-left: none;
  border-radius: 0 12px 12px 0;
  box-shadow: 0 8px 24px rgba(22, 33, 27, 0.12);
  overflow: visible;
}
.social-rail__link {
  position: relative;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); font-size: 20px; text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}
.social-rail__link + .social-rail__link { border-top: 1px solid var(--line); }
.social-rail__link:first-child { border-top-right-radius: 12px; }
.social-rail__link:last-child { border-bottom-right-radius: 12px; }
.social-rail__link--fb:hover, .social-rail__link--fb:focus-visible { background: #1877F2; color: var(--white); }
.social-rail__link--ig:hover, .social-rail__link--ig:focus-visible { background: #D62976; color: var(--white); }

/* Etiqueta que se despliega al pasar el mouse */
.social-rail__label {
  position: absolute; left: 100%; top: 50%;
  margin-left: 8px; padding: 6px 12px;
  background: var(--ink); color: var(--white);
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  border-radius: 6px; white-space: nowrap;
  opacity: 0; transform: translate(-6px, -50%);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.social-rail__link:hover .social-rail__label,
.social-rail__link:focus-visible .social-rail__label { opacity: 1; transform: translate(0, -50%); }

@media (max-width: 960px) {
  /* En celular la barra lateral se oculta; las redes quedan en la barra superior y el pie */
  .social-rail { display: none; }
}

/* Redes en la barra superior */
.topbar__social { display: inline-flex; gap: 14px; align-items: center; }
.topbar__social a { font-size: 15px; display: inline-flex; padding: 4px; }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--white);
  box-shadow: 0 6px 18px rgba(22, 33, 27, 0.25);
}
.wa-float:hover { background: var(--accent-dark); color: var(--white); }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .lead { font-size: 18px; }
  .options { grid-template-columns: 1fr 1fr; }
  .actions .btn { flex: 1 1 100%; }
}


/* ==========================================================
   Zoom al pasar el mouse (especialidades, productos, diseño a medida)
   ========================================================== */
.spec .media img,
.product .media img,
.opt-img img { transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.spec:hover .media img,
.product:hover .media img { transform: scale(1.08); }

.product { transition: box-shadow 0.3s ease, border-color 0.3s ease; }
.product:hover { border-color: var(--line-strong); box-shadow: 0 14px 30px rgba(22, 33, 27, 0.08); }

.opt-img {
  display: block; overflow: hidden;
  background: var(--white); border-radius: 4px;
}
.options img { background: transparent; border-radius: 0; }
.options li { transition: background 0.25s ease; cursor: default; }
.options li:hover { background: #E2E9DF; }
.options li:hover .opt-img img { transform: scale(1.12); }

/* ==========================================================
   Telas: botones interactivos
   ========================================================== */
.fabric-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.fabric-chip {
  --chip: #7A8A80;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 8px 18px 8px 14px;
  background: var(--white); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 999px;
  font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.fabric-chip--std { --chip: #B8A98A; }
.fabric-chip--steel { --chip: #8E9DAA; }
.fabric-chip--carbon { --chip: #1E1E1E; }
.fabric-chip--crohmiq { --chip: #1F6FEB; }
.fabric-chip:hover { border-color: var(--chip); transform: translateY(-1px); }
.fabric-chip__dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--chip);
  box-shadow: 0 0 0 0 var(--chip);
}
.fabric-chip:not([aria-expanded="true"]) .fabric-chip__dot { animation: chip-ping 2.4s ease-out infinite; }
.fabric-chip--steel .fabric-chip__dot { animation-delay: 0.3s !important; }
.fabric-chip--carbon .fabric-chip__dot { animation-delay: 0.6s !important; }
.fabric-chip--crohmiq .fabric-chip__dot { animation-delay: 0.9s !important; }
.fabric-chip[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
@keyframes chip-ping {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--chip) 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 9px transparent; }
}

/* Panel que se despliega */
.fabric-panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), margin 0.5s ease;
}
.fabric-panel.is-open { grid-template-rows: 1fr; margin-bottom: 32px; }
.fabric-panel__inner { overflow: hidden; position: relative; min-height: 0; }
.fabric-panel.is-open .fabric-panel__inner {
  background: var(--white);
  border: 1px solid var(--line); border-radius: 16px;
}
.fabric-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--soft); color: var(--ink); border: none; cursor: pointer;
}
.fabric-close:hover { background: var(--line); }
.fabric-panel:not(.is-open) .fabric-close { visibility: hidden; }

.fabric-item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 32px;
  padding: 28px;
}
.fabric-item[hidden] { display: none; }
.fabric-item__visual {
  flex: 1 1 340px; min-width: 0;
  background: var(--ink); border-radius: 12px;
  padding: 20px 20px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.fabric-item__visual svg { width: 100%; height: auto; display: block; }
.fabric-item__visual figcaption { color: var(--on-dark); font-size: 14px; text-align: center; }
.fabric-item__text { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding-right: 32px; }
.fabric-item__text h3 { font-size: 26px; font-weight: 800; }
.fabric-facts { margin: 6px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.fabric-facts div {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.fabric-facts dt { color: var(--muted); font-size: 15px; }
.fabric-facts dd { margin: 0; font-weight: 600; font-size: 15px; text-align: right; }

/* Entrada del contenido */
.fabric-item.is-active .fabric-item__visual { animation: fx-rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.fabric-item.is-active .fabric-item__text > * { animation: fx-rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.fabric-item.is-active .fabric-item__text > :nth-child(2) { animation-delay: 0.08s; }
.fabric-item.is-active .fabric-item__text > :nth-child(3) { animation-delay: 0.16s; }
@keyframes fx-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* --- Ilustraciones animadas --- */
.fx .fx-weave { opacity: 0.9; }
.fabric-item.is-active .fx-weave { animation: fx-weave-in 0.8s ease both; }
@keyframes fx-weave-in { from { opacity: 0; } to { opacity: 0.9; } }

/* Estándar: la carga se acumula */
.fx-charge circle { fill: #F2B134; stroke: #FFF4D6; stroke-width: 2; }
.fx-charge path { stroke: #16211B; stroke-width: 2.4; stroke-linecap: round; }
.fx-charge { transform-box: fill-box; transform-origin: center; opacity: 0; }
.fabric-item.is-active .fx-charge {
  animation: fx-pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) var(--d) forwards,
             fx-throb 1.6s ease-in-out calc(var(--d) + 0.5s) infinite;
}
@keyframes fx-pop { from { opacity: 0; transform: scale(0.2); } to { opacity: 1; transform: scale(1); } }
@keyframes fx-throb { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 1; transform: scale(1.18); } }

/* Tipo C: corriente que viaja a tierra */
.fx-thread path { stroke: #2B8A4A; stroke-width: 4; fill: none; }
.fx-flow path {
  stroke: #9CF0AA; stroke-width: 4; fill: none; stroke-linecap: round;
  stroke-dasharray: 10 30;
  filter: drop-shadow(0 0 4px #7CE08A);
}
.fabric-item.is-active .fx-flow path { animation: fx-flow 1.1s linear infinite; }
@keyframes fx-flow { to { stroke-dashoffset: -40; } }
.fx-ground path { stroke: #9CF0AA; stroke-width: 3; fill: none; stroke-linecap: round; }
.fabric-item.is-active .fx-ground { animation: fx-ground 1.1s ease-in-out infinite; }
@keyframes fx-ground { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

/* Tipo D: la carga se disipa */
.fx-dissip path { stroke: #2F80ED; stroke-width: 3; fill: none; stroke-dasharray: 2 7; stroke-linecap: round; opacity: 0.8; }
.fx-spark { transform-box: fill-box; transform-origin: center; opacity: 0; }
.fx-spark circle { fill: #8CCBFF; filter: drop-shadow(0 0 8px #3B9BFF); }
.fabric-item.is-active .fx-spark { animation: fx-dissipate 2.4s ease-out var(--d) infinite; }
@keyframes fx-dissipate {
  0% { opacity: 0; transform: scale(0.4); }
  15% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(3.2); }
}

/* Tipo B: descargas pequeñas e inofensivas */
.fx-release { transform-box: fill-box; transform-origin: center; opacity: 0; }
.fx-release circle { fill: #F39A4E; stroke: #FFE3CC; stroke-width: 1.5; }
.fx-release path { stroke: #F39A4E; stroke-width: 2; stroke-linecap: round; }
.fabric-item.is-active .fx-release { animation: fx-release 1.8s ease-out var(--d) infinite; }
@keyframes fx-release {
  0% { opacity: 0; transform: scale(0.3); }
  25% { opacity: 1; transform: scale(1); }
  45% { opacity: 1; transform: scale(1.15); }
  60%, 100% { opacity: 0; transform: scale(0.6); }
}

@media (max-width: 560px) {
  .fabric-item { padding: 60px 16px 20px; gap: 20px; }
  .fabric-item__text { padding-right: 0; }
  .fabric-facts div { flex-direction: column; }
  .fabric-facts dd { text-align: left; }
  .fabric-close { top: 8px; right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .spec .media img, .product .media img, .opt-img img { transition: none; }
  .fabric-chip__dot, .fabric-item.is-active *, .fabric-item.is-active .fx-charge, .fabric-item.is-active .fx-spark, .fabric-item.is-active .fx-release { animation: none !important; }
  .fx-charge, .fx-spark, .fx-release { opacity: 1; }
  .fabric-panel { transition: none; }
}


/* ==========================================================
   Portal (Odoo): menú desplegable en la barra superior
   ========================================================== */
.portal { position: relative; }
.portal__btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 4px 12px;
  background: var(--accent); color: var(--white);
  border: none; border-radius: 999px;
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 0.2s ease;
}
.portal__btn:hover { background: var(--accent-dark); }
.portal__chev { transition: transform 0.25s ease; }
.portal__btn[aria-expanded="true"] .portal__chev { transform: rotate(180deg); }

.portal__menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: 300px; max-width: calc(100vw - 32px);
  margin: 0; padding: 8px; list-style: none;
  background: var(--white); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 18px 40px rgba(22, 33, 27, 0.18);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}
.portal.is-open .portal__menu {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.portal__menu a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 8px;
  color: var(--ink); text-decoration: none;
  transition: background 0.15s ease;
}
.topbar .portal__menu a { color: var(--ink); }
.topbar .portal__menu a:hover { background: var(--soft); color: var(--ink); text-decoration: none; }
.portal__icon {
  flex: none; width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #E3EFE5; color: var(--accent);
}
.portal__text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.portal__text strong { font-size: 15px; }
.portal__text small { font-size: 13px; color: var(--muted); }
.portal__ext { flex: none; color: var(--muted); }

@media (max-width: 560px) {
  .portal__menu { position: fixed; left: 16px; right: 16px; top: auto; width: auto; margin-top: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .portal__menu, .portal__chev { transition: none; }
}

/* LinkedIn en la barra lateral */
.social-rail__link--li:hover, .social-rail__link--li:focus-visible { background: #0A66C2; color: var(--white); }


/* ==========================================================
   Catálogo: pestañas de categoría (barra con indicador deslizante)
   ========================================================== */
/* Botones de tela en una sola fila junto al título */
.section__head--row > .fabric-chips { flex: 0 0 auto; flex-direction: row; flex-wrap: wrap; gap: 10px; max-width: none; }

.cat-tabs {
  position: relative;
  display: flex; flex-wrap: nowrap; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
  padding: 6px; margin-bottom: 28px;
  background: var(--white);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 6px 18px rgba(22, 33, 27, 0.05);
}
.cat-tabs__indicator {
  position: absolute; top: 6px; left: 0; height: calc(100% - 12px); width: 0;
  background: var(--ink); border-radius: 11px;
  transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1), width 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 0;
}
.tabs .cat-tab {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 10px;
  flex: 1 1 auto; white-space: nowrap;
  min-height: 60px; padding: 10px 14px;
  background: transparent; border: none; border-radius: 11px;
  color: var(--ink); text-align: left;
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: color 0.3s ease, background 0.2s ease;
}
.tabs .cat-tab:hover { background: var(--soft); border: none; }
.tabs .cat-tab[aria-selected="true"] { background: transparent; color: var(--white); }
.cat-tab__icon {
  flex: none; width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #E3EFE5; color: var(--accent);
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.cat-tab:hover .cat-tab__icon { transform: rotate(-6deg) scale(1.06); }
.cat-tab[aria-selected="true"] .cat-tab__icon { background: var(--accent); color: var(--white); }
.cat-tab__label { flex: 1 0 auto; line-height: 1.2; }
.cat-tab__count {
  flex: none; min-width: 26px; height: 26px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--soft); color: var(--muted);
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  transition: background 0.3s ease, color 0.3s ease;
}
.cat-tab[aria-selected="true"] .cat-tab__count { background: rgba(255, 255, 255, 0.16); color: var(--white); }

.cat-tabs::-webkit-scrollbar { display: none; }

/* Sin JS el fondo oscuro va en la pestaña misma */
.cat-tabs:not(.has-indicator) .cat-tab[aria-selected="true"] { background: var(--ink); }

/* Entrada de productos al cambiar de categoría */
.products .product.is-entering { animation: cat-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: var(--stagger, 0s); }
@keyframes cat-in { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }

@media (max-width: 1000px) {
  .cat-tabs {
    display: flex; flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity;
    scrollbar-width: none; -ms-overflow-style: none;
  }
    .tabs .cat-tab { flex: 0 0 auto; scroll-snap-align: start; white-space: nowrap; min-height: 54px; }
  .cat-tab__label { flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cat-tabs__indicator, .cat-tab__icon { transition: none; }
  .products .product.is-entering { animation: none; }
}


/* ==========================================================
   Telas: colores por tipo (Steel, Carbon, Crohmiq Blue)
   ========================================================== */
/* Steel: hilos plateados con corriente blanca */
.fx--steel .fx-thread path { stroke: #5F6F7C; stroke-width: 5; }
.fx--steel .fx-flow path { stroke: #F4F9FF; filter: drop-shadow(0 0 4px #BFD9FF); }
.fx--steel .fx-ground path { stroke: #DCE6EE; }

/* Carbon: hilos negros con corriente verde */
.fx--carbon .fx-thread path { stroke: #161616; stroke-width: 5; }
.fx--carbon .fx-flow path { stroke: #9CF0AA; }

/* Crohmiq Blue: tela azul con destellos claros */
.fx--crohmiq .fx-dissip path { stroke: #CFE6FF; opacity: 0.9; }
.fx--crohmiq .fx-spark circle { fill: #EAF6FF; filter: drop-shadow(0 0 9px #8CCBFF); }


/* ==========================================================
   Productos: tarjeta clicable + ventana de detalle
   ========================================================== */
.product { position: relative; cursor: pointer; }
.product__open {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; padding: 0;
  background: transparent; border: none; border-radius: inherit; cursor: pointer;
}
.product__open:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.product__hint {
  position: absolute; top: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--ink); color: var(--white);
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  opacity: 0; transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.product:hover .product__hint, .product__open:focus-visible .product__hint { opacity: 1; transform: none; }
@media (hover: none) { .product__hint { opacity: 1; transform: none; } }

.pmodal {
  width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  padding: 0; border: none; border-radius: 18px;
  background: var(--white); color: var(--ink);
  box-shadow: 0 30px 80px rgba(10, 16, 12, 0.35);
  overflow: hidden;
}
.pmodal::backdrop { background: rgba(14, 20, 16, 0.6); backdrop-filter: blur(3px); }
.pmodal[open] { animation: pm-in 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
.pmodal[open]::backdrop { animation: pm-fade 0.3s ease; }
@keyframes pm-in { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes pm-fade { from { opacity: 0; } to { opacity: 1; } }

.pmodal__box { display: flex; flex-wrap: wrap; max-height: calc(100vh - 32px); overflow-y: auto; position: relative; }
.pmodal__close {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--soft); color: var(--ink); border: none; cursor: pointer;
}
.pmodal__close:hover { background: var(--line); }

.pmodal__media {
  flex: 1 1 420px; min-width: 0; position: relative;
  min-height: 360px; background: var(--ground);
  display: flex; align-items: center; justify-content: center; padding: 32px;
}
.pmodal__media img { max-width: 100%; max-height: 420px; object-fit: contain; }
.pmodal__media img.is-swapping { animation: pm-img 0.4s ease; }
@keyframes pm-img { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
.pmodal__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--white); color: var(--ink);
  border: 1px solid var(--line); box-shadow: 0 4px 12px rgba(22, 33, 27, 0.12);
  cursor: pointer;
}
.pmodal__nav:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.pmodal__nav--prev { left: 14px; }
.pmodal__nav--next { right: 14px; }
.pmodal__nav[hidden] { display: none; }

.pmodal__body {
  flex: 1 1 340px; min-width: 0;
  padding: 44px 36px 32px;
  display: flex; flex-direction: column; gap: 14px;
}
.pmodal__cat {
  align-self: flex-start;
  padding: 4px 12px; border-radius: 999px;
  background: #E3EFE5; color: var(--accent);
  font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
}
.pmodal__title { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 800; padding-right: 40px; }
.pmodal__desc { color: var(--muted); font-size: 16px; line-height: 1.65; }
.pmodal__detail { color: var(--muted); display: flex; flex-direction: column; gap: 10px; }
.pmodal__detail:empty { display: none; }
.pmodal__detail ul { margin: 0; padding-left: 20px; }
.pmodal__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 12px; }
.pmodal__count { color: var(--muted); font-size: 14px; }

@media (max-width: 720px) {
  .pmodal__media { min-height: 240px; padding: 20px; }
  .pmodal__media img { max-height: 260px; }
  .pmodal__body { padding: 24px 20px 24px; }
  .pmodal__actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .pmodal[open], .pmodal[open]::backdrop, .pmodal__media img.is-swapping { animation: none; }
  .product__hint { transition: none; }
}

/* La descripción solo se ve en la ventana de detalle, no en la tarjeta */
.product .product__body p { display: none; }
.product .product__body { padding: 16px 20px 18px; }


/* ==========================================================
   Preguntas frecuentes
   ========================================================== */
.faq { background: var(--white); border-block: 1px solid var(--line); }
.faq__inner { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.faq__intro {
  flex: 1 1 320px; min-width: 0;
  display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 110px;
}
.faq__help {
  margin-top: 12px; padding: 22px;
  background: var(--ground); border: 1px solid var(--line); border-radius: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.faq__help strong { font-family: var(--font-display); font-size: 18px; }
.faq__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.faq__list { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }

.faq__item {
  background: var(--white);
  border: 1px solid var(--line); border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq__item:hover { border-color: var(--line-strong); }
.faq__item[open] { border-color: var(--accent); box-shadow: 0 10px 24px rgba(22, 33, 27, 0.07); }
.faq__item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 16px 20px;
  font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.35;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.faq__icon {
  flex: none; width: 32px; height: 32px; padding: 6px; border-radius: 50%;
  background: var(--soft); color: var(--accent);
  transition: transform 0.3s ease, background 0.2s ease, color 0.2s ease;
}
.faq__item[open] .faq__icon { transform: rotate(45deg); background: var(--accent); color: var(--white); }
.faq__answer { padding: 0 20px 18px; color: var(--muted); }
.faq__answer p { max-width: 62em; }
.faq__answer a { font-weight: 600; }
.faq__item[open] .faq__answer { animation: faq-in 0.3s ease; }
@keyframes faq-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .faq__intro { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  .faq__icon, .faq__item { transition: none; }
  .faq__item[open] .faq__answer { animation: none; }
}
