/* ─── CHECKOUT CABINET / CART DRAWER ─── */
.cart-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.4); display: none;
}
.cart-overlay.open { display: block }
.cart-drawer {
  position: fixed; top: 0; right: -480px; bottom: 0; z-index: 301;
  width: 460px; max-width: 100vw;
  background: var(--bg-white); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  transition: right 0.3s ease;
}
.cart-drawer.open { right: 0 }
.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--line);
}
.cart-header h3 { font-size: 1.1rem }
.cart-header button {
  background: none; border: none; cursor: pointer;
  font-size: 1.3rem; color: var(--ink-soft); padding: 4px;
}

/* Steps indicator */
.checkout-steps {
  display: flex; padding: 16px 24px; gap: 4px;
  border-bottom: 1px solid var(--line); background: var(--bg);
}
.checkout-step {
  flex: 1; text-align: center; padding: 8px 4px;
  font-size: 0.75rem; font-weight: 600; color: var(--ink-muted);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all 0.2s; position: relative;
}
.checkout-step.active { color: var(--ink); background: var(--bg-white); box-shadow: 0 1px 3px rgba(0,0,0,0.08) }
.checkout-step.done { color: var(--accent) }
.checkout-step .step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; font-size: 0.7rem;
  border: 1.5px solid currentColor; margin-bottom: 3px;
}
.checkout-step.active .step-num { background: var(--accent); color: #fff; border-color: var(--accent) }
.checkout-step.done .step-num { background: var(--accent); color: #fff; border-color: var(--accent) }

/* Step panels */
.checkout-panel { display: none; flex: 1; overflow-y: auto; }
.checkout-panel.active { display: flex; flex-direction: column; }

.cart-items { flex: 1; overflow-y: auto; padding: 16px 24px }
.cart-item {
  display: flex; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item-img {
  width: 56px; height: 56px; border-radius: 10px;
  background: linear-gradient(135deg, #f5f0e8, #ede8dd); flex-shrink: 0; overflow: hidden;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover }
.cart-item-info { flex: 1 }
.cart-item-info h4 { font-size: 0.88rem; font-weight: 600; margin-bottom: 2px }
.cart-item-info .ci-meta { font-size: 0.75rem; color: var(--ink-muted) }
.cart-item-price { font-size: 0.82rem; font-weight: 600; color: var(--ink); margin-top: 2px }
.cart-item-controls { display: flex; align-items: center; gap: 8px; margin-top: 8px }
.cart-item-controls button {
  width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--bg);
  cursor: pointer; font-size: 0.9rem; display: flex;
  align-items: center; justify-content: center;
}
.cart-item-controls button:hover { background: #eee }
.cart-item-controls span { font-size: 0.88rem; font-weight: 600; min-width: 20px; text-align: center }
.cart-item-remove {
  background: none !important; border: none !important; color: #cc3333;
  font-size: 0.78rem; cursor: pointer; padding: 4px;
}
.cart-empty { padding: 40px 24px; text-align: center; color: var(--ink-muted); display: flex; flex-direction: column; align-items: center; gap: 12px }
.cart-empty-carousel {
  width: 160px; height: 160px; border-radius: 50%; overflow: hidden;
  position: relative; margin-bottom: 8px;
  background: var(--accent-bg);
}
.cart-empty-carousel img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.8s ease;
}
.cart-empty-carousel img.active { opacity: 1 }
.cart-empty h3 { font-size: 1.1rem; color: var(--ink); margin: 0 }
.cart-empty p { font-size: 0.88rem; margin: 0; line-height: 1.5 }
.cart-empty .btn { margin-top: 8px }
.cart-footer {
  padding: 20px 24px; border-top: 1px solid var(--line); background: var(--bg);
}
.cart-total {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.cart-total span { font-size: 0.9rem; color: var(--ink-soft) }
.cart-total strong { font-size: 1.1rem }

/* Checkout form inside drawer */
.checkout-form { padding: 20px 24px; flex: 1; overflow-y: auto }
.checkout-form .form-group { margin-bottom: 14px }
.checkout-form label {
  display: block; font-size: 0.8rem; font-weight: 600;
  margin-bottom: 5px; color: var(--ink);
}
.checkout-form input, .checkout-form textarea, .checkout-form select {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); font-size: 0.88rem;
  font-family: inherit; background: var(--bg); transition: border-color 0.2s;
  box-sizing: border-box;
}
.checkout-form input:focus, .checkout-form textarea:focus { outline: none; border-color: var(--accent) }
.checkout-form textarea { resize: vertical; min-height: 70px }
.checkout-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px }
@media(max-width:540px) { .checkout-form .form-row { grid-template-columns: 1fr } }

/* Confirm step */
.confirm-list { list-style: none; padding: 0 24px; flex: 1; overflow-y: auto }
.confirm-list li {
  display: flex; justify-content: space-between; padding: 10px 0;
  border-bottom: 1px solid var(--line); font-size: 0.88rem;
}
.confirm-list li:last-child { border-bottom: none }
.confirm-section { padding: 16px 24px }
.confirm-section h4 { font-size: 0.82rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px }
.confirm-detail { font-size: 0.88rem; color: var(--ink); margin-bottom: 6px }
.confirm-total {
  display: flex; justify-content: space-between; padding: 16px 24px;
  font-size: 1rem; font-weight: 700; border-top: 2px solid var(--ink);
}

/* Consent checkboxes */
.consent-group { padding: 16px 24px; border-top: 1px solid var(--line) }
.consent-check {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 10px; cursor: pointer; font-size: 0.8rem;
  color: var(--ink-soft); line-height: 1.45;
}
.consent-check:last-child { margin-bottom: 0 }
.consent-check input[type="checkbox"] {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px;
  accent-color: var(--accent); cursor: pointer;
}
.consent-check a { color: var(--accent); text-decoration: underline }
.consent-check a:hover { color: #c09800 }
