/* ═══════════════════════════════════════════
   Cart / Checkout — modern flow
═══════════════════════════════════════════ */

.cf {
  --cf-blue: #223c78;
  --cf-blue-soft: #eff3fb;
  --cf-bg: #f5f7fb;
  --cf-ink: #111827;
  --cf-mute: #6b7280;
  --cf-line: #e8edf5;
  --cf-radius: 18px;
  --cf-shadow: 0 8px 28px rgba(15, 23, 42, 0.07);
  background: var(--cf-bg);
  padding: 1.25rem 0 3.5rem;
  min-height: 55vh;
}

.cf .tl-container,
.cf .container-wide {
  width: min(1100px, calc(100% - 2rem));
  margin-inline: auto;
}

.cf__steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.cf__step {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--cf-line);
  color: var(--cf-mute);
  font-size: 0.82rem;
  font-weight: 700;
}

.cf__step.is-active {
  background: var(--cf-blue);
  border-color: var(--cf-blue);
  color: #fff;
}

.cf__step.is-done {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.cf__step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  background: rgba(0,0,0,0.06);
}

.cf__step.is-active .cf__step-num {
  background: rgba(255,255,255,0.2);
}

.cf__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.cf__head h1 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.cf__head p {
  margin: 0.35rem 0 0;
  color: var(--cf-mute);
  font-size: 0.9rem;
}

.cf__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 1.15rem;
  align-items: start;
}

.cf__card {
  background: #fff;
  border-radius: var(--cf-radius);
  box-shadow: var(--cf-shadow);
  border: 1px solid #eef2f7;
  padding: 1.15rem 1.2rem 1.25rem;
}

.cf__card h2 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.cf__item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--cf-line);
}

.cf__item:last-child {
  border-bottom: 0;
  padding-bottom: 0.25rem;
}

.cf__item:first-child {
  padding-top: 0.25rem;
}

.cf__item img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--cf-line);
  padding: 0.35rem;
}

.cf__item h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.55;
}

.cf__item h3 a {
  color: var(--cf-ink);
}

.cf__item h3 a:hover {
  color: var(--cf-blue);
  opacity: 1;
}

.cf__meta {
  color: var(--cf-mute);
  font-size: 0.82rem;
  margin-bottom: 0.55rem;
}

.cf__item-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
}

.cf__line-total {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--cf-ink);
  white-space: nowrap;
}

.cf__qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid #e5eaf2;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.cf__qty button {
  width: 36px;
  height: 36px;
  border: 0;
  background: #f4f7fb;
  color: var(--cf-ink);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.cf__qty button:hover {
  background: var(--cf-blue-soft);
  color: var(--cf-blue);
  opacity: 1;
}

.cf__qty input {
  width: 42px;
  height: 36px;
  border: 0;
  text-align: center;
  font: inherit;
  font-weight: 750;
  background: transparent;
  -moz-appearance: textfield;
}

.cf__qty input::-webkit-outer-spin-button,
.cf__qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cf__remove {
  border: 0;
  background: transparent;
  color: #9ca3af;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
  padding: 0;
}

.cf__remove:hover {
  color: #da1e28;
  opacity: 1;
}

.cf__summary {
  position: sticky;
  top: 1rem;
}

.cf__summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  font-size: 0.9rem;
  color: var(--cf-mute);
}

.cf__summary-row.is-total {
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--cf-line);
  color: var(--cf-ink);
  font-weight: 800;
  font-size: 1.05rem;
}

.cf__summary-row.is-total strong {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.cf__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 50px;
  margin-top: 1rem;
  border: 0;
  border-radius: 12px;
  background: var(--cf-blue);
  color: #fff;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s, background 0.25s, box-shadow 0.25s;
  box-shadow: 0 10px 24px rgba(34, 60, 120, 0.25);
}

.cf__cta:hover {
  opacity: 1;
  background: #1a2f5e;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(34, 60, 120, 0.3);
  color: #fff;
}

.cf__cta--ghost {
  background: #fff;
  color: var(--cf-blue);
  border: 1.5px solid #d7e0ef;
  box-shadow: none;
  margin-top: 0.65rem;
}

.cf__cta--ghost:hover {
  background: var(--cf-blue-soft);
  color: var(--cf-blue);
  box-shadow: none;
}

.cf__tips {
  margin-top: 1rem;
  display: grid;
  gap: 0.55rem;
}

.cf__tip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--cf-mute);
  font-weight: 600;
}

.cf__tip i {
  color: #059669;
}

.cf__empty {
  text-align: center;
  padding: 3rem 1.5rem;
  background: #fff;
  border-radius: var(--cf-radius);
  box-shadow: var(--cf-shadow);
}

.cf__empty i {
  font-size: 2.5rem;
  color: #cbd5e1;
}

.cf__empty h2 {
  margin: 0.85rem 0 0.4rem;
  font-size: 1.25rem;
}

.cf__empty p {
  margin: 0 0 1.25rem;
  color: var(--cf-mute);
}

.cf__form {
  display: grid;
  gap: 0.95rem;
}

.cf__field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: #374151;
}

.cf__field .shop-input,
.cf__field input,
.cf__field textarea {
  width: 100%;
  border: 1.5px solid #e5eaf2;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font: inherit;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cf__field .shop-input:focus,
.cf__field input:focus,
.cf__field textarea:focus {
  outline: 0;
  border-color: #93b4e8;
  box-shadow: 0 0 0 3px rgba(34, 60, 120, 0.12);
}

.cf__field .errorlist {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  color: #da1e28;
  font-size: 0.8rem;
}

.cf__mini-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--cf-line);
}

.cf__mini-item:last-of-type {
  border-bottom: 0;
}

.cf__mini-item img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--cf-line);
}

.cf__mini-item h3 {
  margin: 0 0 0.2rem;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.45;
}

.cf__success {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--cf-shadow);
  padding: 2.5rem 1.5rem;
}

.cf__success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ecfdf5;
  color: #059669;
  font-size: 2rem;
  animation: cfPop 0.55s cubic-bezier(.22,1,.36,1) both;
}

.cf__success h1 {
  margin: 0 0 0.65rem;
  font-size: 1.45rem;
}

.cf__success p {
  margin: 0.35rem 0;
  color: var(--cf-mute);
  line-height: 1.75;
}

.cf__success-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

@keyframes cfPop {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 900px) {
  .cf__layout {
    grid-template-columns: 1fr;
  }
  .cf__summary {
    position: static;
  }
  .cf__item {
    grid-template-columns: 72px 1fr;
  }
  .cf__item-side {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
