/* ============================================================
   IC LINKS CO — Cart drawer + cart page
   ============================================================ */

.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(56,53,47,0.4);
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
  z-index: 1050;
}
.cart-overlay.open { opacity: 1; visibility: visible; }

.cart-drawer {
  position: fixed; top: 0; right: 0;
  width: min(92vw, 420px); height: 100vh;
  background: var(--ivory);
  z-index: 1051;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
  box-shadow: -12px 0 50px rgba(56,53,47,0.18);
}
.cart-drawer.open { transform: translateX(0); }

.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 1.5rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.cart-head h3 { font-size: 1.5rem; }
.cart-close {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--charcoal); transition: background var(--trans);
}
.cart-close:hover { background: var(--ivory-dark); }
.cart-close svg { width: 20px; height: 20px; }

/* Build Your Journey draft — see renderJourneyDraft() above. Empty (no
   #cart-journey children) when there's no in-progress Journey, so it takes
   up no space in the drawer for anyone who hasn't started one. */
#cart-journey:empty { display: none; }
.cart-journey-card {
  margin: 1rem 1.5rem 0;
  padding: 1.1rem 1.25rem;
  background: var(--plum-mist);
  border: 1px solid rgba(71,22,62,0.15);
  border-radius: var(--radius-lg);
}
.cart-journey-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.cart-journey-badge {
  font-size: 0.64rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--white); background: var(--plum); padding: 0.2rem 0.55rem; border-radius: var(--radius-pill);
}
.cart-journey-head h4 { font-size: 0.95rem; margin: 0; color: var(--plum-dark); }
.cart-journey-line { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.85rem; color: var(--charcoal-mid); padding: 0.2rem 0; }
.cart-journey-plan { border-top: 1px solid rgba(71,22,62,0.15); margin-top: 0.4rem; padding-top: 0.5rem; font-weight: 600; color: var(--charcoal); }
.cart-journey-empty { font-size: 0.85rem; color: var(--charcoal-light); margin: 0 0 0.5rem; }

.cart-ship {
  padding: 0.9rem 1.5rem;
  background: var(--plum-mist);
  font-size: 0.8rem; color: var(--plum-dark);
}
.cart-ship strong { color: var(--plum-dark); }
.cart-ship-bar { height: 4px; background: rgba(71,22,62,0.2); border-radius: 4px; margin-top: 0.5rem; overflow: hidden; }
.cart-ship-bar i { display: block; height: 100%; background: var(--plum); border-radius: 4px; transition: width 0.4s var(--ease); }

.cart-items { flex: 1; overflow-y: auto; padding: 0.5rem 1.5rem; }

.cart-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 0.9rem;
  align-items: start;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-ic {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--white); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--rose-dark);
}
.cart-item-ic svg { width: 24px; height: 24px; }
.cart-item-ic img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.cart-item-main strong { font-family: var(--font-body); font-size: 0.92rem; font-weight: 600; color: var(--charcoal); display: block; }
.cart-item-meta { font-size: 0.76rem; color: var(--charcoal-light); }
.cart-qty { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.6rem; }
.cart-qty button {
  width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 6px;
  color: var(--charcoal-mid); font-size: 1rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: var(--trans);
}
.cart-qty button:hover { border-color: var(--plum); color: var(--plum-dark); }
.cart-qty span { min-width: 22px; text-align: center; font-size: 0.9rem; font-weight: 600; }
.cart-qty .cart-remove {
  width: auto; height: auto; border: none; padding: 0 0 0 0.5rem; margin-left: 0.25rem;
  font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--charcoal-light);
}
.cart-qty .cart-remove:hover { color: var(--rose-dark); background: none; }
.cart-item-price { font-size: 0.95rem; font-weight: 600; color: var(--charcoal); }

.cart-empty { text-align: center; padding: 3.5rem 1rem; }
.cart-empty svg { width: 48px; height: 48px; color: var(--plum-light); margin: 0 auto 1rem; }
.cart-empty p { margin-bottom: 1.25rem; }

.cart-foot { padding: 1.25rem 1.5rem 1.75rem; border-top: 1px solid var(--border); background: var(--white); }
.cart-subtotal { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.4rem; }
.cart-subtotal span { font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--charcoal-mid); }
.cart-subtotal strong { font-family: var(--font-display); font-size: 1.6rem; color: var(--charcoal); }
.cart-note { font-size: 0.74rem; color: var(--charcoal-light); margin-bottom: 1rem; }
.cart-continue { color: var(--charcoal-mid); margin-top: 0.5rem; }
.cart-continue:hover { color: var(--rose-dark); }

/* ── Full cart page (/cart.html) ── */
.cartpage { display: grid; grid-template-columns: 1.6fr 1fr; gap: 3rem; align-items: start; }
.cartpage-items { display: flex; flex-direction: column; }
.cartpage-row {
  display: grid; grid-template-columns: 64px 1fr auto auto; gap: 1.25rem;
  align-items: center; padding: 1.5rem 0; border-bottom: 1px solid var(--border);
}
.cartpage-row .ic {
  width: 64px; height: 64px; border-radius: 14px; background: var(--ivory-dark);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--rose-dark);
}
.cartpage-row .ic svg { width: 30px; height: 30px; }
.cartpage-row .ic img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.cartpage-row h4 { font-family: var(--font-display); font-size: 1.25rem; text-transform: none; letter-spacing: 0; font-weight: 500; }
.cartpage-summary {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2rem; position: sticky; top: 100px;
}
.cartpage-summary h3 { margin-bottom: 1.25rem; }
.summary-line { display: flex; justify-content: space-between; font-size: 0.92rem; color: var(--charcoal-mid); padding: 0.5rem 0; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 1rem; margin-top: 0.5rem; border-top: 1px solid var(--border); }
.summary-total span { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; }
.summary-total strong { font-family: var(--font-display); font-size: 1.8rem; }
.checkout-note { font-size: 0.78rem; color: var(--charcoal-light); margin-top: 1rem; text-align: center; }

@media (max-width: 820px) {
  .cartpage { grid-template-columns: 1fr; gap: 2rem; }
  .cartpage-summary { position: static; }
}
