.block-product-card .product-card-style--card {
  background-color: rgb(var(--color-background));
}
.block-product-card__layer-image-wrapper {
  position: relative;
  display: flex;
  width: 100%;
  padding: var(--padding);
  overflow: hidden;
}
@media (min-width: 960px) {
  .block-product-card__layer-image-wrapper.hover:hover
    .block-product-card__image:nth-of-type(1) {
    opacity: 0;
  }

  .block-product-card__layer-image-wrapper.hover:hover
    .block-product-card__image:nth-of-type(2) {
    opacity: 1;
  }
}
.block-product-card__image-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  aspect-ratio: var(--aspect-ratio);
  overflow: hidden;
  background-color: rgb(243 243 243 / 100%);
  border-radius: var(--border-radius);
}
.block-product-card__image-wrapper > svg {
  width: 100%;
  height: 100%;
}
.block-product-card__image-wrapper > .block-product-card__image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: var(--fit-type);
  transition: 1s;
}
.block-product-card__image-wrapper > .block-product-card__image:nth-of-type(1) {
  opacity: 1;
}
.block-product-card__image-wrapper > .block-product-card__image:nth-of-type(2) {
  opacity: 0;
}
.block-product-card__layer-wrapper {
  position: absolute;
  inset: 0;
}
.block-product-card__quick-add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  cursor: pointer;
  background-color: rgb(0 0 0 / 40%);
  border: 0;
  border-radius: 50%;
}
.block-product-card__quick-add:hover {
  background-color: rgb(0 0 0 / 60%);
}
.block-product-card__quick-add svg {
  width: 100%;
  height: 100%;
}
@media (max-width: 959px) {
  .block-product-card__quick-add {
    width: 24px;
    height: 24px;
  }
}
.block-product-card__quick-add .icon-loading {
  display: none;
  margin: 8px;
  color: rgb(255 255 255 / 100%);
  animation: animation-button-loading linear 1.5s infinite;
}
.block-product-card__quick-add.loading {
  pointer-events: none;
}
.block-product-card__quick-add.loading .icon-quick-add {
  display: none;
}
.block-product-card__quick-add.loading .icon-loading {
  display: block;
}
.block-product-card__modal-content {
  width: 80vw;
  max-width: 1200px;
  max-height: 80vh;
  overflow-y: auto;
}
@media (max-width: 959px) {
  .block-product-card__modal-content {
    width: 100%;
  }
}
.block-product-card__modal-content .quick-add-hidden {
  display: none;
}
.block-product-card__modal-content theme-product-detail {
  --page-padding: 40px;
  --detail-padding-inline-start: 0px !important;
  --detail-padding-inline-end: 0px !important;
  --detail-padding-block-start: 0px !important;
  --detail-padding-block-end: 0px !important;

  padding: var(--page-padding);
}
@media (max-width: 959px) {
  .block-product-card__modal-content theme-product-detail {
    --page-padding: 20px;
  }

  .block-product-card__modal-content
    theme-product-detail
    theme-product-media-gallery[data-mobile-layout="fullscreen"] {
    margin-block-start: calc(-1 * var(--page-padding));
  }
}
.block-product-card__modal-close {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-end: 15px;
  color: #fff;
  background: rgb(0 0 0 / 40%);
}
.block-product-card__title {
  display: -webkit-box;
  flex-shrink: 0;
  padding-inline-end: 4px;
  overflow: hidden;
  color: rgb(var(--color-light-text));
  text-overflow: ellipsis;
  -webkit-line-clamp: var(--max-row);
  -webkit-box-orient: vertical;
}
.block-product-card__title.product-card-style--card {
  padding-inline: 8px;
}
.block-product-card__price.product-card-style--card {
  padding-inline: 8px;
}
.block-product-card__discount-tag {
  padding: 4px 12px;
  color: rgb(255 255 255 / 100%);
  background-color: rgb(227 38 25 / 100%);
  border-radius: var(--product-discount-radius);
}
@media (max-width: 959px) {
  .block-product-card__discount-tag {
    padding: 2px 8px;
  }
}
.block-product-card__sold-out {
  padding: 4px 12px;
  color: rgb(0 0 0 / 100%);
  background-color: rgb(255 255 255 / 100%);
  border-radius: var(--product-discount-radius);
}
@media (max-width: 959px) {
  .block-product-card__sold-out {
    padding: 2px 8px;
  }
}

/* ===== 以下均限定在「版本2」滑动区块的卡片（.block-product-card--enhanced），不影响分类/搜索等页面 ===== */

/* ===== 图片下方的信息容器：分类/标题/价格按钮，价格行底部对齐 ===== */
.block-product-card--enhanced {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.block-product-card--enhanced .block-product-card__info  {
display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 0;
    padding: 8px;
}
.block-product-card--enhanced .block-product-card__info .block-product-card__price {
    margin: 16px 0 10px;
}

/* ===== 折扣角标：压在图片右下角，黄底深色药丸（对齐效果图 -80% OFF） ===== */
.block-product-card--enhanced .block-product-card__layer-image-wrapper {
  position: relative;
}
/* 只负责定位；背景/文字/圆角/样式由 product/discount-badge 组件按设置渲染 */
.block-product-card--enhanced .block-product-card__image-discount {
  position: absolute;
  inset-inline-end: 10px;
  inset-block-end: 10px;
  z-index: 3;
}
@media (max-width: 959px) {
  .block-product-card--enhanced .block-product-card__image-discount {
    inset-inline-end: 6px;
    inset-block-end: 6px;
  }
}
/* 折扣移到图片后，隐藏价格行里的默认折扣角标（不影响单品详情页） */
.block-product-card--enhanced .block-product-card__price .saveoff.discount-badge {
  display: none;
}

/* ===== 标题上方的分类标签（蓝色大写小字） ===== */
.block-product-card--enhanced .block-product-card__category {
  color: #58B9FF;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
  margin: 6px 0 12px;
}

/* ===== 价格行 CTA 按钮：价格靠左、按钮靠右，黄底深色圆角 ===== */
.block-product-card--enhanced .block-product-card__price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.block-product-card--enhanced .block-product-card__price .product-price {
  flex: 0 1 auto;
  min-width: 0;
}
.block-product-card--enhanced .block-product-card__custom-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  background: #fadc02;
  color: #1e1d1d;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: filter 0.2s;
}
.block-product-card--enhanced .block-product-card__custom-btn:hover {
  filter: brightness(0.95);
}
@media (max-width: 959px) {
  .block-product-card--enhanced .block-product-card__custom-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}