/* cart.css */
.cart-main { padding: 40px 0 64px; min-height: 60vh; }
.cart-title { font-size: 28px; font-weight: 700; margin-bottom: 20px; }

.cart-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
  font-size: 14px;
  color: var(--text-light);
}
.cart-steps .step.active { color: var(--text-dark); font-weight: 700; }
.step-arrow { color: #ccc; }

.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }

/* 왼쪽 */
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-top: 2px solid var(--text-dark);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  font-size: 14px;
}
.cart-header label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.btn-text-del { color: var(--text-gray); font-size: 13px; background: none; border: none; cursor: pointer; }
.btn-text-del:hover { color: var(--sale-color); }

.cart-item {
  display: grid;
  grid-template-columns: 20px 100px 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-img { width: 100px; height: 100px; object-fit: cover; border-radius: 3px; }
.cart-item-info h4 { font-size: 14px; margin-bottom: 6px; line-height: 1.5; }
.cart-item-info p { font-size: 13px; color: var(--text-gray); }
.cart-qty-ctrl { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 3px; }
.cart-qty-ctrl button { width: 30px; height: 30px; font-size: 16px; background: #f5f5f5; border: none; cursor: pointer; }
.cart-qty-ctrl input { width: 40px; height: 30px; text-align: center; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); font-size: 14px; outline: none; }
.cart-item-price { font-size: 16px; font-weight: 700; text-align: right; white-space: nowrap; }
.cart-item-del { color: #aaa; font-size: 18px; cursor: pointer; background: none; border: none; }
.cart-item-del:hover { color: var(--sale-color); }

.empty-cart { text-align: center; padding: 80px 0; }
.empty-cart p { font-size: 18px; color: var(--text-light); margin-bottom: 20px; }

/* 오른쪽 */
.order-summary {
  background: var(--bg-light);
  border-radius: 6px;
  padding: 24px;
  position: sticky;
  top: 90px;
}
.order-summary h3 { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 8px 0; }
.summary-row strong { font-weight: 600; }
.summary-row.discount, .checkout-breakdown .discount { color: var(--sale-color); }
.summary-divider { height: 1px; background: var(--border); margin: 12px 0; }
.summary-row.total { font-size: 16px; }
.summary-row.total strong { font-size: 20px; font-weight: 800; color: var(--primary); }

.coupon-wrap {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}
.coupon-wrap input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
}
.coupon-wrap button {
  padding: 8px 16px;
  background: var(--text-dark);
  color: #fff;
  border-radius: 3px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.safe-payment {
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 12px;
}
.checkout-line, .checkout-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 5px 0;
}
.checkout-line span { min-width: 0; overflow-wrap: anywhere; }
.checkout-line strong { flex: 0 0 auto; }
.checkout-breakdown { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 10px; }
.checkout-total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px !important; font-size: 16px; }
.checkout-total strong { color: var(--primary); }
#checkoutBtn:disabled, #checkoutPayBtn:disabled { opacity: 0.55; cursor: not-allowed; }

@media (max-width: 768px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 20px 70px 1fr; grid-template-rows: auto auto; }
  .cart-item-price { grid-column: 3; }
  .cart-item-del { grid-column: 3; justify-self: end; }
}
