/* Ficha del producto (diálogo #lqQuick), con el formato de una página de producto:
   galería a la izquierda (foto grande con flechas, miniaturas debajo, video al final) y, a la derecha,
   nombre, color y modelo, cantidad + canasta, pedido por WhatsApp, descripción, entrega y retiro; abajo, relacionados.
   Lógica en index-mejorada.js (openQuick). Sin precios. */
.fx {
  --fx-ink: #0d1424;
  --fx-soft: #4c5568;
  --fx-panel: #f1f4f9;
  --fx-line: rgba(13, 20, 36, .12);
  --fx-green: #13803f;
  --fx-ease: cubic-bezier(.23, 1, .32, 1);
  width: min(1180px, 100% - 32px);
  margin: auto;
}
.fx__panel {
  position: relative; max-height: min(94svh, 900px); overflow-y: auto; overscroll-behavior: contain;
  border-radius: 24px; background: #fff; color: var(--fx-ink);
  box-shadow: 0 24px 64px rgba(5, 8, 15, .28);
}
.fx__close { position: sticky; top: 14px; float: right; z-index: 4; margin: 14px 14px -58px 0; width: 44px; height: 44px; background: #fff; }

.fx__top { display: grid; gap: 28px; padding: 22px; }

/* Galería */
.fx__gallery { display: grid; gap: 12px; align-content: start; min-width: 0; }
.fx__stage-wrap { position: relative; }
.fx__stage {
  position: relative; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: var(--fx-panel);
  touch-action: pan-y;
}
.fx__stage img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.fx__stage img.is-in { animation: fx-in 200ms var(--fx-ease); }
.fx__stage video { width: 100%; height: 100%; object-fit: contain; background: var(--fx-ink); }
@keyframes fx-in { from { opacity: 0; } }
.fx__arrow {
  position: absolute; top: 50%; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; margin-top: -22px;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--fx-ink); cursor: pointer;
  box-shadow: 0 2px 10px rgba(13, 20, 36, .12);
  touch-action: manipulation; transition: transform 140ms var(--fx-ease), background-color 160ms ease;
}
.fx__arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fx__arrow--prev { left: 12px; }
.fx__arrow--next { right: 12px; }
.fx__arrow:active { transform: scale(.94); }
.fx__arrow[hidden] { display: none; }

.fx__thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 2px; scrollbar-width: none; scroll-snap-type: x proximity; }
.fx__thumbs::-webkit-scrollbar { display: none; }
.fx__thumbs:empty { display: none; }
.fx__thumbs button {
  position: relative; flex: none; width: 74px; height: 74px; padding: 0; scroll-snap-align: start;
  border: 1.5px solid transparent; border-radius: 12px; background: var(--fx-panel); overflow: hidden; cursor: pointer;
  touch-action: manipulation; transition: border-color 160ms ease, transform 140ms var(--fx-ease);
}
.fx__thumbs button[aria-pressed="true"] { border-color: var(--fx-ink); }
.fx__thumbs button:active { transform: scale(.96); }
.fx__thumbs img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.fx__play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(13, 20, 36, .3); pointer-events: none; }
.fx__play svg { width: 30px; height: 30px; padding: 8px 7px 8px 9px; border-radius: 50%; background: rgba(255, 255, 255, .96); color: var(--fx-ink); fill: currentColor; box-shadow: 0 4px 12px rgba(13, 20, 36, .25); }

/* Información */
.fx__info { display: grid; gap: 22px; align-content: start; min-width: 0; }
.fx .fx__title { margin: 0; padding-right: 2rem; font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 700; line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.fx__options { display: grid; gap: 18px; padding-top: 20px; border-top: 1px solid var(--fx-line); }
.fx__options:empty { display: none; }
.fx__group { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.fx__group legend { padding: 0; color: var(--fx-soft); font-size: .95rem; }
.fx__hint { margin: 0; color: var(--fx-soft); font-size: .88rem; line-height: 1.4; }
.fx__group legend b { color: var(--fx-ink); font-weight: 700; }
.fx__pills { display: flex; flex-wrap: wrap; gap: 8px; }
.fx__pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px;
  border: 1.5px solid rgba(13, 20, 36, .16); border-radius: 12px; background: #fff; color: var(--fx-ink);
  font: inherit; font-size: .92rem; font-weight: 700; cursor: pointer;
  touch-action: manipulation; -webkit-user-select: none; user-select: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 140ms var(--fx-ease);
}
.fx__pill[aria-pressed="true"] { border-color: var(--fx-ink); background: var(--fx-ink); color: #fff; }
.fx__pill:active { transform: scale(.97); }
.fx__dot { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(13, 20, 36, .2); }
.fx__pill[aria-pressed="true"] .fx__dot { box-shadow: 0 0 0 2px #fff; }

.fx__buy { display: flex; gap: 10px; }
.fx__buy .lq-qty { flex: none; height: 54px; }
.fx__add {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 20px;
  border: 0; border-radius: 99px; background: var(--fx-ink); color: #fff; font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer;
  touch-action: manipulation; transition: transform 140ms var(--fx-ease), background-color 160ms ease;
}
.fx__add svg, .fx__wa svg { flex: none; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.fx__add:active, .fx__wa:active { transform: scale(.98); }
.fx__wa {
  display: grid; grid-template-columns: auto auto; justify-content: center; align-items: center; column-gap: 10px; row-gap: 1px;
  min-height: 58px; margin-top: -10px; padding: 8px 20px; border-radius: 99px; background: var(--fx-green); color: #fff; text-decoration: none;
  touch-action: manipulation; transition: transform 140ms var(--fx-ease), background-color 160ms ease;
}
.fx__wa svg { grid-row: span 2; }
.fx__wa strong { font-size: 1rem; font-weight: 800; }
.fx__wa span { font-size: .8rem; opacity: .9; }

.fx__desc { display: grid; gap: 10px; font-size: 1rem; line-height: 1.55; }
.fx__desc p { margin: 0; }
.fx__lead { font-weight: 800; }
.fx__features { display: grid; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.fx__features:empty { display: none; }
.fx__features li { position: relative; padding-left: 28px; }
.fx__features li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px;
  background: var(--fx-green);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Entrega y retiro: pasos unidos por una línea, como un recorrido */

/* Relacionados */
.fx__related { padding: 4px 22px 26px; }
.fx__related:has(.fx__related-list:empty) { display: none; }
.fx__related h3 { margin: 0 0 14px; font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 800; letter-spacing: -.01em; }
.fx__related-list {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(42%, 220px); gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.fx__related-list::-webkit-scrollbar { display: none; }
.fx__rel {
  display: grid; gap: 8px; align-content: start; padding: 0; border: 0; background: none; color: var(--fx-ink);
  font: inherit; text-align: left; cursor: pointer; scroll-snap-align: start; touch-action: manipulation;
}
.fx__rel span:first-child { display: block; aspect-ratio: 1; border-radius: 14px; background: var(--fx-panel); overflow: hidden; transition: transform 140ms var(--fx-ease); }
.fx__rel img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform 400ms var(--fx-ease); }
.fx__rel strong { font-size: .95rem; font-weight: 800; }
.fx__rel small { color: var(--fx-soft); font-size: .85rem; line-height: 1.35; }
.fx__rel:active span:first-child { transform: scale(.98); }

.fx button:focus-visible, .fx a:focus-visible { outline: 2px solid #4d74b8; outline-offset: 3px; }

@media (hover: hover) and (pointer: fine) {
  .fx__arrow:hover { background: #fff; }
  .fx__thumbs button:not([aria-pressed="true"]):hover { border-color: rgba(13, 20, 36, .35); }
  .fx__pill:not([aria-pressed="true"]):hover { border-color: var(--fx-ink); }
  .fx__add:hover { background: #1f2a42; }
  .fx__wa:hover { background: #0f6e35; }
  .fx__rel:hover img { transform: scale(1.04); }
}

@media (min-width: 901px) {
  .fx__top { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 44px; padding: 30px 34px 34px; }
  .fx__gallery { position: sticky; top: 30px; align-self: start; }
  .fx__related { padding: 0 34px 34px; }
  .fx__related-list { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; overflow: visible; }
}
/* Teléfono: la ficha ocupa casi toda la pantalla y se recorre con el dedo */
@media (max-width: 900px) {
  .fx { width: calc(100% - 16px); }
  .fx__panel { max-height: calc(100dvh - 16px); border-radius: 20px; }
  .fx__top { padding: 14px 14px 18px; gap: 22px; }
  .fx__close { margin: 10px 10px -54px 0; }
  .fx__thumbs button { width: 64px; height: 64px; }
  .fx__related { padding: 0 14px 22px; }
  .fx__arrow { width: 44px; height: 44px; margin-top: -22px; }
  /* "Agregar a la canasta" entra en una línea junto a la cantidad */
  .fx__add { padding: 0 14px; white-space: nowrap; font-size: .95rem; }
}
@media (max-width: 420px) {
  .fx__add svg { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fx__arrow, .fx__thumbs button, .fx__pill, .fx__add, .fx__wa, .fx__rel span:first-child, .fx__rel img { transition: none; }
  .fx__arrow:active, .fx__thumbs button:active, .fx__pill:active, .fx__add:active, .fx__wa:active { transform: none; }
  .fx__stage img.is-in { animation: none; }
}

/* Precios (B2C, o B2B con sesión de negocio): ficha, canasta y total */
.fx__price { margin: 6px 0 0; padding-right: 2rem; font-size: 1.45rem; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.fx__price[hidden] { display: none; }
.lq-line__price { display: block; margin-top: 2px; font-size: .92rem; font-weight: 700; color: var(--text, #0d1424); font-variant-numeric: tabular-nums; }
.lq-cart__sum { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--text, #0d1424) 6%, transparent); font-size: .95rem; }
.lq-cart__sum[hidden] { display: none; }
.lq-cart__sum strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
