/* Cart page. */
.ct-title { margin: 16px 0 32px; font-size: clamp(44px, 6vw, 84px); font-weight: 760; line-height: .95; letter-spacing: -.045em; }
.ct-title small { margin-left: 14px; color: var(--muted); font-size: .4em; font-weight: 600; letter-spacing: 0; vertical-align: middle; }
.ct-loading { color: var(--muted); }
.ct-error { padding: 18px 20px; border-radius: 16px; background: #fdf3f0; border: 1.5px solid #f0cbb9; color: #a8432f; }
.ct-error p { margin: 0 0 8px; }
.ct-link-btn { min-height: 44px; padding: 0; border: 0; background: none; color: var(--text); font: 600 15px 'Onest', 'Manrope', sans-serif; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.ct-layout { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 28px; align-items: start; }
.ct-layout[hidden] { display: none; }
.ct-items { display: grid; border-top: 1.5px solid var(--text); }
.ct-item { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 22px 0; border-bottom: 1.5px solid var(--line); animation: ct-in .45s var(--ease) backwards; }
@keyframes ct-in { from { opacity: 0; transform: translateX(-16px); } }
.ct-thumb { display: grid; place-items: center; width: 132px; height: 132px; border-radius: 20px 20px 6px 6px; overflow: clip; background: #f1e7db; color: var(--accent-2); font-size: 40px; text-decoration: none; }
.ct-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.ct-item h2 { margin: 0 0 6px; font-size: 21px; letter-spacing: -.02em; }
.ct-item h2 a { text-decoration: none; }
.ct-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ct-meta span { padding: 5px 10px; border-radius: 999px; background: var(--panel); border: 1.5px solid var(--line); font-size: 13px; }
.ct-meta .own { background: #f6ece2; border-color: #f0cbb9; color: var(--accent-2); font-weight: 600; }
.ct-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.ct-qty { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: var(--panel); }
.ct-qty button { width: 44px; height: 44px; border: 0; background: none; color: var(--text); font-size: 18px; cursor: pointer; }
.ct-qty button:disabled { opacity: .35; cursor: default; }
.ct-qty output { min-width: 24px; text-align: center; font-weight: 700; }
.ct-fixed { color: var(--muted); font-size: 14px; }
.ct-rm { min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--muted); font: 500 14px 'Onest', 'Manrope', sans-serif; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.ct-rm:hover { color: var(--accent-2); }
.ct-price { font-size: 20px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ct-undo { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 18px; padding: 14px 18px; border-radius: 16px; background: var(--panel); border: 1.5px solid var(--line); font-size: 15px; animation: ct-in .35s var(--ease); }
.ct-undo[hidden] { display: none; }
.ct-undo button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--text); color: var(--bg); font: 600 14px 'Onest', 'Manrope', sans-serif; cursor: pointer; }
.ct-continue { display: inline-block; margin-top: 20px; color: var(--muted); text-decoration: underline; text-underline-offset: 5px; }
.ct-sum { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 18px; padding: 26px; border-radius: 28px; background: var(--panel); border: 1.5px solid var(--line); }
.ct-sum h2 { margin: 0; font-size: 22px; }
.ct-sum dl { display: grid; grid-template-columns: 1fr auto; gap: 12px 16px; margin: 0; }
.ct-sum dt { color: var(--muted); }
.ct-sum dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.ct-sum .ct-total { padding-top: 14px; border-top: 1.5px dashed var(--line); font-size: 22px; font-weight: 700; color: var(--text); }
.ct-sum dt.ct-total.is-prelim { font-size: 16px; line-height: 1.35; }
.ct-prelim { margin: -4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.ct-sum .sf-btn { width: 100%; }
.ct-pay { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; line-height: 1.45; }
.ct-pay li { display: flex; gap: 10px; }
.ct-pay li::before { content: '✓'; color: #5d7a58; font-weight: 700; }
.ct-empty { display: grid; justify-items: center; gap: 18px; padding: 40px 24px 20px; text-align: center; }
.ct-empty[hidden] { display: none; }
.ct-empty-shelf { display: flex; align-items: flex-end; gap: 12px; height: 150px; padding: 0 24px; border-bottom: 16px solid #d7bea4; border-radius: 0 0 4px 4px; }
.ct-empty-shelf span { width: 70px; border: 2px dashed #cfc6b6; border-radius: 16px 16px 4px 4px; }
.ct-empty h2 { margin: 12px 0 0; font-size: 32px; letter-spacing: -.03em; }
.ct-empty p { margin: 0; max-width: 44ch; color: var(--muted); font-size: 17px; line-height: 1.55; }
.ct-empty div { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.sf .ct-btn-outline { background: none; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.sf .ct-btn-outline:hover { color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }
.ct-mbar { display: none; }

@media (max-width: 900px) {
  .ct-layout { grid-template-columns: 1fr; }
  .ct-sum { position: relative; top: auto; }
  .ct-item { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; }
  .ct-thumb { width: 96px; height: 96px; }
  .ct-price { grid-column: 2; }
  .ct-mbar:not([hidden]):not(.is-off) { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: rgba(247, 244, 237, .95); backdrop-filter: blur(10px); border-top: 1.5px solid var(--line); }
  .ct-mbar b { font-size: 20px; }
  .ct-mbar small { display: block; color: var(--muted); font-size: 12px; }
  .ct-mbar .sf-btn { min-height: 48px; padding: 0 20px; }
  body:has(.ct-mbar:not([hidden])) .sf-footer { padding-bottom: 90px; }
}
