/* cart.css — بعد از checkout.css لود شود (از متغیرها و کلاس‌های ck- آن استفاده می‌کند) */

/* ---------- Items ---------- */
.ct-list { list-style: none; margin: 0; padding: 0; }
.ct-item {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  grid-template-areas: "thumb info remove" "thumb qty total";
  gap: 10px 14px; align-items: center;
  padding: 20px 0; border-top: 1px solid var(--ck-line);
}
.ct-item:first-child { border-top: 0; padding-top: 0; }

.ct-thumb {
  grid-area: thumb; display: block; width: 76px; height: 98px; overflow: hidden;
  border-radius: 14px; background: var(--ck-blush); border: 1px solid var(--ck-line);
}
.ct-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ct-info { grid-area: info; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ct-name { font-weight: 600; font-size: .95rem; line-height: 1.7; color: var(--ck-ink); text-decoration: none; }
.ct-name:hover { color: var(--ck-action); }
.ct-meta { font-size: .8rem; color: var(--ck-muted); }

.ct-total { grid-area: total; font-weight: 700; font-size: .95rem; white-space: nowrap; }

.ct-remove {
  grid-area: remove; align-self: start; width: 36px; height: 36px; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: transparent; color: var(--ck-muted);
  transition: background .2s, color .2s;
}
.ct-remove:hover { background: var(--ck-blush); color: #c0392b; }
.ct-remove:focus-visible { outline: 3px solid rgba(232, 161, 188, .6); }

@media (min-width: 768px) {
  .ct-item {
    grid-template-columns: 92px 1fr auto 150px 40px;
    grid-template-areas: "thumb info qty total remove";
    gap: 20px; padding: 24px 0;
  }
  .ct-thumb { width: 92px; height: 118px; }
  .ct-total { text-align: end; }
  .ct-remove { align-self: center; }
}

/* ---------- Quantity stepper ---------- */
.ct-stepper {
  grid-area: qty; justify-self: start; display: inline-flex; align-items: center;
  background: #fff; border: 1px solid var(--ck-line); border-radius: 999px; overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.ct-stepper:focus-within { border-color: var(--ck-rose); box-shadow: 0 0 0 4px rgba(232, 161, 188, .28); }
.ct-stepper button {
  width: 38px; height: 38px; border: 0; background: transparent; font-size: 1.15rem; color: var(--ck-ink);
}
.ct-stepper button:hover { background: var(--ck-blush); color: var(--ck-action); }
.ct-stepper input {
  width: 40px; height: 38px; border: 0; padding: 0; text-align: center; font-weight: 600;
  background: transparent; color: var(--ck-ink); outline: 0;
  -moz-appearance: textfield; appearance: textfield;
}
.ct-stepper input::-webkit-outer-spin-button,
.ct-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Secondary button + update row ---------- */
.ct-ghost {
  min-height: 46px; padding: 0 24px; border: 1px solid var(--ck-rose); border-radius: 999px;
  background: #fff; color: var(--ck-action); font-weight: 600; font-size: .92rem;
  transition: background .2s, border-color .2s;
}
.ct-ghost:hover { background: var(--ck-blush); border-color: var(--ck-action); }
.ct-ghost:focus-visible { outline: 3px solid rgba(232, 161, 188, .7); outline-offset: 2px; }

.ct-update-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 20px; border-top: 1px solid var(--ck-line);
}

/* ---------- Summary ---------- */
.ct-summary { padding: 8px 20px 20px; }
@media (min-width: 992px) { .ct-summary { padding: 12px 28px 28px; } }
.ct-sum-title {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 1.1rem; font-weight: 700; margin: 12px 0 16px;
}
.ct-sum-title span { font-size: .82rem; font-weight: 400; color: var(--ck-muted); }
.ct-coupon-box { padding-bottom: 16px; }
.ct-coupon { display: flex; gap: 8px; }
.ct-coupon .form-control { flex: 1; min-width: 0; }
.ct-coupon .ct-ghost { min-height: 50px; }
.ct-coupon-box .ck-note { margin-top: 8px; }

.ct-cta { width: 100%; margin-top: 4px; text-decoration: none; }
a.ck-btn, a.ck-btn:hover { color: #fff; text-decoration: none; }
.ct-login { margin-top: 12px; text-align: center; }
.ct-login a { color: var(--ck-action); }
@media (max-width: 991.98px) { .ct-cta { display: none; } }

/* ---------- Empty state ---------- */
.ct-empty { text-align: center; padding: 64px 16px 24px; }
.ct-empty .bi { font-size: 3rem; color: var(--ck-rose); }
.ct-empty h2 { font-size: 1.25rem; font-weight: 700; margin: 12px 0 6px; }
.ct-empty p { color: var(--ck-muted); margin-bottom: 24px; }
.ct-empty .ck-btn { text-decoration: none; }
