/* LUNA VIP cart / checkout / cart pill — 2026-10-05.
   Static dark glass + gold. No continuous animation. backdrop-filter only on wide, capable screens
   (never in luna-performance-lite or data-luna-performance lite/emergency). Functional controls never depend on effects. */
:root {
  --luna-vip-bg: rgba(18, 20, 26, .86);
  --luna-vip-bg-strong: rgba(14, 16, 21, .96);
  --luna-vip-line: rgba(242, 196, 109, .30);
  --luna-vip-line-soft: rgba(255, 255, 255, .10);
  --luna-vip-gold: #f2c46d;
  --luna-vip-gold-deep: #c9932f;
  --luna-vip-text: #f6f1e7;
  --luna-vip-muted: #b9b2a5;
  --luna-vip-error: #ff8a7a;
  --luna-vip-ok: #8fe3a8;
  --luna-vip-radius: 18px;
  --luna-vip-shadow: 0 10px 28px rgba(0, 0, 0, .38);
}

/* ---------- shared ---------- */
html body .luna-vip-checkout *, html body .luna-vip-checkout *::before, html body .luna-vip-checkout *::after,
html body .luna-cart-item__controls, html body .luna-cart-item__controls *, html body .luna-cart-pill, html body .luna-cart-pill * { box-sizing: border-box; }
html body .luna-vip-card,
html body #checkout-checkout .luna-vip-card {
  background: var(--luna-vip-bg);
  border: 1px solid var(--luna-vip-line);
  border-radius: var(--luna-vip-radius);
  box-shadow: var(--luna-vip-shadow);
  color: var(--luna-vip-text);
  padding: 18px 16px;
}
html body .luna-vip-cta,
html body #checkout-checkout #continue-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  margin: 14px 0 0;
  padding: 12px 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--luna-vip-gold) 0%, var(--luna-vip-gold-deep) 100%);
  color: #1b1408 !important;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .01em;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(201, 147, 47, .35);
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}
html body .luna-vip-cta:active,
html body #checkout-checkout #continue-button:active { transform: translateY(1px); }
html body .luna-vip-cta[disabled],
html body .luna-vip-cta[aria-busy="true"] { opacity: .7; cursor: progress; }
html body .luna-vip-cta:focus-visible,
html body .luna-vip-choice input:focus-visible + span,
html body .luna-qty__step:focus-visible,
html body .luna-cart-pill:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
html body .luna-vip-entrance {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--luna-vip-line);
  background: rgba(242, 196, 109, .10);
  color: var(--luna-vip-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}
html body .luna-vip-entrance::before {
  content: "";
  flex: 0 0 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--luna-vip-gold);
  -webkit-mask: radial-gradient(circle at 50% 50%, #000 34%, transparent 36%);
  mask: radial-gradient(circle at 50% 50%, #000 34%, transparent 36%);
  box-shadow: 0 0 0 3px rgba(242, 196, 109, .35) inset;
}

/* ---------- checkout ---------- */
html body #checkout-checkout.luna-vip-checkout { color: var(--luna-vip-text); }
html body .luna-vip-head { margin: 4px 0 16px; }
html body .luna-vip-kicker { display: block; color: var(--luna-vip-gold); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
html body .luna-vip-head h1 { margin: 4px 0 6px; font-size: clamp(28px, 7vw, 40px); line-height: 1.1; }
html body .luna-vip-sub { margin: 0; color: var(--luna-vip-muted); font-size: 15px; }
html body .luna-vip-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
html body .luna-vip-label { display: block; margin: 0 0 8px; color: var(--luna-vip-text); font-size: 15px; font-weight: 800; }
html body .luna-vip-input {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  color: #14161b;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .02em;
}
html body .luna-vip-input:focus { outline: 0; border-color: var(--luna-vip-gold); box-shadow: 0 0 0 4px rgba(242, 196, 109, .35); }
html body .luna-vip-input[aria-invalid="true"] { border-color: var(--luna-vip-error); box-shadow: 0 0 0 4px rgba(255, 138, 122, .25); }
html body .luna-vip-hint { margin-top: 6px; color: var(--luna-vip-muted); font-size: 13px; }
html body .luna-vip-error { margin-top: 8px; color: var(--luna-vip-error); font-size: 14px; font-weight: 700; }
html body .luna-vip-fulfillment { margin: 18px 0 0; padding: 0; border: 0; min-width: 0; }
html body .luna-vip-choice { position: relative; display: block; margin: 0 0 10px; cursor: pointer; }
html body .luna-vip-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
html body .luna-vip-choice span {
  display: block;
  min-height: 56px;
  padding: 12px 14px 12px 46px;
  border: 1px solid var(--luna-vip-line-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  color: var(--luna-vip-text);
}
html body .luna-vip-choice span::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 17px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--luna-vip-muted);
}
html body .luna-vip-choice input:checked + span { border-color: var(--luna-vip-gold); background: rgba(242, 196, 109, .12); }
html body .luna-vip-choice input:checked + span::before { border-color: var(--luna-vip-gold); background: radial-gradient(circle, var(--luna-vip-gold) 0 5px, transparent 6px); }
html body .luna-vip-choice b { display: block; font-size: 16px; }
html body .luna-vip-choice small { display: block; margin-top: 3px; color: var(--luna-vip-muted); font-size: 13px; line-height: 1.35; }
html body .luna-vip-legal { margin: 12px 0 0; color: var(--luna-vip-muted); font-size: 13px; line-height: 1.45; }
html body .luna-vip-legal a, html body .luna-vip-link { color: var(--luna-vip-gold); text-decoration: underline; text-underline-offset: 2px; }
html body .luna-vip-link { display: inline-block; margin-top: 10px; font-size: 14px; }
html body .luna-vip-h2 { margin: 0 0 10px; color: var(--luna-vip-text); font-size: 20px; font-weight: 800; }
html body .luna-vip-summary .table { margin: 0; color: var(--luna-vip-text); --bs-table-bg: transparent; --bs-table-color: var(--luna-vip-text); border-color: var(--luna-vip-line-soft); }
html body .luna-vip-summary .table { border: 0; }
html body .luna-vip-summary .table > :not(caption) > * > * { background: transparent; color: var(--luna-vip-text); border-width: 0 0 1px; border-color: rgba(255, 255, 255, .08); padding: 9px 4px; }
html body .luna-vip-summary .table thead { display: none; }
html body .luna-vip-summary .table a { color: var(--luna-vip-text); font-weight: 700; }
html body .luna-vip-summary .table small { color: var(--luna-vip-muted); }
html body .luna-vip-summary tfoot tr:last-child td { color: var(--luna-vip-gold); font-size: 18px; font-weight: 800; }
html body #checkout-checkout #checkout-payment .buttons .float-end { float: none !important; }
html body #checkout-checkout #checkout-payment .buttons { margin-top: 6px; }
html body #checkout-checkout #checkout-payment > .text-end .btn[disabled] { width: 100%; min-height: 52px; border-radius: 14px; opacity: .55; }

@media (min-width: 992px) {
  html body .luna-vip-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 22px; }
  html body .luna-vip-summary { position: sticky; top: 16px; }
  html body .luna-vip-card { padding: 24px 22px; }
}

/* ---------- cart page (overrides luna-frontend-system light cart: same specificity + later load, !important where it uses it) ---------- */
html body.checkout-cart #checkout-cart .luna-cart-item {
  border: 1px solid var(--luna-vip-line) !important;
  background: var(--luna-vip-bg) !important;
  box-shadow: var(--luna-vip-shadow) !important;
  color: var(--luna-vip-text);
}
html body.checkout-cart #checkout-cart .luna-cart-item__name { color: var(--luna-vip-text) !important; }
html body.checkout-cart #checkout-cart .luna-cart-item__options li small,
html body.checkout-cart #checkout-cart .luna-cart-item__options li:first-child small { background: rgba(242, 196, 109, .12) !important; color: #f3dcae !important; }
html body.checkout-cart #checkout-cart .luna-cart-item__prices { border-top-color: rgba(255, 255, 255, .12) !important; }
html body.checkout-cart #checkout-cart .luna-cart-item__prices span { color: var(--luna-vip-muted) !important; }
html body.checkout-cart #checkout-cart .luna-cart-item__prices strong { color: var(--luna-vip-gold) !important; }
html body.checkout-cart #checkout-cart .luna-cart-item__controls { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
html body.checkout-cart #checkout-cart .luna-qty { display: inline-flex; align-items: center; border: 1px solid var(--luna-vip-line); border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, .06); }
html body.checkout-cart #checkout-cart .luna-qty__step {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border: 0;
  background: transparent;
  color: var(--luna-vip-gold);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
html body.checkout-cart #checkout-cart .luna-cart-item__controls .luna-qty .form-control.luna-qty__input {
  flex: 0 0 52px;
  width: 52px;
  height: 46px;
  border: 0 !important;
  border-radius: 0 !important;
  background: rgba(255, 255, 255, .96);
  color: #14161b;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  box-shadow: none;
}
html body.checkout-cart #checkout-cart .luna-cart-item__controls .btn.luna-qty__apply {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  border: 0 !important;
}
html body.checkout-cart #checkout-cart .luna-cart-item__controls .btn-danger.luna-cart-item__remove {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 138, 122, .45) !important;
  background: rgba(255, 138, 122, .12) !important;
  color: var(--luna-vip-error) !important;
}
html body.checkout-cart #checkout-cart #checkout-total {
  border: 1px solid var(--luna-vip-line) !important;
  background: var(--luna-vip-bg) !important;
  box-shadow: var(--luna-vip-shadow) !important;
  color: var(--luna-vip-text);
}
html body.checkout-cart #checkout-cart #checkout-total .luna-cart-total-row { display: flex; justify-content: space-between; gap: 12px; }
html body.checkout-cart #checkout-cart #checkout-total .luna-cart-total-row + .luna-cart-total-row { border-top-color: rgba(255, 255, 255, .08) !important; }
html body.checkout-cart #checkout-cart #checkout-total .luna-cart-total-row strong { color: var(--luna-vip-muted) !important; font-size: 16px; font-weight: 700; }
html body.checkout-cart #checkout-cart #checkout-total .luna-cart-total-row span { color: var(--luna-vip-text) !important; font-size: 17px; }
html body.checkout-cart #checkout-cart #checkout-total .luna-cart-total-row.is-grand strong { color: var(--luna-vip-text) !important; font-size: 18px; font-weight: 800; }
html body.checkout-cart #checkout-cart #checkout-total .luna-cart-total-row.is-grand span { color: var(--luna-vip-gold) !important; font-size: 26px; font-weight: 800; }
html body.checkout-cart #checkout-cart #checkout-total .luna-delivery-threshold { border-bottom: 0 !important; border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(242, 196, 109, .10) !important; color: #f3dcae !important; }
html body.checkout-cart #checkout-cart #checkout-total .luna-delivery-threshold.is-free { background: rgba(143, 227, 168, .12) !important; color: #c4f2d2 !important; }
html body.checkout-cart #checkout-cart #checkout-total .luna-vip-entrance { margin: 0 14px 14px; }
html body.checkout-cart #checkout-cart #shopping-cart .d-grid .btn-primary.luna-vip-cta {
  border: 0 !important;
  background: linear-gradient(180deg, var(--luna-vip-gold) 0%, var(--luna-vip-gold-deep) 100%) !important;
  background-image: linear-gradient(180deg, var(--luna-vip-gold) 0%, var(--luna-vip-gold-deep) 100%) !important;
  color: #1b1408 !important;
  box-shadow: 0 6px 18px rgba(201, 147, 47, .35) !important;
}
html body.checkout-cart #checkout-cart #shopping-cart .d-grid .btn-light {
  border: 1px solid var(--luna-vip-line) !important;
  background: rgba(18, 20, 26, .78) !important;
  color: var(--luna-vip-text) !important;
}
/* Page headings keep the site's own heading style (they sit on the light photo background). */
html body #checkout-checkout.luna-vip-checkout .luna-vip-sub { color: #3b4a66; font-weight: 600; }
html body #checkout-checkout.luna-vip-checkout .luna-vip-kicker { color: #8a5d12; }
html body.checkout-cart #checkout-cart .luna-cart-item__remove svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- floating cart pill (mobile) / compact cart panel (desktop) ---------- */
html body .luna-cart-pill {
  position: fixed;
  z-index: 1035;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--luna-vip-line);
  border-radius: 999px;
  background: var(--luna-vip-bg-strong);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  color: var(--luna-vip-text);
  text-decoration: none;
}
html body .luna-cart-pill[hidden] { display: none !important; }
html body .luna-cart-pill__icon { position: relative; flex: 0 0 auto; width: 30px; height: 30px; color: var(--luna-vip-gold); }
html body .luna-cart-pill__icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; }
html body .luna-cart-pill__count {
  position: absolute;
  right: -8px;
  top: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--luna-vip-gold);
  color: #1b1408;
  font-size: 12px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}
html body .luna-cart-pill__sum { flex: 1 1 auto; color: var(--luna-vip-text); font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .luna-cart-pill__cta {
  flex: 0 0 auto;
  padding: 12px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--luna-vip-gold) 0%, var(--luna-vip-gold-deep) 100%);
  color: #1b1408;
  font-size: 16px;
  font-weight: 800;
}
html body.luna-has-cart-pill { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
html body.checkout-cart .luna-cart-pill,
html body.checkout-checkout .luna-cart-pill { display: none !important; }
html body.checkout-cart.luna-has-cart-pill,
html body.checkout-checkout.luna-has-cart-pill { padding-bottom: 0; }

@media (min-width: 992px) {
  html body .luna-cart-pill {
    left: auto;
    right: 24px;
    bottom: 24px;
    width: 340px;
    border-radius: 18px;
    padding: 12px 12px 12px 16px;
  }
  html body.luna-has-cart-pill { padding-bottom: 0; }
}

/* Glass blur only where it is cheap and the performance mode allows it. */
@media (min-width: 992px) and (hover: hover) {
  html:not(.luna-performance-lite):not([data-luna-performance="lite"]):not([data-luna-performance="emergency"]) body .luna-vip-card,
  html:not(.luna-performance-lite):not([data-luna-performance="lite"]):not([data-luna-performance="emergency"]) body .luna-cart-pill {
    background: rgba(18, 20, 26, .72);
    -webkit-backdrop-filter: blur(14px) saturate(1.1);
    backdrop-filter: blur(14px) saturate(1.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .luna-vip-cta, html body #checkout-checkout #continue-button { transition: none; }
}

/* ---------- polish 2026-10-05b: checkout heading panel, desktop CTA alignment, stacked order-summary rows on phones ---------- */
html body #checkout-checkout.luna-vip-checkout .luna-vip-head { display: inline-block; max-width: 100%; padding: 10px 16px 12px; border-radius: 16px; background: rgba(255, 250, 242, .88); box-shadow: 0 6px 18px rgba(0, 0, 0, .16); }
html body #checkout-checkout.luna-vip-checkout .luna-vip-head h1 { margin-top: 2px; }
html body #checkout-checkout.luna-vip-checkout .luna-vip-sub { color: #2b3850; }
html body.checkout-cart #checkout-cart #shopping-cart .d-grid { align-items: stretch; }
html body.checkout-cart #checkout-cart #shopping-cart .d-grid .btn { margin-top: 0 !important; margin-bottom: 0 !important; }
@media (max-width: 480px) {
  html body .luna-vip-summary .table tbody tr { display: flex; flex-direction: column; padding: 6px 4px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  html body .luna-vip-summary .table tbody td { display: block; width: 100%; padding: 4px 0; text-align: left; border-width: 0; }
  html body .luna-vip-summary .table tbody td strong { white-space: nowrap; }
}

/* ---------- polish 2026-10-05c: cart heading panel, readable order summary, YooKassa block on the dark card ---------- */
html body.checkout-cart #checkout-cart #shopping-cart > h1 { display: inline-block; max-width: 100%; margin: 4px 0 16px; padding: 10px 16px 12px; border-radius: 16px; background: rgba(255, 250, 242, .88); box-shadow: 0 6px 18px rgba(0, 0, 0, .16); }
html body .luna-vip-summary .table tfoot td:first-child { text-align: left !important; }
html body .luna-vip-summary .table tfoot tr.luna-total-shipping td { color: var(--luna-vip-muted); }
html body .luna-vip-summary .table tfoot tr.luna-total-shipping td + td { color: var(--luna-vip-text); font-weight: 700; }
html body .luna-vip-summary .table tfoot td { white-space: nowrap; }
html body #checkout-checkout #checkout-payment h3 { margin: 10px 0 2px; color: var(--luna-vip-text); font-size: 16px; font-weight: 700; line-height: 1.3; }
html body #checkout-checkout #checkout-payment > .text-end .btn[disabled] { color: var(--luna-vip-text); background: rgba(255, 255, 255, .06); border: 1px dashed var(--luna-vip-line); }
html body #checkout-checkout.luna-vip-checkout .luna-vip-head h1,
html body.checkout-cart #checkout-cart #shopping-cart > h1 { color: #1d2433; text-shadow: none; }
html body .luna-vip-summary .table tfoot td + td { text-align: right !important; }
@media (max-width: 480px) {
  html body .luna-vip-summary .table, html body .luna-vip-summary .table tbody, html body .luna-vip-summary .table tfoot { display: block; width: 100%; }
  html body .luna-vip-summary .table tfoot tr { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  html body .luna-vip-summary .table tfoot td { display: block; border-width: 0; }
}
