/* InvictusBoost - product quick view popup
   Markup: snippets/product-quickview.njk, behaviour: assets/invictus-quickview.js.
   The popup sits outside the .ib wrapper, so it maps the global --ib-* tokens itself. */

.ibqv {
  --qv-bg: var(--ib-bg, #05080f);
  --qv-panel: var(--ib-panel, #0e1524);
  --qv-panel-2: var(--ib-panel-2, #121b2e);
  --qv-line: var(--ib-line, rgba(120, 170, 255, 0.12));
  --qv-line-strong: var(--ib-line-strong, rgba(110, 168, 255, 0.28));
  --qv-text: var(--ib-text, #f4f7ff);
  --qv-dim: var(--ib-text-dim, #9aadc8);
  --qv-muted: var(--ib-muted, #6d7f99);
  --qv-accent: var(--ib-accent, #4f8cff);
  --qv-accent-2: var(--ib-accent-2, #7eb0ff);
  --qv-accent-deep: var(--ib-accent-deep, #2f6df0);
  --qv-accent-rgb: var(--ib-accent-rgb, 79, 140, 255);
  --qv-pos: var(--ib-pos, #34d399);
  --qv-neg: var(--ib-neg, #fb7185);
  --qv-font: var(--ib-font, 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  --qv-display: var(--ib-font-display, 'Outfit', 'Work Sans', sans-serif);
  --qv-pad: 30px;

  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  font-family: var(--qv-font);
  color: var(--qv-text);
  -webkit-font-smoothing: antialiased;
}
.ibqv[hidden] { display: none; }
/* While it fades out the popup must not swallow clicks meant for the page. */
.ibqv:not(.is-open) { pointer-events: none; }
.ibqv *, .ibqv *::before, .ibqv *::after { box-sizing: border-box; }

/* Page behind the popup stays put (Lenis is stopped by the script as well).
   Only <html> is locked: locking <body> too would turn it into the scroll container
   and un-stick the sticky header while the popup is open. */
html.ibqv-lock { overflow: hidden !important; }

.ibqv__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 12, 0.74);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  touch-action: none;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.ibqv__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(580px, 100%);
  max-height: min(900px, 100%);
  border: 1px solid var(--qv-line-strong);
  border-radius: 22px;
  background: linear-gradient(180deg, #101a2d 0%, #0b1220 46%, #0a101c 100%);
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 30px 120px -40px rgba(var(--qv-accent-rgb), 0.45);
  overflow: hidden;
  outline: none;
  opacity: 0;
  transform: translateY(14px) scale(0.965);
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ibqv.is-open .ibqv__backdrop { opacity: 1; }
.ibqv.is-open .ibqv__panel { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ close */
.ibqv__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--qv-line-strong);
  border-radius: 12px;
  background: rgba(14, 21, 36, 0.86);
  color: var(--qv-dim);
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}
.ibqv__close svg { width: 18px; height: 18px; display: block; }
.ibqv__close:hover { color: var(--qv-text); border-color: var(--qv-accent); background: var(--qv-panel-2); }
.ibqv__close:focus-visible,
.ibqv__buy:focus-visible,
.ibqv__more:focus-visible,
.ibqv__copy a:focus-visible {
  outline: 2px solid var(--qv-accent-2);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------- body */
.ibqv__body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.ibqv__head {
  position: relative;
  flex: none;
  padding: var(--qv-pad) var(--qv-pad) 22px;
  border-bottom: 1px solid var(--qv-line);
  overflow: hidden;
}
.ibqv__glow {
  position: absolute;
  top: -120px;
  left: 50%;
  width: 420px;
  height: 300px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(var(--qv-accent-rgb), 0.3), rgba(var(--qv-accent-rgb), 0) 70%);
  pointer-events: none;
}
.ibqv__head > :not(.ibqv__glow) { position: relative; }

.ibqv__kind {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--qv-accent-2);
}
.ibqv__title {
  margin: 0;
  padding-right: 52px;
  font-family: var(--qv-display);
  font-size: clamp(24px, 4.4vw, 31px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--qv-text);
  overflow-wrap: anywhere;
}
.ibqv__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.ibqv__tags[hidden], .ibqv__price[hidden], .ibqv__kind[hidden], .ibqv__chip[hidden] { display: none; }
.ibqv__tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 12px;
  border: 1px solid rgba(var(--qv-accent-rgb), 0.5);
  border-radius: 999px;
  background: rgba(var(--qv-accent-rgb), 0.1);
  font-family: var(--qv-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #cfe0ff;
}

/* price: big whole part, small symbol and cents */
.ibqv__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-top: 18px;
  font-family: var(--qv-display);
  color: var(--qv-text);
}
.ibqv__amount { display: inline-flex; align-items: baseline; white-space: nowrap; }
.ibqv__amount-sym {
  align-self: flex-start;
  margin: 7px 4px 0 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--qv-accent-2);
}
.ibqv__amount-sym--after { align-self: baseline; margin: 0 0 0 6px; }
.ibqv__amount-whole {
  font-size: clamp(44px, 9vw, 54px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.ibqv__amount-cents { font-size: 23px; font-weight: 800; line-height: 1; }
.ibqv__price-from,
.ibqv__price-code {
  font-family: var(--qv-font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--qv-muted);
}
.ibqv__price-to { font-size: 20px; font-weight: 700; color: var(--qv-dim); white-space: nowrap; }
.ibqv__price-was {
  font-family: var(--qv-font);
  font-size: 15px;
  font-weight: 500;
  color: var(--qv-muted);
  text-decoration: line-through;
  white-space: nowrap;
}

.ibqv__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.ibqv__chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 4px 13px;
  border: 1px solid var(--qv-line-strong);
  border-radius: 999px;
  background: rgba(18, 27, 46, 0.8);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--qv-text);
}
.ibqv__chip svg { width: 14px; height: 14px; flex: none; color: var(--qv-accent-2); }
.ibqv__chip--stock {
  border-color: rgba(52, 211, 153, 0.36);
  background: rgba(52, 211, 153, 0.09);
  color: var(--qv-pos);
}
.ibqv__chip--stock::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.16);
}
.ibqv__chip--stock.is-out {
  border-color: rgba(251, 113, 133, 0.36);
  background: rgba(251, 113, 133, 0.08);
  color: var(--qv-neg);
}
.ibqv__chip--stock.is-out::before { box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.16); }

/* ------------------------------------------------------------ description */
.ibqv__desc {
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px var(--qv-pad) 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--qv-accent-rgb), 0.35) transparent;
}
.ibqv__desc::-webkit-scrollbar { width: 8px; }
.ibqv__desc::-webkit-scrollbar-thumb { border-radius: 8px; background: rgba(var(--qv-accent-rgb), 0.3); }
.ibqv__desc::-webkit-scrollbar-track { background: transparent; }

.ibqv__copy {
  font-size: 14px;
  line-height: 1.62;
  color: var(--qv-dim);
  overflow-wrap: anywhere;
}
.ibqv__copy:empty { display: none; }
.ibqv__copy p { margin: 0 0 10px; }
.ibqv__copy ul,
.ibqv__copy ol { margin: 0 0 12px; padding: 0; list-style: none; }
.ibqv__copy li {
  position: relative;
  margin: 0;
  padding: 3px 0 3px 20px;
}
.ibqv__copy ul > li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.82em;
  width: 6px;
  height: 6px;
  border-top: 2px solid var(--qv-accent);
  border-right: 2px solid var(--qv-accent);
  transform: rotate(45deg);
}
/* emoji-led lines keep their emoji as the bullet */
.ibqv__copy ul > li[data-mark] { padding-left: 28px; }
.ibqv__copy ul > li[data-mark]::before {
  content: attr(data-mark);
  left: 0;
  top: 3px;
  width: auto;
  height: auto;
  border: 0;
  transform: none;
  color: var(--qv-text);
}
.ibqv__copy ol { counter-reset: qv; }
.ibqv__copy ol > li { counter-increment: qv; padding-left: 26px; }
.ibqv__copy ol > li::before {
  content: counter(qv) '.';
  position: absolute;
  left: 0;
  top: 3px;
  font-weight: 600;
  color: var(--qv-accent-2);
}
.ibqv__copy strong, .ibqv__copy b { font-weight: 600; color: var(--qv-text); }
.ibqv__copy a { color: var(--qv-accent-2); text-decoration: underline; text-underline-offset: 3px; }
.ibqv__copy a:hover { color: var(--qv-text); }
.ibqv__copy .ibqv__lead { font-weight: 600; color: var(--qv-text); }
.ibqv__copy > :last-child { margin-bottom: 0; }

/* loading skeleton */
.ibqv__skel { display: grid; gap: 12px; padding: 4px 0 2px; }
.ibqv__skel span {
  display: block;
  height: 11px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(120, 170, 255, 0.08) 0%, rgba(120, 170, 255, 0.2) 45%, rgba(120, 170, 255, 0.08) 90%);
  background-size: 220% 100%;
  animation: ibqv-shimmer 1.3s linear infinite;
}
.ibqv__skel span:nth-child(1) { width: 92%; }
.ibqv__skel span:nth-child(2) { width: 78%; }
.ibqv__skel span:nth-child(3) { width: 86%; }
.ibqv__skel span:nth-child(4) { width: 64%; }
.ibqv__skel span:nth-child(5) { width: 72%; }
@keyframes ibqv-shimmer {
  from { background-position: 120% 0; }
  to { background-position: -100% 0; }
}

.ibqv__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--qv-accent-2);
  text-decoration: none;
  border-radius: 6px;
}
.ibqv__copy:empty + .ibqv__more { margin-top: 0; }
.ibqv__more svg { width: 15px; height: 15px; transition: transform 0.16s ease; }
.ibqv__more:hover { color: var(--qv-text); }
.ibqv__more:hover svg { transform: translate(2px, -2px); }

/* -------------------------------------------------------------- bottom bar */
.ibqv__foot {
  flex: none;
  padding: 16px var(--qv-pad) 18px;
  border-top: 1px solid var(--qv-line);
  background: rgba(8, 13, 24, 0.92);
}
.ibqv__buy {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(120deg, var(--qv-accent-deep) 0%, var(--qv-accent) 55%, var(--qv-accent-2) 120%);
  box-shadow: 0 16px 36px -18px rgba(var(--qv-accent-rgb), 0.9), 0 1px 0 rgba(255, 255, 255, 0.22) inset;
  font-family: var(--qv-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  cursor: pointer;
  transition: filter 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.ibqv__buy svg { width: 18px; height: 18px; transition: transform 0.18s ease; }
.ibqv__buy:hover { filter: brightness(1.09); box-shadow: 0 20px 44px -18px rgba(var(--qv-accent-rgb), 1), 0 1px 0 rgba(255, 255, 255, 0.26) inset; }
.ibqv__buy:hover svg { transform: translateX(4px); }
.ibqv__buy:active { transform: translateY(1px); }
.ibqv__buy:disabled {
  background: var(--qv-panel-2);
  box-shadow: none;
  border: 1px solid var(--qv-line-strong);
  color: var(--qv-muted);
  cursor: not-allowed;
  filter: none;
  transform: none;
}
.ibqv__buy:disabled svg { display: none; }

.ibqv__note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--qv-muted);
  text-align: center;
}
.ibqv.is-unavailable .ibqv__note { display: none; }
.ibqv__coins { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.ibqv__coin {
  padding: 2px 7px;
  border: 1px solid var(--qv-line);
  border-radius: 6px;
  background: rgba(18, 27, 46, 0.7);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--qv-dim);
}

/* ------------------------------------------------------------ small screens
   Narrow or short viewports: the sheet takes the full width (with margins) and the
   whole body scrolls, so the description is not squeezed under a fixed head. */
@media (max-width: 600px), (max-height: 640px) {
  .ibqv { --qv-pad: 20px; padding: 12px 10px; }
  .ibqv__panel { width: 100%; border-radius: 18px; }
  .ibqv__body {
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .ibqv__head { padding-bottom: 18px; }
  .ibqv__desc { overflow: visible; padding-top: 16px; }
  /* The close button floats over the scrolling body here: keep it solid so text passing under it stays readable. */
  .ibqv__close { top: 12px; right: 12px; background: #0e1524; box-shadow: 0 0 0 5px rgba(11, 18, 32, 0.82); }
  .ibqv__foot { padding-top: 12px; padding-bottom: 14px; }
  .ibqv__note { margin-top: 10px; font-size: 11.5px; }
}
/* Very short viewports (phones in landscape): the bar keeps the button and the coins only. */
@media (max-height: 480px) {
  .ibqv__note-text { display: none; }
  .ibqv__buy { min-height: 46px; }
}
@supports (height: 100dvh) {
  .ibqv { height: 100dvh; bottom: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .ibqv__backdrop,
  .ibqv__panel,
  .ibqv__buy,
  .ibqv__buy svg,
  .ibqv__more svg { transition: none; }
  .ibqv__panel { transform: none; }
  .ibqv__skel span { animation: none; }
}