.block-product-card {
  position: relative;
}

.block-product-card.product-card-style--card {
  background-color: rgb(var(--color-card-background));
}

.block-product-card.product-card-style--card .block-product-price,
.block-product-card.product-card-style--card .block-product-title {
  padding-inline: 8px;
}

/* Global product card: hide info by default, show on hover */
.block-product-card .block-product-card-info {
  position: absolute !important;
  inset-block-end: 0 !important;
  inset-inline: 0 !important;
  top: auto !important;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.78) 0%,
    rgba(0, 0, 0, 0.3) 60%,
    rgba(0, 0, 0, 0) 100%
  ) !important;
  padding: 24px 20px 24px !important;
  opacity: 0 !important;
  transform: translateY(12px) !important;
  transition: opacity 0.4s ease, transform 0.4s ease !important;
  z-index: 3 !important;
  max-height: 80% !important;
  pointer-events: none !important;
}

.block-product-card:hover .block-product-card-info {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Trigger SHOPLINE system next-image swap on whole card hover, not just image-wrapper */
.block-product-card:hover .block-product-card__image-wrapper > .block-product-card__image:nth-of-type(1),
.block-product-card:hover .block-product-card__image-wrapper > .block-product-card__video:nth-of-type(1) {
  opacity: 0 !important;
}

.block-product-card:hover .block-product-card__image-wrapper > .block-product-card__image:nth-of-type(2),
.block-product-card:hover .block-product-card__image-wrapper > .block-product-card__video:nth-of-type(2) {
  opacity: 1 !important;
}

/* Product title: white, large */
.block-product-card .block-product-title,
.block-product-card .block-product-title a {
  color: #ffffff !important;
  font-size: 20px !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;
  margin: 0 0 6px 0 !important;
  letter-spacing: 0.3px !important;
  padding: 0 !important;
  text-align: left !important;
}

/* Product summary (副标题) - shows on hover below title */
.block-product-card__summary {
  display: block;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  letter-spacing: 0.2px !important;
  text-align: left !important;
  text-transform: none !important;
  margin-top: 6px !important;
  width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Meta wrap (STYLE + subtitle) - positioned at bottom, default visible */
.block-product-card__meta-wrap {
  position: absolute !important;
  left: 20px !important;
  right: 20px !important;
  bottom: 12px !important;
  z-index: 4 !important;
  pointer-events: none !important;
  text-align: left !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 4px !important;
  opacity: 0 !important;
  transform: translateY(8px) !important;
  transition: opacity 0.4s ease 0.05s, transform 0.4s ease 0.05s !important;
}

.block-product-card:hover .block-product-card__meta-wrap {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* STYLE: code (small) */
.block-product-card__meta-item {
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 2.5px !important;
  text-transform: uppercase !important;
  margin-top: 0 !important;
  opacity: 0.95;
  line-height: 1.4;
  text-align: left;
  display: block;
  width: 100%;
}

/* Hide product price */
.block-product-card .block-product-price {
  display: none !important;
}

/* Hide product buy button by default */
.block-product-card .block-product-buy-button,
.block-product-card .block-product-buy-button-group {
  display: none !important;
}

/* Position SHOPLINE system favorite-button to top right */
.block-product-card .favorite-button {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  z-index: 5 !important;
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.95) !important;
  border: none !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  transition: background 0.3s ease, transform 0.3s ease !important;
  color: #1a1a1a !important;
  opacity: 0.9 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.block-product-card .favorite-button:hover {
  background: #ffffff !important;
  transform: scale(1.08) !important;
  opacity: 1 !important;
}

.block-product-card .favorite-button svg {
  width: 18px !important;
  height: 18px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.5 !important;
}

/* Image zoom on hover */
.block-product-card .block-product-card__image-wrapper > .block-product-card__image,
.block-product-card .block-product-card__image-wrapper > .block-product-card__video {
  transition: opacity 0.5s ease, transform 0.5s ease !important;
}

.block-product-card:hover .block-product-card__image-wrapper > .block-product-card__image:nth-of-type(1),
.block-product-card:hover .block-product-card__image-wrapper > .block-product-card__video:nth-of-type(1) {
  transform: scale(1.05);
}

/* Hide product inventory, description in card */
.block-product-card .block-product-inventory,
.block-product-card .block-product-card__description {
  display: none !important;
}

/* Hide legacy style-code-wrap */
.block-product-card .block-product-card__style-code-wrap {
  display: none !important;
}

/* Hide legacy style-code (replaced by meta-item) */
.block-product-card__style-code {
  display: none !important;
}

/* Responsive */
@media (max-width: 1199px) {
  .block-product-card .block-product-title,
  .block-product-card .block-product-title a {
    font-size: 17px !important;
  }
}

@media (max-width: 767px) {
  .block-product-card .block-product-card-info {
    padding: 18px 16px 16px !important;
  }

  .block-product-card .block-product-title,
  .block-product-card .block-product-title a {
    font-size: 14px !important;
    margin-bottom: 4px !important;
  }

  .block-product-card__summary {
    font-size: 12px !important;
  }

  .block-product-card__meta-item {
    font-size: 9px !important;
    letter-spacing: 1.5px !important;
  }

  .block-product-card__meta-wrap {
    left: 16px !important;
    right: 16px !important;
    bottom: 8px !important;
  }

  .block-product-card .favorite-button {
    width: 32px !important;
    height: 32px !important;
    top: 12px !important;
    right: 12px !important;
  }

  .block-product-card .favorite-button svg {
    width: 16px !important;
    height: 16px !important;
  }
}