.sdm {
  --sdm-visible: var(--sdm-visible-desktop, 6);
  width: 100%;
  padding: var(--sdm-pad-top, 28px) 20px var(--sdm-pad-bottom, 28px);
  background: var(--sdm-section-bg, #f7f4ee);
  box-sizing: border-box;
}

.sdm__inner {
  width: 100%;
  max-width: var(--sdm-max-width, 1440px);
  margin: 0 auto;
  padding: var(--sdm-card-pad, 28px);
  background: var(--sdm-card-bg, #fffcf7);
  border: 1px solid var(--sdm-card-border, #e8e0d4);
  border-radius: var(--sdm-radius, 24px);
  box-shadow: 0 10px 30px rgba(33, 79, 47, 0.06);
  box-sizing: border-box;
}

.sdm__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.sdm__title {
  margin: 0;
  color: var(--sdm-title, #214f2f);
  font-size: var(--sdm-title-size, 30px);
  font-weight: 700;
  line-height: 1.2;
}

.sdm__desc {
  margin: 8px 0 0;
  max-width: 520px;
  color: var(--sdm-desc, #6b756e);
  font-size: 13px;
  line-height: 1.5;
}

.sdm__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.sdm__pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  color: var(--sdm-accent, #214f2f);
  font-size: 12px;
  font-weight: 700;
  background: transparent;
  border: 1px solid var(--sdm-accent, #214f2f);
  border-radius: 999px;
}

.sdm__pill.is-solid {
  color: #fff;
  background: var(--sdm-accent, #214f2f);
}

.sdm__stage {
  position: relative;
  /* 只裁左右；纵向可见，避免卡片底边/圆角被合成层裁掉 */
  overflow-x: hidden;
  overflow-y: visible;
  padding-bottom: 4px;
}

.sdm__viewport {
  position: relative;
  overflow: visible;
  margin: 0 44px;
  padding: 0;
}

.sdm__track {
  display: flex;
  align-items: flex-start;
  gap: var(--sdm-gap, 12px);
  padding: 2px 1px 8px;
  box-sizing: border-box;
  transition: transform 0.35s ease;
}

.sdm__slide {
  flex: 0 0 calc((100% - (var(--sdm-visible, 6) - 1) * var(--sdm-gap, 12px)) / var(--sdm-visible, 6));
  min-width: 0;
  box-sizing: border-box;
}

.sdm__node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 88px;
  margin-bottom: 14px;
  text-align: center;
}

.sdm__node::before {
  position: absolute;
  top: 7px;
  right: calc(-50% - var(--sdm-gap, 12px) / 2);
  left: calc(50% + 8px);
  height: 2px;
  content: "";
  background: var(--sdm-line, #9bb89f);
}

.sdm__slide:last-child .sdm__node::before {
  display: none;
}

.sdm__dot {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin: 0;
  background: var(--sdm-accent, #214f2f);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--sdm-line, #9bb89f);
}

.sdm__time {
  margin: 10px 0 0;
  color: var(--sdm-accent, #214f2f);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.sdm__moment {
  margin: 6px 0 0;
  color: #111111;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

.sdm__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: auto;
  min-height: 0;
  padding: 16px 14px;
  color: inherit;
  text-align: center;
  text-decoration: none;
  background: #fff;
  border: 1px solid #cfc4b4;
  border-radius: 14px;
  box-sizing: border-box;
  overflow: visible;
  background-clip: padding-box;
}

.sdm__card.is-dim {
  background: #f7f1e8;
  border-color: #cfc4b4;
}

.sdm__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0 auto 10px;
  overflow: hidden;
  font-size: 22px;
  background: #f3eee6;
  border-radius: 12px;
}

.sdm__icon img {
  display: block;
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.sdm__card-title {
  margin: 0;
  color: #1f2a24;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.sdm__card-desc {
  margin: 4px 0 0;
  color: #7a847c;
  font-size: 12px;
  line-height: 1.35;
}

.sdm__card-price {
  margin: 8px 0 0;
  color: var(--sdm-price, #2f7a3e);
  font-size: 14px;
  font-weight: 800;
}

.sdm__card-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--sdm-accent, #214f2f);
  font-size: 12px;
  font-weight: 700;
}

.sdm__nav {
  position: absolute;
  top: 58%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: #6b756e;
  cursor: pointer;
  background: #fff;
  border: 1px solid #ddd5c8;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-50%);
}

.sdm__nav:disabled {
  cursor: default;
  opacity: 0.35;
}

.sdm__nav--prev {
  left: 0;
}

.sdm__nav--next {
  right: 0;
}

.sdm__progress {
  height: 4px;
  margin: 8px 44px 0;
  overflow: hidden;
  background: transparent;
  border-radius: 999px;
}

.sdm__progress-bar {
  width: 33.333%;
  height: 100%;
  background: #cfdcc9;
  border-radius: inherit;
  transition: width 0.35s ease, transform 0.35s ease;
  transform: translateX(0);
}

.sdm__footer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 22px;
  padding: 16px 8px;
  background: #f3eee6;
  border-radius: 14px;
}

.sdm__foot-item {
  padding: 0 14px;
  border-right: 1px solid #ddd4c6;
}

.sdm__foot-item:last-child {
  border-right: 0;
}

.sdm__foot-title {
  margin: 0;
  color: var(--sdm-accent, #214f2f);
  font-size: 13px;
  font-weight: 800;
}

.sdm__foot-desc {
  margin: 4px 0 0;
  color: #5b655e;
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 1199.98px) {
  .sdm {
    --sdm-visible: var(--sdm-visible-tablet, 3);
  }

  .sdm__viewport,
  .sdm__progress {
    margin-inline: 40px;
  }
}

@media (max-width: 767.98px) {
  .sdm {
    --sdm-visible: var(--sdm-visible-mobile, 3);
    padding-inline: 16px;
  }

  .sdm__head {
    flex-direction: column;
  }

  .sdm__pills {
    justify-content: flex-start;
  }

  .sdm__title {
    font-size: 24px;
  }

  .sdm__viewport,
  .sdm__progress {
    margin-inline: 36px;
  }

  .sdm__stage {
    overflow-x: hidden;
  }

  .sdm__time {
    font-size: 13px;
  }

  .sdm__moment {
    font-size: 11px;
  }

  .sdm__card {
    padding: 12px 10px;
  }

  .sdm__card-title {
    font-size: 12px;
  }

  .sdm__card-desc {
    font-size: 11px;
  }

  .sdm__nav {
    width: 32px;
    height: 32px;
  }

  .sdm__footer {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .sdm__foot-item {
    border-right: 0;
  }
}
