/* Shared reset + cart drawer + checkout. Each brand sets the tokens below in its own style.css. */
:root {
  --bg: #fff;
  --surface: #f6f6f4;
  --ink: #141414;
  --muted: #5a5a5a;
  --line: rgb(0 0 0 / 0.12);
  --accent: #141414;
  --accent-ink: #fff;
  --save: #0a7a3d;
  --radius: 14px;
  --radius-pill: 999px;
  --font-display: system-ui, sans-serif;
  --font-body: system-ui, sans-serif;
  --shadow: 0 18px 50px -18px rgb(0 0 0 / 0.35);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img,
svg {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
p {
  margin: 0;
  text-wrap: pretty;
}
a {
  color: inherit;
  text-underline-offset: 0.2em;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
::selection {
  background: var(--accent);
  color: var(--accent-ink);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: 8px;
}
.pack {
  width: 100%;
  height: auto;
}
html.cart-lock {
  overflow: hidden;
}
[hidden] {
  display: none !important;
}

/* ---------- buy controls ---------- */
.buy-add,
.buy-stepper {
  min-height: 42px;
  border-radius: var(--radius-pill);
}
.buy-add {
  border: 0;
  padding: 0 20px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  transition:
    transform 0.2s var(--ease),
    filter 0.2s;
}
.buy-add:hover {
  filter: brightness(1.08);
}
.buy-add:active {
  transform: scale(0.96);
}
.buy-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: var(--accent-ink);
}
.buy-stepper button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  background: none;
  color: inherit;
  border-radius: var(--radius-pill);
}
.buy-stepper button:hover {
  background: rgb(255 255 255 / 0.16);
}
.buy-stepper svg,
.cart-x svg,
.cart-wa svg,
.cart-toast svg,
.co-tick svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.buy-stepper output {
  min-width: 22px;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.buy-stepper.is-small,
.buy-add.is-small {
  min-height: 34px;
}
.buy-stepper.is-small button {
  width: 34px;
  height: 34px;
}

/* ---------- drawer ---------- */
.cart-scrim {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
  z-index: 60;
}
.cart-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(420px, 100%);
  background: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  transform: translateX(104%);
  visibility: hidden;
  transition: transform 0.45s var(--ease), visibility 0s 0.45s;
  z-index: 61;
  box-shadow: var(--shadow);
  outline: none;
}
.cart-root.is-open .cart-scrim {
  opacity: 1;
  pointer-events: auto;
}
.cart-root.is-open .cart-drawer {
  transform: none;
  visibility: visible;
  transition: transform 0.45s var(--ease);
}
.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--line);
}
.cart-head h2 {
  font-size: 24px;
}
.cart-x {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: none;
}
.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.cart-empty {
  display: grid;
  gap: 6px;
  padding: 40px 0;
  color: var(--muted);
}
.cart-empty p:first-child {
  color: var(--ink);
  font-weight: 700;
  font-size: 18px;
}
.cart-progress {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 14px;
}
.cart-bar {
  height: 6px;
  border-radius: 6px;
  background: var(--line);
  margin-top: 8px;
  overflow: hidden;
}
.cart-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
  transition: width 0.5s var(--ease);
}
.cart-lines,
.co-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.cart-lines li {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
}
.cart-thumb,
.co-thumb {
  background: var(--surface);
  border-radius: 12px;
  padding: 4px;
}
.cart-name,
.co-name {
  font-weight: 700;
  line-height: 1.25;
}
.cart-size,
.co-size {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.cart-price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cart-foot {
  padding: 14px 20px 20px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.cart-foot:empty {
  display: none;
}
.cart-sum {
  margin: 0;
  display: grid;
  gap: 6px;
  font-size: 14px;
}
.cart-sum div {
  display: flex;
  justify-content: space-between;
}
.cart-sum dt {
  color: var(--muted);
}
.cart-sum dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.cart-sum .is-save dd {
  color: var(--save);
  font-weight: 700;
}
.cart-sum .is-total {
  font-size: 17px;
  font-weight: 800;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}
.cart-sum .is-total dt {
  color: var(--ink);
}
.cart-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  transition: filter 0.2s;
}
.cart-checkout:hover {
  filter: brightness(1.08);
}
.cart-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.cart-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  opacity: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  z-index: 70;
  pointer-events: none;
  transition:
    transform 0.35s var(--ease),
    opacity 0.35s var(--ease);
  white-space: nowrap;
}
.cart-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- checkout ---------- */
.co-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 16px 64px;
}
.co-grid {
  display: grid;
  gap: 28px;
}
@media (min-width: 860px) {
  .co-grid {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }
  .co-summary {
    position: sticky;
    top: 24px;
  }
}
.co-form {
  display: grid;
  gap: 18px;
}
.co-form h1,
.co-empty h1,
.co-done h1 {
  font-size: clamp(32px, 6vw, 48px);
}
.co-demo {
  font-size: 14px;
  color: var(--muted);
}
.co-form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.co-form legend {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 4px;
}
.co-form label:not(.co-pay) {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}
.co-form input:not([type="radio"]),
.co-form textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--bg);
  font-size: 16px;
  font-weight: 400;
  caret-color: var(--accent);
}
.co-form input:focus,
.co-form textarea:focus {
  border-color: var(--ink);
  outline: none;
}
.co-form [aria-invalid="true"] {
  border-color: #c62828;
}
.co-err {
  color: #b71c1c;
  font-size: 13px;
  font-weight: 600;
}
.co-hint {
  font-size: 13px;
  color: var(--muted);
}
.co-pay {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
}
.co-pay:has(input:checked) {
  border-color: var(--ink);
  background: var(--surface);
}
.co-pay input {
  accent-color: var(--accent);
  margin-top: 4px;
  width: 18px;
  height: 18px;
}
.co-pay span {
  display: grid;
}
.co-pay small {
  color: var(--muted);
}
.co-summary {
  background: var(--surface);
  border-radius: calc(var(--radius) + 6px);
  padding: 20px;
  display: grid;
  gap: 16px;
}
.co-summary h2 {
  font-size: 22px;
}
.co-lines li {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  font-weight: 700;
}
.co-thumb {
  background: var(--bg);
}
.co-empty,
.co-done {
  display: grid;
  gap: 14px;
  justify-items: start;
  max-width: 520px;
  margin: 40px auto;
}
.co-done .cart-checkout,
.co-empty .cart-checkout {
  padding: 0 28px;
}
.co-tick {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  animation: pop 0.6s var(--ease);
}
.co-tick svg {
  width: 30px;
  height: 30px;
}
@keyframes pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* The open bag already shows what was added; keep the toast off its buttons. */
.cart-root.is-open .cart-toast {
  opacity: 0;
}
