/* chessmade — unified design system */

/* === Lokal gehostete Variable Fonts (kein Google Fonts) === */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("fonts/dm-sans-vf.woff2") format("woff2-variations"),
       url("fonts/dm-sans-vf.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("fonts/fraunces-vf.woff2") format("woff2-variations"),
       url("fonts/fraunces-vf.woff2") format("woff2");
}

:root[data-theme="green"] {
  --canvas: #ffffff;
  --surface-soft: #f7f7f7;
  --surface-strong: #f2f2f2;
  --ink: #222222;
  --body: #3f3f3f;
  --muted: #6a6a6a;
  --muted-soft: #929292;
  --hairline: #dddddd;
  --hairline-soft: #ebebeb;
  --green-dark: #2f5d50;
  --green: #5f7d67;
  --green-soft: #8faa8a;
  --green-light: #dce8d6;
  --cream: #f4efe3;
  --accent-bg: #edf5eb;
}
:root[data-theme="olive"] {
  --canvas: #fbfaf4;
  --surface-soft: #f4f1e8;
  --surface-strong: #ede7d6;
  --ink: #1f2410;
  --body: #2c3318;
  --muted: #7a7e68;
  --muted-soft: #9a9c84;
  --hairline: #dad6c4;
  --hairline-soft: #e7e2d0;
  --green-dark: #5c6b26;
  --green: #7b8c3c;
  --green-soft: #b8c47a;
  --green-light: #ede8c9;
  --cream: #f4efe3;
  --accent-bg: #efece0;
}
:root[data-theme="dark"] {
  --canvas: #161816;
  --surface-soft: #1d201d;
  --surface-strong: #232624;
  --ink: #f4f4f1;
  --body: #c9ccc6;
  --muted: #8e9189;
  --muted-soft: #6f726b;
  --hairline: #2c2f2c;
  --hairline-soft: #232624;
  --green-dark: #b8c47a;
  --green: #97a565;
  --green-soft: #6f7d52;
  --green-light: #25302a;
  --cream: #25241e;
  --accent-bg: #1c2620;
}
:root {
  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  --shadow-soft: 0 1px 2px rgba(0,0,0,0.04), 0 4px 14px rgba(0,0,0,0.06);
  --shadow-float: 0 22px 70px rgba(34,34,34,0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.menu-open, body.drawer-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.container { width: min(100% - 48px, 1280px); margin: 0 auto; }

/* HEADER */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in oklab, var(--canvas) 94%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline-soft);
}
.topbar__inner {
  min-height: 76px;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 24px;
}
.brand { justify-self: start; display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand-text { display: grid; gap: 2px; line-height: 1; }
.brand-name { font-size: 16px; font-weight: 600; letter-spacing: -0.2px; color: var(--ink); }
.brand-sub { font-size: 12px; color: var(--muted); }

.nav { justify-self: center; display: inline-flex; align-items: center; gap: 28px; }
.nav a {
  position: relative; padding: 26px 0 22px;
  font-size: 15px; font-weight: 600; color: var(--muted);
  transition: color .18s;
}
.nav a:hover, .nav a.active { color: var(--ink); }
.nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 14px;
  height: 2px; border-radius: var(--radius-full); background: var(--ink);
}

.topbar__actions { justify-self: end; display: inline-flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  border: 1px solid var(--hairline); background: var(--canvas); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform .18s, background .18s, box-shadow .18s;
}
.icon-btn:hover { transform: translateY(-1px); background: var(--surface-soft); box-shadow: var(--shadow-soft); }
.menu-btn { display: none; font-size: 18px; }

/* Cart pill (small dot indicator) */
.cart-btn { position: relative; }
.cart-btn .badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--green-dark); color: #fff;
  font-size: 11px; font-weight: 700; display: inline-flex;
  align-items: center; justify-content: center; line-height: 1;
}

/* MOBILE MENU */
.menu-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  z-index: 140; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.menu-backdrop.is-open { opacity: 1; pointer-events: auto; }
.mobile-menu {
  position: fixed; top: 12px; right: 12px; left: 12px; z-index: 150;
  background: var(--canvas); border-radius: 28px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.18);
  padding: 16px; transform: translateY(-18px); opacity: 0;
  pointer-events: none; transition: transform .22s, opacity .22s;
}
.mobile-menu.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-menu__top {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--hairline-soft);
}
.mobile-menu__close {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--hairline); background: var(--canvas); color: var(--ink);
  font-size: 22px; cursor: pointer;
}
.mobile-menu__links { display: grid; gap: 8px; padding: 14px 0 6px; }
.mobile-menu__links a {
  padding: 14px; border-radius: 18px; color: var(--ink);
  font-size: 17px; font-weight: 600; background: var(--surface-soft);
}

/* BUTTONS */
.btn {
  min-height: 48px; padding: 14px 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-full); font-size: 15px; font-weight: 600;
  transition: transform .18s, background .18s, box-shadow .18s;
  border: 1px solid transparent; cursor: pointer; text-align: center;
}
.btn-primary { background: var(--green-dark); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(47,93,80,0.25); }
.btn-secondary { background: var(--canvas); color: var(--ink); border-color: var(--hairline); }
.btn-secondary:hover { background: var(--surface-soft); transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; font-size: 16px; padding: 16px 24px; }
.btn-link {
  background: none; border: 0; padding: 10px; cursor: pointer;
  color: var(--muted); font-size: 14px; font-weight: 500;
  width: 100%; text-align: center;
}
.btn-link:hover { color: var(--ink); }
.btn.is-added { background: var(--green); }
.btn { position: relative; }

/* TYPE */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  color: var(--green-dark); font-size: 12px; font-weight: 700;
  letter-spacing: .32px; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green-dark); }

/* SECTIONS */
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }

.section-head { margin-bottom: 28px; max-width: 720px; }
.section-head h2 {
  margin: 0; font-size: clamp(28px, 4vw, 48px);
  line-height: 1; letter-spacing: -1.6px; font-weight: 700; color: var(--ink);
}
.section-head h2 span { color: var(--green-dark); }
.section-head p { margin: 14px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 540px; }

/* FOOTER */
.footer {
  background: var(--canvas); border-top: 1px solid var(--hairline-soft);
  padding: 56px 0 26px; color: var(--ink);
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand img { width: 42px; height: 42px; object-fit: contain; margin-bottom: 12px; }
.footer h4 { margin: 0 0 14px; font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: .2px; text-transform: uppercase; }
.footer p, .footer a {
  display: block; color: var(--muted);
  font-size: 14px; line-height: 1.5; margin: 0 0 10px;
}
.footer-brand p { max-width: 320px; }
.footer a:hover { color: var(--ink); }
.footer-bottom {
  margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--hairline-soft);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--muted-soft); font-size: 13px;
}

/* PAGE HEADER (legal/about) — soft cream card with subtle grid */
.page-hero {
  position: relative;
  margin-top: 24px;
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px) clamp(36px, 5vw, 56px);
  background:
    radial-gradient(circle at 88% 0%, color-mix(in oklab, var(--green-dark) 14%, transparent), transparent 55%),
    radial-gradient(circle at 10% 110%, color-mix(in oklab, var(--green-light) 65%, transparent), transparent 45%),
    linear-gradient(180deg, var(--accent-bg), color-mix(in oklab, var(--accent-bg) 30%, var(--canvas)) 100%);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-xl);
  overflow: hidden;
  isolation: isolate;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(color-mix(in oklab, var(--green-dark) 22%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklab, var(--green-dark) 22%, transparent) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(135deg, rgba(0,0,0,.35), transparent 65%);
  opacity: .35;
  pointer-events: none;
  z-index: -1;
}
.page-hero > * { position: relative; z-index: 1; }
.page-hero h1 {
  margin: 12px 0 14px; font-size: clamp(34px, 6vw, 64px);
  line-height: .96; letter-spacing: -2px; font-weight: 700; color: var(--ink);
}
.page-hero h1 span { color: var(--green-dark); }
.page-hero p { margin: 0; color: var(--body); font-size: 16px; line-height: 1.55; max-width: 600px; }
@media (max-width: 680px){
  .page-hero { margin-top: 16px; border-radius: var(--radius-lg); }
}

/* PROSE (legal pages) */
.prose { padding: 32px 0 80px; max-width: 760px; }
.prose h2 { margin: 36px 0 12px; font-size: 22px; font-weight: 700; color: var(--ink); }
.prose h3 { margin: 24px 0 8px; font-size: 17px; font-weight: 600; color: var(--ink); }
.prose p, .prose li { color: var(--body); font-size: 15px; line-height: 1.7; }
.prose ul { padding-left: 20px; }
.prose a { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .topbar__inner { grid-template-columns: 1fr auto; }
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .topbar__actions .icon-btn:not(.menu-btn):not(.cart-btn) { display: none; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .container { width: min(100% - 24px, 1280px); }
  .topbar__inner { min-height: 64px; }
  .brand img { width: 34px; height: 34px; }
  .brand-sub { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; }
  .section { padding: 48px 0; }
}

/* THEME PICKER (Tweaks) */
.tweaks {
  position: fixed; bottom: 20px; right: 20px; z-index: 200;
  background: var(--canvas); border: 1px solid var(--hairline);
  border-radius: 18px; box-shadow: 0 18px 60px rgba(0,0,0,0.16);
  padding: 14px; display: none; min-width: 200px;
}
.tweaks.is-open { display: block; }
.tweaks h5 { margin: 0 0 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); }
.tweaks-row { display: flex; gap: 6px; }
.tweaks-row button {
  flex: 1; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--hairline); background: var(--canvas);
  color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 6px; justify-content: center;
}
.tweaks-row button.active { border-color: var(--green-dark); background: var(--accent-bg); }
.tweaks-row button .swatch { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.1); }
.tweaks-fab {
  position: fixed; bottom: 20px; right: 20px; z-index: 201;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--hairline); background: var(--canvas); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: var(--shadow-float);
}

/* ===================================================================
   CART DRAWER
=================================================================== */
.cart-backdrop {
  position: fixed; inset: 0; background: rgba(20,22,18,0.5);
  z-index: 240; opacity: 0; pointer-events: none; transition: opacity .22s;
  backdrop-filter: blur(2px);
}
.cart-backdrop.is-open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 250;
  width: min(440px, 100vw);
  background: var(--canvas); color: var(--ink);
  display: flex; flex-direction: column;
  transform: translateX(102%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  box-shadow: -24px 0 80px rgba(0,0,0,0.18);
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-drawer__head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 22px 22px 16px;
  border-bottom: 1px solid var(--hairline-soft);
}
.cart-drawer__title {
  margin: 0; font-size: 22px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.4px;
}
.cart-drawer__sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.cart-drawer__body {
  flex: 1 1 auto; overflow-y: auto;
  padding: 14px 22px; display: grid; gap: 12px;
  align-content: start;
}
.cart-drawer__foot {
  flex: 0 0 auto;
  padding: 16px 22px calc(20px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--hairline-soft);
  background: var(--canvas);
  display: grid; gap: 10px;
}
.cart-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; color: var(--ink);
}
.cart-row--muted { color: var(--muted); font-size: 13px; }
.cart-row--total {
  padding-top: 10px; border-top: 1px solid var(--hairline-soft);
  font-size: 17px; font-weight: 700;
}
.cart-drawer__foot .btn { margin-top: 6px; }

/* CART ITEM */
.cart-item {
  display: grid; grid-template-columns: 88px 1fr; gap: 14px;
  padding: 14px; border-radius: var(--radius-lg);
  background: var(--surface-soft); border: 1px solid var(--hairline-soft);
}
.cart-item__photo {
  width: 88px; height: 88px; border-radius: var(--radius-md);
  overflow: hidden; background: var(--canvas);
}
.cart-item__photo img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__main { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.cart-item__top { display: flex; justify-content: space-between; gap: 8px; }
.cart-item__name { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.cart-item__sub { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.cart-item__remove {
  flex: 0 0 26px; width: 26px; height: 26px;
  border-radius: 50%; border: 0; background: transparent; color: var(--muted-soft);
  display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s;
}
.cart-item__remove:hover { background: var(--canvas); color: var(--ink); }
.cart-item__bottom {
  margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.cart-item__price { font-weight: 700; font-size: 15px; color: var(--ink); }

/* QTY STEPPER */
.qty-stepper {
  display: inline-flex; align-items: center;
  background: var(--canvas); border: 1px solid var(--hairline);
  border-radius: var(--radius-full); padding: 2px;
}
.qty-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: transparent; color: var(--ink);
  font-size: 16px; font-weight: 600; cursor: pointer;
  display: grid; place-items: center;
}
.qty-btn:hover { background: var(--surface-soft); }
.qty-val { min-width: 28px; text-align: center; font-size: 14px; font-weight: 600; padding: 0 4px; }

/* EMPTY CART */
.cart-empty {
  display: grid; place-items: center; text-align: center;
  padding: 40px 20px; gap: 4px;
}
.cart-empty__icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--surface-soft); color: var(--muted);
  display: grid; place-items: center; margin-bottom: 8px;
}
.cart-empty__title { margin: 0; font-size: 18px; font-weight: 700; color: var(--ink); }
.cart-empty__text  { margin: 0 0 14px; font-size: 14px; color: var(--muted); }

/* ===================================================================
   TOAST
=================================================================== */
.cm-toast {
  position: fixed; left: 50%; bottom: 28px;
  transform: translate(-50%, 18px); opacity: 0; pointer-events: none;
  z-index: 260;
  background: var(--ink); color: var(--canvas);
  padding: 12px 18px; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 500;
  box-shadow: 0 16px 50px rgba(0,0,0,0.22);
  transition: opacity .2s, transform .2s;
}
.cm-toast.is-open { opacity: 1; transform: translate(-50%, 0); }

/* ===================================================================
   CHECKOUT
=================================================================== */
.checkout {
  display: grid; grid-template-columns: 1fr 380px;
  gap: 36px;
  padding: 32px 0 80px;
  align-items: start;
}
.checkout__main { min-width: 0; }
.checkout__title {
  margin: 0 0 6px; font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1; letter-spacing: -1.4px; font-weight: 700; color: var(--ink);
}
.checkout__lead { margin: 0 0 24px; color: var(--muted); font-size: 15px; }

.steps {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 0 24px; flex-wrap: wrap;
}
.steps__item {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); font-size: 13px; font-weight: 600;
}
.steps__dot {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface-soft); color: var(--muted);
  display: inline-grid; place-items: center;
  font-size: 13px; font-weight: 700; border: 1px solid var(--hairline);
}
.steps__item.is-active { color: var(--ink); }
.steps__item.is-active .steps__dot { background: var(--green-dark); color: #fff; border-color: var(--green-dark); }
.steps__item.is-done .steps__dot { background: var(--green-dark); color: #fff; border-color: var(--green-dark); }
.steps__item.is-done .steps__dot::before { content: "✓"; }
.steps__item.is-done .steps__dot > span { display: none; }
.steps__line { flex: 1 1 30px; min-width: 24px; max-width: 60px; height: 1px; background: var(--hairline); }

.field-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: 0.1px;
}
.field input,
.field select,
.field textarea {
  font: inherit; font-size: 15px;
  padding: 14px 16px; min-height: 50px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline); background: var(--canvas); color: var(--ink);
  transition: border-color .18s, box-shadow .18s;
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none; border-color: var(--green-dark);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--green-dark) 12%, transparent);
}
.field input::placeholder { color: var(--muted-soft); }
.field--error input,
.field--error select { border-color: #c84a4a; box-shadow: 0 0 0 4px rgba(200,74,74,0.10); }
.field__error { color: #c84a4a; font-size: 12.5px; margin-top: -2px; }

.option-list { display: grid; gap: 10px; }
.option {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 14px; align-items: center;
  padding: 16px 18px; border-radius: var(--radius-lg);
  border: 1px solid var(--hairline); background: var(--canvas);
  cursor: pointer; transition: border-color .18s, background .18s;
}
.option:hover { background: var(--surface-soft); }
.option__radio {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--hairline); background: var(--canvas);
  display: grid; place-items: center; flex: 0 0 20px;
}
.option__radio::after {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--green-dark); transform: scale(0); transition: transform .18s;
}
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option:has(input:checked) { border-color: var(--green-dark); background: var(--accent-bg); }
.option:has(input:checked) .option__radio { border-color: var(--green-dark); }
.option:has(input:checked) .option__radio::after { transform: scale(1); }
.option__main strong { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
.option__main span  { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.option__price { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; }

.checkout-card {
  background: var(--canvas); border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-xl); padding: 24px;
  margin-bottom: 18px;
}
.checkout-card h2 {
  margin: 0 0 16px; font-size: 18px; font-weight: 700;
  color: var(--ink); letter-spacing: -0.2px;
}
.checkout-actions {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-top: 24px; flex-wrap: wrap;
}
.checkout-actions .btn { min-width: 140px; }

/* SUMMARY (desktop sidebar) */
.summary {
  position: sticky; top: 100px;
  background: var(--surface-soft);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-xl);
  padding: 24px;
}
.summary h3 { margin: 0 0 14px; font-size: 16px; font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: 0.4px; }
.summary__list { display: grid; gap: 12px; max-height: 320px; overflow-y: auto; }
.summary__item { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; }
.summary__photo { width: 56px; height: 56px; border-radius: var(--radius-sm); overflow: hidden; background: var(--canvas); position: relative; }
.summary__photo img { width: 100%; height: 100%; object-fit: cover; }
.summary__qty {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--ink); color: var(--canvas);
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.summary__name { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.summary__sub  { font-size: 12px; color: var(--muted); margin-top: 2px; }
.summary__price { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.summary__totals { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hairline); display: grid; gap: 8px; }
.summary__totals .row { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink); }
.summary__totals .row span:first-child { color: var(--muted); }
.summary__totals .row--total {
  padding-top: 10px; border-top: 1px solid var(--hairline);
  font-size: 18px; font-weight: 700;
}

/* DISCOUNT FIELD */
.discount {
  display: grid; grid-template-columns: 1fr auto; gap: 8px;
  margin-top: 12px;
}
.discount input {
  font: inherit; font-size: 14px; padding: 12px 14px;
  border-radius: var(--radius-full); border: 1px solid var(--hairline);
  background: var(--canvas); color: var(--ink);
}
.discount button {
  border: 1px solid var(--hairline); background: var(--canvas); color: var(--ink);
  padding: 0 18px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.discount button:hover { background: var(--surface-soft); }

/* Edit toggle for completed step */
.step-summary {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 16px 18px; background: var(--surface-soft);
  border-radius: var(--radius-lg); border: 1px solid var(--hairline-soft);
}
.step-summary__main { font-size: 14px; color: var(--body); line-height: 1.5; }
.step-summary__main strong { display: block; color: var(--ink); margin-bottom: 2px; font-size: 13px; }
.step-summary__edit {
  background: none; border: 0; color: var(--green-dark);
  font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 8px;
}

@media (max-width: 980px){
  .checkout { grid-template-columns: 1fr; gap: 20px; padding: 20px 0 100px; }
  .summary { position: static; order: -1; }
  .summary__list { max-height: 220px; }
  .field-grid { grid-template-columns: 1fr; gap: 12px; }
  .checkout-card { padding: 18px; }
  .steps__line { display: none; }
  .steps { gap: 6px; }
  .steps__item span:not(.steps__dot) { display: none; }
  .steps__item.is-active span:not(.steps__dot) { display: inline; }
}

@media (max-width: 680px){
  .cart-drawer { width: 100vw; border-radius: 0; }
  .cart-drawer__head { padding: 18px 18px 14px; }
  .cart-drawer__body { padding: 12px 16px; }
  .cart-drawer__foot { padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px)); }
  .cart-item { grid-template-columns: 72px 1fr; gap: 12px; padding: 12px; }
  .cart-item__photo { width: 72px; height: 72px; }
}
