/* Product card — hero (gallery + info) + specs + description + similar rail */

.xf-product {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: flex-start;
  margin-bottom: 56px;
}

/* ─── Gallery ─────────────────────────────────────────────── */
.xf-product-gallery {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 180px;
}
.xf-product-gallery__main {
  aspect-ratio: auto;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  container-type: inline-size;
}
/* Icon-fallback (no photo) keeps square; photo-case plate adapts to image. */
.xf-product-gallery__main:not(:has(.xf-art--photo)) { aspect-ratio: 1; }
.xf-product-gallery__main .xf-art {
  width: 100%;
  height: 100%;
}
.xf-product-gallery__main .xf-art--photo {
  aspect-ratio: auto;
  min-height: 380px;
  padding: 30px 20px;
  box-sizing: border-box;
  display: grid;
  place-items: center;
}
/* Wrapper schrink'ает до actual img-rect — плашка guarantee
   позиционируется bottom-right самого фото (а не угла __main square),
   физически перекрывает чужой watermark catalog.onliner.by в правом-нижнем
   углу image-rect. Container-type на __main + cqi на img разрывают circular
   percentage в inline-flex wrapper'е. На detail радиус 16 (vs 12 на listing)
   — лучше визуальный баланс с outer __main border-radius 18 на bigger image. */
.xf-product-gallery__main .xf-art--photo .xf-art__photo-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  border-radius: 16px;
  overflow: hidden;
}
.xf-product-gallery__main .xf-art--photo .xf-art__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 360px;
}
.xf-product-gallery__guarantee {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  pointer-events: none;
  box-sizing: border-box;
  min-width: 148px;
  padding: 7px 14px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: oklch(0.96 0.005 285);
  background: oklch(0.25 0.01 285);
  border-radius: 10px 0 0 0;
  line-height: 1.2;
  white-space: nowrap;
}
.xf-product-gallery__guarantee--mobile { display: none; }
.xf-product-gallery__thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.xf-product-gallery__thumb {
  width: 74px;
  height: 74px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
@media (hover: hover) {
  .xf-product-gallery__thumb:hover { border-color: var(--line); transform: translateY(-1px); }
}
.xf-product-gallery__thumb.is-active { border-color: var(--accent-line); }
.xf-product-gallery__thumb img {
  width: 100%; height: 100%; object-fit: contain;
}

/* ─── Info column ─────────────────────────────────────────── */
.xf-product-info__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.xf-product-info__article { color: var(--accent-2); }

.xf-product-info__title {
  margin: 10px 0 18px;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.8px;
  line-height: 1.15;
  color: var(--text);
}

.xf-product-info__meta {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--text-3);
  margin-bottom: 28px;
}
.xf-product-info__stock::before {
  content: "●";
  margin-right: 6px;
  font-size: 9px;
  vertical-align: middle;
}
.xf-product-info__stock.is-in  { color: var(--success); }
.xf-product-info__stock.is-out { color: var(--text-3); }
.xf-product-info__stock.is-out::before { content: "○"; }

.xf-product-info__price-row {
  padding: 22px 0 26px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 24px;
}
.xf-product-info__price {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -1px;
  color: var(--text);
  line-height: 1;
  display: inline;
}
.xf-product-info__price-cur {
  font-size: 18px;
  color: var(--text-3);
  margin-left: 6px;
  font-weight: 500;
}
.xf-product-info__price-old {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--text-3);
  text-decoration: line-through;
  margin-left: 14px;
}
.xf-product-info__price-note {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.4;
}

.xf-product-info__installment {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: -8px 0 24px;
}
.xf-product-info__installment-price {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--success);
  letter-spacing: -.2px;
  line-height: 1.3;
}
.xf-product-info__installment-toggle {
  background: transparent;
  border: none;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-2);
  cursor: pointer;
  transition: opacity .15s;
}
@media (hover: hover) {
  .xf-product-info__installment-toggle:hover { opacity: .7; }
}
.xf-product-info__installment-src .installment__link { display: none; }

/* Preorder disclosure — над actions row, только если xf_in_stock === false */
.xf-product-info__preorder-note {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  margin: 0 0 14px;
  background: oklch(0.96 0.018 75);
  border: 1px solid oklch(0.88 0.04 75);
  border-radius: 12px;
  color: oklch(0.32 0.06 65);
  font-size: 13.5px;
  line-height: 1.4;
}
.xf-product-info__preorder-note svg { flex-shrink: 0; color: oklch(0.50 0.10 60); }
.xf-product-info__preorder-note strong { font-weight: 600; }

.xf-product-info__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  align-items: stretch;
}

/* Secondary CTA рядом с primary "Купить под заказ" — link на телефон.
   Под-заказ flow: primary жмёт корзину (fallback 409 → toast); secondary —
   прямой контакт по конкретному товару (отдельный intent от шапочного phone). */
.xf-btn-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 150px;
  padding: 0 22px;
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14.5px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap;
  box-sizing: border-box;
}
.xf-btn-contact svg { flex-shrink: 0; }
@media (hover: hover) {
  .xf-btn-contact:hover { border-color: var(--accent-line); color: var(--accent); background: var(--surface); }
}
.xf-btn-buy {
  flex: 1;
  min-width: 200px;
  padding: 14px 22px;
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 20px -8px var(--accent);
  transition: transform .15s, box-shadow .15s;
}
@media (hover: hover) {
  .xf-btn-buy:hover { transform: translateY(-1px); box-shadow: 0 10px 28px -8px var(--accent); }
}
.xf-btn-buy.is-busy { opacity: .7; pointer-events: none; }
/* Dual-state: bag+«В корзину» default, check+«В корзине» when added. Same
   green as product-card cart-btn.is-added so the whole cart story feels
   single-language across surfaces. */
.xf-btn-buy__icon, .xf-btn-buy__label { display: inline-flex; align-items: center; }
.xf-btn-buy:not(.is-added) .xf-btn-buy__icon--check,
.xf-btn-buy:not(.is-added) .xf-btn-buy__label--added { display: none; }
.xf-btn-buy.is-added .xf-btn-buy__icon--bag,
.xf-btn-buy.is-added .xf-btn-buy__label--idle { display: none; }
.xf-btn-buy.is-added {
  background: oklch(0.72 0.18 145);
  box-shadow: 0 6px 20px -8px oklch(0.72 0.18 145);
}
@media (hover: hover) {
  .xf-btn-buy.is-added:hover { box-shadow: 0 10px 28px -8px oklch(0.72 0.18 145); }
}
.xf-btn-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
@media (hover: hover) {
  .xf-btn-icon:hover { color: var(--text); border-color: var(--line); background: var(--surface-2); }
}
.xf-btn-icon.is-busy { opacity: .5; pointer-events: none; }
.xf-btn-icon.is-active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}
.xf-btn-icon[data-xf-wish].is-active { background: #e11d48; }
.xf-btn-icon[data-xf-wish].is-active svg { fill: currentColor; }

.xf-product-info__benefits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.xf-product-info__benefit {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.45;
}
.xf-product-info__benefit svg { color: var(--accent-2); flex: 0 0 auto; margin-top: 1px; }

/* ─── Section heads inside product page ───────────────────── */
.xf-product-section {
  margin-bottom: 56px;
}

/* ─── Tabs: Характеристики / Описание / Отзывы ─────────────── */
/* Progressive enhancement: no-JS → все панели видны (styled section подряд),
   JS добавляет .xf-product-tabs--js → прячет неактивные и показывает
   только .xf-product-tabs__panel.is-active. Nav скрыт до появления JS —
   без переключателя он дезинформирует. */
.xf-product-tabs {
  margin-bottom: 56px;
}
.xf-product-tabs__nav {
  display: none;
  gap: 4px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}
.xf-product-tabs__nav::-webkit-scrollbar { display: none; }
.xf-product-tabs--js .xf-product-tabs__nav { display: flex; }
.xf-product-tabs__tab {
  position: relative;
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  padding: 14px 20px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .15s;
}
@media (hover: hover) {
  .xf-product-tabs__tab:hover { color: var(--text); }
}
.xf-product-tabs__tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 8px; }
.xf-product-tabs__tab.is-active { color: var(--text); }
.xf-product-tabs__tab.is-active::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: -1px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}
.xf-product-tabs__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 0 8px;
  height: 20px;
  background: color-mix(in srgb, var(--accent-2) 12%, transparent);
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  border-radius: 999px;
}
.xf-product-tabs__panel { display: block; }
.xf-product-tabs--js .xf-product-tabs__panel { display: none; }
.xf-product-tabs--js .xf-product-tabs__panel.is-active { display: block; }
.xf-product-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.xf-product-section__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 8px;
}
.xf-product-section__eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--accent-2);
  vertical-align: middle;
  margin-right: 8px;
}
.xf-product-section__title {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.7px;
  line-height: 1.15;
  color: var(--text);
}

/* ─── Specs table ─────────────────────────────────────────── */
.xf-specs {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  overflow: hidden;
}
.xf-specs__row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  padding: 14px 22px;
  border-top: 1px solid var(--line-soft);
  align-items: baseline;
}
.xf-specs__row:first-child { border-top: 0; }
.xf-specs__row:nth-child(odd) { background: var(--bg-2); }
.xf-specs__name {
  font-size: 13.5px;
  color: var(--text-3);
}
.xf-specs__value {
  font-size: 13.5px;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* ─── Description ─────────────────────────────────────────── */
.xf-product-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-2);
  max-width: 820px;
}
.xf-product-desc p { margin: 0 0 14px; }
.xf-product-desc ul, .xf-product-desc ol { margin: 0 0 14px; padding-left: 22px; }
.xf-product-desc li { margin-bottom: 6px; }
.xf-product-desc h3, .xf-product-desc h4 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: 22px 0 10px;
}
.xf-product-desc strong, .xf-product-desc b { color: var(--text); font-weight: 600; }
.xf-product-desc a { color: var(--accent-2); }
@media (hover: hover) {
  .xf-product-desc a:hover { color: var(--accent); }
}

/* ─── Reviews (M21-D3, read-only) ──────────────────────────── */
.xf-reviews__count {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--accent-2);
  background: color-mix(in oklch, var(--accent-2) 12%, transparent);
  border-radius: 999px;
  vertical-align: 4px;
}
.xf-reviews__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  max-width: 820px;
}
.xf-reviews__item {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 18px 22px;
}
.xf-reviews__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.xf-reviews__author {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}
.xf-reviews__date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
}
.xf-reviews__body {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.xf-reviews__body p { margin: 0 0 10px; }
.xf-reviews__body p:last-child { margin-bottom: 0; }
.xf-reviews__body a { color: var(--accent-2); }
@media (hover: hover) {
  .xf-reviews__body a:hover { color: var(--accent); }
}
.xf-reviews__body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 6px 0;
}
.xf-reviews__empty {
  max-width: 820px;
  padding: 18px 22px;
  background: var(--bg-2);
  border: 1px dashed var(--line-soft);
  border-radius: 14px;
  font-size: 14px;
  color: var(--text-3);
}

/* ─── Similar rail ─────────────────────────────────────────── */
.xf-similar__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* ─── Gallery dots (mobile scroller indicator) ───────────── */
/* Hidden on desktop — thumbs are active-state carrier there. Markup rendered
   unconditionally when count > 1 so CSS alone can swap visibility. */
.xf-product-gallery__dots { display: none; }
.xf-product-gallery__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  transition: background .2s, width .2s;
}
.xf-product-gallery__dot.is-active {
  background: var(--accent);
  width: 18px;
}

/* ─── Sticky buy-bar — shell hidden on desktop ───────────── */
.xf-buy-sticky { display: none; }

/* ─── Tablet stack ────────────────────────────────────────── */
@media (max-width: 900px) {
  .xf-product { grid-template-columns: 1fr; gap: 24px; }
  .xf-product-gallery { position: static; }
  .xf-product-info__benefits { grid-template-columns: 1fr; }
  .xf-specs__row { grid-template-columns: 1fr; gap: 4px; padding: 12px 16px; }
  .xf-similar__grid { grid-template-columns: repeat(2, 1fr); }
  .xf-product-info__title { font-size: 24px; }
  .xf-product-info__price { font-size: 28px; }
}

/* ─── Phone (≤767) ────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Hero: compact typography, single col already set at 900. */
  .xf-product { gap: 20px; }
  .xf-product-gallery { position: relative; }
  .xf-product-gallery__guarantee { min-width: 130px; font-size: 10.5px; padding: 6px 11px; letter-spacing: 0; }
  /* Mobile fallback: when count>1, __main is display:none and badge inside it
     vanishes — render a sibling badge flush to the thumb-carousel bottom-right.
     bottom = dots-row(~6) + thumbs→dots gap(~14) + small clearance(~14) ≈ 34px;
     keeps badge fully on the visible thumb image. */
  .xf-product-gallery__guarantee--mobile {
    display: block;
    right: calc(var(--container-pad) * -1);
    bottom: 34px;
  }
  .xf-product-info__title { font-size: 22px; line-height: 1.2; margin: 8px 0 14px; }
  .xf-product-info__meta { font-size: 12.5px; gap: 14px; margin-bottom: 20px; }
  .xf-product-info__price-row { padding: 18px 0 20px; margin-bottom: 18px; }
  .xf-product-info__price { font-size: 26px; }
  .xf-product-info__price-cur { font-size: 14px; }
  .xf-product-info__price-old { font-size: 15px; margin-left: 10px; }

  /* Actions stack — buy fullwidth, icons inline below. */
  .xf-product-info__actions { gap: 8px; margin-bottom: 20px; }
  .xf-btn-buy { min-width: 0; flex: 1 1 100%; height: 52px; padding: 0 18px; }
  .xf-btn-icon { width: 44px; height: 44px; }

  /* Gallery: main hidden, thumbs become full-width scroll-snap carousel.
     When count > 1, thumbs ALWAYS rendered (see element.php condition).
     When count === 1, .xf-product-gallery__main is the only visible asset
     and stays as-is. */
  .xf-product-gallery__thumbs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    margin: 0 calc(var(--container-pad) * -1);
    padding: 0;
    scrollbar-width: none;
  }
  .xf-product-gallery__thumbs::-webkit-scrollbar { display: none; }
  .xf-product-gallery__thumb {
    flex: 0 0 100%;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--surface);
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
  .xf-product-gallery__thumb.is-active { border-color: transparent; }
  .xf-product-gallery__thumb img { padding: 24px; box-sizing: border-box; }

  /* When thumbs carousel is present, hide the "main" slot on mobile. */
  .xf-product-gallery:has(.xf-product-gallery__thumbs) .xf-product-gallery__main {
    display: none;
  }
  /* Fallback for :has-less browsers — thumbs only render if count > 1. */

  /* Dots show under carousel. */
  .xf-product-gallery__dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
  }

  /* Specs — еще компактнее, list-style без cards padding. */
  .xf-specs { border-radius: 12px; }
  .xf-specs__row { padding: 10px 14px; font-size: 13px; }

  /* Tabs: fade-edges for horizontal-scroll affordance. */
  .xf-product-tabs--js .xf-product-tabs__nav {
    mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
    padding: 0 4px;
    margin-bottom: 20px;
    /* iOS horizontal-scroll affordance: explicit pan-x + legacy momentum flag. */
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  .xf-product-tabs__tab { padding: 12px 14px; font-size: 14px; }
  .xf-product-tabs__count { font-size: 10.5px; min-width: 20px; height: 18px; padding: 0 7px; }
  .xf-product-section__title { font-size: 22px; letter-spacing: -0.5px; }
  .xf-product-section__eyebrow { font-size: 10.5px; }

  /* Related rail: 2 full cards + peek 3rd, edge-to-edge horizontal scroll.
     Overrides 900-tier 2-col grid. Width math: (100vw - pad*2 - gap*2) / 2.25
     gives ~150px per card at 390px viewport → title/цена/кнопка «В корзину»
     помещаются в 1 строку, совпадает с listing 2-col ритмом. */
  .xf-similar__grid {
    grid-template-columns: none;
    grid-template-rows: auto;
    grid-auto-flow: column;
    grid-auto-columns: calc((100vw - 52px) / 2.25);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    gap: 10px;
    scrollbar-width: none;
    margin: 0 calc(var(--container-pad) * -1);
    padding: 4px 16px;
  }
  .xf-similar__grid::-webkit-scrollbar { display: none; }
  .xf-similar__grid > * { scroll-snap-align: start; min-width: 0; }

  /* Sticky buy-bar — fixed bottom, slide-up reveal when hero actions
     scroll off-screen. Twins-sync via app.js handles state.
     Triple-guard hidden state:
       • transform off-screen (visual slide)
       • opacity 0 (belt — iOS Safari sometimes leaves fixed elems behind
         address bar at `bottom: 0` where translate math doesn't fully clear)
       • pointer-events none (no accidental tap).
     Transition gated behind .is-initialized so the element doesn't animate
     into its hidden state at first paint. */
  .xf-buy-sticky {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: color-mix(in oklch, var(--bg) 92%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line-soft);
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    transform: translateY(calc(100% + env(safe-area-inset-bottom, 0px)));
    opacity: 0;
    pointer-events: none;
  }
  .xf-buy-sticky.is-initialized {
    transition: transform .22s ease-out, opacity .18s ease-out;
  }
  .xf-buy-sticky.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .xf-buy-sticky__inner {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .xf-buy-sticky__price {
    flex: 0 0 auto;
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.3px;
    line-height: 1;
    display: flex;
    align-items: baseline;
    gap: 4px;
  }
  .xf-buy-sticky__price-cur {
    font-size: 11px;
    color: var(--text-3);
    font-weight: 500;
  }
  .xf-buy-sticky__price-val--empty {
    font-size: 13px;
    font-family: var(--font-sans);
    color: var(--text-3);
    font-weight: 500;
  }
  .xf-buy-sticky__btn {
    flex: 1 1 auto;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    font-size: 14px;
  }
  .xf-buy-sticky__wish {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
  }

  /* Add breathing room at page-end so sticky bar doesn't cover last
     content — equivalent to sticky height + safe-area. */
  .xf-home__section:last-of-type { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}
