/* Zohran Zaddies friends order flow — cart drawer, order form, how-it-works. Builds on zz-merch.css tokens. */

/* ---------- How it works ---------- */
.zz-how { }
.zz-how__inner { max-width: 1440px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--zz-gutter); }
.zz-how__steps {
  list-style: none; counter-reset: zz-step; margin: 28px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;
}
.zz-how__steps li {
  counter-increment: zz-step; padding: 20px; border: 1px solid var(--zz-ink);
  font-size: 15px; line-height: 1.45; color: var(--zz-muted);
}
.zz-how__steps li::before {
  content: counter(zz-step); display: inline-grid; place-items: center; width: 32px; height: 32px; margin-bottom: 14px;
  border-radius: 50%; background: var(--zz-accent); border: 1px solid var(--zz-ink); color: var(--zz-ink); font-weight: 800;
}
.zz-how__steps strong { display: block; margin-bottom: 6px; color: var(--zz-ink); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }

@media (hover: hover) {
  .zz-how__steps li { transition: translate .3s ease, border-color .3s ease, box-shadow .3s ease; }
  .zz-how__steps li:hover { translate: 0 -4px; border-color: var(--zz-blue); box-shadow: 4px 4px 0 var(--zz-blue); }
  .zz-ask__topics span { transition: background .15s, color .15s, border-color .15s; }
  .zz-ask__topics input:not(:checked) + span:hover { border-color: var(--zz-blue); color: var(--zz-blue); }
}

/* ---------- Questions & suggestions ---------- */
.zz-ask { }
.zz-ask__inner {
  max-width: 1440px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--zz-gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(24px, 5vw, 72px); align-items: start;
}
.zz-ask__intro p { margin: 16px 0 0; max-width: 38ch; color: var(--zz-muted); font-size: 16px; line-height: 1.5; }
.zz-ask__form { display: flex; flex-direction: column; gap: 14px; }
.zz-ask__topics { display: flex; flex-wrap: wrap; gap: 8px; }
.zz-ask__topics input { position: absolute; opacity: 0; pointer-events: none; }
.zz-ask__topics span {
  display: inline-block; padding: 9px 16px; border: 1px solid var(--zz-ink); border-radius: 999px; cursor: pointer;
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.zz-ask__topics input:checked + span { background: var(--zz-blue); border-color: var(--zz-blue); color: #fff; }
.zz-ask__topics input:focus-visible + span { outline: 2px solid var(--zz-accent); outline-offset: 2px; }
.zz-ask__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.zz-ask__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.zz-ask__status { margin: 0; font-size: 14px; font-weight: 600; }
.zz-ask__status.is-ok { color: #1f7a3a; }
.zz-ask__status.is-error { color: #c21807; }

/* ---------- Cart drawer ---------- */
html:has(.zz-cart[open]) { overflow: hidden; }
.zz-cart {
  width: min(460px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
  margin: 0 0 0 auto; padding: 0; border: 0; border-left: 1px solid var(--zz-ink);
  display: none; flex-direction: column;
}
.zz-cart[open] { display: flex; animation: zz-cart-in .22s ease-out; }
.zz-cart::backdrop { background: rgb(17 17 17 / .55); backdrop-filter: blur(3px); }
@keyframes zz-cart-in { from { transform: translateX(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .zz-cart[open] { animation: none; } }

.zz-cart__head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 20px 24px; border-bottom: 1px solid var(--zz-ink);
}
.zz-cart__title { margin: 0; font-size: 22px; font-weight: 900; letter-spacing: -.01em; text-transform: uppercase; }
.zz-cart__close {
  width: 40px; height: 40px; border: 1px solid var(--zz-ink); background: var(--zz-bg); color: var(--zz-ink);
  font-size: 16px; cursor: pointer;
}
.zz-cart__close:hover { background: var(--zz-accent); }
.zz-cart__body { flex: 1; overflow-y: auto; padding: 20px 24px 28px; display: flex; flex-direction: column; gap: 16px; }
.zz-cart__body[hidden] { display: none; }

.zz-cart__empty { margin: 24px 0; color: var(--zz-muted); }
.zz-cart__lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.zz-cart__line {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: start;
  padding: 14px 0; border-bottom: 1px solid var(--zz-line);
}
.zz-cart__line img { width: 72px; height: 72px; background: var(--zz-card); object-fit: contain; mix-blend-mode: multiply; padding: 4px; }
.zz-cart__line strong { display: block; font-size: 14px; text-transform: uppercase; letter-spacing: .02em; }
.zz-cart__line small { display: block; margin-top: 4px; color: var(--zz-muted); font-size: 13px; }
.zz-cart__price { font-weight: 700; font-size: 14px; }
.zz-cart__qty { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 700; font-size: 14px; }
.zz-cart__qty button {
  width: 32px; height: 32px; border: 1px solid var(--zz-line); background: transparent; color: var(--zz-ink);
  font: inherit; font-size: 16px; cursor: pointer;
}
.zz-cart__qty button:hover { border-color: var(--zz-ink); }
.zz-cart__qty span { min-width: 20px; text-align: center; }
.zz-cart__qty .zz-cart__remove {
  width: auto; height: auto; margin-left: 8px; border: 0; padding: 0;
  font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; color: var(--zz-muted);
}

.zz-cart__foot { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.zz-cart__foot[hidden] { display: none; }
.zz-cart__total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 800; text-transform: uppercase; }
.zz-cart__note { margin: 0; font-size: 14px; color: var(--zz-muted); }
.zz .zz-cart__cta { justify-content: center; width: 100%; }
.zz-cart__back {
  align-self: center; border: 0; background: none; color: var(--zz-ink); cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.zz-cart__back:hover { text-decoration: underline; text-underline-offset: 3px; }
.zz-cart__error { min-height: 1.2em; margin: 0; color: #c21807; font-size: 14px; font-weight: 600; }

/* ---------- Order form ---------- */
.zz-field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.zz-field[hidden] { display: none; }
.zz-field > span, .zz-field legend {
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.zz-field em { font-style: normal; font-weight: 600; color: var(--zz-muted); letter-spacing: .06em; }
.zz-field small { color: var(--zz-muted); font-size: 13px; }
.zz-field input:not([type="radio"]), .zz-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--zz-line); border-radius: 0; background: #fff;
  color: var(--zz-ink); font: inherit; font-size: 16px;
}
.zz-field input:focus, .zz-field textarea:focus { outline: 2px solid var(--zz-ink); outline-offset: -1px; border-color: var(--zz-ink); }
.zz-field textarea { resize: vertical; }
.zz-field__venmo { position: relative; display: block; }
.zz-field__venmo > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--zz-muted); }
.zz-field__venmo input { padding-left: 30px !important; }
.zz-field--choice legend { margin-bottom: 8px; }
.zz-field--choice label {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--zz-line);
  cursor: pointer; font-size: 14px; color: var(--zz-muted);
}
.zz-field--choice label + label { margin-top: 8px; }
.zz-field--choice label:has(input:checked) { border-color: var(--zz-ink); background: #fff; }
.zz-field--choice input { margin-top: 3px; accent-color: var(--zz-ink); }
.zz-field--choice strong { display: block; color: var(--zz-ink); font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.zz-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.zz-cart__done p { margin: 0; font-size: 16px; line-height: 1.5; }
.zz-cart__order { font-size: 13px !important; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--zz-muted); }
.zz-cart__order strong { display: block; margin-top: 4px; font-size: 40px; letter-spacing: -.02em; color: var(--zz-ink); }
.zz-cart__done .zz-cart__cta { margin-top: 12px; }

@media (max-width: 989px) {
  .zz-how__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 749px) {
  .zz-how__steps { grid-template-columns: 1fr; }
  .zz-ask__inner { grid-template-columns: 1fr; }
  .zz-ask__row { grid-template-columns: 1fr; }
  .zz-cart { width: 100vw; border-left: 0; }
}
