/**
 * 購物車 — Neway t4（page-cart.php）
 */
.nw-cart, .mldi-cart-page .mcart.nw-cart {
  --nw-max: 1200px;
  max-width: var(--nw-max);
  margin: 0 auto;
  padding: 8px 16px 100px;
  font-family: var(--nw-font, system-ui, Inter, "PingFang TC", "Microsoft JhengHei", "微軟正黑體", "Noto Sans TC", sans-serif);
  color: var(--nw-ink, #181818);
  background: #fff;
}
.nw-cart .mc-crumb, .nw-cart .mc-h1, .nw-cart .mc-steps { display: none; }
.nw-cart-intro { padding: 20px 0 12px; }
.nw-cart-intro-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.nw-cart-sub { margin: 8px 0 0; color: #666; font-size: .95rem; max-width: 36em; }
.nw-cart-count { font-size: .875rem; color: #777; }
.nw-cart-count strong { color: #181818; }

.nw-cart-grid {
  display: grid; gap: 22px;
}
@media (min-width: 960px) {
  .nw-cart-grid { grid-template-columns: 1.6fr 1fr; align-items: start; gap: 28px; }
}

.nw-cart-item {
  display: flex; gap: 14px;
  border: 1px solid rgba(24,24,24,.08);
  border-radius: 1rem;
  background: #fff;
  padding: 14px;
  margin-bottom: 12px;
}
.nw-cart-thumb { flex-shrink: 0; display: block; }
.nw-cart-thumb img, .nw-cart-img {
  width: 112px; height: 112px; object-fit: cover;
  border-radius: 1rem; background: #f3f3f1; display: block;
}
@media (min-width: 640px) {
  .nw-cart-thumb img, .nw-cart-img { width: 128px; height: 128px; }
}
.nw-cart-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nw-cart-brand { margin: 0; font-size: .75rem; font-weight: 600; color: var(--nw-brand-600); letter-spacing: .04em; }
.nw-cart-name { font-size: 1rem; font-weight: 600; color: #181818; text-decoration: none; margin-top: 2px; }
.nw-cart-name:hover { color: var(--nw-brand-700); }
.nw-cart-opts { margin: 4px 0 0; font-size: .75rem; color: #888; }
.nw-cart-row-actions {
  margin-top: auto; padding-top: 12px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
}
.nw-qty-pill {
  display: inline-flex; align-items: center;
  border-radius: 999px; border: 1px solid rgba(24,24,24,.12);
  background: #fafafa; overflow: hidden;
}
.nw-qty-pill .mc-dec, .nw-qty-pill .mc-inc {
  width: 36px; height: 36px; border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center; color: #555;
}
.nw-qty-pill .mc-q {
  width: 36px; border: 0; text-align: center; background: transparent;
  font-weight: 600; font-size: .875rem; -moz-appearance: textfield;
}
.nw-qty-pill .mc-q::-webkit-outer-spin-button,
.nw-qty-pill .mc-q::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.nw-cart-line { display: flex; align-items: center; gap: 8px; }
.nw-cart-sub { font-weight: 600; font-size: 1rem; }
.nw-cart-del {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 999px;
  color: #999; text-decoration: none;
}
.nw-cart-del:hover { background: #f3f3f1; color: #333; }

.mc-update { margin: 8px 0 0; }
.mc-update-btn {
  border: 0; background: transparent; color: #888;
  font-size: .8125rem; text-decoration: underline; cursor: pointer; padding: 4px 0;
}
.mc-form.mc-busy { opacity: .65; pointer-events: none; }

.nw-cart-sum {
  border: 1px solid rgba(24,24,24,.08);
  border-radius: 1rem;
  background: #fff;
  padding: 22px;
  box-shadow: 0 10px 28px rgba(24,24,24,.05);
}
@media (min-width: 960px) {
  .nw-cart-sum { position: sticky; top: 96px; }
}
.nw-cart-sum h2 { margin: 0 0 14px; font-size: 1.125rem; font-weight: 600; }
.nw-ship-progress {
  border: 1px solid rgba(24,24,24,.06);
  background: #fafafa;
  border-radius: .75rem;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.nw-ship-h { display: flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 600; margin-bottom: 8px; }
.nw-ship-h .mc-ico { color: var(--nw-fresh-600, #4A7229); }
.nw-ship-bar { height: 8px; border-radius: 999px; background: #e8e8e8; overflow: hidden; margin-bottom: 8px; }
.nw-ship-bar span { display: block; height: 100%; background: var(--nw-fresh-600, #4A7229); border-radius: 999px; }
.nw-ship-progress p { margin: 0; font-size: .75rem; color: #777; line-height: 1.45; }
.nw-sum-rows { display: grid; gap: 10px; font-size: .9rem; }
.nw-sum-row { display: flex; justify-content: space-between; gap: 12px; color: #555; }
.nw-sum-row span:last-child { font-weight: 500; color: #181818; }
.nw-sum-row .is-free { color: var(--nw-fresh-700, #3A5A21) !important; font-weight: 600; }
.nw-sum-row.is-total {
  border-top: 1px solid rgba(24,24,24,.08);
  padding-top: 12px; margin-top: 4px;
  font-size: 1.05rem; font-weight: 600; color: #181818;
}
.nw-sum-cod {
  margin: 14px 0;
  padding: 10px 12px;
  border-radius: .75rem;
  background: var(--nw-brand-50, #FDF6EF);
  color: var(--nw-brand-800, #633310);
  font-size: .8125rem; line-height: 1.45;
}
.nw-cart-checkout { width: 100%; margin-bottom: 10px; }
.nw-cart-cont { width: 100%; }

.nw-cart-mbar, .mc-mbar.nw-cart-mbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: none;
  align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96);
  border-top: 1px solid rgba(24,24,24,.08);
  backdrop-filter: blur(10px);
}
.nw-cart-mbar .t { font-size: .9rem; }
.nw-cart-mbar .t strong { font-size: 1.1rem; }
.nw-cart-mbar .s { display: block; font-size: .7rem; color: #888; }
@media (max-width: 959px) {
  body.mldi-cart-has-items .nw-cart-mbar { display: flex; }
  body.mldi-cart-has-items .nw-cart { padding-bottom: 96px; }
}

.nw-cart-empty { margin-top: 12px; }
.nw-cart-empty-extra {
  display: grid; gap: 12px; margin-top: 22px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .nw-cart-empty-extra { grid-template-columns: 1fr 1fr; }
}
