/* Quantity demo: template + discount + a few live options */

/* —— Independent top preview module (does not affect .bxd-main board) —— */
.bxq {
  --bxq-bg: #f4efe8;
  --bxq-ink: #152033;
  --bxq-muted: #5c6570;
  --bxq-card: #fff;
  --bxq-line: rgba(21, 32, 51, 0.1);
  --bxq-accent: #152033;
  --bxq-save-ink: #0f8a4b;
  --bxq-save-bg: #e7f7ee;
  --bxq-gift-bg: #1f6b45;
  --bxq-gift-ink: #fff;
  padding: calc(var(--pt-header-h) + 36px) 0 48px;
  background: var(--bxq-bg);
  color: var(--bxq-ink);
}
.bxq[data-theme="warm"] {
  --bxq-bg: #f3e6d6;
  --bxq-accent: #8a3b12;
  --bxq-save-ink: #b45309;
  --bxq-save-bg: #fcefe4;
  --bxq-gift-bg: #9a4b1c;
  --bxq-gift-ink: #fff;
}
.bxq[data-theme="dark"] {
  --bxq-bg: #343a46;
  --bxq-ink: #f4f6f8;
  --bxq-muted: #c5cbd4;
  --bxq-card: #454d5c;
  --bxq-line: rgba(255, 255, 255, 0.16);
  --bxq-accent: #eef1f5;
  --bxq-save-ink: #8fd9a8;
  --bxq-save-bg: rgba(143, 217, 168, 0.18);
  --bxq-gift-bg: #2f6b4d;
  --bxq-gift-ink: #fff;
  --bxq-cta: #eef1f5;
  --bxq-cta-ink: #1f2430;
  --bxq-seg-on: #eef1f5;
  --bxq-seg-on-ink: #1f2430;
}
.bxq-hero {
  text-align: center;
  margin-bottom: 18px;
}
.bxq-hero__lead {
  margin: 0 auto;
  max-width: 38rem;
  color: var(--bxq-muted);
  font-size: 1.02rem;
  line-height: 1.55;
}
.bxq-quick {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.bxq-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px;
  background: var(--bxq-card);
  border: 1px solid var(--bxq-line);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.bxq-seg button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--bxq-muted);
  cursor: pointer;
  line-height: 1.2;
}
.bxq-seg button.is-on {
  background: var(--bxq-seg-on, #152033);
  color: var(--bxq-seg-on-ink, #fff);
}
.bxq-more {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: var(--bxq-seg-on, #152033);
  color: var(--bxq-seg-on-ink, #fff);
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(21, 32, 51, 0.18);
}
.bxq-more:hover { filter: brightness(1.06); color: inherit; }
.bxq[data-theme="dark"] .bxq-more {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.bxq[data-theme="dark"] .bxq-seg {
  box-shadow: none;
  background: color-mix(in srgb, var(--bxq-card) 88%, #fff 12%);
}
.bxq[data-theme="dark"] .bxq-product {
  background: color-mix(in srgb, var(--bxq-card) 75%, #2a303a);
}
.bxq[data-theme="dark"] .bxq-card {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}
.bxq[data-theme="dark"] .bxq-row,
.bxq[data-theme="dark"] .bxq-col {
  background: color-mix(in srgb, var(--bxq-card) 82%, #2f3540);
}
.bxq[data-theme="dark"] .bxq-row.is-on,
.bxq[data-theme="dark"] .bxq-col.is-on {
  background: color-mix(in srgb, var(--bxq-accent) 12%, var(--bxq-card));
}
.bxq[data-theme="dark"] .bxq-radio {
  border-color: #9aa3b2;
  background: transparent;
}
.bxq[data-theme="dark"] .bxq-row.is-on .bxq-radio {
  border-color: var(--bxq-accent);
  background: radial-gradient(circle at center, var(--bxq-accent) 0 38%, transparent 40%);
  border-width: 2px;
}
.bxq-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 1fr);
  gap: 0;
  align-items: stretch;
  max-width: 980px;
  margin: 0 auto;
  background: var(--bxq-card);
  border: 1px solid var(--bxq-line);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.08);
}
.bxq-product {
  margin: 0;
  background: color-mix(in srgb, var(--bxq-card) 88%, #dfe3e8);
  align-self: stretch;
  min-height: 100%;
  /* Keep image pinned top-left; column bg may grow with Gift height. */
  display: block;
}
.bxq-product img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  min-height: 0;
  max-height: none;
  object-fit: cover;
  object-position: center top;
  display: block;
  vertical-align: top;
}
.bxq-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 22px 24px;
  box-shadow: none;
  text-align: left;
}
.bxq[data-theme="dark"] .bxq-stage {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}
.bxq[data-theme="dark"] .bxq-product {
  background: color-mix(in srgb, var(--bxq-card) 70%, #2a303a);
}
.bxq-card__head h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.bxq-stars {
  margin: 0 0 16px;
  color: #f5a524;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}
.bxq-stars span {
  color: var(--bxq-muted);
  font-weight: 600;
  letter-spacing: 0;
  margin-left: 6px;
}
.bxq-list {
  display: grid;
  gap: 14px;
  padding-top: 10px;
}
.bxq-row,
.bxq-col {
  position: relative;
  width: 100%;
  border: 1.5px solid var(--bxq-line);
  background: var(--bxq-card);
  color: var(--bxq-ink);
  border-radius: 14px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  overflow: visible;
}
.bxq-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
  padding: 14px;
}
.bxq-row.has-gift {
  padding-bottom: 0;
  padding-top: 16px;
}
.bxq-row.is-on,
.bxq-col.is-on {
  border-color: var(--bxq-accent);
  box-shadow: inset 0 0 0 1px var(--bxq-accent);
  background: color-mix(in srgb, var(--bxq-accent) 8%, var(--bxq-card));
  color: var(--bxq-ink);
}
.bxq-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #c8c8c8;
  background: #fff;
  box-sizing: border-box;
}
.bxq-row.is-on .bxq-radio {
  border: 6px solid var(--bxq-accent);
  background: #fff;
}
.bxq-name {
  font-weight: 700;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--bxq-ink);
}
.bxq-save {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bxq-save-bg) !important;
  color: var(--bxq-save-ink) !important;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
}
.bxq-save.is-ghost { visibility: hidden; }
.bxq-row > em,
.bxq-col > em {
  font-style: normal;
  font-weight: 800;
  text-align: right;
  color: var(--bxq-ink);
}
.bxq-row > em s,
.bxq-col > em s {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--bxq-muted);
}
.bxq-badge {
  position: absolute;
  top: 0;
  left: 50%;
  right: auto;
  z-index: 3;
  transform: translate(-50%, -50%);
  background: #111 !important;
  color: #fff !important;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
}
.bxq-row .bxq-badge {
  left: auto;
  right: 12px;
  transform: translateY(-50%);
}
.bxq-gift {
  grid-column: 1 / -1;
  display: flex;
  width: auto;
  margin: 10px -14px 0;
  margin-left: -14px;
  margin-right: -14px;
  border-radius: 0 0 12px 12px;
  background: var(--bxq-gift-bg);
  color: var(--bxq-gift-ink);
  font-size: 0.82rem;
  font-weight: 600;
  box-sizing: border-box;
}
/* Vertical: [icon][name] …… [Free][~~price~~] */
.bxq-gift--row {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  text-align: left;
}
.bxq-gift--row .bxq-gift__name {
  flex: 1 1 auto;
  width: auto;
  text-align: left;
}
.bxq-gift--row .bxq-gift__price {
  margin-left: auto;
  gap: 8px;
  white-space: nowrap;
}
.bxq-gift--row .bxq-gift__was {
  display: inline;
  margin: 0;
}
/* Horizontal columns: name → icon → Free → price (centered) */
.bxq-gift--stack {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 10px 14px;
  text-align: center;
}
.bxq-gift--stack .bxq-gift__name {
  width: 100%;
  text-align: center;
}
.bxq-gift--stack .bxq-gift__price {
  justify-content: center;
}
.bxq-gift__icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}
.bxq-gift--stack .bxq-gift__icon {
  width: 32px;
  height: 32px;
}
.bxq-gift__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.bxq-gift__name {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--bxq-gift-ink);
}
.bxq-gift__price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bxq-gift__price i {
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--bxq-gift-bg);
}
.bxq-gift__was {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--bxq-gift-ink);
  text-decoration: line-through;
  opacity: 0.95;
}
.bxq-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 12px;
  align-items: stretch;
}
.bxq-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 10px 14px;
  text-align: center;
  overflow: visible;
  min-width: 0;
}
.bxq-col.has-gift {
  padding-bottom: 0;
  padding-top: 20px;
}
.bxq-col > strong {
  font-size: 0.92rem;
  color: var(--bxq-ink);
}
.bxq-col > .bxq-save {
  justify-content: center;
}
.bxq-col .bxq-gift {
  width: auto;
  align-self: stretch;
  margin: 10px -10px 0;
  margin-top: auto;
  border-radius: 0 0 12px 12px;
}
.bxq-cta {
  display: block;
  width: 100%;
  margin-top: 16px;
  border: 0;
  border-radius: 999px;
  background: var(--bxq-cta, #152033);
  color: var(--bxq-cta-ink, #fff);
  font-weight: 800;
  font-size: 0.98rem;
  padding: 14px 16px;
  cursor: default;
}
@media (max-width: 860px) {
  .bxq-stage { grid-template-columns: 1fr; max-width: 440px; }
  .bxq-product { min-height: 0; }
  .bxq-product img { aspect-ratio: 16 / 10; }
}
@media (max-width: 720px) {
  .bxq-quick { gap: 8px; }
  .bxq-seg { width: 100%; justify-content: center; }
  .bxq-more { width: 100%; justify-content: center; }
  .bxq-cols { grid-template-columns: 1fr; }
}

.bxd-hero {
  padding: 36px 0 8px;
  text-align: center;
  background: #f6f7f8;
}
.bxd-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
}
.bxd-hero p {
  margin: 0 auto;
  max-width: 36rem;
  color: #5c6570;
}

.bxd-main {
  --fill: #0e8450;
  --badge: #db3918;
  padding: 28px 0 72px;
  background: #f6f7f8;
}
.bxq + .bxd-main {
  padding-top: 8px;
}

.bxd-controls {
  display: grid;
  gap: 14px;
  background: #fff;
  border: 1px solid #e6e8eb;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 22px;
}
.bxd-group { display: grid; gap: 8px; }
.bxd-group > span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
}
.bxd-pills,
.bxd-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.bxd-pills button,
.bxd-reset {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  color: #111;
}
.bxd-pills--sm { gap: 6px; }
.bxd-pills--sm button {
  padding: 4px 9px;
  font-size: 0.72rem;
  border-radius: 8px;
  font-weight: 700;
}
.bxd-pills button.is-on {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
}
.bxd-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 6px 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #111;
  cursor: pointer;
  user-select: none;
}
.bxd-switch.bxd-sub {
  margin-left: 12px;
  font-size: 0.84rem;
  color: #374151;
}
.bxd-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.bxd-switch i {
  position: relative;
  width: 40px;
  height: 24px;
  border-radius: 999px;
  background: #d1d5db;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.bxd-switch i::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}
.bxd-switch input:checked + i {
  background: #111;
}
.bxd-switch input:checked + i::after {
  transform: translateX(16px);
}
.bxd-switch:focus-within i {
  outline: 2px solid rgba(17, 17, 17, 0.25);
  outline-offset: 2px;
}
.bxd-tog {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 6px 10px 6px 12px;
  font-size: 0.86rem;
  font-weight: 700;
}
.bxd-tog input { accent-color: var(--fill); }
.bxd-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.bxd-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--c);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.16);
  padding: 0;
  cursor: pointer;
}
.bxd-dot.is-on { box-shadow: 0 0 0 2px var(--c); }

.bxd-board {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(300px, 1.45fr) minmax(220px, 1fr);
  gap: 16px;
  align-items: start;
  width: 100%;
}
.bxd-side {
  background: #fff;
  border: 1px solid #e6e8eb;
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 16px;
  min-width: 0;
}
.bxd-center {
  display: grid;
  justify-items: stretch;
  gap: 12px;
  min-width: 0;
  width: 100%;
}
.bxd-widget {
  width: 100%;
  background: #fff;
  border: 1px solid #e6e8eb;
  border-radius: 16px;
  padding: 16px;
}
.bxd-reset {
  background: #fff;
  justify-self: center;
}
.bxd-timer-picks,
.bxd-badge-picks,
.bxd-gift-opts,
.bxd-variant-styles { display: none; gap: 6px; }
.bxd-group:has([data-flag="countdown"]:checked) .bxd-timer-picks,
.bxd-group:has([data-flag="badge"]:checked) .bxd-badge-picks {
  display: flex;
  flex-wrap: wrap;
}
.bxd-flags:has([data-flag="gift"]:checked) .bxd-gift-opts { display: grid; }
.bxd-flags:has([data-flag="variants"]:checked) .bxd-variant-styles {
  display: grid;
  padding: 0 0 4px 12px;
}
.bxd-badge-picks button {
  min-height: 0;
  display: inline-flex;
  align-items: center;
}
.bxd-badge-picks .qb {
  font-size: 0.62rem;
  transform: none;
  margin: 0;
}
.bxd-flags { display: grid; gap: 2px; }
.bxd-side--switches .bxd-group { gap: 4px; }
.bxd-side--switches {
  gap: 10px;
}

.qv-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.qv-head span { height: 2px; background: var(--badge); }
.qv-head strong { font-size: 0.95rem; color: #1f2937; white-space: nowrap; }
.qv-timer {
  margin: 0 0 12px;
  border-radius: 12px;
  padding: 12px 10px 14px;
  text-align: center;
  color: #1f2937;
}
.qv-timer strong { display: block; margin-bottom: 8px; font-size: 0.95rem; }
.qv-timer.is-image {
  background: #3d2a6d var(--timer-img) center/cover no-repeat;
  color: #fff;
}
.qv-timer.is-color { background: #d3f286; }
.qv-timer.is-gradient { background: linear-gradient(90deg, #d3f286, #8fd3f4); }
.qv-digits { display: flex; justify-content: center; gap: 8px; }
.qv-digits span {
  background: #fff;
  color: #111;
  border-radius: 8px;
  min-width: 58px;
  padding: 6px 8px 4px;
  display: grid;
}
.qv-digits b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.qv-digits small { font-size: 0.68rem; color: #6b7280; }

.qv-list { display: grid; gap: 14px; }
.qv-row {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 8px 10px;
  align-items: center;
  border: 1.5px solid #ececec;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  cursor: pointer;
  text-align: left;
  color: #111;
  overflow: visible;
}
.qv-row.no-radio {
  grid-template-columns: 1fr auto;
}
.qv-row.has-img.img-left {
  grid-template-columns: 18px 48px minmax(0, 1fr) auto;
}
.qv-row.has-img.img-left.no-radio {
  grid-template-columns: 48px minmax(0, 1fr) auto;
}
.qv-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  background: #f3f4f6;
  display: block;
}
.bxd-mini {
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 700;
  color: #374151;
}
.qv-col.no-img > img { display: none; }
.qv-row.is-on {
  background: color-mix(in srgb, var(--fill) 10%, #fff);
  border-color: var(--fill);
  box-shadow: inset 0 0 0 1px var(--fill);
  color: #111;
}
.qv-radio {
  width: 18px;
  height: 18px;
  margin: 0;
  border-radius: 50%;
  border: 2px solid #c8c8c8;
  background: #fff;
  box-sizing: border-box;
  flex-shrink: 0;
  display: block;
  align-self: center;
}
.qv-row.is-on .qv-radio {
  border: 6px solid var(--fill, #fd4154);
  background: #fff;
}
.qv-name { font-weight: 700; }
.qv-pill {
  display: inline-block;
  margin-left: 6px;
  background: var(--badge);
  color: #fff;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  vertical-align: middle;
}
.qv-pill.is-ghost { visibility: hidden; }
.qv-row em {
  font-style: normal;
  font-weight: 800;
  text-align: right;
}
.qv-row em s,
.qv-col em s {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.7;
}
.qb {
  --badge-bg: var(--badge, #db3918);
  display: inline-flex;
  align-items: center;
  background: var(--badge-bg);
  color: var(--badge-ink, #fff);
  border-radius: 4px;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.5;
  padding: 0 8px;
  position: relative;
  white-space: nowrap;
}
.qb-1 { border-radius: 0 0 4px 4px; margin: 0 6px; }
.qb-1::before,
.qb-1::after {
  content: '';
  position: absolute;
  top: 0;
  border-bottom: 6px solid var(--badge-bg);
}
.qb-1::before { left: -6px; border-left: 6px solid transparent; }
.qb-1::after { right: -6px; border-right: 6px solid transparent; }
.qb-2 { transform: rotate(4deg); letter-spacing: 0.02em; vertical-align: middle; }
.qb-3 { border-radius: 999px; }
.qb-4 { border-radius: 0; margin-right: 8px; }
.qb-4::after {
  content: '';
  position: absolute;
  top: 0;
  right: -8px;
  border-top: 0.75em solid transparent;
  border-bottom: 0.75em solid transparent;
  border-left: 8px solid var(--badge-bg);
}
.qb-5 { border-radius: 0; margin-left: 8px; }
.qb-5::before {
  content: '';
  position: absolute;
  top: 0;
  left: -8px;
  border-top: 0.75em solid transparent;
  border-bottom: 0.75em solid transparent;
  border-right: 8px solid var(--badge-bg);
}
.qb-6 {
  --cres-w: 6px;
  border-radius: 0;
  line-height: 1.8;
  padding: 0 1.1em;
  padding-bottom: var(--cres-w);
  border-image: conic-gradient(#0008 0 0) 51% / var(--cres-w);
  clip-path: polygon(
    100% calc(100% - var(--cres-w)),
    100% 100%,
    calc(100% - var(--cres-w)) calc(100% - var(--cres-w)),
    var(--cres-w) calc(100% - var(--cres-w)),
    0 100%,
    0 calc(100% - var(--cres-w)),
    999px calc(100% - var(--cres-w) - 999px),
    calc(100% - 999px) calc(100% - var(--cres-w) - 999px)
  );
}
.qb-7 { border-radius: 0 10px 0 10px; }
.is-pos { position: absolute; z-index: 2; }
.qb-1.is-pos { top: -7px; right: 18px; margin: 0 6px; }
.qb-2.is-pos { top: -8px; right: 14px; }
.qb-3.is-pos { top: -10px; right: 14px; }
.qb-4.is-pos { top: -8px; right: 20px; }
.qb-5.is-pos { top: -8px; right: 16px; }
.qb-6.is-pos {
  top: 0;
  right: 0;
  left: auto;
  transform: translate(calc((1 - cos(45deg)) * 100%), -100%) rotate(45deg);
  transform-origin: 0 100%;
}
.qb-7.is-pos { top: 0; right: 0; }
/* Horizontal: straddle top edge like bxq grid badges — avoid covering title */
.qv-col .qb-1.is-pos,
.qv-col .qb-2.is-pos,
.qv-col .qb-3.is-pos,
.qv-col .qb-4.is-pos,
.qv-col .qb-5.is-pos {
  top: 0;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
  margin: 0;
}
.qv-col .qb-2.is-pos { transform: translate(-50%, -50%) rotate(4deg); }
.qv-col .qb-6.is-pos,
.qv-col .qb-7.is-pos { right: 0; left: auto; }
.bxd-badge-picks .qb { transform: none; }
.bxd-badge-picks .qb-2 { transform: rotate(4deg); }
.bxd-badge-picks .qb-6 {
  transform: rotate(45deg);
  margin: 1.1em 0.4em;
}
.qv-list { padding-top: 10px; }
.qv-cols { padding-top: 12px; }
.qv-row,
.bxd-widget { overflow: visible; }
.qv-step {
  display: inline-flex;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.qv-step button {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.qv-step b { min-width: 18px; text-align: center; line-height: 28px; }
.qv-vars,
.qv-gift,
.qv-addon { grid-column: 1 / -1; }
.qv-vars {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}
.qv-var {
  display: flex;
  align-items: center;
  gap: 12px;
}
.qv-var img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
}
.qv-var__fields {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.qv-var.is-stack {
  align-items: flex-start;
}
.qv-var.is-stack .qv-var__fields {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.qv-var.qty-only .qv-var__fields {
  justify-content: flex-start;
}
.qv-var__idx {
  min-width: 22px;
  font-size: 0.95rem;
  font-weight: 800;
  font-style: italic;
  color: var(--fill, #c81e1e);
  line-height: 40px;
}
/* Color swatch: solid fills only; selected = outer ring + gap */
.qv-swatches {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, var(--fill, #c81e1e) 35%, #e5e7eb);
  border-radius: 999px;
  background: #fff;
  box-sizing: border-box;
}
.qv-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(17, 24, 39, 0.14);
  background: var(--sw, #ccc);
  background-image: none !important;
  cursor: pointer;
  padding: 0;
  position: relative;
  box-sizing: border-box;
  flex-shrink: 0;
  box-shadow: none;
}
.qv-swatch.is-on {
  /* Keep inner circle border; add white gap + outer ring */
  border-color: rgba(17, 24, 39, 0.14);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ring, #9ca3af);
}
.qv-swatch.is-on::after {
  content: none;
}
.qv-var select {
  flex: 1;
  min-width: 0;
  height: 36px;
  border: 0;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23111' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: #111;
  border-radius: 8px;
  padding: 0 28px 0 12px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  appearance: none;
}
.qv-var__qty {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 104px;
  height: 36px;
  background: #fff;
  border-radius: 8px;
  color: #111;
}
.bxd-pills--stack {
  flex-direction: column;
  align-items: stretch;
}
.bxd-pills--stack button {
  border-radius: 10px;
  text-align: left;
}
.qv-var__qty button {
  width: 34px;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #111;
  line-height: 1;
}
.qv-var__qty b {
  flex: 1;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
}
.qv-gift {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 0.84rem;
  font-weight: 700;
}
.qv-row:not(.is-on) .qv-gift { background: #f3f4f6; }
.qv-giftbox {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  /* Keep side flush with card; do not use negative bottom margin — it collapses list gap. */
  margin: 8px -12px 0;
  padding: 12px;
  background: var(--fill, #db3918);
  border-radius: 0 0 10px 10px;
  color: #fff;
  box-sizing: border-box;
}
.qv-choose {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto;
  max-width: 100%;
  border: 0;
  background: #fff;
  color: var(--fill, #c81e1e);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  box-sizing: border-box;
  white-space: nowrap;
}
.qv-choose i {
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}
/* Vertical: choose button is content-width, left-aligned (Easy Bundle Vertical) */
.qv-giftbox > .qv-choose--v {
  display: inline-flex;
  width: auto;
  align-self: flex-start;
  border-radius: 999px;
  background: #fff;
  color: var(--fill, #c81e1e);
  padding: 8px 14px;
}
/* Gift row: [check?][icon][name] …… [Free][~~price~~] */
.qv-vgift {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  color: #fff;
  box-sizing: border-box;
}
.qv-vgift--chosen {
  justify-content: flex-start;
}
.qv-vgift__icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
}
.qv-vgift__icon svg {
  width: 28px;
  height: 28px;
  display: block;
}
.qv-vgift__thumb {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
}
.qv-vgift__name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.qv-vgift__select {
  width: max-content;
  min-width: 48px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  padding: 0 28px 0 10px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: #111;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23111' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
}
.qv-vgift__price {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
}
.qv-vgift__price i {
  font-style: normal;
  background: #fff;
  color: var(--fill, #c81e1e);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.4;
}
.qv-vgift__price s {
  color: #fff;
  opacity: 0.95;
  font-weight: 600;
  font-size: 0.84rem;
  text-decoration: line-through;
}
.bxd-sub { margin-left: 12px; }
.qv-fixed {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
}
.qv-fixed--chosen {
  grid-template-columns: 18px 32px minmax(0, 1fr) auto;
}
.qv-gcheck {
  position: relative;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.qv-gcheck input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.qv-gcheck i {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
  display: block;
  position: relative;
}
.qv-gcheck input:checked + i::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #111;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.qv-fixed img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}
.qv-fixed__meta {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.qv-fixed__meta strong {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qv-fixed__meta select {
  width: max-content;
  min-width: 56px;
  border: 0;
  border-radius: 999px;
  padding: 4px 28px 4px 10px;
  font: inherit;
  font-weight: 700;
  color: #111;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23111' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
}
.qv-fixed__price {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.qv-fixed__price i {
  font-style: normal;
  background: #fff;
  border: 0;
  color: var(--fill, #c81e1e);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.4;
}
.qv-row.has-gift {
  padding-bottom: 0;
  /* Leave room for the next row's overhanging recommend badge. */
  margin-bottom: 2px;
}
.qv-fixed__price s {
  color: #fff;
  opacity: 0.95;
  font-weight: 600;
  font-size: 0.84rem;
  text-decoration: line-through;
}

.qv-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  padding-top: 16px;
  overflow: visible;
}
.qv-product {
  margin: 0 0 10px;
  text-align: left;
}
.qv-product strong {
  display: block;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.qv-stars {
  margin: 4px 0 0;
  color: #f5a524;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}
.qv-stars span {
  margin-left: 6px;
  color: #6b7280;
  font-weight: 600;
  letter-spacing: 0;
}
.qv-col {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1.5px solid #e8e8e8;
  border-radius: 14px;
  background: #fff;
  padding: 14px 10px 12px;
  font: inherit;
  cursor: pointer;
  text-align: center;
  color: #111;
  /* Match bxq grid: allow recommend badges to sit on the top edge */
  overflow: visible;
}
.qv-col.has-gift {
  padding-bottom: 0;
}
.qv-col.has-badge {
  padding-top: 18px;
}
.qv-col.is-on {
  border-color: var(--fill);
  box-shadow: inset 0 0 0 1.5px var(--fill);
  background: color-mix(in srgb, var(--fill) 10%, #fff);
}
.qv-col.is-on > em {
  color: var(--fill);
}
.qv-col > b {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0 2px;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qv-col > img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 50%;
  background: linear-gradient(#f3f4f6, #e5e7eb);
  flex-shrink: 0;
}
.qv-col.no-img > img { display: none; }
.qv-col .qv-pill {
  background: var(--fill);
  color: #fff;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.68rem;
  font-weight: 800;
}
.qv-col .qv-pill.is-ghost {
  visibility: hidden;
  background: transparent;
}
.qv-col em {
  font-style: normal;
  font-weight: 800;
  display: grid;
  justify-items: center;
  gap: 2px;
  font-size: 0.95rem;
}
.qv-col em s {
  color: #9ca3af;
  font-weight: 600;
  font-size: 0.74rem;
}
.qv-col .qv-giftbox--h {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  flex-shrink: 0;
  width: auto;
  margin: 10px -10px 0;
  margin-top: auto;
  padding: 12px 10px 14px;
  gap: 8px;
  /* Own radius — parent overflow is visible for badges */
  border-radius: 0 0 12px 12px;
  background: var(--fill, #c81e1e);
  box-sizing: border-box;
  color: #fff;
  overflow: hidden;
  text-align: center;
}
.qv-col .qv-giftbox--h.is-choose,
.qv-col .qv-giftbox--h.is-choose-alone {
  padding: 12px 10px 14px;
  gap: 0;
}
/* Horizontal: choose button content-width, centered */
.qv-col .qv-choose--h {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 999px;
  border: 0;
  background: #fff;
  color: var(--fill, #c81e1e);
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
}
.qv-col .qv-choose--h i {
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}
/* Horizontal: fixed/chosen gift stacked + centered */
.qv-hgift {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  min-width: 0;
  width: 100%;
  color: #fff;
  text-align: center;
  box-sizing: border-box;
  background: transparent;
}
.qv-hgift--stack {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.qv-hgift--chosen {
  justify-content: center;
  text-align: center;
}
.qv-hgift__icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: block;
}
.qv-hgift__icon svg {
  width: 32px;
  height: 32px;
  display: block;
}
.qv-hgift strong {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}
.qv-hgift__price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
}
.qv-hgift__price i {
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--fill, #c81e1e);
}
.qv-hgift__was {
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  text-decoration: line-through;
  opacity: 0.95;
}
.qv-hgift img,
.qv-hgift__thumb {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
}
.qv-col .qv-gcheck i {
  background: #fff;
}
.qv-col .qb.is-pos {
  z-index: 3;
  pointer-events: none;
}

/*
 * Full-page mask covers nav. Avoid position:fixed on body — it jumps the page up.
 * overflow:hidden keeps scroll position; padding replaces scrollbar width.
 */
html.bxd-modal-open {
  overflow: hidden;
  scroll-behavior: auto;
}
html.bxd-modal-open body {
  overflow: hidden;
  overscroll-behavior: none;
  padding-right: var(--bxd-sb, 0px);
}
html.bxd-modal-open .site-header {
  z-index: 1;
  padding-right: var(--bxd-sb, 0px);
}
.bxd-gift-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 20px;
}
.bxd-gift-modal[hidden] { display: none; }
.bxd-gift-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
}
.bxd-gift-modal__panel {
  position: relative;
  width: min(420px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
  display: grid;
  gap: 14px;
}
.bxd-gift-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.bxd-gift-modal__head strong {
  font-size: 1.05rem;
}
.bxd-gift-modal__x {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #111;
}
.bxd-gift-modal__list {
  display: grid;
  gap: 10px;
  max-height: min(50vh, 360px);
  overflow: auto;
}
.bxd-gift-item {
  display: grid;
  grid-template-columns: 18px 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 1.5px solid #ececec;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  font: inherit;
  cursor: pointer;
}
.bxd-gift-item.is-on { border-color: var(--fill, #111); }
.bxd-gift-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #c8c8c8;
  background: #fff;
  box-sizing: border-box;
}
.bxd-gift-item.is-on .bxd-gift-radio {
  border: 6px solid var(--fill, #fd4154);
  background: #fff;
}
.bxd-gift-item img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: #f3f4f6;
}
.bxd-gift-item__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.bxd-gift-item__copy strong {
  font-size: 0.95rem;
}
.bxd-gift-item__copy em {
  font-style: normal;
  font-size: 0.86rem;
  font-weight: 600;
  color: #111;
}
.bxd-gift-item__copy s {
  color: #9ca3af;
  margin-right: 6px;
}
.bxd-gift-item__copy select {
  width: max-content;
  min-width: 64px;
  margin-top: 4px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 4px 24px 4px 10px;
  font: inherit;
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23111' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 8px center;
}
.bxd-gift-modal__add {
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font: inherit;
  font-weight: 800;
  padding: 14px 16px;
  cursor: pointer;
}

@media (max-width: 980px) {
  .bxd-board { grid-template-columns: 1fr; }
  .qv-cols { grid-template-columns: 1fr; }
}
