/* 购物车 — 与 Figma / 商品目录 / 结账流同色系 */

.page-shop-cart {
  --cart-bg: #faf8f5;
  --cart-ink: #2c231a;
  --cart-ink-soft: #4a3f35;
  --cart-muted: #8b7355;
  --cart-line: rgba(212, 196, 176, 0.35);
  --cart-card: #fff;
  --cart-chip: #f3ede4;
  --cart-field: #faf8f5;
  background: var(--cart-bg);
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", sans-serif;
  color: var(--cart-ink);
  overflow-x: hidden;
}

.page-shop-cart .cart-shell {
  overflow-x: hidden;
}

.page-shop-cart .cart-main {
  flex: 1;
  padding: 2rem 1.5rem 4rem;
  max-width: 80rem;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.page-shop-cart .cart-hero-title {
  margin: 0 0 0.35rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
}

.page-shop-cart .cart-hero-meta {
  margin: 0 0 2.5rem;
  font-size: 1rem;
  color: var(--cart-muted);
}

.page-shop-cart .cart-msgs {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 2px;
  background: #fff8e6;
  border: 1px solid #f0e0c0;
  color: var(--cart-ink-soft);
  font-size: 0.9rem;
}

.page-shop-cart .cart-msgs ul {
  margin: 0;
  padding-left: 1.25rem;
}

.page-shop-cart .cart-layout {
  display: grid;
  gap: 2.5rem 3rem;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 1024px) {
  .page-shop-cart .cart-layout {
    grid-template-columns: 1fr minmax(17rem, 22rem);
  }

  .page-shop-cart .cart-summary {
    position: sticky;
    top: 5.5rem;
  }
}

.page-shop-cart .cart-lines {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.page-shop-cart .cart-line {
  background: var(--cart-card);
  border: 1px solid var(--cart-line);
  border-radius: 2px;
  padding: 1.5rem;
}

.page-shop-cart .cart-line__inner {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.page-shop-cart .cart-line__thumb {
  width: 6rem;
  height: 6rem;
  flex-shrink: 0;
  border-radius: 2px;
  overflow: hidden;
  background: #e8dfd6;
}

.page-shop-cart .cart-line__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-shop-cart .cart-line__body {
  flex: 1;
  min-width: 0;
}

.page-shop-cart .cart-line__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.page-shop-cart .cart-line__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  color: var(--cart-muted);
}

.page-shop-cart .cart-line__title {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.page-shop-cart .cart-line__title a {
  color: inherit;
  text-decoration: none;
}

.page-shop-cart .cart-line__title a:hover {
  text-decoration: underline;
}

.page-shop-cart .cart-line__meta {
  margin: 0;
  font-size: 0.875rem;
  color: var(--cart-ink-soft);
  line-height: 1.45;
}

.page-shop-cart .cart-line__meta small {
  display: block;
  margin-top: 0.2rem;
  color: var(--cart-muted);
  font-size: 0.8rem;
}

.page-shop-cart .cart-line__remove {
  flex-shrink: 0;
  appearance: none;
  border: none;
  background: transparent;
  padding: 0.35rem;
  cursor: pointer;
  color: var(--cart-muted);
  border-radius: 2px;
  line-height: 0;
  transition: color 0.15s, background 0.15s;
}

.page-shop-cart .cart-line__remove:hover {
  color: var(--cart-ink);
  background: var(--cart-chip);
}

.page-shop-cart .cart-line__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
}

.page-shop-cart .cart-qty {
  display: inline-flex;
  align-items: stretch;
  border: 2px solid #d4c4b0;
  border-radius: 2px;
  background: var(--cart-field);
  font-size: 1rem;
  font-weight: 600;
  color: var(--cart-ink);
  overflow: hidden;
}

.page-shop-cart .cart-qty__btn {
  appearance: none;
  border: none;
  margin: 0;
  padding: 0.5rem 0.65rem;
  background: transparent;
  cursor: pointer;
  color: var(--cart-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.page-shop-cart .cart-qty__btn:hover:not(:disabled) {
  background: var(--cart-chip);
}

.page-shop-cart .cart-qty__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-shop-cart .cart-qty__val {
  padding: 0.5rem 0.75rem;
  min-width: 2.25rem;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}

.page-shop-cart .cart-qty__cap {
  margin-left: 0.75rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--cart-muted);
}

.page-shop-cart .cart-line__price {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--cart-ink);
}

.page-shop-cart .cart-summary {
  background: var(--cart-card);
  border: 1px solid var(--cart-line);
  border-radius: 2px;
  padding: 2rem;
}

.page-shop-cart .cart-summary__title {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.page-shop-cart .cart-summary__rows {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--cart-line);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.page-shop-cart .cart-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  color: var(--cart-ink-soft);
}

.page-shop-cart .cart-summary__row strong {
  color: var(--cart-ink);
  font-weight: 600;
}

.page-shop-cart .cart-summary__hint {
  margin: 0;
  padding: 0.75rem;
  background: var(--cart-chip);
  border-radius: 2px;
  font-size: 0.875rem;
  color: var(--cart-muted);
  line-height: 1.45;
}

.page-shop-cart .cart-summary__hint--nowrap {
  white-space: nowrap;
  font-size: clamp(0.66rem, 2.35vw, 0.875rem);
  line-height: 1.2;
  word-break: keep-all;
  overflow-wrap: normal;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.page-shop-cart .cart-summary__grand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.page-shop-cart .cart-summary__grand-label {
  font-size: 1.125rem;
  font-weight: 600;
}

.page-shop-cart .cart-summary__grand-val {
  font-size: 1.5rem;
  font-weight: 600;
}

.page-shop-cart .cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  border: none;
  border-radius: 2px;
  background: var(--cart-ink);
  color: var(--cart-bg);
  font: inherit;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

.page-shop-cart .cart-btn:hover {
  background: #4a3f35;
  color: var(--cart-bg);
}

.page-shop-cart .cart-btn--ghost {
  background: transparent;
  color: var(--cart-ink-soft);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0;
  padding: 0.75rem;
}

.page-shop-cart .cart-btn--ghost:hover {
  color: var(--cart-ink);
  background: transparent;
}

.page-shop-cart .cart-perks {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--cart-line);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--cart-muted);
}

.page-shop-cart .cart-perks__row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.page-shop-cart .cart-empty {
  text-align: center;
  padding: 4rem 1rem;
}

.page-shop-cart .cart-empty__icon {
  margin: 0 auto 1.5rem;
  color: #d4c4b0;
  line-height: 0;
}

.page-shop-cart .cart-empty__title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.page-shop-cart .cart-empty__lead {
  margin: 0 0 2rem;
  color: var(--cart-muted);
}

