/* =================== hc-cart-drawer.css =================== */
/* hc-cart-drawer - premium right-side cart drawer. Toggled by header cart
 * icon via Alpine `cartOpen`. Panel slides in from the right with backdrop
 * blur. Has head, body (cart items + upsells), and footer (totals + CTA).
 * Strictly .hc-cart-drawer / .hc-cart-drawer__*. */

/* host overlay (the dimmer behind the panel) — uses .hc-drawer wrapper from
 * Alpine; we style the variant .hc-cart-drawer scoped to its own class.
 * The wrapper opens on `body[data-body] [x-show=cartOpen]`; CSS just handles
 * the visual layers. */
.hc-cart-drawer {
  position: relative;
}

.hc-cart-drawer__panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: var(--hc-z-drawer, 80);
  display: flex;
  flex-direction: column;
  width: min(440px, 92vw);
  background: linear-gradient(180deg, var(--hc-paper, #ffffff) 0%, rgba(252, 248, 240, 0.96) 100%);
  border-left: 0.5px solid rgba(141, 109, 71, 0.22);
  box-shadow: -32px 0 80px -20px rgba(40, 30, 15, 0.32);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.hc-cart-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px;
  border-bottom: 0.5px solid rgba(141, 109, 71, 0.16);
  background:
    radial-gradient(circle at 100% 0%, rgba(212, 184, 150, 0.18), transparent 50%),
    rgba(255, 252, 247, 0.86);
}
.hc-cart-drawer__title {
  margin: 0;
  font-family: var(--hc-serif, "Playfair Display", Georgia, serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.005em;
  color: var(--hc-ink, #1a1714);
}
.hc-cart-drawer__count {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 8px;
  background: var(--hc-accent-dark, #5d4d3a);
  color: var(--hc-paper, #ffffff);
  border-radius: var(--hc-r-pill);
  font-family: var(--hc-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.hc-cart-drawer__close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0.5px solid rgba(141, 109, 71, 0.18);
  border-radius: 10px;
  color: var(--hc-ink-soft, rgba(26, 23, 20, 0.7));
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.hc-cart-drawer__close:hover {
  background: var(--hc-ink, #1a1714);
  color: var(--hc-paper, #ffffff);
  border-color: var(--hc-ink);
  transform: rotate(90deg);
}

.hc-cart-drawer__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 22px;
  display: grid;
  gap: 14px;
}
.hc-cart-drawer__loading {
  display: grid;
  place-items: center;
  padding: 48px 0;
}

/* one cart line */
.hc-cart-drawer__line {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: start;
  gap: 14px;
  padding: 14px;
  background: rgba(255, 252, 247, 0.86);
  border: 0.5px solid rgba(141, 109, 71, 0.14);
  border-radius: 14px;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.hc-cart-drawer__line:hover {
  border-color: var(--hc-gold-border, rgba(212, 184, 150, 0.4));
  box-shadow: 0 8px 18px -8px rgba(184, 154, 111, 0.18);
}
.hc-cart-drawer__thumb {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #f7f3ea 0%, #efe8da 100%);
  border-radius: 10px;
  overflow: hidden;
}
.hc-cart-drawer__thumb img,
.hc-cart-drawer__thumb svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}
.hc-cart-drawer__line-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.hc-cart-drawer__line-name {
  font-family: var(--hc-serif);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--hc-ink, #1a1714);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hc-cart-drawer__line-series {
  font-family: var(--hc-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--hc-accent-dark, #7a6548);
}
.hc-cart-drawer__line-qty {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  border: 0.5px solid rgba(141, 109, 71, 0.22);
  border-radius: var(--hc-r-pill);
  overflow: hidden;
}
.hc-cart-drawer__line-qty button {
  width: 28px;
  height: 28px;
  background: transparent;
  border: 0;
  font-size: 14px;
  color: var(--hc-ink, #1a1714);
  cursor: pointer;
  transition: background 0.16s ease;
}
.hc-cart-drawer__line-qty button:hover {
  background: rgba(212, 184, 150, 0.22);
}
.hc-cart-drawer__line-qty input {
  width: 32px;
  height: 28px;
  text-align: center;
  background: transparent;
  border: 0;
  font: inherit;
  font-family: var(--hc-mono);
  font-size: 12px;
  font-weight: 600;
}
.hc-cart-drawer__line-price {
  font-family: var(--hc-serif);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: var(--hc-ink, #1a1714);
  white-space: nowrap;
}
.hc-cart-drawer__line-remove {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  background: transparent;
  border: 0;
  color: var(--hc-ink-mid, rgba(26, 23, 20, 0.45));
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.18s ease, color 0.18s ease;
}
.hc-cart-drawer__line-remove:hover {
  background: rgba(201, 67, 58, 0.12);
  color: var(--hc-danger, #c9433a);
}

/* empty state */
.hc-cart-drawer__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 36px 24px;
  text-align: center;
}
.hc-cart-drawer__empty-art {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #f7f3ea, #efe8da);
  border-radius: 50%;
}
.hc-cart-drawer__empty strong {
  font-family: var(--hc-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--hc-ink, #1a1714);
}
.hc-cart-drawer__empty span {
  max-width: 32ch;
  font-size: 13px;
  line-height: 1.55;
  color: var(--hc-ink-soft, rgba(26, 23, 20, 0.62));
}

/* upsells strip */
.hc-cart-drawer__upsell {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 0.5px dashed rgba(141, 109, 71, 0.22);
}
.hc-cart-drawer__upsell h4 {
  margin: 0 0 10px;
  font-family: var(--hc-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hc-accent-dark, #7a6548);
}

/* footer with totals + CTA */
.hc-cart-drawer__foot {
  padding: 18px 22px 22px;
  background: rgba(255, 252, 247, 0.94);
  border-top: 0.5px solid rgba(141, 109, 71, 0.18);
  display: grid;
  gap: 12px;
}
.hc-cart-drawer__sum {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.hc-cart-drawer__sum-label {
  font-family: var(--hc-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--hc-ink-mid, rgba(26, 23, 20, 0.55));
}
.hc-cart-drawer__sum-value {
  font-family: var(--hc-serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--hc-ink, #1a1714);
}
.hc-cart-drawer__cta {
  width: 100%;
}
.hc-cart-drawer__view {
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: var(--hc-ink-soft, rgba(26, 23, 20, 0.62));
}
.hc-cart-drawer__view a {
  color: var(--hc-accent-dark, #5d4d3a);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

@media (max-width: 480px) {
  .hc-cart-drawer__panel {
    width: 100vw;
    border-left: 0;
  }
}

/* ──────────────────────────────────────────────────────────────
   Drawer line items + cross-sell + footer. The template was rewritten
   with __item/__info/__row/__xsell* / hc-cart-upsells__* class names
   that had NO CSS, so the drawer rendered as a raw text list. Styles
   below match the current markup; built on design tokens.
   ────────────────────────────────────────────────────────────── */
.hc-cart-drawer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--hc-sp-3, 12px);
}

.hc-cart-drawer__item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: var(--hc-sp-3, 12px);
  padding-bottom: var(--hc-sp-3, 12px);
  border-bottom: 1px solid var(--hc-line, rgba(26, 23, 20, 0.08));
}

.hc-cart-drawer__thumb {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--hc-bg-warm, #f0ebe1);
  flex-shrink: 0;
}

.hc-cart-drawer__thumb img { width: 100%; height: 100%; object-fit: cover; }

.hc-cart-drawer__info { min-width: 0; display: grid; gap: var(--hc-sp-1, 4px); align-content: start; }

.hc-cart-drawer__name {
  font-size: var(--hc-fs-md, 14px);
  line-height: var(--hc-lh-snug, 1.25);
  color: var(--hc-ink, #1a1714);
  text-decoration: none;
}

.hc-cart-drawer__name:hover { color: var(--hc-accent-dark, #5d4d3a); }

.hc-cart-drawer__sub { margin: 0; font-size: var(--hc-fs-sm, 13px); color: var(--hc-ink-mid, rgba(26, 23, 20, 0.55)); }

.hc-cart-drawer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hc-sp-2, 8px);
  margin-top: var(--hc-sp-1, 4px);
}

.hc-cart-drawer__lt { font-size: var(--hc-fs-lg, 16px); color: var(--hc-ink, #1a1714); white-space: nowrap; }

.hc-cart-drawer__remove { margin: 0; }
.hc-cart-drawer__remove button {
  background: none;
  border: 0;
  padding: 4px;
  cursor: pointer;
  color: var(--hc-ink-muted, rgba(26, 23, 20, 0.4));
  line-height: 0;
  transition: color var(--hc-dur-fast, 0.15s) var(--hc-ease, ease);
}
.hc-cart-drawer__remove button:hover { color: var(--hc-danger, #c0392b); }

/* Footer rows */
.hc-cart-drawer__foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hc-sp-2, 8px);
  padding: var(--hc-sp-2, 8px) 0;
}

.hc-cart-drawer__foot-row--total {
  margin-top: var(--hc-sp-2, 8px);
  padding-top: var(--hc-sp-3, 12px);
  border-top: 1px solid var(--hc-line, rgba(26, 23, 20, 0.14));
  font-size: var(--hc-fs-xl, 18px);
}
.hc-cart-drawer__foot-row--total strong { font-size: var(--hc-fs-2xl, 22px); color: var(--hc-ink, #1a1714); }

.hc-cart-drawer__installment {
  font-size: var(--hc-fs-sm, 13px);
  color: var(--hc-ink-mid, rgba(26, 23, 20, 0.55));
  padding: var(--hc-sp-2, 8px) 0;
}

.hc-cart-drawer__cart-link {
  display: inline-block;
  margin-top: var(--hc-sp-2, 8px);
  font-size: var(--hc-fs-md, 14px);
  color: var(--hc-accent-dark, #5d4d3a);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Cross-sell inside drawer */
.hc-cart-drawer__xsell {
  margin-top: var(--hc-sp-5, 24px);
  padding-top: var(--hc-sp-4, 16px);
  border-top: 1px solid var(--hc-line, rgba(26, 23, 20, 0.08));
}

.hc-cart-drawer__xsell-title,
.hc-cart-upsells__title {
  font: 600 var(--hc-fs-xs, 12px) / 1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hc-ink-mid, rgba(26, 23, 20, 0.55));
  margin-bottom: var(--hc-sp-3, 12px);
}

.hc-cart-drawer__xsell-grid,
.hc-cart-upsells__grid {
  display: grid;
  gap: var(--hc-sp-2, 8px);
}

.hc-cart-drawer__xsell-item,
.hc-cart-upsells__item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: var(--hc-sp-2, 8px);
  padding: var(--hc-sp-2, 8px);
  border: 1px solid var(--hc-line, rgba(26, 23, 20, 0.08));
  border-radius: 12px;
}

.hc-cart-drawer__xsell-thumb,
.hc-cart-upsells__thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--hc-bg-warm, #f0ebe1);
}
.hc-cart-drawer__xsell-thumb img,
.hc-cart-upsells__thumb img { width: 100%; height: 100%; object-fit: cover; }

.hc-cart-drawer__xsell-info,
.hc-cart-upsells__info { min-width: 0; display: grid; gap: 2px; }

.hc-cart-drawer__xsell-name,
.hc-cart-upsells__name {
  font-size: var(--hc-fs-sm, 13px);
  line-height: var(--hc-lh-snug, 1.25);
  color: var(--hc-ink, #1a1714);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hc-cart-drawer__xsell-price,
.hc-cart-upsells__price { font-size: var(--hc-fs-sm, 13px); font-weight: 600; color: var(--hc-ink, #1a1714); }

.hc-cart-drawer__xsell-add,
.hc-cart-upsells__add { margin: 0; }
.hc-cart-drawer__xsell-add button,
.hc-cart-upsells__item button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--hc-line, rgba(26, 23, 20, 0.14));
  background: var(--hc-bg, #fff);
  color: var(--hc-ink, #1a1714);
  font-size: var(--hc-fs-lg, 16px);
  line-height: 1;
  cursor: pointer;
  transition: background var(--hc-dur-fast, 0.15s) var(--hc-ease, ease),
              color var(--hc-dur-fast, 0.15s) var(--hc-ease, ease);
}
.hc-cart-drawer__xsell-add button:hover,
.hc-cart-upsells__item button:hover {
  background: var(--hc-ink, #1a1714);
  color: #fff;
}

.hc-cart-upsells { margin-bottom: var(--hc-sp-4, 16px); }

.hc-installment-modal {
  max-width: 520px;
}

.hc-installment-modal__title {
  font-family: var(--serif);
  font-size: 18px;
}

.hc-installment-modal__results {
  max-height: 60vh;
  padding: var(--sp-4);
}

.hc-installment-quote {
  margin-bottom: var(--sp-3);
  padding: var(--sp-3);
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hc-installment-quote__head,
.hc-installment-schedule__row {
  display: flex;
  justify-content: space-between;
}

.hc-installment-quote__head {
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}

.hc-installment-quote__lead {
  margin-bottom: var(--sp-2);
  font-size: 14px;
}

.hc-installment-schedule summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--accent-dark);
}

.hc-installment-schedule__row {
  padding: 3px 0;
  font-size: 12px;
  color: var(--ink-3);
}

.hc-installment-quote__choose {
  width: 100%;
  margin-top: var(--sp-3);
}

/* ── Qty stepper + 0%-badge (drawer line) — were unstyled ─────────────────── */
.qty-form {
  display: inline-flex;
  align-items: center;
  border: 0.5px solid var(--hc-line-2, rgba(180, 151, 115, 0.28));
  border-radius: 999px;
  overflow: hidden;
  background: var(--hc-paper, #fff);
}
.qty-form button {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--hc-ink, #1a1714);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}
.qty-form button:hover:not(:disabled) {
  background: rgba(212, 184, 150, 0.16);
}
.qty-form button:disabled {
  opacity: 0.4;
  cursor: default;
}
.qty-form__v {
  min-width: 26px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.badge-0pct {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(61, 107, 79, 0.12);
  color: #2f6f4c;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
