/**
 * Quantity product card — shop card design (inline stepper; full-width + grid).
 *
 * SHOP-ONLY, scoped under .sbr-qty. Two views from one markup: .sbr-qty--wide
 * (full-width horizontal) and .sbr-qty--small (compact vertical grid). Per-family
 * tint via .sbr-qty--{brush|heads|whitening|floss}; ribbon tone via
 * .sbr-qty-ribbon--{navy|berry|purple|green}.
 */

.sbr-qty, .sbr-qty * { box-sizing: border-box; }

.sbr-qty {
	--qt-ui: 'Open Sans', sans-serif;
	--qt-disp: 'Montserrat', sans-serif;
	--qt-ink: #1f2524;
	--qt-ink2: #3f4d4c;
	--qt-slate: #6b7877;
	--qt-faint: #9aa7a6;
	--qt-line: #e9eceb;
	--qt-pink: #fa319e;
	/* tint defaults (brush) */
	--qt-from: #efe9f6;
	--qt-to: #ded0ee;
	--qt-accent: #6a3ea0;

	display: block;
	font-family: var(--qt-ui);
	color: var(--qt-ink);
	text-align: left;
}
.sbr-qty--brush     { --qt-from:#efe9f6; --qt-to:#ded0ee; --qt-accent:var(--shop-card-accent,#6a3ea0); }
.sbr-qty--heads     { --qt-from:#e6f4f6; --qt-to:#cfe7ec; --qt-accent:var(--shop-card-accent,#0e9aa6); }
.sbr-qty--whitening { --qt-from:#f7e8f1; --qt-to:#eed4e6; --qt-accent:var(--shop-card-accent,#9e1e82); }
.sbr-qty--floss     { --qt-from:#e8f6f3; --qt-to:#d3e9e6; --qt-accent:var(--shop-card-accent,#0e8f86); }

.sbr-qty-col .vc_column-inner,
.sbr-qty-col .wpb_wrapper { padding: 0; margin: 0; }
.sbr-qty a { text-decoration: none; }
.sbr-qty img { display: block; max-width: 100%; }

/* ---- card shell ---- */
.sbr-qty-card {
	display: flex; flex-direction: column; background: #fff; overflow: hidden;
	border: 1px solid var(--qt-line); border-radius: 22px;
	box-shadow: 0 14px 40px -18px rgba(20, 40, 40, .28), 0 4px 12px -6px rgba(20, 40, 40, .12); height: 100%;
	width: 100%; max-width: 100%; /* never exceed the column the shop grid gives us */
	transition: box-shadow .3s cubic-bezier(.16, 1, .3, 1), transform .3s cubic-bezier(.16, 1, .3, 1);
}
.sbr-qty--small .sbr-qty-card:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -22px rgba(20, 40, 40, .34); }
.sbr-qty--wide .sbr-qty-card:hover { box-shadow: 0 30px 60px -28px rgba(20, 40, 40, .36); }

/* ---- product stage ---- */
.sbr-qty-stage { position: relative; background: var(--shop-card-fill, linear-gradient(150deg, var(--qt-from), var(--qt-to))); overflow: hidden; }
.sbr-qty--small .sbr-qty-stage { padding: 18px; min-height: 248px; }
.sbr-qty-stage::before { content: ''; position: absolute; width: 150px; height: 150px; border-radius: 50%; background: none; top: 12%; left: 50%; transform: translateX(-50%); }
.sbr-qty-stage__img { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 52px 26px 22px; }
.sbr-qty-stage__img img { width: auto; max-width: 86%; max-height: 100%; object-fit: contain; mix-blend-mode: normal; }

.sbr-qty-ribbon {
	position: absolute; top: 16px; left: 16px; z-index: 4; font-weight: 800; font-size: 10.5px;
	letter-spacing: .6px; text-transform: uppercase; border-radius: 7px; padding: 6px 11px;
	box-shadow: 0 4px 12px rgba(20, 40, 40, .16);
}
.sbr-qty-ribbon--navy   { background: #002244; color: #fff; }
.sbr-qty-ribbon--berry  { background: #9e1e82; color: #fff; }
.sbr-qty-ribbon--purple { background: #6a3ea0; color: #fff; }
.sbr-qty-ribbon--green  { background: #e7f6ee; color: #1f8a5b; }

.sbr-qty-off {
	position: absolute; top: 14px; right: 16px; z-index: 4; width: 52px; height: 52px; border-radius: 50%;
	background: #fff; box-shadow: 0 6px 16px rgba(20, 40, 40, .2); display: flex; flex-direction: column;
	align-items: center; justify-content: center; line-height: 1;
}
.sbr-qty-off b { font-family: var(--qt-disp); font-weight: 800; font-size: 15px; color: var(--shop-action, var(--qt-pink)); }
.sbr-qty-off small { font-weight: 700; font-size: 7.5px; letter-spacing: .5px; text-transform: uppercase; color: var(--qt-slate); }

/* ---- body ---- */
.sbr-qty-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.sbr-qty-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.sbr-qty-stars { display: inline-flex; gap: 1.5px; color: #ffc53d; line-height: 0; }
.sbr-qty-rating { font-weight: 700; font-size: 12.5px; color: var(--qt-ink2); }
.sbr-qty-social { font-weight: 600; font-size: 11.5px; color: var(--qt-slate); }

.sbr-qty-eyebrow { font-weight: 800; font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--shop-card-accent, var(--qt-accent)); margin-bottom: 8px; }
.sbr-qty-name { font-family: var(--qt-disp); font-weight: 700; font-size: 21px; line-height: 1.08; letter-spacing: -.4px; margin: 0 0 10px; }
.sbr-qty-name a { color: var(--qt-ink); }
.sbr-qty-tagline { font-weight: 500; font-size: 12.8px; line-height: 1.45; color: var(--qt-slate); margin: 0 0 14px; }

.sbr-qty-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 8px; }
.sbr-qty-chip { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 11px; color: var(--qt-ink2); background: color-mix(in srgb, var(--shop-card-accent, var(--qt-accent)) 10%, #fff); border-radius: 999px; padding: 5px 10px; }
.sbr-qty-chip svg { color: var(--shop-card-accent, var(--qt-accent)); }

.sbr-qty-price { margin-top: auto; padding-top: 16px; display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
/* When the price sits in a priceline (with the tagline beside it), the wrapper
   carries the bottom-pin instead of the price. */
.sbr-qty-body > .sbr-shop-priceline { margin-top: auto; padding-top: 16px; }
.sbr-qty-body > .sbr-shop-priceline .sbr-qty-price { margin-top: 0; padding-top: 0; }
.sbr-qty--wide .sbr-qty-body > .sbr-shop-priceline { margin-top: 0; padding-top: 0; }
.sbr-qty-price__now { font-family: var(--qt-disp); font-weight: 800; font-size: 30px; color: var(--qt-ink); letter-spacing: -1px; }
.sbr-qty-price__now sup { font-size: 16px; vertical-align: super; }
.sbr-qty-price__was { font-weight: 600; font-size: 14px; color: var(--qt-faint); text-decoration: line-through; }
.sbr-qty-price__off { font-weight: 800; font-size: 11.5px; color: var(--shop-action, var(--qt-pink)); }

/* ---- controls (stepper + add to cart) ---- */
.sbr-qty-controls { display: flex; flex-direction: column; gap: 12px; margin-top: 15px; }
.sbr-qty-step { display: flex; align-items: center; justify-content: flex-start; gap: 12px; flex-wrap: wrap; }
.sbr-qty-step__lbl { font-weight: 700; font-size: 12px; letter-spacing: .3px; text-transform: uppercase; color: var(--qt-ink2); }
.sbr-qty-step__box { display: inline-flex; align-items: center; gap: 8px; }
.sbr-qty-dec, .sbr-qty-inc {
	width: 40px; height: 40px; flex: 0 0 auto; border: 1px solid var(--qt-line); background: #fff;
	border-radius: 11px; cursor: pointer; display: flex; align-items: center; justify-content: center;
	font-family: var(--qt-ui); font-size: 20px; font-weight: 400; line-height: 1; color: var(--shop-card-accent, var(--qt-accent));
	transition: background .15s ease; padding: 0;
}
.sbr-qty-dec:hover, .sbr-qty-inc:hover { background: color-mix(in srgb, var(--qt-accent) 8%, #fff); }
.sbr-qty-dec[disabled], .sbr-qty-inc[disabled] { opacity: .4; cursor: not-allowed; }
.sbr-qty-n {
	min-width: 52px; height: 40px; border: 1px solid var(--qt-line); border-radius: 11px; background: #fbfcfc;
	display: inline-flex; align-items: center; justify-content: center;
	font-family: var(--qt-disp); font-weight: 800; font-size: 19px; color: var(--qt-ink);
	letter-spacing: -.5px; font-variant-numeric: tabular-nums;
}

.sbr-qty-add {
	width: 100%; border: 0; cursor: pointer; border-radius: 12px; padding: 15px;
	background: var(--shop-action, #1cb9bd); transition: filter .22s ease;
	display: flex; align-items: center; justify-content: center; gap: 9px;
}
.sbr-qty-add:hover { filter: brightness(.92); }
.sbr-qty-add__lbl { font-weight: 800; font-size: 15.5px; color: #fff; letter-spacing: .2px; }
.sbr-qty-add__total { font-weight: 700; font-size: 14px; color: rgba(255, 255, 255, .82); }

.sbr-qty-cap { font-weight: 500; font-size: 10.5px; color: var(--qt-faint); margin-top: 8px; }

/* Grid (6-md / --small) card ordering. Two goals:
   1. Show the price directly ABOVE Add to Cart (below the quantity stepper), not
      up under the chips. .sbr-qty-controls holds BOTH the stepper and the button,
      so flatten it with display:contents — the stepper, price and button then
      become body-level flex items and interleave via order.
   2. Line the Add to Cart up with a neighbouring simple-product card's button:
      both bodies are equal-height flex columns ending button → trust. The
      bottom-pin (margin-top:auto) now leads the pinned block on the caption, so
      the whole caption/stepper/price/button group sits at the card's base.
   (Grid/small only; the full-width --wide card is solo in its row.) */
.sbr-qty--small .sbr-qty-controls { display: contents; }
.sbr-qty--small .sbr-qty-cap  { order: 1; margin-top: auto; }
.sbr-qty--small .sbr-qty-step { order: 2; margin-top: 14px; }
.sbr-qty--small .sbr-qty-body > .sbr-shop-priceline { order: 3; margin-top: 14px; padding-top: 0; }
.sbr-qty--small .sbr-qty-add  { order: 4; margin-top: 14px; }
.sbr-qty--small .sbr-qty-trust { order: 5; }

.sbr-qty-trust { display: flex; justify-content: center; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.sbr-qty-trust__i { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 10.5px; color: var(--qt-slate); }
.sbr-qty-trust__i svg { color: var(--qt-accent); }

/* ============================ WIDE (full-width) ============================ */
/* The shop renders single (medium-12) cards full-bleed — their .vc_column-inner
   stretches past the column and the stock cards re-center their inner box. Our
   card doesn't use that wrapper, so cap + center the wide card to the shop
   content width (same as the Night Guard hero and the design's 1180 max). */
.sbr-qty--wide { display: block; max-width: 1180px; margin-left: auto; margin-right: auto; }
/* minmax(0,fr) + min-width:0 lets the two tracks shrink to the column instead of
   blowing out to their content's min-size (which overflowed the row). */
.sbr-qty--wide .sbr-qty-card { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); border-radius: 26px; }
.sbr-qty--wide .sbr-qty-stage,
.sbr-qty--wide .sbr-qty-body { min-width: 0; }
.sbr-qty--wide .sbr-qty-stage { min-height: 380px; }
.sbr-qty--wide .sbr-qty-stage::before { width: 320px; height: 320px; top: 40%; left: 46%; transform: translate(-50%, -50%); }
.sbr-qty--wide .sbr-qty-stage__img { padding: 60px 44px 44px; }
.sbr-qty--wide .sbr-qty-stage__img img { max-width: 380px; }
.sbr-qty--wide .sbr-qty-ribbon { top: 20px; left: 20px; font-size: 11px; padding: 7px 13px; }
.sbr-qty--wide .sbr-qty-off { top: 18px; right: 20px; width: 60px; height: 60px; }
.sbr-qty--wide .sbr-qty-off b { font-size: 19px; }
.sbr-qty--wide .sbr-qty-body { padding: 40px 44px; justify-content: center; }
.sbr-qty--wide .sbr-qty-name { font-family: var(--qt-disp); font-weight: 800; font-size: clamp(28px, 3vw, 42px); line-height: 1; letter-spacing: -1.2px; margin-bottom: 12px; }
.sbr-qty--wide .sbr-qty-tagline { font-size: 15.5px; line-height: 1.55; margin-bottom: 20px; max-width: 520px; }
.sbr-qty--wide .sbr-qty-chips { gap: 8px; margin-bottom: 22px; }
.sbr-qty--wide .sbr-qty-chip { font-size: 12px; padding: 7px 13px; }
.sbr-qty--wide .sbr-qty-price { margin-top: 0; padding-top: 0; }
.sbr-qty--wide .sbr-qty-price__now { font-size: 40px; letter-spacing: -1.4px; }
.sbr-qty--wide .sbr-qty-price__now sup { font-size: 21px; }
.sbr-qty--wide .sbr-qty-price__off { color: #fff; background: var(--shop-action, var(--qt-pink)); border-radius: 8px; padding: 5px 9px; font-size: 12px; }
.sbr-qty--wide .sbr-qty-controls { flex-direction: row; align-items: flex-end; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.sbr-qty--wide .sbr-qty-step { flex-direction: column; align-items: flex-start; gap: 7px; }
.sbr-qty--wide .sbr-qty-step__lbl { font-size: 11px; letter-spacing: .4px; }
/* Match the stepper controls to the Add-to-Cart height so, bottom-aligned in the
   row, the − / n / + box lines up perfectly with the button. */
.sbr-qty--wide .sbr-qty-dec, .sbr-qty--wide .sbr-qty-inc { width: 54px; height: 54px; }
.sbr-qty--wide .sbr-qty-n { min-width: 58px; height: 54px; font-size: 22px; }
.sbr-qty--wide .sbr-qty-add { min-height: 54px; }
.sbr-qty--wide .sbr-qty-add { flex: 1 1 240px; min-width: 220px; width: auto; border-radius: 14px; padding: 18px 24px; }
.sbr-qty--wide .sbr-qty-add__lbl { font-size: 16px; }
.sbr-qty--wide .sbr-qty-cap { font-size: 11.5px; margin-top: 9px; }
.sbr-qty--wide .sbr-qty-trust { justify-content: flex-start; gap: 20px; margin-top: 16px; }
.sbr-qty--wide .sbr-qty-trust__i { font-size: 11.5px; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 880px) {
	.sbr-qty--wide .sbr-qty-card { grid-template-columns: 1fr; border-radius: 18px; }
	.sbr-qty--wide .sbr-qty-stage { min-height: 240px; }
	.sbr-qty--wide .sbr-qty-body { padding: 24px 20px 26px; }
	.sbr-qty--wide .sbr-qty-name { font-size: 27px; }
	.sbr-qty--wide .sbr-qty-add { flex: 1 1 100%; min-width: 0; }
}
@media (max-width: 480px) {
	.sbr-qty-name { font-size: 20px; }
	.sbr-qty--wide .sbr-qty-price__now { font-size: 32px; }
}
