/* ════════════════════════════════════
   RELIQUARY ARCANUM — CART STYLES
   Drawer, toast, line items
   ════════════════════════════════════ */

.ra-cart-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8, 8, 8, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.ra-cart-overlay.open { opacity: 1; pointer-events: auto; }

.ra-cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 201;
  width: min(440px, 92vw);
  background: var(--ink);
  border-left: 1px solid var(--rule);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.25, 1);
  font-family: var(--sans);
}
.ra-cart-drawer.open { transform: translateX(0); }

/* head */
.ra-cart-head {
  position: relative;
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: baseline;
  column-gap: 14px;
}
.ra-cart-eyebrow {
  font-size: 10px; letter-spacing: 0.32em;
  text-transform: uppercase; color: var(--gold);
  grid-column: 1; grid-row: 1;
}
.ra-cart-count {
  font-family: var(--serif); font-size: 13px; font-style: italic;
  color: var(--muted-lt);
  grid-column: 1; grid-row: 2;
  margin-top: 4px;
}
.ra-cart-close {
  grid-column: 2; grid-row: 1 / span 2;
  align-self: center;
  background: transparent; border: 1px solid var(--rule);
  color: var(--muted-lt); cursor: pointer;
  width: 36px; height: 36px;
  font-size: 24px; line-height: 1; font-weight: 200;
  transition: color 0.2s, border-color 0.2s;
}
.ra-cart-close:hover { color: var(--gold); border-color: var(--gold); }

/* body / lines */
.ra-cart-body {
  flex: 1; overflow-y: auto;
  padding: 8px 28px 16px;
}
.ra-cart-empty {
  padding: 64px 8px; text-align: center;
}
.ra-cart-empty-title {
  font-family: var(--serif); font-size: 22px; color: var(--parchment);
  margin-bottom: 10px;
}
.ra-cart-empty-sub {
  font-family: var(--serif); font-size: 13px; font-style: italic;
  color: var(--muted-lt);
}

.ra-cart-line {
  display: grid; grid-template-columns: 80px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.ra-cart-line:last-child { border-bottom: none; }
.ra-cart-line-img {
  width: 80px; height: 100px;
  object-fit: cover;
  border: 1px solid var(--rule);
  filter: brightness(0.92) saturate(0.85);
  background: #111;
}
.ra-cart-line-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ra-cart-line-name {
  font-family: var(--serif); font-size: 16px; color: var(--parchment);
  text-decoration: none; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis;
}
.ra-cart-line-name:hover { color: var(--gold); }
.ra-cart-line-variant {
  font-size: 9.5px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--muted);
}
.ra-cart-line-price {
  font-family: var(--serif); font-size: 15px; color: var(--gold);
  margin-top: 4px;
}
.ra-cart-line-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px;
}
.ra-cart-qty {
  display: flex; align-items: center;
  border: 1px solid var(--rule);
}
.ra-cart-qty button {
  background: transparent; border: none;
  color: var(--muted-lt); cursor: pointer;
  width: 28px; height: 28px; line-height: 1;
  font-family: var(--serif); font-size: 16px;
  transition: color 0.2s;
}
.ra-cart-qty button:hover:not(:disabled) { color: var(--gold); }
.ra-cart-qty button:disabled { opacity: 0.4; cursor: not-allowed; }
.ra-cart-qty span {
  padding: 0 10px; min-width: 32px; text-align: center;
  font-size: 12px; color: var(--parchment);
}
.ra-cart-remove {
  background: none; border: none; cursor: pointer;
  font-size: 9px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--muted);
  transition: color 0.2s; padding: 4px 0;
}
.ra-cart-remove:hover:not(:disabled) { color: var(--gold); }
.ra-cart-remove:disabled { opacity: 0.4; cursor: not-allowed; }

/* notice / error banners */
.ra-cart-notice {
  margin: 0 28px;
  padding: 12px 14px;
  background: rgba(192,158,80,0.06);
  border: 1px solid var(--gold-dim);
  font-size: 10.5px; line-height: 1.5;
  color: var(--gold);
  letter-spacing: 0.04em;
}
.ra-cart-notice.error {
  background: rgba(180, 60, 60, 0.08);
  border-color: rgba(220, 90, 90, 0.4);
  color: rgb(220, 130, 130);
}

/* foot */
.ra-cart-foot {
  border-top: 1px solid var(--rule);
  padding: 22px 28px 26px;
  background: var(--ink-2, var(--ink));
}
.ra-cart-subtotal {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
}
.ra-cart-subtotal-label {
  font-size: 10px; letter-spacing: 0.32em;
  text-transform: uppercase; color: var(--muted-lt);
}
.ra-cart-subtotal-val {
  font-family: var(--serif); font-size: 22px; color: var(--parchment);
}
.ra-cart-meta {
  font-size: 10px; color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.ra-cart-checkout {
  width: 100%; padding: 16px;
  font-size: 11px; letter-spacing: 0.3em;
}
.ra-cart-checkout:disabled { opacity: 0.5; cursor: not-allowed; }

/* nav cart count badge */
.ra-cart-badge {
  position: absolute;
  top: -6px; right: -8px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--sans); font-size: 9px; font-weight: 500;
  letter-spacing: 0;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 5px;
  pointer-events: none;
}
.nav-icon-cart {
  position: relative;
}

/* ── Toast (bottom-right) ── */
.ra-cart-toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 199;
  background: var(--ink-2, var(--ink));
  border: 1px solid var(--gold-dim);
  padding: 16px 18px;
  display: flex; align-items: center; gap: 18px;
  min-width: 280px; max-width: 360px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  font-family: var(--sans);
  animation: ra-toast-in 0.3s ease;
}
@keyframes ra-toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ra-cart-toast-text { min-width: 0; }
.ra-cart-toast-eyebrow {
  font-size: 9px; letter-spacing: 0.32em;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 4px;
}
.ra-cart-toast-title {
  font-family: var(--serif); font-size: 15px;
  color: var(--parchment); line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ra-cart-toast-cta {
  background: transparent; border: 1px solid var(--gold);
  color: var(--gold); cursor: pointer;
  font-family: var(--sans); font-size: 9px;
  letter-spacing: 0.28em; text-transform: uppercase;
  padding: 8px 14px;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.ra-cart-toast-cta:hover { background: var(--gold); color: var(--ink); }

/* ── Wishlist heart on product page ── */
.btn-wish-active {
  background: rgba(192,158,80,0.08);
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .ra-cart-toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
  .ra-cart-head, .ra-cart-body, .ra-cart-foot { padding-left: 20px; padding-right: 20px; }
}
