[x-cloak] {
  display: none !important;
}
.nav-blur {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}
:root {
  --paper: #f4f8fc;
  --surface: #ffffff;
  --ink: #0b1f3a;
  --azul: #005596; /* Ajustado al azul de index */
  --azul-deep: #0a0f1a;
  --celeste: #00a3e0; /* Ajustado al cyan de index */
  --rojo: #ff0000;
  --line: #dce6f2;
  --muted: #5c7089;
  --bby: #f0c419;
  --bby-deep: #b98e0a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", sans-serif; /* Misma fuente que index */
}
.mono {
  font-family: "IBM Plex Mono", monospace;
}
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 100px;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: 120px 0 40px; /* Aumentado para compensar el navbar fixed */
  border-bottom: 1px solid var(--line);
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: conic-gradient(
    var(--azul) 0 33%,
    var(--celeste) 33% 66%,
    var(--rojo) 66% 100%
  );
}
.brand-name {
  font-weight: 600;
  font-size: 15px;
}
.brand-sub {
  color: var(--muted);
  font-size: 12px;
}
.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--azul);
  text-transform: uppercase;
  margin-bottom: 14px;
}
h1 {
  font-weight: 700;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.1;
  margin: 0 0 14px;
  max-width: 17ch;
}
.hero p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 54ch;
  margin: 0 0 28px;
}
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.chip {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 9px 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.chip:hover {
  border-color: var(--azul);
  color: var(--azul);
}
.chip.active {
  background: var(--azul);
  border-color: var(--azul);
  color: #fff;
}

/* ---------- GRID ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 28px;
  margin-top: 36px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: opacity 0.25s ease;
}
.card.hide {
  display: none;
}

/* ---- visual / showcase zone ---- */
.card-visual {
  position: relative;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at 50% 38%,
    rgba(0, 85, 150, 0.09),
    transparent 68%
  );
  border-bottom: 1px solid var(--line);
}
.card-visual.t-celeste {
  background: radial-gradient(
    circle at 50% 38%,
    rgba(0, 163, 224, 0.16),
    transparent 68%
  );
}
.card-visual .lens-shadow {
  position: absolute;
  bottom: 38px;
  width: 150px;
  height: 16px;
  border-radius: 50%;
  background: rgba(11, 31, 58, 0.18);
  filter: blur(7px);
}
.card-visual svg {
  width: 190px;
  height: auto;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 14px 16px rgba(0, 85, 150, 0.22));
}
.card-visual svg .haptic {
  fill: none;
  stroke: var(--azul);
  stroke-width: 2.6;
}
.card-visual svg .optic {
  fill: var(--bby);
  fill-opacity: 0.55;
  stroke: var(--azul);
  stroke-width: 2.6;
}

.badge-float {
  position: absolute;
  top: 16px;
  left: 16px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(11, 31, 58, 0.1);
}
.badge-float.hidrofobico {
  color: #00819c;
}
.badge-float.hidrofilico {
  color: var(--azul);
}
.badge-flag {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  color: var(--muted);
  background: #fff;
  padding: 5px 10px;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(11, 31, 58, 0.1);
}
.flag {
  display: inline-flex;
  width: 14px;
  height: 10px;
  border-radius: 2px;
  overflow: hidden;
}
.flag span {
  flex: 1;
}
.flag .s1 {
  background: #ff9933;
}
.flag .s2 {
  background: #fff;
}
.flag .s3 {
  background: #138808;
}

/* ---- body ---- */
.card-body {
  padding: 22px 24px 26px;
}
.card-name {
  font-weight: 700;
  font-size: 21px;
  margin: 0 0 4px;
}
.card-sub {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 18px;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.qstat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
}
.qstat .qval {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 15px;
  color: var(--azul);
  display: block;
}
.qstat .qlbl {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.expand-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 16px;
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--azul);
  font-weight: 500;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}
.expand-btn:hover {
  border-color: var(--azul);
  background: var(--paper);
}
.expand-btn .plus {
  position: relative;
  width: 14px;
  height: 14px;
  flex: none;
}
.expand-btn .plus::before,
.expand-btn .plus::after {
  content: "";
  position: absolute;
  background: var(--azul);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.expand-btn .plus::before {
  width: 14px;
  height: 1.6px;
}
.expand-btn .plus::after {
  width: 1.6px;
  height: 14px;
  transition: transform 0.3s ease;
}
.card.is-open .expand-btn .plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

/* ---- expandable panel ---- */
.panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.card.is-open .panel {
  grid-template-rows: 1fr;
}
.panel-inner {
  overflow: hidden;
  min-height: 0;
}
.panel-content {
  padding-top: 22px;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 0.4s ease 0.1s,
    transform 0.4s ease 0.1s;
}
.card.is-open .panel-content {
  opacity: 1;
  transform: translateY(0);
}

/* technical diagram */
.tech-diagram {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 22px;
}
.lens-diagram {
  position: relative;
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
}

.lens-diagram-img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  display: block;
}
.bracket {
  position: absolute;
  border-bottom: 1.3px solid var(--azul);
}
.bracket::before,
.bracket::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 1.3px;
  height: 5px;
  background: var(--azul);
}
.bracket::before {
  left: 0;
}
.bracket::after {
  right: 0;
}
.bracket .b-label {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  color: var(--azul);
  font-weight: 500;
}
.bracket.b-optic {
  border-bottom: none;
  border-top: 1.3px solid var(--bby-deep);
}
.bracket.b-optic::before,
.bracket.b-optic::after {
  background: var(--bby-deep);
  top: auto;
  bottom: -5px;
}
.bracket.b-optic .b-label {
  color: var(--bby-deep);
  top: auto;
  bottom: -18px;
}
.incision-tag {
  position: absolute;
  right: 20px;
  bottom: 2px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  color: var(--rojo);
  padding-left: 14px;
}
.incision-tag::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 10px;
  height: 1.3px;
  background: var(--rojo);
}

.diopter-scale {
  padding: 0 4px 4px;
}
.ds-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ds-track {
  position: relative;
  height: 6px;
  background: var(--line);
  border-radius: 3px;
}
.ds-fill {
  position: absolute;
  top: 0;
  height: 6px;
  background: var(--azul);
  border-radius: 3px;
}
.ds-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9.5px;
  color: var(--muted);
}

.spec-group {
  margin-bottom: 20px;
}
.spec-group:last-child {
  margin-bottom: 0;
}
.spec-group h3 {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--azul);
  margin: 0 0 8px;
  font-weight: 600;
}
.spec-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.spec-row:last-child {
  border-bottom: none;
}
.spec-row dt {
  color: var(--muted);
  font-size: 12.5px;
}
.spec-row dd {
  margin: 0;
  text-align: right;
  font-weight: 500;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
}
.pack-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.7;
}

.p-cta {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  letter-spacing: 0.03em;
  padding: 11px 16px;
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  transition:
    border-color 0.2s ease,
    color 0.2s ease;
}
.btn:hover {
  border-color: var(--azul);
  color: var(--azul);
}
.btn.primary {
  background: var(--azul);
  border-color: var(--azul);
  color: #fff;
  font-weight: 600;
}
.btn.primary:hover {
  background: var(--azul-deep);
  border-color: var(--azul-deep);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .panel,
  .panel-content,
  .expand-btn .plus::after {
    transition: none !important;
  }
}

/* ========== ESTILOS OPTIMIZADOS: SLIDER AMPLIO Y ZOOM CON NAVEGACIÓN ========== */
.card-visual.has-slider {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 330px;
  padding: 45px 16px 14px 16px;
  background: #ffffff;
}

.main-img-container {
  width: 100%;
  height: 230px; /* ¡Aumentado para que el producto luzca grande y claro! */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  background: #ffffff;
}

.main-img-container .main-product-photo {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.main-img-container:hover .main-product-photo {
  transform: scale(1.05); /* Zoom elegante al posicionar el mouse */
}

.main-img-container:hover .zoom-icon-overlay {
  opacity: 1;
  transform: scale(1);
}

.zoom-icon-overlay {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(11, 31, 58, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #ffffff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.7) translateY(5px);
  transition:
    opacity 0.3s ease,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.2s ease;
  pointer-events: none;
  box-shadow:
    0 4px 14px rgba(11, 31, 58, 0.25),
    0 2px 5px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.zoom-icon-overlay svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.main-img-container:hover .zoom-icon-overlay {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.main-img-container:hover .zoom-icon-overlay:hover {
  background: #0047ab; /* Puedes cambiar esto por el azul exacto de tu marca */
  box-shadow: 0 6px 20px rgba(0, 71, 171, 0.4);
}

.main-img-container:hover .zoom-icon-overlay:hover svg {
  transform: scale(1.1);
}

.slider-thumbs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
  width: 100%;
}

.slider-thumbs .thumb-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.2s ease;
  overflow: hidden; /* Evita que textos alternativos rompan el diseño */
  font-size: 0; /* Oculta rastros de texto de imágenes caídas */
}

.slider-thumbs .thumb-img:hover,
.slider-thumbs .thumb-img.active {
  border-color: var(--azul);
  box-shadow: 0 0 0 2.5px rgba(0, 71, 171, 0.18);
  transform: translateY(-2px);
}

/* Lightbox Modal para el Zoom con Flechas Laterales */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 31, 58, 0.9);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Distribuye flechas a los extremos */
  padding: 0 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-wrapper {
  max-width: 75%;
  max-height: 85%;
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lightboxShow 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes lightboxShow {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-wrapper img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
}

.lightbox-close-btn {
  position: absolute;
  top: -45px;
  right: 0;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 38px;
  font-weight: 300;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.lightbox-close-btn:hover {
  color: var(--celeste);
}

/* Botones Navegadores del Modal */
.lightbox-nav-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 46px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  user-select: none;
  z-index: 10000;
}

.lightbox-nav-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: var(--celeste);
  transform: scale(1.08);
}

.lightbox-nav-btn:active {
  transform: scale(0.95);
}

@media (max-width: 600px) {
  .lightbox-nav-btn {
    width: 44px;
    height: 44px;
    font-size: 32px;
  }
  .lightbox-wrapper {
    max-width: 85%;
  }
}
