/* ============================================
   CART PAGE — matches reference design
   ============================================ */

.cart-page {
  min-height: 100vh;
  padding-top: 80px;
}

/* ── Title ── */
.cart-page-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  color: #fff;
  text-align: center;
  padding: 2.5rem 2rem 1.5rem;
  margin: 0;
}

/* ── Empty state ── */
.cart-empty {
  max-width: 760px; margin: 2rem auto;
  background: #fff; border-radius: 24px;
  padding: 3.5rem 2rem; text-align: center; display: none;
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.cart-empty h2 { font-size: 1.5rem; font-weight: 700; color: #00a8d8; margin-bottom: 0.75rem; }
.cart-empty p  { font-size: 0.95rem; font-weight: 300; color: #5a7a9c; margin-bottom: 2rem; line-height: 1.6; }
.cart-empty .btn-primary {
  display: inline-block; padding: 0.9rem 2.5rem;
  background: #0b1e46; color: #fff; font-weight: 700;
  border-radius: 50px; text-decoration: none;
  font-family: 'DM Sans', sans-serif; transition: background 0.2s;
}
.cart-empty .btn-primary:hover { background: #00a8d8; }

/* ── Cart content ── */
.cart-content { display: none; }

.cart-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

/* ── Column headers ── */
.cart-items-header {
  display: grid;
  grid-template-columns: 3fr 1fr 1.6fr 1fr 0.3fr;
  gap: 1rem;
  padding: 0.5rem 1.5rem;
  font-size: 0.72rem; font-weight: 700;
  color: #fff; text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

/* ── Cart item — white pill ── */
.cart-item {
  display: grid;
  grid-template-columns: 3fr 1fr 1.6fr 1fr 0.3fr;
  gap: 1rem; align-items: center;
  padding: 1rem 1.5rem;
  background: #fff;
  border-radius: 50px;
  margin-bottom: 0.85rem;
}

.cart-item-info { display: flex; align-items: center; gap: 1rem; }

.cart-item-img {
  width: 64px; height: 64px;
  border-radius: 12px;
  overflow: hidden; flex-shrink: 0;
  background: #0b1e46;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }

.cart-item-name {
  font-size: 0.95rem; font-weight: 700; color: #0b1e46; margin-bottom: 2px;
}
.cart-item-coins { display: flex; gap: 0.3rem; }
.coin-tag {
  font-size: 0.72rem; font-weight: 600; color: #5a7a9c;
}

.cart-item-price {
  font-size: 1.15rem; font-weight: 600; color: #0b1e46;
}

/* ── QTY control — dark navy pill ── */
.cart-qty-control {
  display: inline-flex; align-items: center;
  background: #0b1e46; border-radius: 50px; overflow: hidden;
}
.cart-qty-control button {
  width: 38px; height: 38px;
  background: none; border: none;
  color: #fff; font-size: 1.1rem; cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.2s;
}
.cart-qty-control button:hover { background: rgba(255,255,255,0.12); }
.cart-qty-control span {
  color: #fff; font-weight: 700; font-size: 1.1rem;
  padding: 0 0.85rem; min-width: 32px; text-align: center;
}

.cart-item-subtotal {
  font-size: 1.2rem; font-weight: 800; color: #143176;
}

/* ── Remove button ── */
.cart-remove-btn {
  width: 28px; height: 28px; border-radius: 50%;
  background: none; border: 1px solid #e0e8f0;
  color: #a0b0c8; font-size: 0.75rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.cart-remove-btn:hover { background: rgba(255,80,80,0.1); border-color: rgba(255,80,80,0.4); color: #ff5050; }

/* ── Divider ── */
.cart-divider {
  height: 1px;
  background: #000;
  margin: 1.75rem 0;
}

/* ── Order Summary heading ── */
.cart-summary-heading {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 900; color: #fff;
  text-align: center;
  margin-bottom: 1.25rem;
}

/* ── Summary rows — cyan pills aligned to item grid ── */
.summary-row {
  display: grid;
  grid-template-columns: 3fr 1fr 1.6fr 1fr 0.3fr;
  gap: 1rem; align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(80, 190, 235, 0.62);
  border-radius: 50px;
  margin-bottom: 0.75rem;
  position: relative;
}
.summary-row-qty  { font-size: 1.1rem; font-weight: 600; color: #fff; }
.summary-row-name {
  position: absolute; left: 0; right: 0;
  text-align: center; pointer-events: none;
  font-size: 1.1rem; font-weight: 600; color: #fff;
}
.summary-row-val  { grid-column: 4; font-size: 1.2rem; font-weight: 800; color: #fff; text-align: right; }

.cart-summary-note {
  font-size: 0.82rem; font-weight: 300;
  color: #000;
  text-align: center;
  margin-top: 0.5rem;
}

/* ── Trust row ── */
.cart-trust-row {
  display: flex; align-items: center; justify-content: center; gap: 3rem;
  font-size: 0.88rem; font-weight: 400; color: #000;
  margin-bottom: 1.5rem;
}

/* ── Checkout panel — auth badge ── */
.auth-user-badge {
  display: flex; align-items: center; gap: 10px;
  padding: 0.75rem 1rem; border-radius: 12px; margin-bottom: 1.25rem;
  background: #f0f8ff; border: 1px solid #c8e6f5;
  font-size: 0.85rem; max-width: 500px; margin-left: auto; margin-right: auto;
}
.auth-check {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: rgba(71,255,139,0.12); border: 1px solid rgba(71,255,139,0.35);
  color: #22c55e; font-size: 0.7rem;
  display: flex; align-items: center; justify-content: center;
}

/* ── Checkout button — large centered navy pill ── */
.btn-primary.btn-checkout,
.btn-checkout {
  display: block !important;
  width: 100% !important; max-width: 500px !important;
  margin: 0 auto 0.75rem !important;
  padding: 1.1rem 2rem !important;
  background: #0b1e46 !important; color: #fff !important;
  font-size: 1.1rem !important; font-weight: 700 !important;
  border: none; border-radius: 50px !important; cursor: pointer;
  text-align: center; text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.2s !important;
  box-shadow: none !important;
}
.btn-primary.btn-checkout:hover,
.btn-checkout:hover { background: #00a8d8 !important; }

/* Sign in prompt */
.checkout-sign-in-prompt { text-align: center; padding: 1rem 0.5rem; }
.signin-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.checkout-sign-in-prompt p { font-size: 0.88rem; color: rgba(255,255,255,0.7); margin-bottom: 1.25rem; line-height: 1.6; }

/* Error message */
.checkout-error-msg {
  max-width: 500px; margin: 0 auto;
  background: rgba(255,80,80,0.08); border: 1px solid rgba(255,80,80,0.3);
  color: #ff6b6b; border-radius: 8px; padding: 0.7rem 1rem;
  font-size: 0.85rem; text-align: center;
}

/* Spinner */
.spinner {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  animation: spin 0.7s linear infinite; vertical-align: middle; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Legal notice ── */
.cart-legal {
  font-size: 0.78rem; font-weight: 300;
  color: #000;
  text-align: center;
  margin-top: 1.25rem;
  line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .cart-items-header { display: none; }
  .cart-item {
    grid-template-columns: 1fr;
    border-radius: 24px;
    padding: 1.25rem;
    gap: 0.75rem;
  }
  .cart-trust-row { gap: 1.5rem; }
}
