/* ============================================
   CART PAGE STYLES
   ============================================ */

main.container {
  padding-top: 20px;
  padding-bottom: 140px;
}

#cartTitle {
  font-size: 17px;
  font-weight: 600;
}

/* ---------- CART LIST ---------- */
.cart-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.cart-row {
  background: var(--color-cream);
  border-radius: var(--radius-md);
  padding: 14px;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
}

.cart-row-img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--color-border-light);
}

.cart-row-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-row-img svg {
  width: 28px;
  height: 28px;
  stroke: var(--color-gold);
}

.cart-row-info {
  color: var(--color-text-dark);
  min-width: 0;
}

.cart-row-info h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-row-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 8px;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.qty-stepper button {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-dark);
  color: var(--color-white);
  font-size: 15px;
  font-weight: 600;
}

.qty-stepper span {
  min-width: 28px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-dark);
}

.cart-row-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  height: 100%;
  gap: 12px;
}

.cart-row-remove {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-danger);
}

.cart-row-remove svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-danger);
}

.cart-row-item-total {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-dark);
}

/* ---------- PRICE DETAILS ---------- */
.price-details {
  padding: 18px;
}

.price-details h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--color-border-light);
}

.price-row-item {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: #4a4a4a;
  margin-bottom: 10px;
}

.price-row-item.total {
  border-top: 1px dashed var(--color-border-light);
  padding-top: 12px;
  margin-top: 4px;
  margin-bottom: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-dark);
}

.text-success {
  color: var(--color-success);
  font-weight: 600;
}

/* ---------- STICKY ACTION BAR ---------- */
.sticky-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-bg-dark-2);
  border-top: 1px solid var(--color-border);
  padding: 12px 20px max(12px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 90;
}

.cart-bar-total {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.cart-bar-label {
  font-size: 11px;
  color: var(--color-text-gray);
}

.cart-bar-total strong {
  font-size: 16px;
  color: var(--color-white);
}

#checkoutBtn {
  flex: 1;
}

/* ---------- RESPONSIVE: DESKTOP ---------- */
@media (min-width: 900px) {
  main.container {
    max-width: 640px;
    padding-bottom: 100px;
  }

  .sticky-action-bar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    max-width: 640px;
    width: 100%;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    bottom: 0;
  }
}
