/* Slide-out cart drawer and checkout form */
.btn-block { display: block; width: 100%; text-align: center; cursor: pointer; font-family: inherit; }
.btn:disabled { opacity: 0.6; cursor: wait; }
body.is-locked { overflow: hidden; }

.drawer-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(15, 27, 45, 0.55); }
.drawer-overlay[hidden] { display: none; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  background: var(--paper);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0.3s;
}

.cart-drawer.is-open { transform: none; visibility: visible; }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: var(--ink);
}

.drawer-head h2 { margin: 0; font-size: 1.35rem; color: #fff; }
.drawer-head .icon-close { background: transparent; color: #fff; }

.drawer-view { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.drawer-view[hidden] { display: none; }

.cart-items { flex: 1; overflow-y: auto; padding: 8px 24px; }

.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item-thumb { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; }
.cart-item h3 { margin: 0 0 2px; font-size: 1rem; }
.cart-item .price { margin: 0; font-size: 1rem; }

.cart-remove { padding: 0; border: 0; background: none; font-size: 0.82rem; color: var(--muted); text-decoration: underline; cursor: pointer; }
.cart-remove:hover { color: #b3412e; }

.cart-empty { padding: 40px 24px; text-align: center; color: var(--muted); }
.cart-empty[hidden], .drawer-foot[hidden] { display: none; }
.drawer-link { color: var(--accent-dark); font-weight: 600; text-decoration: underline; }

.drawer-foot { padding: 20px 24px 24px; border-top: 1px solid var(--line); background: var(--paper-warm); }

.cart-subtotal { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 1.05rem; color: var(--ink); }
.cart-subtotal strong { font-family: var(--font-serif); font-size: 1.3rem; }
.drawer-note { margin-bottom: 16px; font-size: 0.85rem; color: var(--muted); }

.checkout-form { gap: 14px; padding: 20px 24px 24px; overflow-y: auto; }
.checkout-form label { display: grid; gap: 6px; font-size: 0.88rem; font-weight: 500; color: var(--ink); }
.checkout-form small { font-weight: 400; color: var(--muted); }

.checkout-form input,
.checkout-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
}

.checkout-form input:focus,
.checkout-form textarea:focus { outline: none; border-color: var(--accent); }
.checkout-form textarea { resize: vertical; }

.drawer-back { justify-self: start; padding: 0; border: 0; background: none; font: inherit; font-size: 0.9rem; color: var(--muted); cursor: pointer; }
.drawer-back:hover { color: var(--ink); }

/* Honeypot field: hidden from people, visible to bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin: 0; min-height: 1.4em; font-size: 0.9rem; }
.form-status.is-error { color: #b3412e; }

.order-done { justify-content: center; gap: 8px; padding: 40px 24px; text-align: center; }
.order-done p { margin-bottom: 20px; color: var(--muted); }
