.cart-page { padding: 16px 0; }
.cart-title{ margin: 6px 0 14px; }

.cart-empty{
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  padding:16px;
  text-align:center;
}

.cart-wrap {
  display: grid;
  grid-template-columns: 1fr 320px; /* list | summary */
  gap: 16px;
  align-items: start;
}

.cart-list { min-width: 0; }

@media (max-width: 860px){
  .cart-wrap { grid-template-columns: 1fr; }
}

/* cart list */
.cart-list{
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  padding:6px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.cart-row{
  display:grid;
  /* BEFORE: grid-template-columns: 84px 1fr 110px 110px 32px; */
  grid-template-columns: 84px minmax(0,1fr) 110px 110px 32px;
  gap:10px; align-items:center; padding:8px;
  border-bottom:1px dashed var(--line);
}
.cart-row:last-child{ border-bottom:0; }

.cart-img{
  width:84px; height:84px;
  border:1px solid var(--line);
  border-radius:10px;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden; background:#fff;
}
.cart-img img{ width:100%; height:100%; object-fit:cover; }

/* cart.css */
.cart-name h3{ margin:0 0 4px; font-size:1rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cart-name a{ text-decoration:none; color:inherit; }
.cart-name a:hover{ color: var(--brand); text-decoration: underline; }
.cart-name .muted{ font-size:.9rem; }

.cart-price{ font-weight:700; }
.cart-price .old{
  color:#888; text-decoration:line-through; margin-left:6px; font-weight:400;
}

.cart-qty{ display:flex; align-items:center; gap:8px; }
.cart-qty input[type="number"]{
  width:84px; padding:8px 10px; border:1px solid var(--line); border-radius:10px;
}

.cart-remove{
  display:flex; align-items:center; justify-content:center;
}
.cart-remove button{
  border:1px solid var(--line); background:#fff; border-radius:8px; cursor:pointer;
  width:32px; height:32px; line-height:1; font-weight:800;
}

/* summary */
.cart-summary{
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  padding:12px;
  height:max-content;
  position:sticky; top:90px;
}
.summary-row{
  display:flex; align-items:center; justify-content:space-between;
  margin:8px 0;
}
.summary-row.small{ font-size:.95rem; color: var(--muted); }
.summary-row.total{ font-size:1.25rem; font-weight:800; }

.summary-actions{ display:grid; gap:8px; margin-top:10px; }
.tiny{ font-size:.85rem; color:var(--muted); margin-top:8px; }
