/* ============================================================
   ywy 购物车商品列表页样式（qkidc 风格，全本地化）
   仅作用于 ywy 商品列表页，配置与结算页继续使用父主题
   ============================================================ */
.ywy-cart {
  --ywy-navy: #13233d;
  --ywy-blue: #006eff;
  --ywy-ink: #1d2b3a;
  --ywy-muted: #43566b;
  --ywy-line: #dce5ef;
  --ywy-surface: #f4f7fb;
  --ywy-radius: 4px;
  --ywy-radius-control: 3px;
  background: var(--ywy-surface);
  color: var(--ywy-ink);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Noto Sans CJK SC", Arial, sans-serif;
  -webkit-font-smoothing: auto;
}
.ywy-cart *,
.ywy-cart *::before,
.ywy-cart *::after {
  box-sizing: border-box;
}
.ywy-cart a,
.ywy-cart a:hover,
.ywy-cart a:focus-visible {
  text-decoration: none;
}
.ywy-cart a:focus-visible,
.ywy-cart button:focus-visible {
  outline: 3px solid #20a6af;
  outline-offset: 3px;
}
.ywy-cart-container {
  width: min(100% - 48px, 1360px);
  margin-inline: auto;
}

/* 概览头 */
.ywy-cart-overview {
  background: linear-gradient(112deg, #13233d, #1b3d6a);
  color: #fff;
}
.ywy-cart-overview {
  position: relative;
  overflow: hidden;
}
.ywy-cart-overview::before {
  content: "";
  position: absolute;
  right: -140px;
  top: -180px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(0 110 255 / 32%) 0%, transparent 68%);
}
.ywy-cart-overview::after {
  content: "";
  position: absolute;
  right: 120px;
  bottom: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 12%);
  box-shadow: inset 0 0 0 40px rgb(255 255 255 / 3%);
}
.ywy-cart-overview-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 226px;
  padding-block: 44px;
}
.ywy-cart-overview-copy {
  min-width: 0;
}
.ywy-cart-eyebrow {
  margin: 0 0 8px;
  color: #b7d4fb;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.ywy-cart-overview h1 {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .01em;
}
.ywy-cart-overview-copy > p:last-child {
  max-width: 680px;
  margin: 0;
  color: #e0eafa;
  font-size: 14px;
  line-height: 1.7;
}

/* 筛选区 */
.ywy-cart-content {
  padding-block: 28px 76px;
}
.ywy-cart-filters {
  margin-top: -34px;
  position: relative;
  z-index: 2;
  padding: 6px 24px;
  border: 1px solid var(--ywy-line);
  border-radius: var(--ywy-radius);
  background: #fff;
  box-shadow: 0 10px 30px rgb(16 42 72 / 7%);
}
.ywy-cart-filter-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding-block: 14px;
}
.ywy-cart-filter-row + .ywy-cart-filter-row {
  border-top: 1px solid #edf1f6;
}
.ywy-cart-filter-label {
  flex: none;
  width: 68px;
  padding-top: 9px;
  color: var(--ywy-navy);
  font-size: 13px;
  font-weight: 700;
}
.ywy-cart-tabs,
.ywy-cart-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ywy-cart-tabs a,
.ywy-cart-chips a {
  display: block;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: var(--ywy-radius-control);
  color: var(--ywy-ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
  transition: background 0.15s, color 0.15s;
}
.ywy-cart-tabs a:hover,
.ywy-cart-chips a:hover {
  background: #f0f6ff;
  color: var(--ywy-blue);
}
.ywy-cart-tabs a[aria-current="page"] {
  background: var(--ywy-blue);
  color: #fff;
  font-weight: 600;
}
.ywy-cart-chips a[aria-current="page"] {
  border-color: var(--ywy-blue);
  background: #eaf3ff;
  color: var(--ywy-blue);
  font-weight: 600;
}
.ywy-cart-results-notes {
  margin-top: 2px;
}
.ywy-cart-results-note {
  margin: 0;
  padding-block: 12px;
  color: var(--ywy-muted);
  font-size: 13px;
  line-height: 1.7;
}

/* 商品网格 */
.ywy-cart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 26px;
}
.ywy-cart-product {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--ywy-line);
  border-radius: var(--ywy-radius);
  background: #fff;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.ywy-cart-product:hover {
  transform: translateY(-4px);
  border-color: rgb(0 110 255 / 45%);
  box-shadow: 0 12px 28px rgb(16 42 72 / 12%);
}
.ywy-cart-product::after {
  content: "↗";
  position: absolute;
  right: 18px;
  top: 20px;
  color: var(--ywy-blue);
  font-size: 15px;
  opacity: 0;
  transition: opacity .2s, transform .2s;
}
.ywy-cart-product:hover::after {
  opacity: 1;
  transform: translate(2px, -2px);
}
.ywy-cart-product h3 {
  margin: 0;
  color: var(--ywy-navy);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
}
.ywy-cart-description {
  margin-top: 10px;
  color: var(--ywy-muted);
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.ywy-cart-description .specs-item {
  display: block;
}
.ywy-cart-description strong {
  color: var(--ywy-ink);
}
.ywy-cart-card-foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
}
.ywy-cart-stock {
  align-self: flex-start;
  padding: 1px 8px;
  border-radius: 3px;
  background: #f0f3f7;
  color: var(--ywy-muted);
  font-size: 12px;
}
.ywy-cart-price {
  color: var(--ywy-blue);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}
.ywy-cart-price span {
  font-size: 15px;
  font-weight: 600;
}
.ywy-cart-price small {
  color: var(--ywy-muted);
  font-size: 12px;
  font-weight: 400;
}
.ywy-cart-original {
  color: #9aa9ba;
  font-size: 12px;
  text-decoration: line-through;
}
.ywy-cart-trial {
  color: #20a6af;
  font-size: 12.5px;
}
.ywy-cart-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: var(--ywy-radius-control);
  background: var(--ywy-blue);
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
}
.ywy-cart-buy:hover {
  background: #005bd4;
  color: #fff !important;
}
.ywy-cart-soldout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: var(--ywy-radius-control);
  background: #f0f3f7;
  color: #9aa9ba;
  font-size: 14px;
  font-weight: 600;
}

/* 分页 */
.ywy-cart-pagination {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}
.ywy-cart-pagination ul {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}
.ywy-cart-pagination li a,
.ywy-cart-pagination li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--ywy-line);
  border-radius: var(--ywy-radius-control);
  background: #fff;
  color: var(--ywy-ink);
  font-size: 13px;
}
.ywy-cart-pagination li.active span,
.ywy-cart-pagination li a:hover {
  border-color: var(--ywy-blue);
  color: var(--ywy-blue);
}
.ywy-cart-pagination li.active span {
  background: var(--ywy-blue);
  color: #fff;
}
.ywy-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 26px;
  padding: 60px 24px;
  border: 1px dashed var(--ywy-line);
  border-radius: var(--ywy-radius);
  background: #fff;
  color: var(--ywy-muted);
  text-align: center;
}
.ywy-cart-empty svg {
  width: 52px;
  height: 52px;
  margin-bottom: 8px;
  color: #b9c8d9;
}
.ywy-cart-empty h3 {
  margin: 0;
  color: var(--ywy-navy);
  font-size: 17px;
  font-weight: 700;
}
.ywy-cart-empty p {
  margin: 0;
  font-size: 13.5px;
}
.ywy-cart-empty-actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* 购买须知 */
.ywy-cart-notice {
  position: relative;
  margin-top: 40px;
  padding: 26px 28px 26px 32px;
  border: 1px solid var(--ywy-line);
  border-radius: var(--ywy-radius);
  background: #fff;
  overflow: hidden;
}
.ywy-cart-notice::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #2f8bff, #0052d9);
}
.ywy-cart-notice h2 {
  margin: 0 0 12px;
  color: var(--ywy-navy);
  font-size: 17px;
  font-weight: 700;
}
.ywy-cart-notice {
  color: var(--ywy-muted);
  font-size: 13.5px;
  line-height: 1.85;
}
.ywy-cart-notice p {
  margin: 0 0 8px;
}

/* 响应式 */
@media (max-width: 768px) {
  .ywy-cart-container {
    width: min(100% - 32px, 1360px);
  }
  .ywy-cart-filter-row {
    flex-direction: column;
    gap: 8px;
  }
  .ywy-cart-filter-label {
    width: auto;
    padding-top: 0;
  }
  .ywy-cart-overview-inner {
    min-height: 0;
    padding-block: 40px 26px;
  }
  .ywy-cart-grid {
    grid-template-columns: 1fr;
  }
}
