/* 产品标题只显示两行 */
.wc-block-product .wp-block-post-title > a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 产品标题链接：悬停时无下划线 */
.wc-block-product .wp-block-post-title > a:hover {
  text-decoration: none;
}

/* 卡片本身撑满格子高度，并纵向排列 */
.wc-block-product {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* 最后一组（按钮 + sku）被推到底 */
.wc-block-product .wp-block-group:last-child {
  margin-top: auto !important;
}

/* 产品加入购物车按钮：电脑端 — 购物袋图标 + 文案 */
.wc-block-components-product-button {
  border: 1px solid;
  border-radius: 30px;
  color: #000000;
  background: transparent;
}
.wc-block-components-product-button .wc-block-components-product-button__button {
  width: 134px;
  padding: 6px 10px;
  color: #000000;
  background: transparent;
  gap: 6px;
  font-weight: 400;
  font-size: 12px;
  /* 禁止换行 */
  white-space: nowrap;
}

.wc-block-components-product-button .wc-block-components-product-button__button::before {
  content: "";
  display: block;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  background: url("./e-product-button-bag.svg") no-repeat center / contain;
}

.wc-block-components-product-button .wc-block-components-product-button__button::after {
  content: none;
}

/* 产品加入购物车按钮：手机端 — 圆圈加号 SVG */
@media (max-width: 768px) {
  .wc-block-components-product-button {
    border: none;
  }
  .wc-block-components-product-button .wc-block-components-product-button__button {
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
  }

  /* 隐藏原本的文案 */
  .wc-block-components-product-button .wc-block-components-product-button__button > span {
    width: 0;
    height: 0;
    overflow: hidden;
  }

  .wc-block-components-product-button .wc-block-components-product-button__button::before {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    background: url("./e-product-button-mobile.svg") no-repeat center / contain;
  }

  .wc-block-components-product-button .wc-block-components-product-button__button::after {
    content: none;
  }
}
