/* ════════════════════════════════════════════════════════════════
   HORNS & HERITAGE — Cart & Checkout refresh
   Additive only. Loads LAST so it refines the cart sidebar + checkout
   without touching any product, price, or content markup.
   ════════════════════════════════════════════════════════════════ */

/* ---------- Cart sidebar shell: soft cream, rounded 16px ---------- */
.cart-sidebar {
  background: #FAF8F3;
  border-left: 1px solid var(--border-soft);
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
  box-shadow: -24px 0 60px rgba(61, 42, 26, 0.18);
}

.cart-head {
  background: #FAF8F3;
  border-top-left-radius: 16px;
  padding: 22px 24px 18px;
}
.cart-head h3 {
  font-size: 1.32rem;
  line-height: 1.2;
  color: var(--primary-green);
  letter-spacing: -0.01em;
}
/* tiny brand underline accent under the heading */
.cart-head h3::after {
  content: "";
  display: block;
  width: 38px; height: 3px;
  margin-top: 9px;
  border-radius: 3px;
  background: var(--gold);
}

.cart-items {
  padding: 18px 20px;
  gap: 12px;
}

/* ---------- Item rows as clean cards (photo-inspired) ---------- */
.cart-sidebar .cart-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 14px;
  padding: 14px;
  margin: 0;
  background: #FFFFFF;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  box-shadow: 0 2px 6px rgba(61, 42, 26, 0.05);
  align-items: start;
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
.cart-sidebar .cart-item:hover {
  background: #FFFFFF;
  border-color: #DFCFb8;
  box-shadow: 0 6px 18px rgba(61, 42, 26, 0.10);
}

.cart-sidebar .cart-item-img {
  width: 60px; height: 60px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: var(--bg-alt);
}

.cart-sidebar .cart-item-info { min-width: 0; }
.cart-sidebar .cart-item-info h4 {
  font-family: var(--sans);
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.28;
  margin: 1px 0 3px;
}
.cart-sidebar .cart-item-info .ci-price {
  font-size: 0.8rem;
  color: var(--text-muted);
}
/* per-item subtotal — prominent, terracotta */
.cart-sidebar .cart-item-info .ci-subtotal {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--terracotta);
  margin-top: 6px;
}

/* right-hand control column: quantity stepper + remove */
.cart-sidebar .cart-item-ctrl {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 10px;
}

.cart-sidebar .qty-ctrl {
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: #FAF8F3;
}
.cart-sidebar .qty-ctrl button {
  width: 28px; height: 28px;
  color: var(--primary-green);
  font-size: 1.05rem;
}
.cart-sidebar .qty-ctrl button:hover { background: var(--bg-alt); }
.cart-sidebar .qty-ctrl .qty {
  min-width: 24px;
  font-size: 0.86rem;
  color: var(--text-primary);
}

/* trash button (hh-popups injects the icon; we just refine placement) */
.cart-sidebar .ci-remove.is-trash {
  width: 30px; height: 30px;
  border-radius: 9px;
  color: var(--text-muted);
}
.cart-sidebar .ci-remove.is-trash:hover {
  color: var(--rust);
  background: rgba(184, 81, 44, 0.10);
}

/* ---------- Footer: total + proceed ---------- */
.cart-foot {
  background: #F3ECDF;
  border-top: 1px solid var(--border-soft);
  border-bottom-left-radius: 16px;
}
.cart-total-row strong { color: var(--primary-green); }
.cart-checkout {
  background: var(--primary-green);
  letter-spacing: 0.01em;
}

/* ---------- Empty state ---------- */
.cart-empty { padding: 70px 20px; }

/* ---------- Checkout: guest "log in to autofill" banner ---------- */
.co-login-note {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: rgba(212, 160, 43, 0.10);
  border: 1px solid rgba(212, 160, 43, 0.40);
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-secondary);
}
.co-login-note svg { flex: 0 0 auto; color: var(--gold-dark); }
.co-login-note a {
  font-weight: 700;
  color: var(--primary-green);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.co-login-note a:hover { color: #1B4D3E; }

/* prefilled fields get a subtle "saved" tint so users see auto-fill worked */
.hh-field input.co-prefilled {
  background: rgba(45, 106, 79, 0.05);
  border-color: rgba(45, 106, 79, 0.30);
}

/* ---------- Mobile ---------- */
@media (max-width: 520px) {
  .cart-sidebar {
    border-radius: 0;
    border-top-left-radius: 16px;
  }
  .cart-head, .cart-foot { border-radius: 0; }
  .cart-head { border-top-left-radius: 16px; }
}
