/* ==========================================================================
   Cart Page
   ========================================================================== */

.cart-page {
  padding-block: 2.5rem;
}

.cart-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 56rem) {
  .cart-layout {
    grid-template-columns: 1fr 340px;
    align-items: start;
  }
}

/* Cart items */
.cart-items {
  display: grid;
  gap: 1rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e6ea);
  border-radius: 8px;
  align-items: center;
}

.cart-item__image {
  width: 90px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  background: #f1f3f5;
}

.cart-item__info h3 {
  font-size: 1rem;
  margin: 0 0 0.25rem;
}

.cart-item__meta {
  font-size: 0.875rem;
  color: var(--muted, #5c6b7a);
  margin-bottom: 0.5rem;
}

.cart-item__price {
  font-weight: 600;
}

/* Quantity controls */
.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border, #d0d5dd);
  border-radius: 6px;
  overflow: hidden;
}

.qty-control button {
  width: 36px;
  height: 36px;
  border: none;
  background: #f8f9fa;
  font-size: 1.1rem;
  cursor: pointer;
}

.qty-control button:hover {
  background: #e9ecef;
}

.qty-control span {
  width: 40px;
  text-align: center;
  font-weight: 500;
}

/* Remove button */
.cart-item__remove {
  background: none;
  border: none;
  color: #c0392b;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.25rem 0;
}

.cart-item__remove:hover {
  text-decoration: underline;
}

/* Summary */
.cart-summary__box {
  padding: 1.5rem;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e6ea);
  border-radius: 8px;
  position: sticky;
  top: 1.5rem;
}

.cart-summary__box h2 {
  margin-top: 0;
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
}

.cart-summary__row {
  display: flex;
  justify-content: space-between;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.cart-summary__note {
  font-size: 0.875rem;
  color: var(--muted, #5c6b7a);
  margin-bottom: 1.5rem;
  line-height: 1.45;
}

.cart-summary .btn {
  margin-bottom: 0.75rem;
}

.cart-summary .btn:last-child {
  margin-bottom: 0;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
}

.empty-state h2 {
  margin-bottom: 0.75rem;
}