/* ===== WooCommerce Styles - Rebuilt from transcript ===== */
:root {
  --ds-wc-btn-bg: #0b121c;
  --ds-wc-btn-bg-hover: #151c28;
  --ds-wc-btn-text: #ffffff;
  --ds-wc-btn-radius: 9999px;
  --ds-wc-btn-shadow: rgba(11, 18, 28, 0.28);
}

/*
 * 勿写裸 .container：在 body.woocommerce-page / body.woocommerce-account 等下会变成
 * 「body + 2 个 class」选择器，特异性高于 .site-header .container（仅 2 个 class），
 * 会盖掉顶栏容器上未带 !important 的声明，导致 logo/搜索与站内其它页不一致。
 * 以下仅约束主内容区版心（顶栏内 .container 仍只由 common-header-footer 控制）。
 */
.ds-woo-page-main > .container,
.ds-wc-account-outer-shell > .container.ds-woo-wrap,
header.site-header ~ .container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  box-sizing: border-box;
}
footer .container{
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* ===== WC 页面顶栏：抬一层 body.* 前缀，保证与 common-header-footer 顶栏观感一致（仅 header 内）===== */
body.woocommerce-page .site-header,
body.woocommerce-account .site-header,
body.woocommerce-cart .site-header,
body.woocommerce-checkout .site-header,
body.woocommerce-shop .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 25;
  background: var(--navy, #1b2f57);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.42);
}
body.wp-singular .site-header .container,
body.woocommerce-page .site-header .container,
body.woocommerce-account .site-header .container,
body.woocommerce-cart .site-header .container,
body.woocommerce-checkout .site-header .container,
body.woocommerce-shop .site-header .container {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 20px;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  body.woocommerce-page .site-header .container,
  body.woocommerce-account .site-header .container,
  body.woocommerce-cart .site-header .container,
  body.woocommerce-checkout .site-header .container,
  body.woocommerce-shop .site-header .container {
    padding: 0 12px !important;
  }
}

body.woocommerce-page .site-header .masthead,
body.woocommerce-account .site-header .masthead,
body.woocommerce-cart .site-header .masthead,
body.woocommerce-checkout .site-header .masthead,
body.woocommerce-shop .site-header .masthead {
  border-bottom: 0;
  color: #cfdae9;
  font-size: 14px;
  letter-spacing: 0.4px;
  background: transparent;
  position: relative;
}

body.woocommerce-page .site-header .masthead::before,
body.woocommerce-account .site-header .masthead::before,
body.woocommerce-cart .site-header .masthead::before,
body.woocommerce-checkout .site-header .masthead::before,
body.woocommerce-shop .site-header .masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  background: #002658;
  z-index: 0;
  pointer-events: none;
}

body.woocommerce-page .site-header .masthead > *,
body.woocommerce-account .site-header .masthead > *,
body.woocommerce-cart .site-header .masthead > *,
body.woocommerce-checkout .site-header .masthead > *,
body.woocommerce-shop .site-header .masthead > * {
  position: relative;
  z-index: 1;
}

body.woocommerce-page .site-header .masthead-inner,
body.woocommerce-account .site-header .masthead-inner,
body.woocommerce-cart .site-header .masthead-inner,
body.woocommerce-checkout .site-header .masthead-inner,
body.woocommerce-shop .site-header .masthead-inner {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 6px 0;
}
a { color: inherit; text-decoration: none; }
body.woocommerce-page .site-header .masthead-inner .logo,
body.woocommerce-account .site-header .masthead-inner .logo,
body.woocommerce-cart .site-header .masthead-inner .logo,
body.woocommerce-checkout .site-header .masthead-inner .logo,
body.woocommerce-shop .site-header .masthead-inner .logo {
  flex-shrink: 0;
  padding-left: 0;
}

body.woocommerce-page .site-header .desktop-nav,
body.woocommerce-account .site-header .desktop-nav,
body.woocommerce-cart .site-header .desktop-nav,
body.woocommerce-checkout .site-header .desktop-nav,
body.woocommerce-shop .site-header .desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-left: 0;
  margin-top: 0;
  margin-right: auto;
  padding: 4px 10px;
  min-height: 0;
  border-radius: 14px;
}

body.woocommerce-page .site-header .search,
body.woocommerce-account .site-header .search,
body.woocommerce-cart .site-header .search,
body.woocommerce-checkout .site-header .search,
body.woocommerce-shop .site-header .search {
  width: min(360px, 100%);
  background: rgba(235, 243, 252, 0.14);
  border: 1px solid rgba(182, 205, 228, 0.42);
  border-radius: var(--radius, 14px);
  min-height: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  padding: 0 8px 0 12px;
  gap: 8px;
  color: #d5e2f1;
  font-size: 15px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  flex-shrink: 0;
}

body.woocommerce-page .site-header .search:focus-within,
body.woocommerce-account .site-header .search:focus-within,
body.woocommerce-cart .site-header .search:focus-within,
body.woocommerce-checkout .site-header .search:focus-within,
body.woocommerce-shop .site-header .search:focus-within {
  border-color: #9ec2e2;
  background: rgba(235, 243, 252, 0.2);
  box-shadow: 0 0 0 3px rgba(158, 194, 226, 0.24);
}

body.woocommerce-page .site-header .search > form,
body.woocommerce-account .site-header .search > form,
body.woocommerce-cart .site-header .search > form,
body.woocommerce-checkout .site-header .search > form,
body.woocommerce-shop .site-header .search > form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin: 0;
}

body.woocommerce-page .site-header .search-input,
body.woocommerce-account .site-header .search-input,
body.woocommerce-cart .site-header .search-input,
body.woocommerce-checkout .site-header .search-input,
body.woocommerce-shop .site-header .search-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: #edf4ff;
  font-size: 15px;
  font-family: inherit;
  transition: color 0.2s ease;
  box-shadow: none;
  min-height: 0;
}

body.woocommerce-page .site-header .search .search-input:focus,
body.woocommerce-account .site-header .search .search-input:focus,
body.woocommerce-cart .site-header .search .search-input:focus,
body.woocommerce-checkout .site-header .search .search-input:focus,
body.woocommerce-shop .site-header .search .search-input:focus {
  color: #ffffff;
}

body.woocommerce-page .site-header .search .search-input::placeholder,
body.woocommerce-account .site-header .search .search-input::placeholder,
body.woocommerce-cart .site-header .search .search-input::placeholder,
body.woocommerce-checkout .site-header .search .search-input::placeholder,
body.woocommerce-shop .site-header .search .search-input::placeholder {
  color: #b8c8db;
  opacity: 1;
}

body.woocommerce-page .site-header .search-btn,
body.woocommerce-account .site-header .search-btn,
body.woocommerce-cart .site-header .search-btn,
body.woocommerce-checkout .site-header .search-btn,
body.woocommerce-shop .site-header .search-btn {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #d8e6f5;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

body.woocommerce-page .site-header .search-btn svg,
body.woocommerce-account .site-header .search-btn svg,
body.woocommerce-cart .site-header .search-btn svg,
body.woocommerce-checkout .site-header .search-btn svg,
body.woocommerce-shop .site-header .search-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

@media (max-width: 640px) {
  body.woocommerce-page .site-header .masthead-inner,
  body.woocommerce-account .site-header .masthead-inner,
  body.woocommerce-cart .site-header .masthead-inner,
  body.woocommerce-checkout .site-header .masthead-inner,
  body.woocommerce-shop .site-header .masthead-inner {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
  }

  body.woocommerce-page .site-header .masthead-inner .search,
  body.woocommerce-account .site-header .masthead-inner .search,
  body.woocommerce-cart .site-header .masthead-inner .search,
  body.woocommerce-checkout .site-header .masthead-inner .search,
  body.woocommerce-shop .site-header .masthead-inner .search {
    width: auto;
    max-width: none;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 32px;
    font-size: 14px;
  }

  body.woocommerce-page .site-header .desktop-nav,
  body.woocommerce-account .site-header .desktop-nav,
  body.woocommerce-cart .site-header .desktop-nav,
  body.woocommerce-checkout .site-header .desktop-nav,
  body.woocommerce-shop .site-header .desktop-nav {
    display: none;
  }

  body.woocommerce-page .site-header .menu-toggle,
  body.woocommerce-account .site-header .menu-toggle,
  body.woocommerce-cart .site-header .menu-toggle,
  body.woocommerce-checkout .site-header .menu-toggle,
  body.woocommerce-shop .site-header .menu-toggle {
    display: inline-grid;
    place-items: center;
  }
}

/* ===== 页面布局容器 ===== */
.ds-woo-page-main {
  background: #f8f9fa;
  padding-top: 150px;
  padding-bottom: 40px;
  min-height: calc(100vh - 200px);
}

.ds-woo-page-main .ds-woo-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.ds-woo-page-main .ds-woo-main {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 2rem;
}

/* ===== 面包屑导航样式 ===== */
.woocommerce-breadcrumb {
  background: linear-gradient(135deg, #fff 0%, #fff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: #64748b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  max-width: 100%;
  overflow-x: auto;
  word-wrap: break-word;
}

.woocommerce-breadcrumb a {
  color: #393939;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.woocommerce-breadcrumb a:hover {
  color: #c2410c;
}

.woocommerce-breadcrumb .delimiter {
  margin: 0 0.75rem;
  color: #94a3b8;
}

/* ===== 商品列表网格布局 ===== */
/*
 * 冲突：functions.php 全站加载 Tailwind CDN，其 .columns-4 等工具类会设置 CSS column-count，
 * 与 WooCommerce 在 ul.products / .woocommerce 上的 columns-* 类名同名，导致列表变成极窄竖条（非 grid）。
 * 另：主题已禁用 woocommerce-layout.css，需在此显式覆盖 float/width 并重置 columns。
 */
.woocommerce:is([class*="columns-"]),
.woocommerce ul.products:is([class*="columns-"]),
ul.products[class*="columns-"] {
  columns: auto !important;
  column-count: auto !important;
  -webkit-column-count: auto !important;
  column-width: auto !important;
  column-gap: normal !important;
}

ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1.5rem !important;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  clear: both;
  float: none !important;
}

ul.products.columns-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
}

ul.products.columns-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

ul.products.columns-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

ul.products.columns-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

ul.products.columns-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

ul.products li.product {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  width: auto !important;
  max-width: none !important;
  float: none !important;
  clear: none !important;
  margin: 0 !important;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

ul.products li.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* ===== 商品列表图：完整按比例缩放（contain，不裁切） ===== */
ul.products li.product a.woocommerce-LoopProduct-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
}

ul.products li.product .woocommerce-product-gallery__image,
ul.products li.product .product-image,
ul.products li.product a img,
ul.products li.product img,
body.woocommerce ul.products li.product img,
body.woocommerce-page ul.products li.product img {
  width: 100%;
  height: 320px;
  object-fit: contain !important;
  object-position: center;
  background: #f8fafc;
  border-radius: 8px 8px 0 0;
  transition: opacity 0.3s ease;
}

ul.products li.product:hover img {
  opacity: 0.95;
}

/* ===== 商品标题 ===== */
ul.products li.product .woocommerce-loop-product__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1rem 1.25rem 0.35rem;
  color: #1a1a2e;
  padding: 0;
  line-height: 1.4;
  transition: color 0.2s ease;
}

ul.products li.product:hover .woocommerce-loop-product__title {
  color: #ea580c;
}

/* ===== 商品简短描述 ===== */
ul.products li.product .product-short-description {
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.6;
  margin: 0.35rem 1.25rem 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 2.7em;
}

/* ===== 促销标签 ===== */
ul.products li.product span.onsale {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: #e63946;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.3);
  z-index: 10;
}

/* ===== 价格样式（红色醒目；仅在空格/标点处换行，禁止逐字拆开） ===== */
ul.products li.product .price {
  color: #dc2626;
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.35;
}

ul.products li.product .price del {
  opacity: 0.5;
  font-size: 0.85rem;
  color: #9ca3af;
  text-decoration: line-through;
}

ul.products li.product .price ins {
  text-decoration: none;
  color: #dc2626;
}

/* ===== 商品卡片底部区域（宽屏左右排布；窄卡纵向排列避免价格被挤成一字宽） ===== */
ul.products li.product .product-card-footer {
  padding: 0.65rem 1.1rem 1.1rem;
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
}

/* 仅四列大屏：价与按钮并排（≤1200px 已为 3/2 列，卡片窄，改纵向排列） */
@media (min-width: 1201px) {
  ul.products li.product .product-card-footer .price {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 8rem);
  }
}

/* ≤1200px：价格占满一行再排按钮，避免剩余宽度过小触发怪异换行 */
@media (max-width: 1200px) {
  ul.products li.product .product-card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  ul.products li.product .product-card-footer .price {
    flex: none;
    max-width: none;
    width: 100%;
  }

  ul.products li.product .product-card-footer .product-view-details {
    align-self: flex-end;
  }
}

/* ===== 查看详情按钮 ===== */
ul.products li.product .product-view-details {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--ds-wc-btn-radius);
  border: none;
  background: var(--ds-wc-btn-bg);
  color: var(--ds-wc-btn-text);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

ul.products li.product .product-view-details:hover {
  background: var(--ds-wc-btn-bg-hover);
  color: var(--ds-wc-btn-text);
}

/* ===== 强制隐藏所有默认购物车按钮 ===== */
ul.products li.product .button.add_to_cart_button,
ul.products li.product .add_to_cart_button,
ul.products li.product .button.added_to_cart.wc-forward,
ul.products li.product .added_to_cart.wc-forward,
ul.products li.product .button.product_type_simple,
ul.products li.product .button.product_type_variable,
ul.products li.product .button.product_type_external,
ul.products li.product .button.product_type_grouped {
  display: none !important;
}

/* 确保自定义查看详情按钮显示 */
ul.products li.product a.product-view-details,
ul.products li.product .product-view-details {
  display: inline-flex !important;
}

/* ===== 响应式布局 ===== */
/* 平板设备 - 3列 */
@media (max-width: 1200px) {
  ul.products {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  ul.products li.product img {
    height: 300px;
  }
}

/* 平板设备 - 3列 */
@media (max-width: 900px) {
  ul.products {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  ul.products li.product img {
    height: 280px;
  }
}

/* 移动端 - 2列 */
@media (max-width: 768px) {
  ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }

  ul.products li.product img {
    height: 240px;
  }

  ul.products li.product .woocommerce-loop-product__title {
    font-size: 0.95rem;
    margin: 0.75rem 0.75rem 0.35rem;
  }

  ul.products li.product .product-short-description {
    font-size: 0.72rem;
    margin: 0 0.75rem 0.5rem;
  }

  ul.products li.product .price {
    font-size: 0.85rem;
  }

  ul.products li.product .product-card-footer {
    padding: 0 0.65rem 0.65rem;
  }

  ul.products li.product .product-view-details {
    padding: 0.32rem 0.65rem;
    font-size: 0.7rem;
  }

  ul.products li.product span.onsale {
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
  }

  .ds-woo-page-main {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .ds-woo-page-main .ds-woo-main {
    padding: 1rem;
  }
}

/* 小屏幕移动端 */
@media (max-width: 480px) {
  ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  ul.products li.product img {
    height: 180px;
  }

  ul.products li.product .woocommerce-loop-product__title {
    font-size: 0.85rem;
  }

  ul.products li.product .product-view-details {
    font-size: 0.65rem;
    padding: 0.28rem 0.45rem;
  }

  ul.products li.product .price {
    font-size: 0.8rem;
  }
}

/* ===== 个人中心：浅底 + 白卡片 + 品牌橙强调 ===== */
body.woocommerce-account,
body:has(nav.woocommerce-MyAccount-navigation) {
  --ds-account-accent: #ea580c;
  --ds-account-accent-hover: #c2410c;
  --ds-account-accent-deep: #9a3412;
  --ds-account-text: #2a3242;
  --ds-account-muted: #5c6578;
  --ds-account-card-border: #e2e8f0;
  --ds-account-card-shadow: 0 5px 18px rgba(15, 23, 42, 0.06);
  --ds-account-active-gradient: linear-gradient(to right, #ffedd5 0%, #ffffff 72%);
  /* 与 .ds-woo-wrap 版心配合：侧栏固定宽，右侧为剩余宽度（对齐面包屑/导航内容宽度） */
  --ds-account-sidebar-w: 280px;
  --ds-account-row-gap: 28px;
  --ds-account-required: #dc2626;
}

body.woocommerce-account .ds-woo-page-main,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-page-main {
  background: var(--ds-account-bg) !important;
}

/* 去掉外层大白底，让左右两张卡片浮在米色背景上 */
body.woocommerce-account .ds-woo-page-main > .ds-woo-wrap > .ds-woo-main,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-page-main > .ds-woo-wrap > .ds-woo-main {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

/* 短代码外壳：仅作 flex 容器，不要再套一层白底 */
body.woocommerce-account .ds-wc-account-outer-shell,
body:has(nav.woocommerce-MyAccount-navigation) .ds-wc-account-outer-shell {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
}

body.woocommerce-account .woocommerce,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce,
body.woocommerce-account .ds-woo-page-main .ds-woo-main .woocommerce,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-page-main .ds-woo-main .woocommerce {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  gap: var(--ds-account-row-gap, 28px) !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body.woocommerce-account .ds-wc-account-inner-flex,
body:has(nav.woocommerce-MyAccount-navigation) .ds-wc-account-inner-flex {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  gap: var(--ds-account-row-gap, 28px) !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-navigation,
body.woocommerce-account .ds-wc-account-inner-flex > .woocommerce-MyAccount-navigation,
body:has(nav.woocommerce-MyAccount-navigation) .ds-wc-account-inner-flex > .woocommerce-MyAccount-navigation {
  flex: 0 0 var(--ds-account-sidebar-w, 280px) !important;
  flex-shrink: 0 !important;
  width: var(--ds-account-sidebar-w, 280px) !important;
  max-width: var(--ds-account-sidebar-w, 280px) !important;
  position: sticky !important;
  top: 100px !important;
  align-self: flex-start !important;
  background: #ffffff !important;
  border: 1px solid var(--ds-account-card-border) !important;
  border-radius: 10px !important;
  box-shadow: var(--ds-account-card-shadow) !important;
  padding: 0 !important;
  overflow: hidden;
}

body.woocommerce-account .woocommerce-MyAccount-content,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content,
body.woocommerce-account .ds-wc-account-inner-flex > .woocommerce-MyAccount-content,
body:has(nav.woocommerce-MyAccount-navigation) .ds-wc-account-inner-flex > .woocommerce-MyAccount-content {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  width: auto !important;
  background: #ffffff !important;
  border: 1px solid var(--ds-account-card-border) !important;
  border-radius: 10px !important;
  box-shadow: var(--ds-account-card-shadow) !important;
  padding: 2rem 2.25rem !important;
  color: var(--ds-account-text);
  line-height: 1.65;
}

body.woocommerce-account .woocommerce-MyAccount-content a,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content a {
  color: var(--ds-account-accent);
  text-decoration: none;
  font-weight: 500;
}

body.woocommerce-account .woocommerce-MyAccount-content a:hover,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content a:hover {
  color: var(--ds-account-accent-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-navigation ul li {
  margin: 0;
  border-bottom: 1px solid var(--ds-account-card-border);
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li:last-child,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-navigation ul li:last-child {
  border-bottom: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li a,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-navigation ul li a {
  display: block;
  padding: 0.95rem 1.15rem 0.95rem 1.25rem;
  color: var(--ds-account-text);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-navigation ul li a:hover {
  color: var(--ds-account-accent-deep);
  background: rgba(251, 146, 60, 0.18);
}

/* 当前页：左侧色条 + 浅橙渐变底 + 导航同色字 */
body.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-navigation ul li.is-active {
  border-left: 4px solid var(--ds-account-accent);
  margin-left: 0;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-navigation ul li.is-active a {
  color: var(--ds-account-accent-deep) !important;
  font-weight: 600;
  background: var(--ds-account-active-gradient);
  padding-left: calc(1.25rem - 4px);
}

/* 注销：与主导航强调一致 */
body.woocommerce-account .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout a,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout a {
  color: var(--ds-account-accent-deep) !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout.is-active a,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout.is-active a {
  color: var(--ds-account-accent-deep) !important;
}

body.woocommerce-account .woocommerce-MyAccount-content p,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content p {
  color: var(--ds-account-text);
}

body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-notices-wrapper + *,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .woocommerce-notices-wrapper + * {
  margin-top: 0;
}

/* PC：账户双栏占满版心宽度，右侧为「版心内剩余固定宽度」 */
@media (min-width: 769px) {
  body.woocommerce-account .ds-woo-page-main .ds-woo-wrap,
  body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-page-main .ds-woo-wrap {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
  }

  body.woocommerce-account .ds-woo-page-main .ds-woo-main,
  body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-page-main .ds-woo-main,
  body.woocommerce-account .ds-woo-page-main > .ds-woo-wrap > .ds-woo-main,
  body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-page-main > .ds-woo-wrap > .ds-woo-main {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  body.woocommerce-account .woocommerce,
  body:has(nav.woocommerce-MyAccount-navigation) .woocommerce,
  body.woocommerce-account .ds-woo-page-main .ds-woo-main .woocommerce,
  body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-page-main .ds-woo-main .woocommerce,
  body.woocommerce-account .ds-wc-account-inner-flex,
  body:has(nav.woocommerce-MyAccount-navigation) .ds-wc-account-inner-flex {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
  }

  body.woocommerce-account .woocommerce-MyAccount-navigation,
  body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-navigation,
  body.woocommerce-account .ds-wc-account-inner-flex > .woocommerce-MyAccount-navigation,
  body:has(nav.woocommerce-MyAccount-navigation) .ds-wc-account-inner-flex > .woocommerce-MyAccount-navigation {
    flex: 0 0 var(--ds-account-sidebar-w, 280px) !important;
    width: var(--ds-account-sidebar-w, 280px) !important;
    max-width: var(--ds-account-sidebar-w, 280px) !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-content,
  body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content,
  body.woocommerce-account .ds-wc-account-inner-flex > .woocommerce-MyAccount-content,
  body:has(nav.woocommerce-MyAccount-navigation) .ds-wc-account-inner-flex > .woocommerce-MyAccount-content {
    flex: 0 0 calc(100% - var(--ds-account-sidebar-w, 280px) - var(--ds-account-row-gap, 28px)) !important;
    width: calc(100% - var(--ds-account-sidebar-w, 280px) - var(--ds-account-row-gap, 28px)) !important;
    max-width: calc(100% - var(--ds-account-sidebar-w, 280px) - var(--ds-account-row-gap, 28px)) !important;
    min-width: 0 !important;
  }
}

/* 移动端账户布局 */
@media (max-width: 768px) {
  body.woocommerce-account .woocommerce,
  body:has(nav.woocommerce-MyAccount-navigation) .woocommerce,
  body.woocommerce-account .ds-wc-account-inner-flex,
  body:has(nav.woocommerce-MyAccount-navigation) .ds-wc-account-inner-flex {
    flex-direction: column !important;
    gap: 1.25rem !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-navigation,
  body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-navigation,
  body.woocommerce-account .ds-wc-account-inner-flex > .woocommerce-MyAccount-navigation,
  body:has(nav.woocommerce-MyAccount-navigation) .ds-wc-account-inner-flex > .woocommerce-MyAccount-navigation {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    top: 0 !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-content,
  body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content,
  body.woocommerce-account .ds-wc-account-inner-flex > .woocommerce-MyAccount-content,
  body:has(nav.woocommerce-MyAccount-navigation) .ds-wc-account-inner-flex > .woocommerce-MyAccount-content {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 1.5rem !important;
  }
}

/* 主题内联 SVG 图标（各模板 .ds-icon）：无 width/height 属性时防止被拉满整行 */
svg.ds-icon {
  width: 1.125rem;
  height: 1.125rem;
  min-width: 1.125rem;
  min-height: 1.125rem;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

body.woocommerce-account a.ds-address-edit-link,
body:has(nav.woocommerce-MyAccount-navigation) a.ds-address-edit-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ds-account-accent);
  text-decoration: none;
}

body.woocommerce-account a.ds-address-edit-link:hover,
body:has(nav.woocommerce-MyAccount-navigation) a.ds-address-edit-link:hover {
  color: var(--ds-account-accent-hover);
}

/* 地址簿展示：标题与编辑同一卡片内对齐，避免整行 space-between 显得脱节 */
body.woocommerce-account .ds-addresses-overview .woocommerce-Address-title,
body.woocommerce-account .ds-addresses-overview .woocommerce-Address-heading,
body:has(nav.woocommerce-MyAccount-navigation) .ds-addresses-overview .woocommerce-Address-title,
body:has(nav.woocommerce-MyAccount-navigation) .ds-addresses-overview .woocommerce-Address-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.5rem 0.75rem;
  margin: 0 0 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ds-account-card-border);
}

body.woocommerce-account .ds-addresses-overview .woocommerce-Address-title h2,
body.woocommerce-account .ds-addresses-overview .woocommerce-Address-heading h2,
body:has(nav.woocommerce-MyAccount-navigation) .ds-addresses-overview .woocommerce-Address-title h2,
body:has(nav.woocommerce-MyAccount-navigation) .ds-addresses-overview .woocommerce-Address-heading h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ds-account-text);
  line-height: 1.35;
}

body.woocommerce-account .ds-addresses-overview a.ds-address-edit-link,
body:has(nav.woocommerce-MyAccount-navigation) .ds-addresses-overview a.ds-address-edit-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--ds-account-card-border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ds-account-accent);
  font-size: 0.85rem;
  white-space: nowrap;
  align-self: start;
  transition:
          background 0.15s ease,
          border-color 0.15s ease,
          color 0.15s ease;
}

body.woocommerce-account .ds-addresses-overview a.ds-address-edit-link:hover,
body:has(nav.woocommerce-MyAccount-navigation) .ds-addresses-overview a.ds-address-edit-link:hover {
  background: #fff7ed;
  border-color: #fed7aa;
  color: var(--ds-account-accent-hover);
}

body.woocommerce-account .ds-addresses-overview,
body:has(nav.woocommerce-MyAccount-navigation) .ds-addresses-overview {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

body.woocommerce-account .ds-addresses-overview .ds-account-address-lead,
body:has(nav.woocommerce-MyAccount-navigation) .ds-addresses-overview .ds-account-address-lead {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1.1rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ds-account-muted);
  background: #ffffff;
  border: 1px solid var(--ds-account-card-border);
  border-radius: 10px;
  box-shadow: var(--ds-account-card-shadow);
  box-sizing: border-box;
}

body.woocommerce-account .ds-addresses-overview .ds-addresses-grid,
body:has(nav.woocommerce-MyAccount-navigation) .ds-addresses-overview .ds-addresses-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

body.woocommerce-account .ds-addresses-overview .ds-addresses-grid--single,
body:has(nav.woocommerce-MyAccount-navigation) .ds-addresses-overview .ds-addresses-grid--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 32rem;
}

body.woocommerce-account .ds-addresses-overview .ds-addresses-grid .woocommerce-Address,
body:has(nav.woocommerce-MyAccount-navigation) .ds-addresses-overview .ds-addresses-grid .woocommerce-Address {
  float: none !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
}

body.woocommerce-account .ds-addresses-overview .ds-address-card,
body:has(nav.woocommerce-MyAccount-navigation) .ds-addresses-overview .ds-address-card {
  background: #ffffff;
  border: 1px solid var(--ds-account-card-border);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  box-shadow: var(--ds-account-card-shadow);
  min-width: 0;
  box-sizing: border-box;
}

body.woocommerce-account .ds-addresses-overview .ds-address-card > address,
body:has(nav.woocommerce-MyAccount-navigation) .ds-addresses-overview .ds-address-card > address {
  margin: 0;
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ds-account-text);
}

@media (max-width: 768px) {
  body.woocommerce-account .ds-addresses-overview .ds-addresses-grid:not(.ds-addresses-grid--single),
  body:has(nav.woocommerce-MyAccount-navigation) .ds-addresses-overview .ds-addresses-grid:not(.ds-addresses-grid--single) {
    grid-template-columns: 1fr;
  }

  body.woocommerce-account .ds-addresses-overview .ds-addresses-grid--single,
  body:has(nav.woocommerce-MyAccount-navigation) .ds-addresses-overview .ds-addresses-grid--single {
    max-width: none;
  }
}

@media (max-width: 480px) {
  body.woocommerce-account .ds-addresses-overview .woocommerce-Address-title,
  body.woocommerce-account .ds-addresses-overview .woocommerce-Address-heading,
  body:has(nav.woocommerce-MyAccount-navigation) .ds-addresses-overview .woocommerce-Address-title,
  body:has(nav.woocommerce-MyAccount-navigation) .ds-addresses-overview .woocommerce-Address-heading {
    grid-template-columns: 1fr;
  }

  body.woocommerce-account .ds-addresses-overview a.ds-address-edit-link,
  body:has(nav.woocommerce-MyAccount-navigation) .ds-addresses-overview a.ds-address-edit-link {
    justify-self: start;
    white-space: normal;
    text-align: left;
  }
}

/* 我的账户：必填星号颜色 */
body.woocommerce-account .woocommerce-MyAccount-content label .required,
body.woocommerce-account .woocommerce-MyAccount-content label abbr.required,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content label .required,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content label abbr.required {
  color: var(--ds-account-required, #dc2626);
  text-decoration: none;
  border: none;
  font-weight: 700;
}

/* 编辑地址表单：统一「标签在上 + 整行输入」，取消半宽浮动导致的错位换行 */
body.woocommerce-account form.ds-edit-address-form .woocommerce-address-fields__field-wrapper,
body:has(nav.woocommerce-MyAccount-navigation) form.ds-edit-address-form .woocommerce-address-fields__field-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  width: 100%;
}

body.woocommerce-account form.ds-edit-address-form .woocommerce-address-fields__field-wrapper::after,
body:has(nav.woocommerce-MyAccount-navigation) form.ds-edit-address-form .woocommerce-address-fields__field-wrapper::after {
  content: "";
  display: table;
  clear: both;
}

body.woocommerce-account form.ds-edit-address-form .form-row,
body:has(nav.woocommerce-MyAccount-navigation) form.ds-edit-address-form .form-row {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
}

body.woocommerce-account form.ds-edit-address-form .form-row label,
body:has(nav.woocommerce-MyAccount-navigation) form.ds-edit-address-form .form-row label {
  display: block;
  width: 100%;
  margin: 0 0 0.4rem 0;
  line-height: 1.45;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: normal;
}

body.woocommerce-account form.ds-edit-address-form .form-row label.inline,
body:has(nav.woocommerce-MyAccount-navigation) form.ds-edit-address-form .form-row label.inline {
  display: block;
}

body.woocommerce-account form.ds-edit-address-form .woocommerce-input-wrapper,
body:has(nav.woocommerce-MyAccount-navigation) form.ds-edit-address-form .woocommerce-input-wrapper {
  width: 100%;
  display: block;
}

body.woocommerce-account form.ds-edit-address-form .input-text,
body.woocommerce-account form.ds-edit-address-form select,
body.woocommerce-account form.ds-edit-address-form textarea,
body:has(nav.woocommerce-MyAccount-navigation) form.ds-edit-address-form .input-text,
body:has(nav.woocommerce-MyAccount-navigation) form.ds-edit-address-form select,
body:has(nav.woocommerce-MyAccount-navigation) form.ds-edit-address-form textarea {
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
}

body.woocommerce-account form.ds-edit-address-form .select2-container,
body:has(nav.woocommerce-MyAccount-navigation) form.ds-edit-address-form .select2-container {
  width: 100% !important;
  max-width: 100%;
}

body.woocommerce-account form.ds-edit-address-form h2,
body:has(nav.woocommerce-MyAccount-navigation) form.ds-edit-address-form h2 {
  margin: 0 0 1.25rem 0;
  font-size: 1.35rem;
}

/* 个人中心：面包屑与主按钮与整页暖色系统一 */
body.woocommerce-account .woocommerce-breadcrumb,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-breadcrumb {
  background: #ffffff !important;
  border: 1px solid var(--ds-account-card-border) !important;
  border-radius: 10px !important;
  box-shadow: var(--ds-account-card-shadow) !important;
  color: var(--ds-account-muted) !important;
}

body.woocommerce-account .woocommerce-breadcrumb a,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-breadcrumb a {
  color: #393939 !important;
}

body.woocommerce-account .woocommerce-breadcrumb a:hover,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-breadcrumb a:hover {
  color: var(--ds-account-accent-hover) !important;
}

body.woocommerce-account .woocommerce button.button,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce button.button,
body.woocommerce-account .woocommerce a.button,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce a.button,
body.woocommerce-account .woocommerce input.button,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce input.button {
  background: var(--ds-wc-btn-bg) !important;
  color: var(--ds-wc-btn-text) !important;
  border: none !important;
  border-radius: var(--ds-wc-btn-radius) !important;
}

body.woocommerce-account .woocommerce button.button:hover,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce button.button:hover,
body.woocommerce-account .woocommerce a.button:hover,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce a.button:hover,
body.woocommerce-account .woocommerce input.button:hover,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce input.button:hover {
  background: var(--ds-wc-btn-bg-hover) !important;
  color: var(--ds-wc-btn-text) !important;
  transform: none;
  box-shadow: 0 4px 12px var(--ds-wc-btn-shadow);
}

/* ===== 我的订单：修复 WC smallscreen 把 shop_table_responsive 打成 block 后列错位 / 按钮叠在一起 ===== */
body.woocommerce-account table.woocommerce-orders-table.shop_table,
body.woocommerce-page.woocommerce-account table.woocommerce-orders-table.shop_table,
body:has(nav.woocommerce-MyAccount-navigation) table.woocommerce-orders-table.shop_table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  overflow: visible;
}

body.woocommerce-account table.woocommerce-orders-table.shop_table thead th,
body.woocommerce-page.woocommerce-account table.woocommerce-orders-table.shop_table thead th,
body:has(nav.woocommerce-MyAccount-navigation) table.woocommerce-orders-table.shop_table thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--ds-account-card-border);
  font-size: 0.875rem;
}

body.woocommerce-account table.woocommerce-orders-table.shop_table tbody th,
body.woocommerce-account table.woocommerce-orders-table.shop_table tbody td,
body.woocommerce-page.woocommerce-account table.woocommerce-orders-table.shop_table tbody th,
body.woocommerce-page.woocommerce-account table.woocommerce-orders-table.shop_table tbody td,
body:has(nav.woocommerce-MyAccount-navigation) table.woocommerce-orders-table.shop_table tbody th,
body:has(nav.woocommerce-MyAccount-navigation) table.woocommerce-orders-table.shop_table tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--ds-account-card-border);
}

body.woocommerce-account table.woocommerce-orders-table.shop_table tbody tr:nth-child(even) th,
body.woocommerce-account table.woocommerce-orders-table.shop_table tbody tr:nth-child(even) td,
body.woocommerce-page.woocommerce-account table.woocommerce-orders-table.shop_table tbody tr:nth-child(even) th,
body.woocommerce-page.woocommerce-account table.woocommerce-orders-table.shop_table tbody tr:nth-child(even) td,
body:has(nav.woocommerce-MyAccount-navigation) table.woocommerce-orders-table.shop_table tbody tr:nth-child(even) th,
body:has(nav.woocommerce-MyAccount-navigation) table.woocommerce-orders-table.shop_table tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.75);
}

body.woocommerce-account table.woocommerce-orders-table.shop_table td.order-actions .ds-order-actions,
body.woocommerce-page.woocommerce-account table.woocommerce-orders-table.shop_table td.order-actions .ds-order-actions,
body:has(nav.woocommerce-MyAccount-navigation) table.woocommerce-orders-table.shop_table td.order-actions .ds-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-start;
}

body.woocommerce-account table.woocommerce-orders-table.shop_table td.order-actions .ds-order-actions .button,
body.woocommerce-page.woocommerce-account table.woocommerce-orders-table.shop_table td.order-actions .ds-order-actions .button,
body:has(nav.woocommerce-MyAccount-navigation) table.woocommerce-orders-table.shop_table td.order-actions .ds-order-actions .button {
  float: none !important;
  margin: 0 !important;
}

@media only screen and (max-width: 768px) {
  body.woocommerce-account table.woocommerce-orders-table.shop_table_responsive thead,
  body.woocommerce-page.woocommerce-account table.woocommerce-orders-table.shop_table_responsive thead,
  body:has(nav.woocommerce-MyAccount-navigation) table.woocommerce-orders-table.shop_table_responsive thead {
    display: table-header-group !important;
  }

  body.woocommerce-account table.woocommerce-orders-table.shop_table_responsive tbody th,
  body.woocommerce-page.woocommerce-account table.woocommerce-orders-table.shop_table_responsive tbody th,
  body:has(nav.woocommerce-MyAccount-navigation) table.woocommerce-orders-table.shop_table_responsive tbody th {
    display: table-cell !important;
  }

  body.woocommerce-account table.woocommerce-orders-table.shop_table_responsive tbody tr,
  body.woocommerce-page.woocommerce-account table.woocommerce-orders-table.shop_table_responsive tbody tr,
  body:has(nav.woocommerce-MyAccount-navigation) table.woocommerce-orders-table.shop_table_responsive tbody tr {
    display: table-row !important;
  }

  body.woocommerce-account table.woocommerce-orders-table.shop_table_responsive tbody td,
  body.woocommerce-account table.woocommerce-orders-table.shop_table_responsive tbody th,
  body.woocommerce-page.woocommerce-account table.woocommerce-orders-table.shop_table_responsive tbody td,
  body.woocommerce-page.woocommerce-account table.woocommerce-orders-table.shop_table_responsive tbody th,
  body:has(nav.woocommerce-MyAccount-navigation) table.woocommerce-orders-table.shop_table_responsive tbody td,
  body:has(nav.woocommerce-MyAccount-navigation) table.woocommerce-orders-table.shop_table_responsive tbody th {
    display: table-cell !important;
    text-align: inherit !important;
    width: auto !important;
  }

  body.woocommerce-account table.woocommerce-orders-table.shop_table_responsive tbody td::before,
  body.woocommerce-account table.woocommerce-orders-table.shop_table_responsive tbody th::before,
  body.woocommerce-page.woocommerce-account table.woocommerce-orders-table.shop_table_responsive tbody td::before,
  body.woocommerce-page.woocommerce-account table.woocommerce-orders-table.shop_table_responsive tbody th::before,
  body:has(nav.woocommerce-MyAccount-navigation) table.woocommerce-orders-table.shop_table_responsive tbody td::before,
  body:has(nav.woocommerce-MyAccount-navigation) table.woocommerce-orders-table.shop_table_responsive tbody th::before {
    display: none !important;
    content: none !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-content,
  body.woocommerce-page.woocommerce-account .woocommerce-MyAccount-content,
  body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ===== WooCommerce表单输入框样式 ===== */
.woocommerce input.input-text,
.woocommerce textarea,
.woocommerce select {
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  background: #ffffff;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.woocommerce input.input-text:focus,
.woocommerce textarea:focus,
.woocommerce select:focus {
  outline: none;
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

body.woocommerce-account .woocommerce input.input-text:focus,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce input.input-text:focus,
body.woocommerce-account .woocommerce textarea:focus,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce textarea:focus,
body.woocommerce-account .woocommerce select:focus,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce select:focus {
  border-color: var(--ds-account-accent);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.2);
}

/* 个人账户：全部输入类控件（未登录页无 .woocommerce 包裹，必须用 .ds-woo-main 命中） */
body.woocommerce-account .ds-woo-main .woocommerce-Input.input-text,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main .woocommerce-Input.input-text,
body.woocommerce-account .ds-woo-main input.input-text,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main input.input-text,
body.woocommerce-account .ds-woo-main input[type="text"],
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main input[type="text"],
body.woocommerce-account .ds-woo-main input[type="email"],
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main input[type="email"],
body.woocommerce-account .ds-woo-main input[type="password"],
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main input[type="password"],
body.woocommerce-account .ds-woo-main input[type="tel"],
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main input[type="tel"],
body.woocommerce-account .ds-woo-main input[type="url"],
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main input[type="url"],
body.woocommerce-account .ds-woo-main input[type="number"],
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main input[type="number"],
body.woocommerce-account .ds-woo-main input[type="search"],
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main input[type="search"],
body.woocommerce-account .ds-woo-main textarea,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main textarea,
body.woocommerce-account .ds-woo-main select,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--ds-account-card-border, #e5e7eb);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  min-height: 46px;
  font-size: 0.95rem;
  line-height: 1.45;
  background: #ffffff;
  color: var(--ds-account-text, #1e293b);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

body.woocommerce-account .ds-woo-main textarea,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main textarea {
  min-height: 6.5rem;
  resize: vertical;
}

body.woocommerce-account .ds-woo-main select,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main select {
  cursor: pointer;
}

body.woocommerce-account .ds-woo-main input::placeholder,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main input::placeholder,
body.woocommerce-account .ds-woo-main textarea::placeholder,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main textarea::placeholder {
  color: #94a3b8;
}

body.woocommerce-account .ds-woo-main input.input-text:focus,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main input.input-text:focus,
body.woocommerce-account .ds-woo-main input[type="text"]:focus,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main input[type="text"]:focus,
body.woocommerce-account .ds-woo-main input[type="email"]:focus,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main input[type="email"]:focus,
body.woocommerce-account .ds-woo-main input[type="password"]:focus,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main input[type="password"]:focus,
body.woocommerce-account .ds-woo-main input[type="tel"]:focus,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main input[type="tel"]:focus,
body.woocommerce-account .ds-woo-main input[type="url"]:focus,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main input[type="url"]:focus,
body.woocommerce-account .ds-woo-main input[type="number"]:focus,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main input[type="number"]:focus,
body.woocommerce-account .ds-woo-main input[type="search"]:focus,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main input[type="search"]:focus,
body.woocommerce-account .ds-woo-main textarea:focus,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main textarea:focus,
body.woocommerce-account .ds-woo-main select:focus,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main select:focus {
  outline: none;
  border-color: var(--ds-account-accent, #ea580c);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.2);
}

body.woocommerce-account .ds-woo-main .woocommerce-input-wrapper,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main .woocommerce-input-wrapper {
  display: block;
  width: 100%;
}

body.woocommerce-account .ds-woo-main form .woocommerce-form-row label,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main form .woocommerce-form-row label,
body.woocommerce-account .ds-woo-main form .form-row label,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main form .form-row label {
  display: block;
  margin: 0 0 0.4rem 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ds-account-text, #334155);
}

body.woocommerce-account .ds-woo-main form .woocommerce-form__label-for-checkbox,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main form .woocommerce-form__label-for-checkbox {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
  cursor: pointer;
  font-weight: 500;
}

body.woocommerce-account .ds-woo-main input[type="checkbox"].woocommerce-form__input-checkbox,
body:has(nav.woocommerce-MyAccount-navigation)
.ds-woo-main
input[type="checkbox"].woocommerce-form__input-checkbox {
  width: 1.125rem;
  height: 1.125rem;
  min-height: 0;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--ds-account-accent, #ea580c);
  cursor: pointer;
  border-radius: 4px;
  box-shadow: none;
}

body.woocommerce-account .ds-woo-main fieldset,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main fieldset {
  border: 1px solid var(--ds-account-card-border, #e5e7eb);
  border-radius: 12px;
  padding: 1.25rem 1.25rem 0.75rem;
  margin: 1.5rem 0;
  background: rgba(255, 255, 255, 0.6);
}

body.woocommerce-account .ds-woo-main fieldset legend,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main fieldset legend {
  padding: 0 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ds-account-text, #1e293b);
}

body.woocommerce-account .ds-woo-main .woocommerce-LostPassword.lost_password a,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main .woocommerce-LostPassword.lost_password a {
  color: var(--ds-account-accent, #ea580c);
  text-decoration: none;
  font-weight: 500;
}

body.woocommerce-account .ds-woo-main .woocommerce-LostPassword.lost_password a:hover,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main .woocommerce-LostPassword.lost_password a:hover {
  text-decoration: underline;
  color: var(--ds-account-accent-hover, #c2410c);
}

body.woocommerce-account .ds-woo-main form.woocommerce-form-login p.form-row:not(.woocommerce-form-row--wide),
body:has(nav.woocommerce-MyAccount-navigation)
.ds-woo-main
form.woocommerce-form-login
p.form-row:not(.woocommerce-form-row--wide) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

body.woocommerce-account .ds-woo-main form.woocommerce-form-login .woocommerce-form-login__submit,
body:has(nav.woocommerce-MyAccount-navigation)
.ds-woo-main
form.woocommerce-form-login
.woocommerce-form-login__submit {
  margin: 0;
}

body.woocommerce-account .ds-woo-main form.woocommerce-form button.button,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main form.woocommerce-form button.button,
body.woocommerce-account .ds-woo-main form.woocommerce-ResetPassword button.button,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main form.woocommerce-ResetPassword button.button {
  background: var(--ds-wc-btn-bg) !important;
  color: var(--ds-wc-btn-text) !important;
  border: none !important;
  border-radius: var(--ds-wc-btn-radius) !important;
  padding: 0.75rem 1.5rem !important;
  min-height: 46px;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

body.woocommerce-account .ds-woo-main form.woocommerce-form button.button:hover,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main form.woocommerce-form button.button:hover,
body.woocommerce-account .ds-woo-main form.woocommerce-ResetPassword button.button:hover,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main form.woocommerce-ResetPassword button.button:hover {
  background: var(--ds-wc-btn-bg-hover) !important;
  color: var(--ds-wc-btn-text) !important;
  box-shadow: 0 4px 12px var(--ds-wc-btn-shadow);
}

@media (max-width: 768px) {
  body.woocommerce-account .ds-woo-main form.woocommerce-form-login p.form-row:not(.woocommerce-form-row--wide),
  body:has(nav.woocommerce-MyAccount-navigation)
  .ds-woo-main
  form.woocommerce-form-login
  p.form-row:not(.woocommerce-form-row--wide) {
    flex-direction: column;
    align-items: stretch;
  }

  body.woocommerce-account .ds-woo-main form.woocommerce-form-login .woocommerce-form-login__submit,
  body:has(nav.woocommerce-MyAccount-navigation)
  .ds-woo-main
  form.woocommerce-form-login
  .woocommerce-form-login__submit {
    width: 100%;
  }

  body.woocommerce-account .ds-woo-main form.edit-account .form-row-first,
  body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main form.edit-account .form-row-first,
  body.woocommerce-account .ds-woo-main form.edit-account .form-row-last,
  body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main form.edit-account .form-row-last {
    float: none !important;
    width: 100% !important;
    margin-right: 0 !important;
  }

  body.woocommerce-account .ds-woo-main form.woocommerce-ResetPassword .form-row-first,
  body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main form.woocommerce-ResetPassword .form-row-first,
  body.woocommerce-account .ds-woo-main form.woocommerce-ResetPassword .form-row-last,
  body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main form.woocommerce-ResetPassword .form-row-last {
    float: none !important;
    width: 100% !important;
    margin-right: 0 !important;
  }
}

@media (min-width: 769px) {
  body.woocommerce-account .ds-woo-main form.edit-account .form-row-first,
  body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main form.edit-account .form-row-first {
    float: left;
    clear: both;
    width: 48%;
    margin-right: 4%;
  }

  body.woocommerce-account .ds-woo-main form.edit-account .form-row-last,
  body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main form.edit-account .form-row-last {
    float: right;
    clear: none;
    width: 48%;
    margin-right: 0;
  }

  body.woocommerce-account .ds-woo-main form.woocommerce-ResetPassword:not(:has(.form-row-last)) .form-row-first,
  body:has(nav.woocommerce-MyAccount-navigation)
  .ds-woo-main
  form.woocommerce-ResetPassword:not(:has(.form-row-last))
  .form-row-first {
    float: none;
    width: 100%;
    margin-right: 0;
  }

  body.woocommerce-account .ds-woo-main form.woocommerce-ResetPassword:has(.form-row-last) .form-row-first,
  body:has(nav.woocommerce-MyAccount-navigation)
  .ds-woo-main
  form.woocommerce-ResetPassword:has(.form-row-last)
  .form-row-first {
    float: left;
    clear: both;
    width: 48%;
    margin-right: 4%;
  }

  body.woocommerce-account .ds-woo-main form.woocommerce-ResetPassword:has(.form-row-last) .form-row-last,
  body:has(nav.woocommerce-MyAccount-navigation)
  .ds-woo-main
  form.woocommerce-ResetPassword:has(.form-row-last)
  .form-row-last {
    float: right;
    clear: none;
    width: 48%;
    margin-right: 0;
  }
}

.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button {
  background: var(--ds-wc-btn-bg);
  color: var(--ds-wc-btn-text);
  border: none;
  border-radius: var(--ds-wc-btn-radius);
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  box-shadow: none;
}

.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover {
  background: var(--ds-wc-btn-bg-hover);
  color: var(--ds-wc-btn-text);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--ds-wc-btn-shadow);
}

/* ===== 产品详情页全新样式 - Clean Layout ===== */

/* 产品页面主容器 */
.product-page-main {
  background: #f8f9fa;
  padding-top: 80px;
  padding-bottom: 40px;
  min-height: calc(100vh - 200px);
}

.product-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 面包屑导航 */
.product-breadcrumb {
  background: #ffffff;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.product-breadcrumb .woocommerce-breadcrumb {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

.product-breadcrumb a {
  color: #ea580c;
  text-decoration: none;
}

/* 产品详情主布局 - 两栏 */
.product-detail-wrapper {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 2.5rem;
  background: #ffffff;
  border-radius: 12px;
  padding: 0.5rem;
  /*box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);*/
  margin-bottom: 2rem;
}

/* 左侧图片区域 - 限制图片不撑破 */
.product-images-column {
  position: relative;
  width: 100%;
  max-width: 400px;
}

/* 促销标签 */
.product-images-column .onsale {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: #ff5000;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  z-index: 10;
}

/* 主图容器 - 固定宽高比 */
.main-product-image {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
  border: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 主图 - 限制最大尺寸 */
.main-product-image img,
.main-product-image .product-main-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* 缩略图列表 */
.product-thumbnails {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.product-thumbnails .product-thumb-btn {
  padding: 0;
  margin: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  line-height: 0;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-thumbnails .product-thumb-btn:hover {
  border-color: #ff5000;
}

.product-thumbnails .product-thumb-btn.is-active {
  border-color: #ea580c;
  box-shadow: 0 0 0 1px #ea580c;
}

.product-thumbnails .product-thumb-btn .thumb-img {
  width: 70px;
  height: 70px;
  border-radius: 2px;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* 右侧信息区域 */
.product-info-column {
  padding: 0;
  min-width: 0;
  overflow: hidden;
}

/* 产品标题 */
.product-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: #333;
  line-height: 1.4;
  word-wrap: break-word;
}

/* 评分 */
.product-info-column .star-rating {
  color: #ff5000;
  margin-bottom: 1rem;
}

/* 价格区域 */
.product-price-wrap {
  background: linear-gradient(135deg, #fff5f0 0%, #fff0e6 100%);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.product-price-wrap .sale-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ff5000;
  margin-right: 1rem;
}

.product-price-wrap .regular-price {
  font-size: 0.9rem;
  color: #999;
  text-decoration: line-through;
}

.product-price-wrap--variable .price,
.product-price-wrap--variable .woocommerce-Price-amount {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ff5000;
}

.product-price-wrap--variable del {
  font-size: 0.95rem;
  font-weight: 400;
  color: #999;
}

/* 简短描述 */
.product-short-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #666;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
  word-wrap: break-word;
}

/* 购物车表单 */
.product-cart-form {
  margin-bottom: 1.5rem;
}

.product-cart-form.cart {
  display: block;
}

form.variations_form.product-cart-form {
  position: relative;
}

.product-cart-form .product-cart-form-row,
.variations_form.product-cart-form .product-cart-form-row--variable {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.25rem;
}

/* 数量选择器 + 左右 +/- */
.product-cart-form .quantity.ds-qty-with-buttons {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.product-cart-form .ds-qty-btn {
  width: 44px;
  min-width: 44px;
  border: none;
  background: #f1f5f9;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.product-cart-form .ds-qty-btn:hover {
  background: #e2e8f0;
  color: var(--ds-wc-btn-bg);
}

.product-cart-form .quantity.ds-qty-with-buttons input.qty {
  width: 52px;
  height: 44px;
  border: none;
  border-left: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  -moz-appearance: textfield;
  border-radius: 0;
}

.product-cart-form .quantity input::-webkit-outer-spin-button,
.product-cart-form .quantity input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.product-cart-form .product-cart-buttons {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* 加入购物车 */
.product-cart-form button.single_add_to_cart_button {
  background: var(--ds-wc-btn-bg);
  color: var(--ds-wc-btn-text);
  border: none;
  border-radius: var(--ds-wc-btn-radius);
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  height: 44px;
  min-width: 140px;
  box-shadow: none;
}

.product-cart-form button.single_add_to_cart_button:hover {
  background: var(--ds-wc-btn-bg-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--ds-wc-btn-shadow);
}

/* 立即购买 */
.product-cart-form .buy-now-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 44px;
  min-width: 140px;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--ds-wc-btn-radius);
  border: none;
  background: var(--ds-wc-btn-bg);
  color: var(--ds-wc-btn-text);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: none;
}

.product-cart-form .buy-now-button:hover {
  background: var(--ds-wc-btn-bg-hover);
  color: var(--ds-wc-btn-text);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--ds-wc-btn-shadow);
}

/* 可变商品：隐藏原生下拉，按钮式规格 */
.ds-variation-selects-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ds-variations-wrapper {
  margin-bottom: 1.25rem;
}

.ds-variation-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.5rem;
}

.ds-variation-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  align-items: stretch;
}

.ds-variation-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.4rem 0.85rem;
  min-height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #1e293b;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.ds-variation-option--color {
  padding: 0.45rem 0.9rem 0.45rem 0.45rem;
  min-height: 48px;
}

.ds-variation-option:hover:not(:disabled) {
  border-color: #94a3b8;
}

.ds-variation-option.is-selected {
  border-color: var(--ds-wc-btn-bg);
  box-shadow: 0 0 0 1px var(--ds-wc-btn-bg);
  color: var(--ds-wc-btn-bg);
}

.ds-variation-option:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ds-variation-swatch {
  display: flex;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid #e5e7eb;
}

.ds-variation-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ds-variations-wrapper .reset_variations {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #64748b;
  text-decoration: underline;
}

.variations_form.product-cart-form .single_variation_wrap {
  margin-top: 0.5rem;
}

.variations_form.product-cart-form .woocommerce-variation {
  margin-bottom: 0.75rem;
}

.variations_form.product-cart-form .woocommerce-variation-price {
  display: none;
}

/* 产品元数据 */
.product-meta {
  font-size: 0.85rem;
  color: #666;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-meta .sku,
.product-meta .categories {
  display: block;
}

.product-meta a {
  color: #ea580c;
  text-decoration: none;
}

/* 产品描述区域 */
.product-tabs-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 1rem;
  /*box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);*/
  margin-bottom: 2rem;
}

.product-tabs-section .section-title {
  font-size: 1.25rem;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #eee;
  color: #333;
}

/* 商品详情区内：属性置顶 */
.product-tabs-section .product-attributes-section--detail-top {
  margin: 0 0 1.5rem 0;
  padding: 0 0 1.5rem 0;
  border-bottom: 1px solid #eee;
}

.product-tabs-section .product-attributes-section--detail-top:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.product-tabs-section .product-attributes-heading {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  color: #333;
}

.product-tabs-section .woocommerce-product-attributes.shop_attributes {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}

.product-tabs-section .woocommerce-product-attributes th,
.product-tabs-section .woocommerce-product-attributes td {
  padding: 0.55rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #f0f0f0;
}

.product-tabs-section .woocommerce-product-attributes tr:last-child th,
.product-tabs-section .woocommerce-product-attributes tr:last-child td {
  border-bottom: none;
}

.product-tabs-section .woocommerce-product-attributes-item__label {
  color: #64748b;
  font-weight: 600;
  width: 38%;
  max-width: 220px;
  padding-right: 0.75rem;
}

.product-tabs-section .woocommerce-product-attributes-item__value {
  color: #1e293b;
}

.product-tabs-section .woocommerce-product-attributes-item__value p {
  margin: 0;
}

.product-tabs-section .woocommerce-product-attributes-item__value a {
  color: #ea580c;
  text-decoration: none;
}

.product-tabs-section .woocommerce-product-attributes-item__value a:hover {
  text-decoration: underline;
}

.product-full-description {
  font-size: 1rem;
  line-height: 1.8;
  color: #444;
  max-width: 100%;
  overflow: hidden;
}

/* 确保描述中的图片不撑破容器 */
.product-full-description img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 相关产品区域 */
.related-products-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 1rem;
  /*box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);*/
}

.related-products-section h2 {
  font-size: 1.25rem;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #eee;
  color: #333;
}

/* 响应式 - 平板 */
@media (max-width: 900px) {
  .product-detail-wrapper {
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    padding: 1.5rem;
  }

  .product-images-column {
    max-width: 350px;
  }

  .main-product-image {
    max-width: 350px;
  }

  .product-title {
    font-size: 1.25rem;
  }
}

/* 响应式 - 手机 */
@media (max-width: 768px) {
  .product-page-main {
    padding-top: 60px;
  }

  .product-detail-wrapper {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1rem;
  }

  .product-images-column {
    max-width: 100%;
    margin: 0 auto;
  }

  .main-product-image {
    max-width: 100%;
    aspect-ratio: 1 / 1;
  }

  .product-title {
    font-size: 1.1rem;
  }

  .product-price-wrap .sale-price {
    font-size: 1.5rem;
  }

  /* 避免 fixed 加购条被父级裁切 */
  body.single-product .product-info-column {
    overflow: visible;
  }

  /* 主内容底部留白，避免长文/推荐被底栏挡住 */
  body.single-product .ds-woo-main:has(form.cart) {
    padding-bottom: calc(10.5rem + env(safe-area-inset-bottom, 0px));
  }

  /* 简单商品：数量在上，双按钮横排，整块贴屏幕底（常见商城手淘样式） */
  form.product-cart-form.cart:not(.variations_form) .product-cart-form-row {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    margin: 0;
    padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
    background: #ffffff;
    border-top: 1px solid #e8e8e8;
    box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.12);
    box-sizing: border-box;
  }

  form.product-cart-form.cart:not(.variations_form) .product-cart-form-row > .quantity {
    width: 100%;
    justify-content: center;
  }

  form.product-cart-form.cart:not(.variations_form) .quantity.ds-qty-with-buttons {
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
  }

  form.product-cart-form.cart:not(.variations_form) .product-cart-buttons {
    flex-direction: row;
    width: 100%;
    gap: 0.5rem;
  }

  form.product-cart-form.cart:not(.variations_form) .product-cart-buttons .single_add_to_cart_button,
  form.product-cart-form.cart:not(.variations_form) .product-cart-buttons .buy-now-button {
    flex: 1;
    width: auto;
    min-width: 0;
    min-height: 46px;
  }

  /* 可变商品：规格仍在页面内滚动，仅数量+按钮条贴底 */
  .variations_form.product-cart-form .woocommerce-variation-add-to-cart.variations_button {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    margin: 0 !important;
    padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
    background: #ffffff;
    border-top: 1px solid #e8e8e8;
    box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.12);
    box-sizing: border-box;
  }

  .variations_form.product-cart-form .product-cart-form-row--variable {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .variations_form.product-cart-form .product-cart-form-row--variable > .quantity {
    width: 100%;
    justify-content: center;
  }

  .variations_form.product-cart-form .product-cart-form-row--variable .quantity.ds-qty-with-buttons {
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
  }

  .variations_form.product-cart-form .product-cart-buttons {
    flex-direction: row;
    width: 100%;
    gap: 0.5rem;
  }

  .variations_form.product-cart-form .product-cart-buttons .single_add_to_cart_button,
  .variations_form.product-cart-form .product-cart-buttons .buy-now-button {
    flex: 1;
    width: auto;
    min-width: 0;
    min-height: 46px;
  }

  .product-tabs-section,
  .related-products-section {
    padding: 1rem;
  }
}

/* 隐藏多余按钮（勿隐藏带 single_add_to_cart_button 的主提交按钮） */
.woocommerce-variation-add-to-cart .button.alt:not(.single_add_to_cart_button),
.woocommerce-variation-add-to-cart .buy_now_button,
form.cart .button.alt:not(.single_add_to_cart_button) {
  display: none !important;
}

/* ===== 购物车样式（.ds-cart-table-shell 提高优先级，部分属性 !important 防插件覆盖）===== */
body.woocommerce-cart .woocommerce,
body.woocommerce-page.woocommerce-cart .woocommerce {
  background: #ffffff;
}

body.woocommerce-cart .ds-cart-table-shell table.cart,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06) !important;
  background: #ffffff !important;
}

body.woocommerce-cart .ds-cart-table-shell table.cart thead th,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart thead th,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart thead th {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
  padding: 0.85rem 1rem !important;
  text-align: left !important;
  font-weight: 600 !important;
  font-size: 0.8125rem !important;
  letter-spacing: 0.02em !important;
  color: #475569 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  vertical-align: middle !important;
}

body.woocommerce-cart .ds-cart-table-shell table.cart thead th.product-remove,
body.woocommerce-cart .ds-cart-table-shell table.cart thead th.product-thumbnail,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart thead th.product-remove,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart thead th.product-thumbnail,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart thead th.product-remove,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart thead th.product-thumbnail {
  width: 1% !important;
  text-align: center !important;
  color: #94a3b8 !important;
}

body.woocommerce-cart .ds-cart-table-shell table.cart thead th.product-price,
body.woocommerce-cart .ds-cart-table-shell table.cart thead th.product-quantity,
body.woocommerce-cart .ds-cart-table-shell table.cart thead th.product-subtotal,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart thead th.product-price,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart thead th.product-quantity,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart thead th.product-subtotal,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart thead th.product-price,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart thead th.product-quantity,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart thead th.product-subtotal {
  text-align: center !important;
}

body.woocommerce-cart .ds-cart-table-shell table.cart tbody td,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart tbody td,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart tbody td {
  padding: 1rem 1rem !important;
  border-bottom: 1px solid #f1f5f9 !important;
  vertical-align: middle !important;
  background: #ffffff !important;
}

body.woocommerce-cart .ds-cart-table-shell table.cart tbody tr:last-child td,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart tbody tr:last-child td,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart tbody tr:last-child td {
  border-bottom: none !important;
}

body.woocommerce-cart .ds-cart-table-shell table.cart tbody tr:hover td,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart tbody tr:hover td,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart tbody tr:hover td {
  background: #fafbfc !important;
}

body.woocommerce-cart .ds-cart-table-shell table.cart .product-thumbnail img,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart .product-thumbnail img,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart .product-thumbnail img {
  width: 80px !important;
  height: 80px !important;
  max-width: 80px !important;
  max-height: 80px !important;
  object-fit: cover !important;
  border-radius: 10px !important;
  border: 1px solid #f1f5f9 !important;
  box-sizing: border-box !important;
}

body.woocommerce-cart .ds-cart-table-shell table.cart .product-name a,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart .product-name a,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart .product-name a {
  color: #1a1a2e !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

body.woocommerce-cart .ds-cart-table-shell table.cart .product-price,
body.woocommerce-cart .ds-cart-table-shell table.cart .product-subtotal,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart .product-price,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart .product-subtotal,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart .product-price,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart .product-subtotal {
  color: #dc2626 !important;
  font-weight: 600 !important;
}

body.woocommerce-cart .ds-cart-table-shell table.cart td.product-price,
body.woocommerce-cart .ds-cart-table-shell table.cart td.product-quantity,
body.woocommerce-cart .ds-cart-table-shell table.cart td.product-subtotal,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart td.product-price,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart td.product-quantity,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart td.product-subtotal,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart td.product-price,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart td.product-quantity,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart td.product-subtotal {
  text-align: center !important;
}

/* 购物车移除：圆形图标按钮 */
body.woocommerce-cart .ds-cart-table-shell table.cart td.product-remove,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart td.product-remove,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart td.product-remove {
  width: 3.25rem !important;
  text-align: center !important;
  vertical-align: middle !important;
}

body.woocommerce-cart .ds-cart-table-shell table.cart td.product-remove a.remove,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart td.product-remove a.remove,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart td.product-remove a.remove {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 2.125rem !important;
  height: 2.125rem !important;
  font-size: 1.35rem !important;
  line-height: 1 !important;
  font-weight: 500 !important;
  color: #94a3b8 !important;
  text-decoration: none !important;
  border-radius: 9999px !important;
  border: 1px solid #e2e8f0 !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease, transform 0.1s ease;
}

body.woocommerce-cart .ds-cart-table-shell table.cart td.product-remove a.remove:hover,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart td.product-remove a.remove:hover,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart td.product-remove a.remove:hover {
  color: #dc2626 !important;
  background: #fef2f2 !important;
  border-color: #fecaca !important;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.12) !important;
}

body.woocommerce-cart .ds-cart-table-shell table.cart td.product-remove a.remove:focus,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart td.product-remove a.remove:focus,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart td.product-remove a.remove:focus {
  outline: none !important;
}

body.woocommerce-cart .ds-cart-table-shell table.cart td.product-remove a.remove:focus-visible,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart td.product-remove a.remove:focus-visible,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart td.product-remove a.remove:focus-visible {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--ds-wc-btn-shadow) !important;
}

body.woocommerce-cart .ds-cart-table-shell table.cart td.product-remove a.remove:active,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart td.product-remove a.remove:active,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart td.product-remove a.remove:active {
  transform: scale(0.92);
}

/* 购物车数量：扁平药丸 */
body.woocommerce-cart .ds-cart-table-shell table.cart .quantity.ds-qty-with-buttons,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart .quantity.ds-qty-with-buttons,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart .quantity.ds-qty-with-buttons {
  display: inline-flex !important;
  align-items: stretch !important;
  height: 40px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #ffffff !important;
  box-shadow: none !important;
  vertical-align: middle !important;
}

body.woocommerce-cart .ds-cart-table-shell table.cart .quantity.ds-qty-with-buttons .ds-qty-btn,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart .quantity.ds-qty-with-buttons .ds-qty-btn,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart .quantity.ds-qty-with-buttons .ds-qty-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 40px !important;
  width: 40px !important;
  min-width: 40px !important;
  height: auto !important;
  min-height: 0 !important;
  align-self: stretch !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: #f1f5f9 !important;
  color: #334155 !important;
  font-size: 1.125rem !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  padding: 0 !important;
  transition: background 0.15s ease, color 0.15s ease;
}

body.woocommerce-cart .ds-cart-table-shell table.cart .quantity.ds-qty-with-buttons .ds-qty-minus,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart .quantity.ds-qty-with-buttons .ds-qty-minus,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart .quantity.ds-qty-with-buttons .ds-qty-minus {
  border-right: 1px solid #e2e8f0 !important;
}

body.woocommerce-cart .ds-cart-table-shell table.cart .quantity.ds-qty-with-buttons .ds-qty-plus,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart .quantity.ds-qty-with-buttons .ds-qty-plus,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart .quantity.ds-qty-with-buttons .ds-qty-plus {
  border-left: 1px solid #e2e8f0 !important;
}

body.woocommerce-cart .ds-cart-table-shell table.cart .quantity.ds-qty-with-buttons .ds-qty-btn:hover,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart .quantity.ds-qty-with-buttons .ds-qty-btn:hover,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart .quantity.ds-qty-with-buttons .ds-qty-btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

body.woocommerce-cart .ds-cart-table-shell table.cart .quantity.ds-qty-with-buttons .ds-qty-btn:active,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart .quantity.ds-qty-with-buttons .ds-qty-btn:active,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart .quantity.ds-qty-with-buttons .ds-qty-btn:active {
  background: #cbd5e1 !important;
}

body.woocommerce-cart .ds-cart-table-shell table.cart .quantity.ds-qty-with-buttons .ds-qty-btn:focus,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart .quantity.ds-qty-with-buttons .ds-qty-btn:focus,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart .quantity.ds-qty-with-buttons .ds-qty-btn:focus {
  outline: none !important;
}

body.woocommerce-cart .ds-cart-table-shell table.cart .quantity.ds-qty-with-buttons .ds-qty-btn:focus-visible,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart .quantity.ds-qty-with-buttons .ds-qty-btn:focus-visible,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart .quantity.ds-qty-with-buttons .ds-qty-btn:focus-visible {
  position: relative;
  z-index: 1;
  box-shadow: inset 0 0 0 2px #ffffff, inset 0 0 0 4px var(--ds-wc-btn-bg) !important;
}

body.woocommerce-cart .ds-cart-table-shell table.cart .quantity.ds-qty-with-buttons input.qty,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart .quantity.ds-qty-with-buttons input.qty,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart .quantity.ds-qty-with-buttons input.qty {
  flex: 1 1 auto !important;
  width: 3rem !important;
  min-width: 2.75rem !important;
  max-width: 4rem !important;
  height: auto !important;
  min-height: 0 !important;
  align-self: stretch !important;
  box-sizing: border-box !important;
  border: none !important;
  border-left: 1px solid #e2e8f0 !important;
  border-right: 1px solid #e2e8f0 !important;
  margin: 0 !important;
  text-align: center !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums !important;
  color: #0f172a !important;
  background: #ffffff !important;
  border-radius: 0 !important;
  -moz-appearance: textfield;
}

body.woocommerce-cart .ds-cart-table-shell table.cart .quantity input::-webkit-outer-spin-button,
body.woocommerce-cart .ds-cart-table-shell table.cart .quantity input::-webkit-inner-spin-button,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart .quantity input::-webkit-outer-spin-button,
body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart .quantity input::-webkit-inner-spin-button,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart .quantity input::-webkit-outer-spin-button,
form.woocommerce-cart-form .ds-cart-table-shell table.shop_table.cart .quantity input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

/*
 * 购物车有商品时列错位 / 图巨大 / 半透明条盖住图：
 * 任意来源若对 .shop_table_responsive 使用 display:block（类 WC smallscreen），在桌面会与 thead 不同步。
 * 此处与「我的订单」思路一致：≥769px 强制真实 table，并去掉 tbody td::before 伪元素。
 */
@media only screen and (min-width: 769px) {
  /* 兼容：body 无 woocommerce-cart、子主题去掉 ds-cart-table、短代码购物车 —— 用表单内唯一类名命中 */
  body.woocommerce-cart .ds-cart-table-shell table.shop_table_responsive.cart.ds-cart-table,
  body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.shop_table_responsive.cart.ds-cart-table,
  body.woocommerce-cart table.shop_table_responsive.cart.ds-cart-table,
  body.woocommerce-page.woocommerce-cart table.shop_table_responsive.cart.ds-cart-table,
  form.woocommerce-cart-form .ds-cart-table-shell table.shop_table_responsive.cart,
  form.woocommerce-cart-form table.woocommerce-cart-form__contents.shop_table_responsive.cart,
  .woocommerce form.woocommerce-cart-form table.shop_table_responsive.woocommerce-cart-form__contents {
    display: table !important;
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    table-layout: auto;
  }

  body.woocommerce-cart .ds-cart-table-shell table.shop_table_responsive.cart.ds-cart-table thead,
  body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.shop_table_responsive.cart.ds-cart-table thead,
  body.woocommerce-cart table.shop_table_responsive.cart.ds-cart-table thead,
  body.woocommerce-page.woocommerce-cart table.shop_table_responsive.cart.ds-cart-table thead,
  form.woocommerce-cart-form .ds-cart-table-shell table.shop_table_responsive.cart thead,
  form.woocommerce-cart-form table.woocommerce-cart-form__contents.shop_table_responsive.cart thead,
  .woocommerce form.woocommerce-cart-form table.shop_table_responsive.woocommerce-cart-form__contents thead {
    display: table-header-group !important;
  }

  body.woocommerce-cart .ds-cart-table-shell table.shop_table_responsive.cart.ds-cart-table tbody,
  body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.shop_table_responsive.cart.ds-cart-table tbody,
  body.woocommerce-cart table.shop_table_responsive.cart.ds-cart-table tbody,
  body.woocommerce-page.woocommerce-cart table.shop_table_responsive.cart.ds-cart-table tbody,
  form.woocommerce-cart-form .ds-cart-table-shell table.shop_table_responsive.cart tbody,
  form.woocommerce-cart-form table.woocommerce-cart-form__contents.shop_table_responsive.cart tbody,
  .woocommerce form.woocommerce-cart-form table.shop_table_responsive.woocommerce-cart-form__contents tbody {
    display: table-row-group !important;
  }

  body.woocommerce-cart .ds-cart-table-shell table.shop_table_responsive.cart.ds-cart-table tfoot,
  body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.shop_table_responsive.cart.ds-cart-table tfoot,
  body.woocommerce-cart table.shop_table_responsive.cart.ds-cart-table tfoot,
  body.woocommerce-page.woocommerce-cart table.shop_table_responsive.cart.ds-cart-table tfoot,
  form.woocommerce-cart-form .ds-cart-table-shell table.shop_table_responsive.cart tfoot,
  form.woocommerce-cart-form table.woocommerce-cart-form__contents.shop_table_responsive.cart tfoot,
  .woocommerce form.woocommerce-cart-form table.shop_table_responsive.woocommerce-cart-form__contents tfoot {
    display: table-footer-group !important;
  }

  body.woocommerce-cart .ds-cart-table-shell table.shop_table_responsive.cart.ds-cart-table tr,
  body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.shop_table_responsive.cart.ds-cart-table tr,
  body.woocommerce-cart table.shop_table_responsive.cart.ds-cart-table tr,
  body.woocommerce-page.woocommerce-cart table.shop_table_responsive.cart.ds-cart-table tr,
  form.woocommerce-cart-form .ds-cart-table-shell table.shop_table_responsive.cart tr,
  form.woocommerce-cart-form table.woocommerce-cart-form__contents.shop_table_responsive.cart tr,
  .woocommerce form.woocommerce-cart-form table.shop_table_responsive.woocommerce-cart-form__contents tr {
    display: table-row !important;
  }

  body.woocommerce-cart .ds-cart-table-shell table.shop_table_responsive.cart.ds-cart-table thead th,
  body.woocommerce-cart .ds-cart-table-shell table.shop_table_responsive.cart.ds-cart-table tbody th,
  body.woocommerce-cart .ds-cart-table-shell table.shop_table_responsive.cart.ds-cart-table tbody td,
  body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.shop_table_responsive.cart.ds-cart-table thead th,
  body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.shop_table_responsive.cart.ds-cart-table tbody th,
  body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.shop_table_responsive.cart.ds-cart-table tbody td,
  body.woocommerce-cart table.shop_table_responsive.cart.ds-cart-table thead th,
  body.woocommerce-cart table.shop_table_responsive.cart.ds-cart-table tbody th,
  body.woocommerce-cart table.shop_table_responsive.cart.ds-cart-table tbody td,
  body.woocommerce-page.woocommerce-cart table.shop_table_responsive.cart.ds-cart-table thead th,
  body.woocommerce-page.woocommerce-cart table.shop_table_responsive.cart.ds-cart-table tbody th,
  body.woocommerce-page.woocommerce-cart table.shop_table_responsive.cart.ds-cart-table tbody td,
  form.woocommerce-cart-form .ds-cart-table-shell table.shop_table_responsive.cart thead th,
  form.woocommerce-cart-form .ds-cart-table-shell table.shop_table_responsive.cart tbody th,
  form.woocommerce-cart-form .ds-cart-table-shell table.shop_table_responsive.cart tbody td,
  form.woocommerce-cart-form table.woocommerce-cart-form__contents.shop_table_responsive.cart thead th,
  form.woocommerce-cart-form table.woocommerce-cart-form__contents.shop_table_responsive.cart tbody th,
  form.woocommerce-cart-form table.woocommerce-cart-form__contents.shop_table_responsive.cart tbody td,
  .woocommerce form.woocommerce-cart-form table.shop_table_responsive.woocommerce-cart-form__contents thead th,
  .woocommerce form.woocommerce-cart-form table.shop_table_responsive.woocommerce-cart-form__contents tbody th,
  .woocommerce form.woocommerce-cart-form table.shop_table_responsive.woocommerce-cart-form__contents tbody td {
    display: table-cell !important;
    float: none !important;
    width: auto;
    box-sizing: border-box;
  }

  body.woocommerce-cart .ds-cart-table-shell table.shop_table_responsive.cart.ds-cart-table tbody td::before,
  body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.shop_table_responsive.cart.ds-cart-table tbody td::before,
  body.woocommerce-cart table.shop_table_responsive.cart.ds-cart-table tbody td::before,
  body.woocommerce-page.woocommerce-cart table.shop_table_responsive.cart.ds-cart-table tbody td::before,
  form.woocommerce-cart-form .ds-cart-table-shell table.shop_table_responsive.cart tbody td::before,
  form.woocommerce-cart-form table.woocommerce-cart-form__contents.shop_table_responsive.cart tbody td::before,
  .woocommerce form.woocommerce-cart-form table.shop_table_responsive.woocommerce-cart-form__contents tbody td::before {
    display: none !important;
    content: none !important;
  }

  body.woocommerce-cart .ds-cart-table-shell table.cart.ds-cart-table td.product-thumbnail,
  body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart.ds-cart-table td.product-thumbnail,
  body.woocommerce-cart table.cart.ds-cart-table td.product-thumbnail,
  body.woocommerce-page.woocommerce-cart table.cart.ds-cart-table td.product-thumbnail,
  form.woocommerce-cart-form .ds-cart-table-shell table.shop_table_responsive.cart td.product-thumbnail,
  form.woocommerce-cart-form table.woocommerce-cart-form__contents.shop_table_responsive.cart td.product-thumbnail,
  .woocommerce form.woocommerce-cart-form table.shop_table_responsive.woocommerce-cart-form__contents td.product-thumbnail {
    width: 1%;
    white-space: nowrap;
    vertical-align: middle;
  }

  body.woocommerce-cart .ds-cart-table-shell table.cart.ds-cart-table td.product-thumbnail a,
  body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart.ds-cart-table td.product-thumbnail a,
  body.woocommerce-cart table.cart.ds-cart-table td.product-thumbnail a,
  body.woocommerce-page.woocommerce-cart table.cart.ds-cart-table td.product-thumbnail a,
  form.woocommerce-cart-form .ds-cart-table-shell table.shop_table_responsive.cart td.product-thumbnail a,
  form.woocommerce-cart-form table.woocommerce-cart-form__contents.shop_table_responsive.cart td.product-thumbnail a,
  .woocommerce form.woocommerce-cart-form table.shop_table_responsive.woocommerce-cart-form__contents td.product-thumbnail a {
    display: inline-block;
    line-height: 0;
    vertical-align: middle;
  }

  body.woocommerce-cart .ds-cart-table-shell table.cart.ds-cart-table .product-thumbnail img,
  body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart.ds-cart-table .product-thumbnail img,
  body.woocommerce-cart table.cart.ds-cart-table .product-thumbnail img,
  body.woocommerce-page.woocommerce-cart table.cart.ds-cart-table .product-thumbnail img,
  form.woocommerce-cart-form .ds-cart-table-shell table.shop_table_responsive.cart .product-thumbnail img,
  form.woocommerce-cart-form table.woocommerce-cart-form__contents.shop_table_responsive.cart .product-thumbnail img,
  .woocommerce form.woocommerce-cart-form table.shop_table_responsive.woocommerce-cart-form__contents .product-thumbnail img {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    object-fit: cover;
  }

  body.woocommerce-cart .ds-cart-table-shell table.cart.ds-cart-table td.product-quantity,
  body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart.ds-cart-table td.product-quantity,
  body.woocommerce-cart table.cart.ds-cart-table td.product-quantity,
  body.woocommerce-page.woocommerce-cart table.cart.ds-cart-table td.product-quantity,
  form.woocommerce-cart-form .ds-cart-table-shell table.shop_table_responsive.cart td.product-quantity,
  form.woocommerce-cart-form table.woocommerce-cart-form__contents.shop_table_responsive.cart td.product-quantity,
  .woocommerce form.woocommerce-cart-form table.shop_table_responsive.woocommerce-cart-form__contents td.product-quantity {
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
  }

  body.woocommerce-cart .ds-cart-table-shell table.cart.ds-cart-table td.product-subtotal,
  body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart.ds-cart-table td.product-subtotal,
  body.woocommerce-cart table.cart.ds-cart-table td.product-subtotal,
  body.woocommerce-page.woocommerce-cart table.cart.ds-cart-table td.product-subtotal,
  form.woocommerce-cart-form .ds-cart-table-shell table.shop_table_responsive.cart td.product-subtotal,
  form.woocommerce-cart-form table.woocommerce-cart-form__contents.shop_table_responsive.cart td.product-subtotal,
  .woocommerce form.woocommerce-cart-form table.shop_table_responsive.woocommerce-cart-form__contents td.product-subtotal {
    text-align: right;
    vertical-align: middle;
    white-space: nowrap;
  }

  body.woocommerce-cart .ds-cart-table-shell table.cart.ds-cart-table td.product-price,
  body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart.ds-cart-table td.product-price,
  body.woocommerce-cart table.cart.ds-cart-table td.product-price,
  body.woocommerce-page.woocommerce-cart table.cart.ds-cart-table td.product-price,
  form.woocommerce-cart-form .ds-cart-table-shell table.shop_table_responsive.cart td.product-price,
  form.woocommerce-cart-form table.woocommerce-cart-form__contents.shop_table_responsive.cart td.product-price,
  .woocommerce form.woocommerce-cart-form table.shop_table_responsive.woocommerce-cart-form__contents td.product-price {
    vertical-align: middle;
    white-space: nowrap;
  }

  body.woocommerce-cart .ds-cart-table-shell table.cart.ds-cart-table td.product-name,
  body.woocommerce-page.woocommerce-cart .ds-cart-table-shell table.cart.ds-cart-table td.product-name,
  body.woocommerce-cart table.cart.ds-cart-table td.product-name,
  body.woocommerce-page.woocommerce-cart table.cart.ds-cart-table td.product-name,
  form.woocommerce-cart-form .ds-cart-table-shell table.shop_table_responsive.cart td.product-name,
  form.woocommerce-cart-form table.woocommerce-cart-form__contents.shop_table_responsive.cart td.product-name,
  .woocommerce form.woocommerce-cart-form table.shop_table_responsive.woocommerce-cart-form__contents td.product-name {
    vertical-align: middle;
  }

  /* 侧栏总计表若被全局 responsive 规则打成 block，一并拉回 */
  body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.shop_table_responsive.ds-cart-totals-table,
  body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.shop_table_responsive.ds-cart-totals-table,
  body.woocommerce-cart .cart_totals.ds-cart-totals table.shop_table_responsive.ds-cart-totals-table,
  body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals table.shop_table_responsive.ds-cart-totals-table,
  .woocommerce .cart_totals.ds-cart-totals.ds-cart-totals-shell table.shop_table_responsive.ds-cart-totals-table,
  .woocommerce .cart_totals.ds-cart-totals table.shop_table_responsive.ds-cart-totals-table {
    display: table !important;
    width: 100% !important;
    table-layout: fixed;
    border-collapse: separate !important;
    border-spacing: 0 !important;
  }

  body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.shop_table_responsive.ds-cart-totals-table tr,
  body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.shop_table_responsive.ds-cart-totals-table tr,
  body.woocommerce-cart .cart_totals.ds-cart-totals table.shop_table_responsive.ds-cart-totals-table tr,
  body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals table.shop_table_responsive.ds-cart-totals-table tr,
  .woocommerce .cart_totals.ds-cart-totals.ds-cart-totals-shell table.shop_table_responsive.ds-cart-totals-table tr,
  .woocommerce .cart_totals.ds-cart-totals table.shop_table_responsive.ds-cart-totals-table tr {
    display: table-row !important;
  }

  body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.shop_table_responsive.ds-cart-totals-table th,
  body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.shop_table_responsive.ds-cart-totals-table td,
  body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.shop_table_responsive.ds-cart-totals-table th,
  body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.shop_table_responsive.ds-cart-totals-table td,
  body.woocommerce-cart .cart_totals.ds-cart-totals table.shop_table_responsive.ds-cart-totals-table th,
  body.woocommerce-cart .cart_totals.ds-cart-totals table.shop_table_responsive.ds-cart-totals-table td,
  body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals table.shop_table_responsive.ds-cart-totals-table th,
  body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals table.shop_table_responsive.ds-cart-totals-table td,
  .woocommerce .cart_totals.ds-cart-totals.ds-cart-totals-shell table.shop_table_responsive.ds-cart-totals-table th,
  .woocommerce .cart_totals.ds-cart-totals.ds-cart-totals-shell table.shop_table_responsive.ds-cart-totals-table td,
  .woocommerce .cart_totals.ds-cart-totals table.shop_table_responsive.ds-cart-totals-table th,
  .woocommerce .cart_totals.ds-cart-totals table.shop_table_responsive.ds-cart-totals-table td {
    display: table-cell !important;
    float: none !important;
  }

  body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.shop_table_responsive.ds-cart-totals-table tbody td::before,
  body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.shop_table_responsive.ds-cart-totals-table tbody td::before,
  body.woocommerce-cart .cart_totals.ds-cart-totals table.shop_table_responsive.ds-cart-totals-table tbody td::before,
  body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals table.shop_table_responsive.ds-cart-totals-table tbody td::before,
  .woocommerce .cart_totals.ds-cart-totals.ds-cart-totals-shell table.shop_table_responsive.ds-cart-totals-table tbody td::before,
  .woocommerce .cart_totals.ds-cart-totals table.shop_table_responsive.ds-cart-totals-table tbody td::before {
    display: none !important;
    content: none !important;
  }
}

/* ===== 购物车总计：浅灰卡片 + 表格左右对齐（高优先级，防插件覆盖）===== */
body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06) !important;
  padding: 1.35rem 1.5rem 1.5rem !important;
  margin-top: 1.75rem !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell h2,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell h2,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell h2,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell h2 {
  font-size: 1.125rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 0 0 1rem !important;
  padding-bottom: 0.85rem !important;
  border-bottom: 1px solid #e2e8f0 !important;
  text-align: left !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table.shop_table,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table.shop_table,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table.shop_table,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table.shop_table {
  border: 1px solid #e2e8f0 !important;
  margin: 0 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  overflow: hidden !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table {
  display: table !important;
  width: 100% !important;
  table-layout: fixed !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tbody,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tbody,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tbody,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tbody {
  display: table-row-group !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr {
  display: table-row !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr th,
body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr td,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr th,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr td,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr th,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr td,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr th,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr td {
  display: table-cell !important;
  float: none !important;
  vertical-align: top !important;
  padding: 0.75rem 1rem !important;
  border: none !important;
  border-bottom: 1px solid #f1f5f9 !important;
  text-align: left !important;
  box-sizing: border-box !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr th,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr th,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr th,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr th {
  width: 42% !important;
  max-width: 12rem !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  color: #64748b !important;
  text-align: left !important;
  padding-right: 0.75rem !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr td,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr td,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr td,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr td {
  width: 58% !important;
  text-align: right !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  color: #0f172a !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr td::before,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr td::before,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr td::before,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr td::before {
  content: none !important;
  display: none !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.order-total th,
body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.order-total td,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.order-total th,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.order-total td,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.order-total th,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.order-total td,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.order-total th,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.order-total td {
  border-bottom: none !important;
  padding-top: 1rem !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  vertical-align: middle !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.cart-subtotal td,
body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.cart-subtotal th,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.cart-subtotal td,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.cart-subtotal th,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.cart-subtotal td,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.cart-subtotal th,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.cart-subtotal td,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.cart-subtotal th {
  padding-top: 0.35rem !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.shipping th,
body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.shipping td,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.shipping th,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.shipping td,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.shipping th,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.shipping td,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.shipping th,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.shipping td {
  vertical-align: top !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table .includes_tax,
body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table .tax_label,
body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table small.includes_tax,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table .includes_tax,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table .tax_label,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table small.includes_tax,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table .includes_tax,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table .tax_label,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table small.includes_tax,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table .includes_tax,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table .tax_label,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table small.includes_tax {
  display: block !important;
  margin-top: 0.25rem !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  color: #64748b !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell ul#shipping_method.woocommerce-shipping-methods,
body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell ul.woocommerce-shipping-methods,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell ul.woocommerce-shipping-methods,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell ul.woocommerce-shipping-methods,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell ul.woocommerce-shipping-methods {
  list-style: none !important;
  margin: 0 0 0.25rem !important;
  padding: 0 !important;
  text-align: right !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell ul.woocommerce-shipping-methods li,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell ul.woocommerce-shipping-methods li,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell ul.woocommerce-shipping-methods li,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell ul.woocommerce-shipping-methods li {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  justify-content: flex-end !important;
  gap: 0.35rem 0.5rem !important;
  margin: 0 0 0.45rem !important;
  padding: 0 !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell ul.woocommerce-shipping-methods li:last-child,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell ul.woocommerce-shipping-methods li:last-child,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell ul.woocommerce-shipping-methods li:last-child,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell ul.woocommerce-shipping-methods li:last-child {
  margin-bottom: 0 !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell ul.woocommerce-shipping-methods input.shipping_method,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell ul.woocommerce-shipping-methods input.shipping_method,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell ul.woocommerce-shipping-methods input.shipping_method,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell ul.woocommerce-shipping-methods input.shipping_method {
  margin: 0.2rem 0 0 !important;
  flex-shrink: 0 !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell ul.woocommerce-shipping-methods label,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell ul.woocommerce-shipping-methods label,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell ul.woocommerce-shipping-methods label,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell ul.woocommerce-shipping-methods label {
  cursor: pointer !important;
  font-weight: 600 !important;
  color: #334155 !important;
  line-height: 1.45 !important;
  text-align: right !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .woocommerce-shipping-destination,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .woocommerce-shipping-destination,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .woocommerce-shipping-destination,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .woocommerce-shipping-destination {
  margin: 0.5rem 0 0 !important;
  padding: 0.55rem 0.65rem !important;
  font-size: 0.8125rem !important;
  line-height: 1.55 !important;
  color: #64748b !important;
  text-align: right !important;
  background: #f8fafc !important;
  border-radius: 8px !important;
  border: 1px solid #e2e8f0 !important;
  box-sizing: border-box !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .woocommerce-shipping-destination strong,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .woocommerce-shipping-destination strong,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .woocommerce-shipping-destination strong,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .woocommerce-shipping-destination strong {
  font-weight: 600 !important;
  color: #475569 !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .woocommerce-shipping-contents,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .woocommerce-shipping-contents,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .woocommerce-shipping-contents,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .woocommerce-shipping-contents {
  margin: 0.35rem 0 0 !important;
  text-align: right !important;
  color: #64748b !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .shipping-calculator-form,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .shipping-calculator-form,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .shipping-calculator-form,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .shipping-calculator-form {
  margin-top: 0.75rem !important;
  text-align: left !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell tr.cart-discount td,
body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell tr.cart-discount th,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell tr.cart-discount td,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell tr.cart-discount th,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell tr.cart-discount td,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell tr.cart-discount th,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell tr.cart-discount td,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell tr.cart-discount th {
  color: #16a34a !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell tr.fee td,
body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell tr.fee th,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell tr.fee td,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell tr.fee th,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell tr.fee td,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell tr.fee th,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell tr.fee td,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell tr.fee th {
  font-weight: 500 !important;
}

/* 金额列：WooCommerce 价格 span */
body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr td .woocommerce-Price-amount,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr td .woocommerce-Price-amount,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr td .woocommerce-Price-amount,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr td .woocommerce-Price-amount {
  color: #dc2626 !important;
  font-weight: 700 !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.order-total td .woocommerce-Price-amount,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.order-total td .woocommerce-Price-amount,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.order-total td .woocommerce-Price-amount,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell table.ds-cart-totals-table tr.order-total td .woocommerce-Price-amount {
  color: #0f172a !important;
  font-size: 1.15rem !important;
}

/* 购物车「去结账」：全宽，与卡片内边距对齐 */
body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout {
  padding-top: 1rem !important;
  margin-top: 0.5rem !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  clear: both !important;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.checkout-button,
body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.ds-cart-checkout-button,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.checkout-button,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.ds-cart-checkout-button,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.checkout-button,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.ds-cart-checkout-button,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.checkout-button,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.ds-cart-checkout-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0.75rem 1.25rem !important;
  min-height: 46px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  text-align: center !important;
  text-decoration: none !important;
  color: var(--ds-wc-btn-text) !important;
  border: none !important;
  border-radius: var(--ds-wc-btn-radius) !important;
  cursor: pointer !important;
  line-height: 1.35 !important;
  background: var(--ds-wc-btn-bg) !important;
  box-shadow: none !important;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.checkout-button:hover,
body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.ds-cart-checkout-button:hover,
body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.checkout-button:focus,
body.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.ds-cart-checkout-button:focus,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.checkout-button:hover,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.ds-cart-checkout-button:hover,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.checkout-button:focus,
body.woocommerce-page.woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.ds-cart-checkout-button:focus,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.ds-cart-checkout-button:hover,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.checkout-button:focus,
.woocommerce-cart .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.ds-cart-checkout-button:focus,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.ds-cart-checkout-button:hover,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.checkout-button:focus,
.woocommerce .cart-collaterals .cart_totals.ds-cart-totals.ds-cart-totals-shell .wc-proceed-to-checkout a.ds-cart-checkout-button:focus {
  color: var(--ds-wc-btn-text) !important;
  text-decoration: none !important;
  background: var(--ds-wc-btn-bg-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--ds-wc-btn-shadow);
}

/* 购物车小屏：主题禁用了 WC woocommerce-smallscreen，在此等价补齐 */
@media (max-width: 768px) {
  .woocommerce-cart .woocommerce {
    padding: 1rem;
  }

  .woocommerce-cart .woocommerce-cart-form {
    min-width: 0;
    width: 100%;
  }

  .woocommerce-cart .ds-cart-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
  }

  .woocommerce-cart .cart-collaterals {
    width: 100%;
    min-width: 0;
  }

  .woocommerce-cart .cart-collaterals .cart_totals,
  .woocommerce-cart .cart-collaterals .cross-sells,
  .woocommerce-cart .cart-collaterals .shipping_calculator {
    width: 100% !important;
    max-width: 100%;
    float: none !important;
    clear: both;
  }

  .woocommerce-cart table.shop_table_responsive.cart {
    display: block;
    width: 100%;
    border: 0;
    overflow: visible;
  }

  .woocommerce-cart table.shop_table_responsive.cart thead {
    display: none;
  }

  .woocommerce-cart table.shop_table_responsive.cart tbody,
  .woocommerce-cart table.shop_table_responsive.cart tbody tr,
  .woocommerce-cart table.shop_table_responsive.cart tbody td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .woocommerce-cart table.shop_table_responsive.cart tbody th {
    display: none;
  }

  .woocommerce-cart table.shop_table_responsive.cart tbody tr:first-child td:first-child {
    border-top: 0;
  }

  .woocommerce-cart table.shop_table_responsive.cart tr.woocommerce-cart-form__cart-item {
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
  }

  .woocommerce-cart table.shop_table_responsive.cart tr.woocommerce-cart-form__cart-item td {
    text-align: right !important;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
  }

  .woocommerce-cart table.shop_table_responsive.cart tr.woocommerce-cart-form__cart-item td:last-child {
    border-bottom: none;
  }

  .woocommerce-cart table.shop_table_responsive.cart tr.woocommerce-cart-form__cart-item:nth-child(2n) td {
    background-color: transparent;
  }

  .woocommerce-cart table.shop_table_responsive.cart tbody td::before {
    content: attr(data-title) ": ";
    font-weight: 600;
    float: left;
    color: #64748b;
  }

  .woocommerce-cart table.shop_table_responsive.cart td.product-remove::before,
  .woocommerce-cart table.shop_table_responsive.cart td.product-thumbnail::before,
  .woocommerce-cart table.shop_table_responsive.cart td.actions::before {
    content: none;
    display: none;
  }

  .woocommerce-cart table.shop_table_responsive.cart td.product-remove {
    text-align: left !important;
    padding: 0.5rem 1rem;
  }

  .woocommerce-cart table.shop_table_responsive.cart td.product-thumbnail {
    text-align: center !important;
    padding: 1rem;
  }

  .woocommerce-cart table.shop_table_responsive.cart td.product-thumbnail img {
    width: 72px;
    height: 72px;
  }

  .woocommerce-cart table.shop_table_responsive.cart td.product-quantity {
    overflow: hidden;
  }

  .woocommerce-cart table.shop_table_responsive.cart td.product-quantity .quantity.ds-qty-with-buttons {
    float: right;
    max-width: 100%;
  }

  .woocommerce-cart table.shop_table_responsive.cart td.actions {
    text-align: left !important;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin-top: 0.5rem;
  }

  .woocommerce-cart .ds-cart-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .woocommerce-cart .ds-cart-actions .coupon {
    float: none;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 0;
  }

  .woocommerce-cart .ds-cart-actions .coupon .input-text {
    flex: 1 1 160px;
    min-width: 0;
    box-sizing: border-box;
  }

  .woocommerce-cart .cart_totals.ds-cart-totals.ds-cart-totals-shell,
  .woocommerce-cart .cart_totals.ds-cart-totals {
    margin-top: 0;
  }
}

/* ===== 结算页样式 ===== */

.woocommerce-checkout .woocommerce-form-coupon {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.woocommerce-checkout .woocommerce-checkout-review-order {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.5rem;
}

/* ===== order-pay：结账「支付订单」页（与结算摘要区风格统一）===== */
body.woocommerce-order-pay form.ds-pay-order-form.woocommerce-checkout-review-order {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

body.woocommerce-order-pay form.ds-pay-order-form table.ds-pay-order-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  table-layout: auto;
  overflow: visible;
}

body.woocommerce-order-pay form.ds-pay-order-form table.ds-pay-order-table thead th,
body.woocommerce-order-pay form.ds-pay-order-form table.ds-pay-order-table tbody td,
body.woocommerce-order-pay form.ds-pay-order-form table.ds-pay-order-table tbody th,
body.woocommerce-order-pay form.ds-pay-order-form table.ds-pay-order-table tfoot th,
body.woocommerce-order-pay form.ds-pay-order-form table.ds-pay-order-table tfoot td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

body.woocommerce-order-pay form.ds-pay-order-form table.ds-pay-order-table tbody td.product-quantity,
body.woocommerce-order-pay form.ds-pay-order-form table.ds-pay-order-table thead th.product-quantity {
  text-align: center;
  white-space: nowrap;
}

body.woocommerce-order-pay form.ds-pay-order-form table.ds-pay-order-table tbody td.product-subtotal,
body.woocommerce-order-pay form.ds-pay-order-form table.ds-pay-order-table thead th.product-total {
  text-align: right;
}

body.woocommerce-order-pay form.ds-pay-order-form table.ds-pay-order-table tfoot td.product-total {
  text-align: right;
}

body.woocommerce-order-pay form.ds-pay-order-form table.ds-pay-order-table tbody tr:last-child td,
body.woocommerce-order-pay form.ds-pay-order-form table.ds-pay-order-table tbody tr:last-child th {
  border-bottom: 1px solid #e2e8f0;
}

body.woocommerce-order-pay form.ds-pay-order-form table.ds-pay-order-table tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.65);
}

body.woocommerce-order-pay form.ds-pay-order-form #payment.woocommerce-checkout-payment {
  margin: 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid #e2e8f0;
  background: transparent;
}

body.woocommerce-order-pay form.ds-pay-order-form #payment .wc_payment_methods.payment_methods {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

body.woocommerce-order-pay form.ds-pay-order-form #payment .wc_payment_methods.payment_methods > li {
  margin: 0 0 0.65rem;
  padding: 0;
}

body.woocommerce-order-pay form.ds-pay-order-form #payment .wc_payment_methods.payment_methods > li:last-child {
  margin-bottom: 0;
}

body.woocommerce-order-pay form.ds-pay-order-form #payment .wc_payment_method {
  padding: 0.85rem 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.woocommerce-order-pay form.ds-pay-order-form #payment .wc_payment_method:has(input:checked) {
  border-color: #ea580c;
  box-shadow: 0 0 0 1px rgba(234, 88, 12, 0.25);
}

body.woocommerce-order-pay form.ds-pay-order-form #payment .wc_payment_method label {
  cursor: pointer;
  font-weight: 600;
  color: #1e293b;
}

body.woocommerce-order-pay form.ds-pay-order-form #payment .payment_box {
  margin: 0.75rem 0 0;
  padding: 1rem;
  background: #f1f5f9;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

body.woocommerce-order-pay form.ds-pay-order-form #payment .form-row {
  margin: 0;
  padding: 0;
}

body.woocommerce-order-pay form.ds-pay-order-form #payment #place_order {
  width: 100%;
  max-width: 100%;
  margin-top: 1rem;
  padding: 0.9rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  box-sizing: border-box;
  border-radius: var(--ds-wc-btn-radius);
  background: var(--ds-wc-btn-bg);
  color: var(--ds-wc-btn-text);
  border: none;
}

body.woocommerce-order-pay form.ds-pay-order-form #payment #place_order:hover,
body.woocommerce-order-pay form.ds-pay-order-form #payment #place_order:focus {
  background: var(--ds-wc-btn-bg-hover);
  color: var(--ds-wc-btn-text);
  box-shadow: 0 4px 12px var(--ds-wc-btn-shadow);
}

@media (min-width: 769px) {
  body.woocommerce-order-pay form.ds-pay-order-form #payment #place_order {
    width: auto;
    min-width: 220px;
  }
}

@media only screen and (max-width: 768px) {
  body.woocommerce-order-pay form.ds-pay-order-form {
    padding: 1rem !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.woocommerce-order-pay form.ds-pay-order-form table.ds-pay-order-table {
    min-width: 520px;
  }

  body.woocommerce-order-pay form.ds-pay-order-form table.ds-pay-order-table td.product-name {
    min-width: 8rem;
    max-width: 55vw;
  }
}

/* ===== 我的账户 · 查看订单（view-order）===== */
body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order-intro,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order-intro {
  margin: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(110deg, rgba(234, 88, 12, 0.07) 0%, #ffffff 48%);
  border: 1px solid var(--ds-account-card-border);
  border-radius: 10px;
  color: var(--ds-account-text);
  line-height: 1.65;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order-intro mark,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order-intro mark {
  background: transparent;
  color: inherit;
  font-weight: 600;
  padding: 0;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order-intro mark.order-status,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order-intro mark.order-status {
  color: var(--ds-account-accent-deep);
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order > h2,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order > h2 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ds-account-text);
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-OrderUpdates,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-OrderUpdates {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-OrderUpdate,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-OrderUpdate {
  margin: 0;
  padding: 0;
  border: 1px solid var(--ds-account-card-border);
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-OrderUpdate-inner,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-OrderUpdate-inner {
  padding: 1rem 1.15rem;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-OrderUpdate-meta,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-OrderUpdate-meta {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  color: var(--ds-account-muted);
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-OrderUpdate-description,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-OrderUpdate-description {
  margin: 0;
  color: var(--ds-account-text);
  font-size: 0.9375rem;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads {
  margin: 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--ds-account-card-border);
  border-radius: 10px;
  background: #ffffff;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads__title,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads__title {
  margin: 0 0 1rem;
  font-size: 1.125rem;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-details,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-details {
  margin: 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--ds-account-card-border);
  border-radius: 10px;
  background: #ffffff;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-details__title,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-details__title {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ds-account-text);
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  overflow: visible;
  /* fixed：避免某一格 display:flex 破坏列宽后，首列被压成极窄导致中文逐字竖排 */
  table-layout: fixed;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details thead th,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details thead th {
  padding: 0.65rem 1rem;
  text-align: left;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--ds-account-muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--ds-account-card-border);
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details thead th.product-name,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details thead th.product-name {
  width: 68%;
  word-break: normal;
  overflow-wrap: break-word;
  white-space: normal;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details thead th.product-total,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details thead th.product-total {
  width: 32%;
  text-align: right;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tbody td,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tbody td {
  padding: 0.85rem 1rem;
  vertical-align: top;
  border-bottom: 1px solid var(--ds-account-card-border);
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tbody td.product-name,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tbody td.product-name {
  width: 68%;
  word-break: normal;
  overflow-wrap: break-word;
  white-space: normal;
}

/* 明细区 float 元数据标签时，防止单元格宽度塌陷 */
body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tbody td.product-name::after,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tbody td.product-name::after {
  content: "";
  display: table;
  clear: both;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tbody td.product-total,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tbody td.product-total {
  width: 32%;
  text-align: right;
  white-space: nowrap;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tbody tr:nth-child(even) td,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.7);
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tfoot th,
body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tfoot td,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tfoot th,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tfoot td {
  padding: 0.65rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--ds-account-card-border);
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tfoot th:not(.order-actions--heading),
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tfoot th:not(.order-actions--heading) {
  width: 68%;
  word-break: normal;
  overflow-wrap: break-word;
  white-space: normal;
  text-align: left;
  font-weight: 600;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tfoot td:not(:has(a.button)),
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tfoot td:not(:has(a.button)) {
  width: 32%;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tfoot tr:last-child th,
body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tfoot tr:last-child td,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tfoot tr:last-child th,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tfoot tr:last-child td {
  border-bottom: none;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tfoot td,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tfoot td {
  text-align: right;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tfoot th.order-actions--heading,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tfoot th.order-actions--heading {
  text-align: left;
  width: 24%;
  max-width: 10rem;
  white-space: nowrap;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tfoot td:has(a.button),
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tfoot td:has(a.button) {
  text-align: left;
  width: 76%;
  /* 禁止对 td 使用 flex/grid，否则会脱离 table-cell 布局导致整表列宽错乱 */
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tfoot td:has(a.button) a,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details tfoot td:has(a.button) a {
  float: none !important;
  display: inline-block;
  margin: 0 0.5rem 0.35rem 0 !important;
  vertical-align: middle;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .order-again,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .order-again {
  margin: 1rem 0 0;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-customer-details,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-customer-details {
  margin: 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--ds-account-card-border);
  border-radius: 10px;
  background: #ffffff;
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-customer-details .woocommerce-column__title,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-customer-details .woocommerce-column__title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ds-account-text);
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-customer-details address,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-customer-details address {
  font-style: normal;
  line-height: 1.65;
  color: var(--ds-account-text);
}

body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-columns--addresses.col2-set,
body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-columns--addresses.col2-set {
  display: grid;
  gap: 1.5rem;
  margin: 0;
}

@media (min-width: 769px) {
  body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-columns--addresses.col2-set,
  body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-columns--addresses.col2-set {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

@media only screen and (max-width: 768px) {
  body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order,
  body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order {
    gap: 1.15rem;
  }

  body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads,
  body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
  }

  body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads table.shop_table_responsive,
  body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads table.shop_table_responsive {
    min-width: 420px;
  }

  body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads table.shop_table_responsive thead,
  body.woocommerce-page.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads table.shop_table_responsive thead,
  body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads table.shop_table_responsive thead {
    display: table-header-group !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads table.shop_table_responsive tbody th,
  body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads table.shop_table_responsive tbody td,
  body.woocommerce-page.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads table.shop_table_responsive tbody th,
  body.woocommerce-page.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads table.shop_table_responsive tbody td,
  body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads table.shop_table_responsive tbody th,
  body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads table.shop_table_responsive tbody td {
    display: table-cell !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads table.shop_table_responsive tr,
  body.woocommerce-page.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads table.shop_table_responsive tr,
  body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads table.shop_table_responsive tr {
    display: table-row !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads table.shop_table_responsive tbody td::before,
  body.woocommerce-page.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads table.shop_table_responsive tbody td::before,
  body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-downloads table.shop_table_responsive tbody td::before {
    display: none !important;
    content: none !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-details,
  body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order .woocommerce-order-details {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
  }

  body.woocommerce-account .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details,
  body:has(nav.woocommerce-MyAccount-navigation) .woocommerce-MyAccount-content .ds-view-order table.woocommerce-table--order-details {
    min-width: 340px;
  }
}

/* ===== 订单确认页（感谢页 / order-received）===== */
.woocommerce-thankyou-order-received {
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  color: #16a34a;
  font-weight: 600;
}

.woocommerce-order-overview {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.woocommerce-order-overview li {
  margin-bottom: 0.5rem;
}

/* 结账「订单已收到」整页：与账户/支付页同一套卡片节奏 */
body.woocommerce-checkout .woocommerce-order.ds-thankyou-order,
.woocommerce-order.ds-thankyou-order {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 100%;
}

.ds-thankyou-order .ds-order-received {
  margin: 0;
  padding: 1.75rem 1.5rem 1.5rem;
  text-align: center;
  background: linear-gradient(165deg, rgba(220, 252, 231, 0.55) 0%, #ffffff 52%);
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.ds-thankyou-order .ds-order-received__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  color: #16a34a;
}

.ds-thankyou-order .ds-order-received__icon svg {
  width: 100%;
  height: 100%;
}

/* 外层已是成功卡片，内层成功文案不再套第二层绿盒 */
.ds-thankyou-order .ds-order-received .woocommerce-thankyou-order-received {
  margin: 0 0 0.5rem;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  font-size: 1.15rem;
  line-height: 1.5;
  color: #15803d;
  font-weight: 700;
}

.ds-thankyou-order .ds-order-received__subtext {
  margin: 0;
  font-size: 0.9375rem;
  color: #475569;
  line-height: 1.55;
}

/* 订单摘要：栅格卡片，避免长列表挤成一团 */
.ds-thankyou-order ul.woocommerce-order-overview.woocommerce-thankyou-order-details {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
  gap: 0.75rem;
  background: transparent;
}


.ds-thankyou-order ul.woocommerce-order-overview.woocommerce-thankyou-order-details > li strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  word-break: break-word;
}

/* 失败状态 */
.ds-thankyou-order .woocommerce-thankyou-order-failed {
  margin: 0;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 600;
}

.ds-thankyou-order .woocommerce-thankyou-order-failed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
}

.ds-thankyou-order .woocommerce-thankyou-order-failed-actions .button {
  margin: 0;
}

/* 订单明细 / 客户信息（woocommerce_thankyou 输出） */
.ds-thankyou-order .woocommerce-order-downloads,
.ds-thankyou-order .woocommerce-order-details,
.ds-thankyou-order .woocommerce-customer-details {
  margin: 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ds-thankyou-order .woocommerce-order-details__title,
.ds-thankyou-order .woocommerce-order-downloads__title,
.ds-thankyou-order .woocommerce-column__title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
}

.ds-thankyou-order table.woocommerce-table--order-details {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  table-layout: fixed;
}

.ds-thankyou-order table.woocommerce-table--order-details thead th {
  padding: 0.65rem 0.85rem;
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.ds-thankyou-order table.woocommerce-table--order-details thead th.product-total {
  text-align: right;
  width: 32%;
}

.ds-thankyou-order table.woocommerce-table--order-details thead th.product-name {
  width: 68%;
}

.ds-thankyou-order table.woocommerce-table--order-details tbody td {
  padding: 0.75rem 0.85rem;
  vertical-align: top;
  border-bottom: 1px solid #e2e8f0;
  word-break: normal;
  overflow-wrap: break-word;
}

.ds-thankyou-order table.woocommerce-table--order-details tbody td.product-total {
  text-align: right;
  white-space: nowrap;
}

.ds-thankyou-order table.woocommerce-table--order-details tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.65);
}

.ds-thankyou-order table.woocommerce-table--order-details tfoot th,
.ds-thankyou-order table.woocommerce-table--order-details tfoot td {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.ds-thankyou-order table.woocommerce-table--order-details tfoot td {
  text-align: right;
}

.ds-thankyou-order table.woocommerce-table--order-details tfoot tr:last-child th,
.ds-thankyou-order table.woocommerce-table--order-details tfoot tr:last-child td {
  border-bottom: none;
}

.ds-thankyou-order .woocommerce-customer-details address {
  font-style: normal;
  line-height: 1.65;
  color: #334155;
}

.ds-thankyou-order .woocommerce-columns--addresses.col2-set {
  display: grid;
  gap: 1.25rem;
  margin: 0;
}

@media (min-width: 769px) {
  .ds-thankyou-order .woocommerce-columns--addresses.col2-set {
    grid-template-columns: 1fr 1fr;
  }
}

/* 底部操作按钮 */
.ds-thankyou-order .ds-thankyou-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 0;
  padding-top: 0.25rem;
}

.ds-thankyou-order .ds-thankyou-actions .button,
.ds-thankyou-order .ds-thankyou-actions a.button {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  border-radius: var(--ds-wc-btn-radius);
  font-weight: 600;
  text-decoration: none;
  background: var(--ds-wc-btn-bg);
  color: var(--ds-wc-btn-text);
  border: none;
}

.ds-thankyou-order .ds-thankyou-actions .button:hover,
.ds-thankyou-order .ds-thankyou-actions a.button:hover {
  background: var(--ds-wc-btn-bg-hover);
  color: var(--ds-wc-btn-text);
}

@media only screen and (max-width: 768px) {
  .ds-thankyou-order .woocommerce-order-details,
  .ds-thankyou-order .woocommerce-order-downloads {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
  }

  .ds-thankyou-order table.woocommerce-table--order-details {
    min-width: 320px;
  }

  .ds-thankyou-order .ds-thankyou-actions .button,
  .ds-thankyou-order .ds-thankyou-actions a.button {
    flex: 1 1 auto;
    min-width: min(100%, 12rem);
    justify-content: center;
  }
}

/* ===== 登录/注册页（我的账户）===== */
.woocommerce-form-login,
.woocommerce-form-register {
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* 仅登录、未出现双栏容器时：与版心同宽（不单列窄块） */
body.woocommerce-account .woocommerce > form.woocommerce-form-login.login {
  max-width: 100%;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.woocommerce-form-login h2,
.woocommerce-form-register h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* 登录/注册：密码框 + 眼睛（只依赖 form，避免 body 无 woocommerce-account 时按钮变默认样式、定位错位） */
form.woocommerce-form-login .ds-password-field-wrap,
form.woocommerce-form-register .ds-password-field-wrap {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  overflow: hidden;
  contain: layout;
}

form.woocommerce-form-login .ds-password-field-wrap > input.input-text,
form.woocommerce-form-register .ds-password-field-wrap > input.input-text {
  width: 100% !important;
  box-sizing: border-box !important;
  padding-right: 2.75rem !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

form.woocommerce-form-login .ds-password-toggle,
form.woocommerce-form-register .ds-password-toggle {
  position: absolute !important;
  right: 0.5rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 2.375rem !important;
  height: 2.375rem !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #64748b !important;
  cursor: pointer !important;
  line-height: 0 !important;
  z-index: 2;
  font: inherit;
}

form.woocommerce-form-login .ds-password-toggle:hover,
form.woocommerce-form-register .ds-password-toggle:hover {
  color: #ea580c !important;
  background: rgba(234, 88, 12, 0.08) !important;
}

form.woocommerce-form-login .ds-password-toggle:focus,
form.woocommerce-form-register .ds-password-toggle:focus {
  outline: none !important;
}

form.woocommerce-form-login .ds-password-toggle:focus-visible,
form.woocommerce-form-register .ds-password-toggle:focus-visible {
  outline: 2px solid #ea580c !important;
  outline-offset: 2px !important;
}

form.woocommerce-form-login .ds-password-toggle svg,
form.woocommerce-form-register .ds-password-toggle svg {
  width: 1.25rem !important;
  height: 1.25rem !important;
  display: block !important;
  pointer-events: none;
}

form.woocommerce-form-login .ds-password-field-wrap > input[type="password"]::-ms-reveal,
form.woocommerce-form-login .ds-password-field-wrap > input[type="password"]::-ms-clear,
form.woocommerce-form-register .ds-password-field-wrap > input[type="password"]::-ms-reveal,
form.woocommerce-form-register .ds-password-field-wrap > input[type="password"]::-ms-clear {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* 密码框 + 眼睛按钮（由 wc-login-password-toggle.js 插入 .ds-password-field-wrap） */
body.woocommerce-account .ds-password-field-wrap,
body:has(nav.woocommerce-MyAccount-navigation) .ds-password-field-wrap {
  position: relative;
  display: block;
  width: 100%;
  /* 裁掉 Chromium 仍可能露出的原生装饰像素，避免输入框下方再出现一条「药丸」 */
  overflow: hidden;
}

body.woocommerce-account .ds-password-field-wrap > input.input-text,
body:has(nav.woocommerce-MyAccount-navigation) .ds-password-field-wrap > input.input-text {
  width: 100%;
  box-sizing: border-box;
  padding-right: 2.75rem;
  /* 去掉系统密码框外观，可一并去掉内置「显示密码」等控件（保留主题眼睛） */
  -webkit-appearance: none;
  appearance: none;
}

body.woocommerce-account .ds-password-toggle,
body:has(nav.woocommerce-MyAccount-navigation) .ds-password-toggle {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  line-height: 0;
}

body.woocommerce-account .ds-password-toggle:hover,
body:has(nav.woocommerce-MyAccount-navigation) .ds-password-toggle:hover {
  color: var(--ds-account-accent, #ea580c);
  background: rgba(234, 88, 12, 0.08);
}

body.woocommerce-account .ds-password-toggle:focus-visible,
body:has(nav.woocommerce-MyAccount-navigation) .ds-password-toggle:focus-visible {
  outline: 2px solid var(--ds-account-accent, #ea580c);
  outline-offset: 2px;
}

/* 隐藏 Edge/IE 与 Edge(Chromium) 原生「显示密码」，只保留主题眼睛 */
body.woocommerce-account .ds-password-field-wrap > input[type="password"]::-ms-reveal,
body.woocommerce-account .ds-password-field-wrap > input[type="password"]::-ms-clear,
body:has(nav.woocommerce-MyAccount-navigation) .ds-password-field-wrap > input[type="password"]::-ms-reveal,
body:has(nav.woocommerce-MyAccount-navigation) .ds-password-field-wrap > input[type="password"]::-ms-clear {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Chrome / Safari：隐藏内置密码装饰（勿仅用 display:none，部分版本会在下方留出「药丸」占位） */
body.woocommerce-account .ds-password-field-wrap > input[type="password"]::-webkit-credentials-auto-fill-button,
body.woocommerce-account .ds-password-field-wrap > input[type="password"]::-webkit-contacts-auto-fill-button,
body:has(nav.woocommerce-MyAccount-navigation) .ds-password-field-wrap > input[type="password"]::-webkit-credentials-auto-fill-button,
body:has(nav.woocommerce-MyAccount-navigation) .ds-password-field-wrap > input[type="password"]::-webkit-contacts-auto-fill-button {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  opacity: 0 !important;
}

body.woocommerce-account .ds-password-field-wrap > input[type="password"]::-webkit-strong-password-auto-fill-button,
body:has(nav.woocommerce-MyAccount-navigation) .ds-password-field-wrap > input[type="password"]::-webkit-strong-password-auto-fill-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.woocommerce-account .ds-password-field-wrap > input[type="password"]::-webkit-textfield-decoration-container,
body.woocommerce-account .ds-password-field-wrap > input[type="text"]::-webkit-textfield-decoration-container,
body:has(nav.woocommerce-MyAccount-navigation) .ds-password-field-wrap > input[type="password"]::-webkit-textfield-decoration-container,
body:has(nav.woocommerce-MyAccount-navigation) .ds-password-field-wrap > input[type="text"]::-webkit-textfield-decoration-container {
  display: block !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  flex: 0 0 0 !important;
}

/* 登录 / 注册：更高优先级压住 Chromium 第二条控件（勿写 .ds-woo-main：未登录时 my-account 只输出表单，不在该壳内） */
body.woocommerce-account form.woocommerce-form-login .ds-password-field-wrap,
body.woocommerce-page form.woocommerce-form-login .ds-password-field-wrap,
body:has(nav.woocommerce-MyAccount-navigation) form.woocommerce-form-login .ds-password-field-wrap,
body.woocommerce-account form.woocommerce-form-register .ds-password-field-wrap,
body.woocommerce-page form.woocommerce-form-register .ds-password-field-wrap,
body:has(nav.woocommerce-MyAccount-navigation) form.woocommerce-form-register .ds-password-field-wrap {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  overflow: hidden;
  contain: layout;
}

body.woocommerce-account form.woocommerce-form-login .ds-password-field-wrap > input[type="password"]::-webkit-textfield-decoration-container,
body.woocommerce-account form.woocommerce-form-login .ds-password-field-wrap > input[type="text"]::-webkit-textfield-decoration-container,
body.woocommerce-page form.woocommerce-form-login .ds-password-field-wrap > input[type="password"]::-webkit-textfield-decoration-container,
body.woocommerce-page form.woocommerce-form-login .ds-password-field-wrap > input[type="text"]::-webkit-textfield-decoration-container,
body:has(nav.woocommerce-MyAccount-navigation)
form.woocommerce-form-login
.ds-password-field-wrap
> input[type="password"]::-webkit-textfield-decoration-container,
body:has(nav.woocommerce-MyAccount-navigation)
form.woocommerce-form-login
.ds-password-field-wrap
> input[type="text"]::-webkit-textfield-decoration-container,
body.woocommerce-account form.woocommerce-form-register .ds-password-field-wrap > input[type="password"]::-webkit-textfield-decoration-container,
body.woocommerce-account form.woocommerce-form-register .ds-password-field-wrap > input[type="text"]::-webkit-textfield-decoration-container,
body.woocommerce-page form.woocommerce-form-register .ds-password-field-wrap > input[type="password"]::-webkit-textfield-decoration-container,
body.woocommerce-page form.woocommerce-form-register .ds-password-field-wrap > input[type="text"]::-webkit-textfield-decoration-container,
body:has(nav.woocommerce-MyAccount-navigation)
form.woocommerce-form-register
.ds-password-field-wrap
> input[type="password"]::-webkit-textfield-decoration-container,
body:has(nav.woocommerce-MyAccount-navigation)
form.woocommerce-form-register
.ds-password-field-wrap
> input[type="text"]::-webkit-textfield-decoration-container {
  display: block !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  flex: 0 0 0 !important;
}

body.woocommerce-account form.woocommerce-form-login .ds-password-field-wrap > input[type="password"]::-webkit-strong-password-auto-fill-button,
body.woocommerce-page form.woocommerce-form-login .ds-password-field-wrap > input[type="password"]::-webkit-strong-password-auto-fill-button,
body:has(nav.woocommerce-MyAccount-navigation)
form.woocommerce-form-login
.ds-password-field-wrap
> input[type="password"]::-webkit-strong-password-auto-fill-button,
body.woocommerce-account form.woocommerce-form-register .ds-password-field-wrap > input[type="password"]::-webkit-strong-password-auto-fill-button,
body.woocommerce-page form.woocommerce-form-register .ds-password-field-wrap > input[type="password"]::-webkit-strong-password-auto-fill-button,
body:has(nav.woocommerce-MyAccount-navigation)
form.woocommerce-form-register
.ds-password-field-wrap
> input[type="password"]::-webkit-strong-password-auto-fill-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* JS 尚未执行时：登录 #password 先压住原生条 */
body.woocommerce-account form.woocommerce-form-login #password::-webkit-textfield-decoration-container,
body.woocommerce-page form.woocommerce-form-login #password::-webkit-textfield-decoration-container,
body:has(nav.woocommerce-MyAccount-navigation) form.woocommerce-form-login #password::-webkit-textfield-decoration-container {
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  pointer-events: none !important;
}

body.woocommerce-account form.woocommerce-form-register #reg_password::-webkit-textfield-decoration-container,
body.woocommerce-page form.woocommerce-form-register #reg_password::-webkit-textfield-decoration-container,
body:has(nav.woocommerce-MyAccount-navigation) form.woocommerce-form-register #reg_password::-webkit-textfield-decoration-container {
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  pointer-events: none !important;
}

/* 编辑账户 · 修改密码：输入不要太宽，眼睛与输入同一行（依赖 wc-login-password-toggle.js 包裹） */
body.woocommerce-account .ds-woo-main form.edit-account fieldset .ds-password-field-wrap,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main form.edit-account fieldset .ds-password-field-wrap {
  max-width: min(100%, 22rem);
}

/* JS 执行前：尽量压掉 Chromium 原生装饰（包裹后由 .ds-password-field-wrap 内规则接管） */
body.woocommerce-account .ds-woo-main form.edit-account fieldset input[type="password"].woocommerce-Input--password::-webkit-textfield-decoration-container,
body:has(nav.woocommerce-MyAccount-navigation)
.ds-woo-main
form.edit-account
fieldset
input[type="password"].woocommerce-Input--password::-webkit-textfield-decoration-container {
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  pointer-events: none !important;
}

body.woocommerce-account .ds-woo-main form.edit-account fieldset input[type="password"].woocommerce-Input--password::-webkit-strong-password-auto-fill-button,
body:has(nav.woocommerce-MyAccount-navigation)
.ds-woo-main
form.edit-account
fieldset
input[type="password"].woocommerce-Input--password::-webkit-strong-password-auto-fill-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.woocommerce-account .ds-woo-main form.edit-account fieldset .ds-password-field-wrap > input.input-text,
body:has(nav.woocommerce-MyAccount-navigation) .ds-woo-main form.edit-account fieldset .ds-password-field-wrap > input.input-text {
  min-height: 46px;
}

body.woocommerce-account .ds-woo-main form.woocommerce-ResetPassword.lost_reset_password .ds-password-field-wrap,
body:has(nav.woocommerce-MyAccount-navigation)
.ds-woo-main
form.woocommerce-ResetPassword.lost_reset_password
.ds-password-field-wrap {
  max-width: min(100%, 22rem);
}

/* PC：左登录右注册（#customer_login 仅在开启「我的账户注册」时出现） */
@media (min-width: 769px) {
  body.woocommerce-account #customer_login.col2-set,
  body:has(#customer_login.col2-set) #customer_login.col2-set {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 1.75rem;
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  body.woocommerce-account #customer_login.col2-set .u-column1,
  body.woocommerce-account #customer_login.col2-set .u-column2,
  body:has(#customer_login.col2-set) #customer_login.col2-set .u-column1,
  body:has(#customer_login.col2-set) #customer_login.col2-set .u-column2 {
    flex: 1 1 50%;
    min-width: 0;
  }

  body.woocommerce-account #customer_login .woocommerce-form-login,
  body.woocommerce-account #customer_login .woocommerce-form-register,
  body:has(#customer_login.col2-set) #customer_login .woocommerce-form-login,
  body:has(#customer_login.col2-set) #customer_login .woocommerce-form-register {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    /*height: 100%;*/
    box-sizing: border-box;
  }

  body.woocommerce-account #customer_login .woocommerce-form-login h2,
  body.woocommerce-account #customer_login .woocommerce-form-register h2,
  body:has(#customer_login.col2-set) #customer_login .woocommerce-form-login h2,
  body:has(#customer_login.col2-set) #customer_login .woocommerce-form-register h2 {
    text-align: left;
  }
}
.show-password-input{
  display: none;
}

@media (max-width: 768px) {
  body.woocommerce-account #customer_login.col2-set,
  body:has(#customer_login.col2-set) #customer_login.col2-set {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  body.woocommerce-account #customer_login .woocommerce-form-login,
  body.woocommerce-account #customer_login .woocommerce-form-register {
    max-width: 100%;
  }
}

/* ===== 商店工具栏（排序与商品列表间距） ===== */
.ds-shop-main .woocommerce-ordering {
  display: block;
  float: none !important;
  width: 100%;
  margin-top: 0.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0f0f0;
  clear: both;
}

.ds-shop-main .woocommerce-result-count {
  float: none !important;
  width: 100%;
  margin-bottom: 1rem;
}

.ds-shop-main ul.products {
  margin-top: 0.25rem;
  clear: both;
  width: 100%;
}

.woocommerce .woocommerce-ordering select {
  border-color: #e5e7eb;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  min-height: 44px;
  font-size: 0.95rem;
  background-color: #fff;
}

/* ===== 分页样式 ===== */
.woocommerce nav.woocommerce-pagination {
  margin-top: 2rem;
}

.woocommerce nav.woocommerce-pagination ul {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  color: #374151;
  text-decoration: none;
  transition: all 0.2s ease;
}

.woocommerce nav.woocommerce-pagination ul li a:hover {
  background: #f8fafc;
  border-color: var(--ds-wc-btn-bg);
  color: var(--ds-wc-btn-bg);
}

.woocommerce nav.woocommerce-pagination ul li span.current {
  background: var(--ds-wc-btn-bg);
  border-color: var(--ds-wc-btn-bg);
  color: var(--ds-wc-btn-text);
}

/* ===== 消息提示 ===== */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-notice {
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.woocommerce-message {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #16a34a;
}

.woocommerce-info {
  background: #ffedd5;
  border: 1px solid #fdba74;
  color: #ea580c;
}

.woocommerce-error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #dc2626;
}

.woocommerce-message a.button,
.woocommerce-info a.button {
  margin-left: auto;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  background: var(--ds-wc-btn-bg) !important;
  color: var(--ds-wc-btn-text) !important;
  border: none !important;
  border-radius: var(--ds-wc-btn-radius) !important;
}

.woocommerce-message a.button:hover,
.woocommerce-info a.button:hover {
  background: var(--ds-wc-btn-bg-hover) !important;
  color: var(--ds-wc-btn-text) !important;
}

/* ===== 空购物车/空订单 ===== */
.woocommerce .cart-empty,
.woocommerce .woocommerce-info {
  text-align: center;
  padding: 3rem;
  font-size: 1.1rem;
}

/* 空购物车：hero 垂直居中叠放；推荐区单独拉满宽。勿用外层 align-items:stretch，否则整块被拉满易与全局 h2 左对齐冲突 */
.ds-cart-empty,
.woocommerce-cart .ds-cart-empty,
.woocommerce-page.woocommerce-cart .ds-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: none;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 1.25rem 0 2rem;
  box-sizing: border-box;
}

.ds-cart-empty__hero,
.woocommerce-cart .ds-cart-empty__hero,
.woocommerce-page.woocommerce-cart .ds-cart-empty__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(100%, 28rem);
  max-width: 28rem;
  margin: 0 auto 1rem;
  padding: 0 1rem;
  box-sizing: border-box;
}

.ds-cart-empty__hero > *,
.woocommerce-cart .ds-cart-empty__hero > *,
.woocommerce-page.woocommerce-cart .ds-cart-empty__hero > * {
  float: none;
  clear: both;
}

.ds-cart-empty__icon,
.woocommerce-cart .ds-cart-empty__icon,
.woocommerce-page.woocommerce-cart .ds-cart-empty__icon {
  width: 4rem;
  height: 4rem;
  max-width: min(4rem, 22vw);
  max-height: min(4rem, 22vw);
  margin: 0 auto 0.75rem;
  flex-shrink: 0;
  color: #94a3b8;
  box-sizing: border-box;
  overflow: hidden;
}

.ds-cart-empty__icon svg,
.woocommerce-cart .ds-cart-empty__icon svg,
.woocommerce-page.woocommerce-cart .ds-cart-empty__icon svg {
  width: 100%;
  height: 100%;
  max-width: 4rem;
  max-height: 4rem;
  display: block;
}

.ds-cart-empty__title,
.woocommerce-cart .ds-cart-empty__title,
.woocommerce-page.woocommerce-cart .ds-cart-empty__title {
  width: 100%;
  max-width: 26rem;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: #1e293b;
  text-align: center !important;
}

.ds-cart-empty__message,
.woocommerce-cart .ds-cart-empty__message,
.woocommerce-page.woocommerce-cart .ds-cart-empty__message {
  width: 100%;
  max-width: 26rem;
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #64748b;
  text-align: center !important;
}

.ds-cart-empty__actions,
.woocommerce-cart .ds-cart-empty__actions,
.woocommerce-page.woocommerce-cart .ds-cart-empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 26rem;
}

@media (max-width: 480px) {
  .ds-cart-empty__icon,
  .woocommerce-cart .ds-cart-empty__icon,
  .woocommerce-page.woocommerce-cart .ds-cart-empty__icon {
    width: 3.25rem;
    height: 3.25rem;
    max-width: min(3.25rem, 28vw);
    max-height: min(3.25rem, 28vw);
    margin-bottom: 0.65rem;
  }

  .ds-cart-empty__icon svg,
  .woocommerce-cart .ds-cart-empty__icon svg,
  .woocommerce-page.woocommerce-cart .ds-cart-empty__icon svg {
    max-width: 3.25rem;
    max-height: 3.25rem;
  }

  .ds-cart-empty__title,
  .woocommerce-cart .ds-cart-empty__title,
  .woocommerce-page.woocommerce-cart .ds-cart-empty__title {
    font-size: 1.05rem;
  }
}

/* 空购物车下方「新品」：与商店列表同一套 ul.products，且占满主内容宽度 */
.ds-cart-empty__recommendations {
  align-self: stretch;
  width: 100%;
  margin-top: 2rem;
  max-width: none;
  text-align: left;
  box-sizing: border-box;
}

.ds-cart-empty__recommendations .ds-cart-empty__subtitle {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
  color: #1e293b;
  text-align: center;
}

.ds-cart-empty__recommendations ul.products {
  margin-bottom: 0;
}

/* 空购物车推荐商品：与商店列表一致，完整显示、按比例缩放 */
.ds-cart-empty__recommendations ul.products li.product img {
  width: 100%;
  height: 320px;
  max-height: none;
  object-fit: contain !important;
  object-position: center;
  background: #f8fafc;
}

/* ===== 辅助类 ===== */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/*付款页面*/
.wc-block-components-checkout-place-order-button {
  background: var(--ds-wc-btn-bg) !important;
  color: var(--ds-wc-btn-text) !important;
  border: none !important;
  border-radius: var(--ds-wc-btn-radius) !important;
  padding: 0.75rem 1.75rem !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  min-height: 44px;
  min-width: 140px;
  box-shadow: none !important;
}

.wc-block-components-checkout-place-order-button:hover,
.wc-block-components-checkout-place-order-button:focus {
  background: var(--ds-wc-btn-bg-hover) !important;
  color: var(--ds-wc-btn-text) !important;
  box-shadow: 0 4px 12px var(--ds-wc-btn-shadow);
}
.wp-block-woocommerce-checkout-order-summary-block{
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;

}

.airwallex-content-drop-in .cart-contents img{
  max-width: 80px;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
}