/* The cart shares the shop's paper, lavender and deep plum palette. */
html:has(.checkout[open]) { overflow: hidden; }
.checkout {
  --cart-plum: #594166;
  --cart-rule: #ded5df;
  --cart-pad: clamp(20px, 5vw, 38px);
  width: min(480px, 100%);
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: 100%;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: #fcfaf8;
  color: var(--ink);
  box-shadow: -12px 0 56px #3024341f;
}
.checkout::backdrop { background: #29203166; }
.cart-shell { min-height: 100%; display: flex; flex-direction: column; }
.cart-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: max(28px, env(safe-area-inset-top)) var(--cart-pad) 24px;
  background: #f1eaf3; border-bottom: 1px solid var(--cart-rule);
}
.cart-brand { font: 600 .69rem/1.4 var(--sans); letter-spacing: .15em; text-transform: uppercase; color: #6a5572; }
.cart-head h2 { margin: 5px 0 0; font: 400 clamp(2rem, 7vw, 2.8rem)/1.04 var(--serif); letter-spacing: -.045em; }
.cart-head h2:focus { outline: 0; }
.cart-close { align-self: flex-start; background: #fcfaf8; border-color: #d6c9da; }
.cart-main { flex: 1; display: grid; align-content: start; padding: 8px var(--cart-pad) 30px; }
.cart-list, .cart-totals, .cart-totals dd { margin: 0; padding: 0; }
.cart-list { list-style: none; }
.cart-line {
  display: grid; grid-template-columns: clamp(70px, 21vw, 96px) minmax(0, 1fr);
  gap: clamp(12px, 3vw, 18px); align-items: start;
  padding-block: 22px; border-bottom: 1px solid var(--cart-rule);
}
.cart-thumb {
  display: grid; place-items: center; width: 100%; aspect-ratio: 1;
  background: #eae2ec; border-radius: 16px;
  box-shadow: inset 0 0 0 1px #4b365310; overflow: hidden;
}
.cart-line[data-finish="azul"] .cart-thumb { background: #e1e9ec; }
.cart-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.cart-line-info { min-width: 0; }
.cart-line h3 { font: 400 1.35rem/1.2 var(--serif); letter-spacing: -.025em; }
.cart-variant { display: flex; align-items: center; gap: 7px; margin-top: 4px; color: var(--muted); font-size: .86rem; }
.cart-variant i { width: 12px; height: 12px; flex: none; border: 1px solid #9c9198; border-radius: 50%; background: #faf9f6; }
.cart-line[data-finish="azul"] .cart-variant i { background: #9ebbc9; border-color: #7693a2; }
.cart-line-actions { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: center; margin-top: 8px; }
.cart-stepper { display: inline-flex; align-items: center; border: 1px solid #d1c7d4; border-radius: 99px; background: #fffdfb; }
.cart-stepper button, .cart-remove, .cart-text-button {
  min-height: 44px; padding: 0; border: 0; background: none; color: var(--cart-plum);
  font: 600 .85rem/1.25 var(--sans);
}
.cart-stepper button { min-width: 44px; border-radius: 50%; font-size: 1.05rem; }
.cart-stepper button:disabled { color: #b2a9b4; cursor: default; }
.cart-stepper span { min-width: 1.6em; text-align: center; font-size: .88rem; font-variant-numeric: tabular-nums; }
.cart-remove, .cart-text-button, .cart-shop {
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #b5a5b8;
}
.cart-line-review { display: none; margin-top: 8px; font-size: .84rem; color: var(--muted); }
.checkout[data-stage="review"] .cart-line-actions { display: none; }
.checkout[data-stage="review"] .cart-line-review { display: block; }
.cart-totals { display: grid; gap: 10px; margin-top: 22px; }
.cart-totals div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cart-totals dt, .cart-totals dd { color: var(--muted); font-size: .89rem; }
.cart-totals dd { text-align: right; }
.cart-totals div:last-child dt, .cart-totals div:last-child dd { color: var(--ink); font-weight: 600; }
.cart-message { padding: clamp(34px, 9vh, 76px) 0 12px; text-align: center; }
.cart-message img { display: block; margin: 0 auto 20px; width: 84px; height: 84px; object-fit: contain; }
.cart-message h3 { font: 400 clamp(1.6rem, 6vw, 2rem)/1.15 var(--serif); letter-spacing: -.04em; }
.cart-message p { max-width: 31ch; margin: 10px auto 0; font-size: .94rem; line-height: 1.55; color: var(--muted); }
.cart-foot {
  display: grid; justify-items: stretch; gap: 4px; padding: 18px var(--cart-pad) max(20px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--cart-rule); background: #f5f0f3;
}
.cart-payment-note { margin: 0 0 12px; font-size: .9rem; color: #604f65; line-height: 1.5; }
.cart-foot .cart-primary, .cart-shop.cart-primary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px;
  border: 1px solid var(--cart-plum); border-radius: 999px; background: var(--cart-plum);
  color: white; font: 600 .95rem/1.2 var(--sans); text-decoration: none;
}
.cart-shop, .cart-text-button { display: grid; place-items: center; min-height: 44px; color: var(--cart-plum); font: 600 .88rem/1.3 var(--sans); }
.cart-announcement { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (hover: hover) {
  .cart-foot .cart-primary:hover { background: #45334f; }
  .cart-stepper button:not(:disabled):hover { background: #f2edf3; }
  .cart-remove:hover, .cart-shop:hover, .cart-text-button:hover { text-decoration-color: currentColor; }
}
@media (max-width: 360px) {
  .cart-line { grid-template-columns: 60px minmax(0, 1fr); gap: 10px; }
}
