/* PEPZEST — 购物车整页（双卡片：清单 + 概览）
   配色沿用抽屉：绿 #24bd9c / 深绿 #137a65 / 边 #dfeae8 / 墨 #111416 / 次级 #4d5659 */

/* 页面底色略灰，让白色卡片浮起来 */
body.woocommerce-cart .pz-ibody--white { background: #f7faf9; }

.pz-cp-form { display: block; margin: 0; }

/* ---------- 两列骨架 ---------- */
.pz-cp {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 384px);
  gap: 22px;
  align-items: start;
}
.pz-cp,
.pz-cp * { box-sizing: border-box; }

.pz-cp__card {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--pz-rule, #dfeae8);
  border-radius: 26px;
  padding: clamp(18px, 2.2vw, 26px);
  box-shadow: 0 1px 2px rgba(16, 26, 25, .04), 0 14px 34px rgba(16, 26, 25, .04);
}

.pz-cp__head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.pz-cp__head--summary { justify-content: flex-start; }
.pz-cp__title {
  margin: 0 !important;
  font-size: clamp(19px, 1.6vw, 22px) !important;
  line-height: 1.2;
  font-weight: 700 !important;
  letter-spacing: -.02em;
  color: #111416;
}
.pz-cp__meta { margin: 0; font-size: 13px; color: #6b7775; letter-spacing: .01em; }

/* ---------- 明细行 ---------- */
.pz-cp__list,
.pz-prose .pz-cp__list {
  display: block !important;
  list-style: none !important;
  margin: 16px 0 0 !important;
  padding: 0 !important;
}
.pz-cp__row,
.pz-prose .pz-cp__list > li.pz-cp__row {
  position: static;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 18px 0 !important;
  border-top: 1px solid #edf2f1;
  color: #111416;
}
.pz-prose .pz-cp__list > li.pz-cp__row::before { content: none !important; display: none !important; }

.pz-cp__thumb {
  width: 88px; height: 110px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #e6eeec; border-radius: 14px; background: #f7faf9;
  overflow: hidden;
}
.pz-cp__thumb a { display: block; width: 100%; height: 100%; }
.pz-cp__thumb img { width: 100% !important; height: 100% !important; object-fit: contain !important; margin: 0 !important; display: block; }

.pz-cp__info { min-width: 0; }

.pz-cp__name,
.pz-prose .pz-cp__name {
  display: block;
  font-size: 15.5px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em;
  color: #111416 !important; text-decoration: none !important;
}
.pz-cp__name:hover { color: #137a65 !important; }

.pz-cp__attrs,
.pz-cp__attrs p { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: #4d5659; }
.pz-cp__attrs .variation { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 6px 0 0; font-size: 13px; color: #4d5659; }
.pz-cp__attrs .variation dt { margin: 0; font-weight: 600; color: #6b7775; }
.pz-cp__attrs .variation dd { margin: 0; }
.pz-cp__attrs ul.wc-item-meta { margin: 6px 0 0; padding: 0; list-style: none; font-size: 13px; color: #4d5659; }
.pz-cp__attrs ul.wc-item-meta li { display: flex; gap: 6px; padding: 0; }
.pz-cp__attrs ul.wc-item-meta li::before { content: none; }

.pz-cp__unit { margin-top: 8px; font-size: 13px; color: #4d5659; letter-spacing: .01em; }

.pz-cp__ctl { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- 数量步进 ---------- */
.pz-cp__qty {
  display: inline-flex; align-items: center; height: 38px;
  border: 1px solid #e2ebea; border-radius: 999px; background: #fff;
}
.pz-cp__qty input.qty {
  width: 44px; height: 36px; margin: 0 !important; padding: 0 !important;
  border: 0 !important; background: transparent !important;
  text-align: center; font-size: 14px; font-weight: 600; color: #111416;
  box-shadow: none !important; outline: none;
  -moz-appearance: textfield; appearance: textfield;
}
.pz-cp__qty input.qty::-webkit-outer-spin-button,
.pz-cp__qty input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pz-cp__step {
  width: 34px; height: 36px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: #111416;
  font-size: 16px; line-height: 1; cursor: pointer; border-radius: 999px;
}
.pz-cp__step:hover { color: #137a65; }
.pz-cp__step[disabled] { opacity: .35; cursor: default; }

/* ---------- 移除 ---------- */
.pz-cp__info .product-remove { margin: 0; float: none; }
.pz-cp__remove,
.pz-prose .pz-cp__remove {
  font-size: 12.5px; font-weight: 600; color: #4d5659 !important;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.pz-cp__remove:hover { color: #b3261e !important; }

/* ---------- 行小计 ---------- */
.pz-cp__total {
  font-size: 16.5px; font-weight: 700; line-height: 1.3;
  white-space: nowrap; text-align: right; color: #111416;
}
.pz-cp__total .amount, .pz-cp__total bdi { font-weight: 700; }
.pz-cp__total del { color: #9aa6a4; font-weight: 500; margin-right: 4px; }
.pz-cp__total ins { text-decoration: none; }

/* ---------- 更新购物车 ---------- */
.pz-cp__update {
  margin-top: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 24px;
  border: 1px solid #d9e4e2; border-radius: 999px;
  background: #fff; color: #111416;
  font-size: 13.5px; font-weight: 700; letter-spacing: .01em;
  cursor: pointer; transition: border-color .2s, color .2s, opacity .2s;
}
.pz-cp__update:hover { border-color: #b9cdc9; color: #137a65; }
.pz-cp__update[disabled] { opacity: .45; cursor: default; }

/* ---------- 概览卡 ---------- */
.pz-cp__coupon { display: flex; gap: 8px; margin-top: 16px; }
.pz-cp__couponInput {
  flex: 1 1 auto; min-width: 0; height: 44px;
  padding: 0 16px !important; margin: 0 !important;
  border: 1px solid #e2ebea !important; border-radius: 999px;
  background: #fff; font-size: 13.5px; color: #111416; outline: none;
}
.pz-cp__couponInput:focus { border-color: #24bd9c !important; }
.pz-cp__couponBtn {
  flex: 0 0 auto; height: 44px; padding: 0 20px;
  border: 0; border-radius: 999px; background: #137a65; color: #fff;
  font-size: 13px; font-weight: 700; cursor: pointer; transition: background .2s;
}
.pz-cp__couponBtn:hover { background: #0f6b57; }

.pz-cp__coupons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pz-cp__chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  background: #eaf6f2; color: #137a65; font-size: 12px; font-weight: 600;
}
.pz-cp__chip .woocommerce-remove-coupon {
  color: inherit !important; font-size: 14px; line-height: 1; text-decoration: none !important;
}
.pz-cp__chip .woocommerce-remove-coupon:hover { color: #b3261e !important; }

.pz-cp__subtotal {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin: 18px 0; padding-top: 16px; border-top: 1px solid #edf2f1;
  font-size: 16.5px; font-weight: 700; color: #111416;
}
.pz-cp__subtotal strong { font-size: 23px; letter-spacing: -.02em; font-weight: 700; }
.pz-cp__subtotal small { font-size: 12.5px; font-weight: 500; color: #6b7775; }

.pz-cp__checkout,
.pz-prose .pz-cp__checkout {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 52px; margin-top: 4px;
  border-radius: 999px; background: #24bd9c; color: #fff !important;
  font-size: 15px; font-weight: 700; letter-spacing: .01em; text-decoration: none !important;
  box-shadow: 0 8px 18px rgba(36, 189, 156, .22);
  transition: background .2s, box-shadow .2s;
}
.pz-cp__checkout:hover { background: #1fa98b; color: #fff !important; box-shadow: 0 10px 22px rgba(36, 189, 156, .28); }

.pz-cp__continue,
.pz-prose .pz-cp__continue {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 48px; margin-top: 10px;
  border: 1px solid #d9e4e2; border-radius: 999px; background: #fff;
  color: #111416 !important; font-size: 13.5px; font-weight: 700; text-decoration: none !important;
  transition: border-color .2s, color .2s;
}
.pz-cp__continue:hover { border-color: #b9cdc9; color: #137a65 !important; }

.pz-cp__note { margin: 12px 0 0; font-size: 12.5px; line-height: 1.5; color: #6b7775; text-align: center; }

/* ---------- 空购物车 ---------- */
.pz-cp-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: clamp(36px, 6vw, 72px) 20px; text-align: center;
  background: #fff; border: 1px solid var(--pz-rule, #dfeae8); border-radius: 26px;
}
.pz-cp-empty h2 { margin: 0; font-size: clamp(20px, 2vw, 24px); font-weight: 700; letter-spacing: -.02em; color: #111416; }
.pz-cp-empty p { margin: 0; font-size: 14px; color: #4d5659; }
.pz-cp-empty__btn,
.pz-prose .pz-cp-empty__btn {
  margin-top: 10px; display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 26px; border-radius: 999px;
  background: #24bd9c; color: #fff !important; font-size: 14px; font-weight: 700; text-decoration: none !important;
  box-shadow: 0 8px 18px rgba(36, 189, 156, .22);
}
.pz-cp-empty__btn:hover { background: #1fa98b; }

/* ---------- Woo 默认空车（[woocommerce_cart] 空车时不走主题模板） ---------- */
/* 购物车页不用 .pz-prose 的 grid 间距，避免卡片被额外撑开 */
body.woocommerce-cart .pz-legal__doc.pz-prose { display: block; }
body.woocommerce-cart .wc-empty-cart-message {
  margin: 0; padding: clamp(34px, 6vw, 64px) 20px 26px;
  border: 1px solid var(--pz-rule, #dfeae8); border-bottom: 0;
  border-radius: 26px 26px 0 0; background: #fff; text-align: center;
}
body.woocommerce-cart .cart-empty,
body.woocommerce-cart .woocommerce-info.cart-empty {
  display: block; margin: 0; padding: 0;
  border: 0; border-radius: 0; background: transparent;
  text-align: center; color: #111416; font-size: 17px; font-weight: 600;
}
body.woocommerce-cart .woocommerce-info.cart-empty::before { display: none; }
body.woocommerce-cart .return-to-shop {
  margin: 0; padding: 0 20px clamp(30px, 5vw, 52px);
  border: 1px solid var(--pz-rule, #dfeae8); border-top: 0;
  border-radius: 0 0 26px 26px; background: #fff; text-align: center;
}
body.woocommerce-cart .return-to-shop .button,
body.woocommerce-cart .return-to-shop a.button {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 26px; border-radius: 999px;
  background: #24bd9c; color: #fff !important; font-size: 14px; font-weight: 700;
  text-decoration: none; box-shadow: 0 8px 18px rgba(36, 189, 156, .22);
}
body.woocommerce-cart .return-to-shop .button:hover { background: #1fa98b; color: #fff !important; }

/* ---------- 提示消息 ---------- */
body.woocommerce-cart .woocommerce-notices-wrapper { margin: 0 0 18px; }
body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .woocommerce-error {
  list-style: none; margin: 0 0 10px; padding: 14px 18px;
  border: 0; border-radius: 14px; background: #eaf6f2; color: #137a65;
  font-size: 13.5px; line-height: 1.5;
}
body.woocommerce-cart .woocommerce-error { background: #fdeceb; color: #b3261e; }
.pz-prose .woocommerce-error li { padding-left: 0 !important; color: inherit; }
.pz-prose .woocommerce-error li::before { content: none !important; }

/* ---------- 屏幕阅读器专用标题 ---------- */
.pz-cp-sr {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Also available ---------- */
.pz-also { margin-top: clamp(30px, 3.6vw, 46px); }
.pz-also__head { margin: 0 0 16px; }
.pz-also__title {
  display: inline-block;
  margin: 0 !important;
  font-size: 16.5px !important; font-weight: 700 !important;
  letter-spacing: -.01em; color: #1a7f9c;
}
.pz-also__title::after {
  content: ""; display: block; width: 74px; height: 3px; border-radius: 2px;
  margin-top: 8px; background: linear-gradient(90deg, #24bd9c, #39a7c4);
}

.pz-also__grid,
.pz-prose .pz-also__grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0 !important; padding: 0 !important;
  list-style: none !important;
}
.pz-also__item,
.pz-prose .pz-also__grid > li.pz-also__item {
  display: flex; gap: 14px; align-items: stretch;
  padding: 16px !important;
  border: 1px solid #e6eeec; border-radius: 14px; background: #fff;
  min-width: 0;
}
.pz-prose .pz-also__grid > li.pz-also__item::before { content: none !important; display: none !important; }

.pz-also__shot {
  flex: 0 0 56px; width: 56px; height: 74px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #eef3f2; border-radius: 8px; background: #f9fcfb;
  overflow: hidden;
}
.pz-also__shot img { width: 100% !important; height: 100% !important; object-fit: contain !important; margin: 0 !important; display: block; }

.pz-also__body { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.pz-also__name,
.pz-prose .pz-also__name {
  display: block; font-size: 15px; font-weight: 700; line-height: 1.3;
  color: #111416 !important; text-decoration: none !important;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.pz-also__name:hover { color: #137a65 !important; }
.pz-also__size { margin-top: 5px; font-size: 13px; color: #4d5659; letter-spacing: .01em; }

.pz-also__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; }
.pz-also__price { font-size: 15px; font-weight: 700; color: #111416; white-space: nowrap; }
.pz-also__add,
.pz-prose .pz-also__add {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 18px;
  border: 1px solid #cfe0dc; border-radius: 999px; background: #fff;
  color: #111416 !important; font-size: 13px; font-weight: 700; text-decoration: none !important;
  transition: border-color .2s, color .2s, background .2s;
}
.pz-also__add:hover { border-color: #24bd9c; color: #137a65 !important; background: #f4fbf9; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .pz-cp { grid-template-columns: minmax(0, 1fr); }
  .pz-also__grid, .pz-prose .pz-also__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .pz-cp__card { border-radius: 20px; padding: 18px; }
  .pz-cp__row, .pz-prose .pz-cp__list > li.pz-cp__row { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
  .pz-cp__thumb { width: 72px; height: 92px; }
  .pz-cp__total { grid-column: 2; justify-self: end; margin-top: -6px; font-size: 15.5px; }
  .pz-cp__name { font-size: 15px; }
}
@media (max-width: 560px) {
  .pz-also__grid, .pz-prose .pz-also__grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .pz-also__shot { flex-basis: 52px; width: 52px; height: 68px; }
}
