/* ============================================================
   JY Product Perks Showcase Section
   Design Specs: 1920x800 PC baseline, 900x460px horizontal card,
   750px mobile baseline, padding 105/85/45px.
============================================================ */

.jy-product-perks {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.jy-product-perks__container {
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Header Area */
.jy-product-perks__header {
  margin-bottom: 40px;
  transition: transform 0.2s ease-out;
}

.jy-product-perks__header--left {
  text-align: left;
}

.jy-product-perks__header--center {
  text-align: center;
}

.jy-product-perks__header--right {
  text-align: right;
}

.jy-product-perks__title {
  margin: 0;
  font-family: var(--font-heading-family, inherit);
  font-weight: 500;
  color: #1b321f;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.jy-product-perks__subheading {
  margin: 12px 0 0 0;
  font-size: 15px;
  color: #5d675b;
  line-height: 1.5;
}

/* Optional Divider Line (需求7: 单独设置模块中的线) */
.jy-product-perks__divider {
  width: 100%;
  margin-bottom: 36px;
  border: none;
}

/* Cards Grid */
.jy-product-perks__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  width: 100%;
  box-sizing: border-box;
}

/* Single Card (900*460px 横版卡片) */
.jy-product-perks__card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background-color: var(--card-bg, #ffffff);
  border: var(--card-border-width, 1px) solid var(--card-border-color, #e8eae3);
  border-radius: var(--card-border-radius, 16px);
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 20px rgba(27, 50, 31, 0.04);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  min-height: 380px;
  box-sizing: border-box;
}

.jy-product-perks__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(27, 50, 31, 0.08);
}

/* Card Left: Media (可添加/替换图片，点击跳转) */
.jy-product-perks__media {
  width: 44%;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background-color: #f7f7f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jy-product-perks__media-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.jy-product-perks__picture {
  display: block;
  align-self: stretch;
  width: 100%;
  height: 100%;
}

.jy-product-perks__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.jy-product-perks__card:hover .jy-product-perks__img {
  transform: scale(1.03);
}

.jy-product-perks__placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ebeee8;
  color: #7b8878;
}

.jy-product-perks__placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.6;
}

/* Card Right: Content Info Box */
.jy-product-perks__content {
  width: 56%;
  padding: 32px 28px 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

.jy-product-perks__info-top {
  display: flex;
  flex-direction: column;
}

.jy-product-perks__item-title {
  margin: 0 0 8px 0;
  font-family: var(--card-title-font-family, var(--font-heading-family, inherit));
  font-weight: var(--card-title-font-weight, 600);
  font-style: var(--card-title-font-style, normal);
  color: #1b321f;
  line-height: 1.25;
  font-size: var(--card-title-size-d, 24px);
}

.jy-product-perks__item-desc {
  margin: 0;
  color: #657163;
  line-height: 1.45;
  font-size: var(--card-desc-size-d, 13px);
}

/* Feature Icons Row (无槽位限制，空间充裕时等分自适应，超出时丝滑横向滑动) */
.jy-product-perks__icons-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 18px 0;
  padding: 14px 2px 10px 2px;
  border-top: var(--card-line-width, 1px) solid var(--card-line-color, #e2e5dc);
  border-bottom: var(--card-line-width, 1px) solid var(--card-line-color, #e2e5dc);
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(27, 50, 31, 0.22) transparent;
}

.jy-product-perks__icons-row::-webkit-scrollbar {
  height: 3px;
}

.jy-product-perks__icons-row::-webkit-scrollbar-track {
  background: transparent;
}

.jy-product-perks__icons-row::-webkit-scrollbar-thumb {
  background: rgba(27, 50, 31, 0.22);
  border-radius: 9999px;
}

.jy-product-perks__icon-item {
  flex: 1 0 auto;
  min-width: 58px;
  max-width: 105px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  scroll-snap-align: start;
}

.jy-product-perks__icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1b321f;
  flex-shrink: 0;
  width: var(--card-icon-size-d, 24px);
  height: var(--card-icon-size-d, 24px);
}

.jy-product-perks__icon-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.jy-product-perks__icon-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.jy-product-perks__icon-label {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  color: #4a5749;
  word-break: break-word;
  white-space: normal;
}

/* Card Bottom: Price + CTA Button */
.jy-product-perks__bottom {
  display: flex;
  flex-direction: column;
  gap: var(--card-price-btn-gap, 14px);
  margin-top: auto;
}

.jy-product-perks__price-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1;
}

.jy-product-perks__price {
  font-size: var(--card-price-size-d, 26px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--card-price-color, #1b321f);
}

.jy-product-perks__compare-price {
  font-size: var(--card-compare-size-d, 15px);
  font-weight: 400;
  text-decoration: line-through;
  line-height: 1;
  color: var(--card-compare-price-color, #8e958c);
}

/* Pill CTA Button (Shop Now) */
.jy-product-perks__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 130px;
  max-width: 160px;
  height: var(--card-btn-height-d, 42px);
  padding: 0 24px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  background-color: var(--card-btn-bg, #1b321f) !important;
  color: var(--card-btn-text, #ffffff) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.jy-product-perks__btn:hover {
  opacity: 0.9;
  filter: brightness(1.1);
  transform: translateY(-1px);
  color: var(--card-btn-text, #ffffff) !important;
}

/* ============================================================
   Responsive Adaptations
============================================================ */

/* Tablet (750px - 1024px) */
@media screen and (max-width: 1024px) {
  .jy-product-perks__grid {
    gap: 20px;
  }
  .jy-product-perks__content {
    padding: 24px 20px 20px 16px;
  }
  .jy-product-perks__icons-row {
    margin: 14px 0;
    padding-top: 12px;
  }
}

/* Mobile (< 750px 需求标注基准) */
@media screen and (max-width: 749px) {
  .jy-product-perks__header {
    margin-bottom: 24px;
  }

  .jy-product-perks__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .jy-product-perks__card {
    min-height: auto;
    border-radius: var(--card-border-radius, 12px);
  }

  /* 移动端保留左图右文横版紧凑排列 */
  .jy-product-perks__media {
    width: 38%;
    min-height: 190px;
  }

  .jy-product-perks__media--mobile-contain .jy-product-perks__img {
    object-fit: contain;
  }

  .jy-product-perks__content {
    width: 62%;
    padding: 14px 12px 14px 12px;
  }

  .jy-product-perks__item-title {
    font-size: var(--card-title-size-m, 16px);
  }

  .jy-product-perks__item-desc {
    font-size: var(--card-desc-size-m, 11px);
  }

  .jy-product-perks__icons-row {
    gap: 10px;
    margin: 10px 0;
    padding: 8px 2px 6px 2px;
  }

  .jy-product-perks__icon-item {
    flex: 0 0 auto;
    min-width: 52px;
    max-width: 70px;
  }

  .jy-product-perks__icon-box {
    width: var(--card-icon-size-m, 18px);
    height: var(--card-icon-size-m, 18px);
  }

  .jy-product-perks__icon-label {
    font-size: 9.5px;
    line-height: 1.15;
  }

  .jy-product-perks__bottom {
    gap: 10px;
  }

  .jy-product-perks__price {
    font-size: var(--card-price-size-m, 19px) !important;
  }

  .jy-product-perks__compare-price {
    font-size: var(--card-compare-size-m, 12px) !important;
  }

  .jy-product-perks__btn {
    min-width: 100px;
    max-width: 125px;
    height: var(--card-btn-height-m, 34px);
    padding: 0 16px;
    font-size: 12px;
  }
}
