.qd-countdown-banner,
.qd-countdown-banner *,
.qd-countdown-banner *::before,
.qd-countdown-banner *::after {
  box-sizing: border-box;
}

.qd-countdown-banner {
  width: 100%;
  min-height: var(--countdown-banner-min-height);
  /* padding: var(--countdown-padding-y) var(--countdown-padding-x); */
  color: var(--countdown-text-color);
  background: var(--countdown-banner-color);
}

.qd-countdown-banner.width-over {
  max-width: none !important;
}

.qd-countdown-banner__box {
  display: flex;
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  background: var(--qd-partition-promotion-nav-bg-color, var(--countdown-banner-color));
}

.qd-countdown-banner__carousel {
  position: relative;
  width: 100%;
  max-width: 1800px;
}

.qd-countdown-banner .carousel__track {
  overflow-y: hidden;
}

.qd-countdown-banner__list {
  display: flex;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.qd-countdown-banner__list > div {
  display: contents;
}

.qd-countdown-banner__promotion-list-content {
  display: grid;
  width: 100%;
  min-height: var(--countdown-banner-min-height);
  row-gap: 4px;
  align-items: center;
}

.qd-countdown-banner__promotion-entry {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
}

.qd-countdown-banner__item {
  position: relative;
  min-width: 0;
}

.qd-countdown-banner__partition {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: var(--countdown-banner-min-height);
  /* padding: 0 var(--countdown-content-gap); */
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: inherit;
  font-size: var(--countdown-text-size, inherit);
  font-weight: 400;
  letter-spacing: var(--countdown-text-letter-spacing, normal);
  line-height: 1.25;
  text-align: center;
}

.qd-countdown-banner__partition > span {
  /* display: inline-block; */
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  /* align-self: stretch; */
  min-height: 100%;
  /* line-height: var(--countdown-banner-min-height); */
}

.qd-countdown-banner__promotion-text--pc,
.qd-countdown-banner__promotion-text--mobile {
  display: inline;
}

.qd-countdown-banner__partition > .qd-countdown-banner__promotion-text--pc,
.qd-countdown-banner__partition > .qd-countdown-banner__promotion-text--mobile {
  display: flex;
}

.qd-countdown-banner__promotion-text--mobile,
.qd-countdown-banner__partition > .qd-countdown-banner__promotion-text--mobile {
  display: none;
}

@media (max-width: 1023px) {
  .qd-countdown-banner__promotion-text--pc,
  .qd-countdown-banner__partition > .qd-countdown-banner__promotion-text--pc {
    display: none;
  }

  .qd-countdown-banner__promotion-text--mobile {
    display: inline;
  }

  .qd-countdown-banner__partition > .qd-countdown-banner__promotion-text--mobile {
    display: flex;
  }
}

@media (min-width: 1024px) {
  .qd-countdown-banner__promotion-entry[data-pc-text-empty="true"],
  .qd-countdown-banner__item[data-pc-text-empty="true"] {
    display: none;
  }
}

@media (max-width: 1023px) {
  .qd-countdown-banner__promotion-entry[data-mobile-text-empty="true"],
  .qd-countdown-banner__item[data-mobile-text-empty="true"] {
    display: none;
  }
}

.qd-countdown-banner__partition.qd-countdown-banner__partition--timer {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
}

.qd-countdown-banner__partition--timer > .qd-countdown-banner__countdown-prefix,
.qd-countdown-banner__partition--timer > .qd-countdown-banner__timer,
.qd-countdown-banner__partition--timer > .qd-countdown-banner__timer-link {
  flex: 0 0 auto;
  width: auto;
}

.qd-countdown-banner__partition > .qd-countdown-banner__countdown-prefix svg {
  display: inline-block;
  vertical-align: middle;
}

.qd-countdown-banner__prefix-text {
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 20px;
}


.qd-countdown-banner__timer {
  display: flex;
  min-width: 0;
}

.qd-countdown-banner__unit {
  display: inline-flex;
  flex: 0 0 var(--countdown-block-width);
  width: var(--countdown-block-width);
  height: var(--countdown-block-height);
  padding: var(--countdown-block-padding);
  align-items: center;
  justify-content: center;
  color: var(--countdown-block-text-color);
  background: var(--countdown-block-background);
  border-radius: var(--countdown-block-radius);
}

.qd-countdown-banner__value {
  font-size: var(--countdown-number-size);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1;
}

.qd-countdown-banner__label {
  font-size: var(--countdown-label-size);
  letter-spacing: 0.02em;
  line-height: 1;
}

.qd-countdown-banner__separator {
  display: none;
}

.qd-countdown-banner__timer-link {
  flex: 0 1 auto;
  color: inherit;
  text-decoration: underline;
  white-space: nowrap;
}

.qd-countdown-banner__pager--arrows {
  position: absolute;
  inset-block-start: 50%;
}

.qd-countdown-banner__pager--arrow {
  display: flex;
  width: 40px;
  height: 40px;
  padding: 0;
  align-items: center;
  justify-content: center;
  color: inherit;
  cursor: pointer;
  background: transparent;
  border: 0;
  filter: drop-shadow(0 4px 10px rgb(0 0 0 / 15%));
}

.qd-countdown-banner__pager--arrow[name="previous"] {
  left: 5px;
  transform: rotate(90deg) translate(-50%, 0);
}

.qd-countdown-banner__pager--arrow[name="next"] {
  right: 5px;
  transform: rotate(-90deg) translate(50%, 0);
}

.qd-countdown-banner__pager {
  position: absolute;
  bottom: 0;
  left: 50%;
  z-index: 3;
  display: flex;
  gap: 6px;
  align-items: center;
  transform: translate(-50%, 0);
}

.qd-countdown-banner__pager--dots {
  bottom: 10px;
}

.qd-countdown-banner__pager--dot {
  display: block;
  width: 6px;
  height: 6px;
  padding: 0;
  cursor: pointer;
  background-color: currentColor;
  border: 0;
  border-radius: 50%;
  opacity: 0.4;
  transition: opacity, width, height, 0.3s;
}

.qd-countdown-banner__pager--dot.is-active {
  width: 10px;
  height: 10px;
  opacity: 1;
}

/* PC: 修复了单行卡片与分隔符的显示问题。 */
@media (min-width: 1024px) {
  .qd-countdown-banner__list {
    flex-wrap: nowrap;
    align-items: stretch;
    overflow-x: hidden;
  }

  .qd-countdown-banner__item {
    flex: 0 0 var(--countdown-item-width-pc, 100%);
    width: var(--countdown-item-width-pc, 100%);
    max-width: var(--countdown-item-width-pc, 100%);
  }

  /* .qd-countdown-banner__timer { 
    padding: 0 10px 0 20px;
  } */

  .qd-countdown-banner__item[data-pc-hide="true"],
  .qd-countdown-banner__item[data-prefix-pc-hide="true"] .qd-countdown-banner__prefix-text {
    display: none;
  }

  .qd-countdown-banner__promotion-entry[data-pc-hide="true"],
  .qd-countdown-banner__promotion-entry[data-prefix-pc-hide="true"] .qd-countdown-banner__prefix-text {
    display: none;
  }

  .qd-countdown-banner .promotion__item.pc-divider::after {
    position: absolute;
    top: 14%;
    right: 0;
    width: 1px;
    height: 72%;
    content: "";
    background: var(--qd-partition-promotion-divider-color, var(--countdown-text-color));
  }

  .qd-countdown-banner__pager--arrows,
  .qd-countdown-banner__pager {
    display: none;
  }

  /* Keep the merged first promotion list inline until its contents no longer fit. */
  .qd-countdown-banner__item:first-child .qd-countdown-banner__promotion-list-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--countdown-promotion-list-gap);
    align-content: center;
    align-items: center;
    justify-content: center;
  }

  .qd-countdown-banner__item:first-child .qd-countdown-banner__promotion-entry {
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
  }

  .qd-countdown-banner__item:first-child .qd-countdown-banner__promotion-entry--text {
    max-width: 100%;
  }

  .qd-countdown-banner__item:first-child .qd-countdown-banner__promotion-entry--text .qd-countdown-banner__partition,
  .qd-countdown-banner__item:first-child .qd-countdown-banner__partition--timer {
    width: auto;
    min-height: auto;
  }

  .qd-countdown-banner__item:first-child .qd-countdown-banner__promotion-entry--text .qd-countdown-banner__partition {
    max-width: 100%;
    overflow: visible;
  }

  .qd-countdown-banner__item:first-child .qd-countdown-banner__promotion-entry--text .qd-countdown-banner__partition > span {
    width: auto;
    min-height: auto;
    white-space: normal;
  }
}

/* Keep the combined first promotion list readable at medium desktop widths. */
@media (min-width: 1024px) and (max-width: 1599px) {
  .qd-countdown-banner {
    --countdown-block-width: 24px;
    --countdown-block-height: 24px;
    --countdown-unit-gap: 4px;
    --countdown-padding-x: 4px;
  }

  .qd-countdown-banner__item:first-child .qd-countdown-banner__promotion-list-content { 
    flex-wrap: nowrap;
  }

  .qd-countdown-banner__partition--timer {
    flex-wrap: wrap;
    gap: 4px;
  }

  .qd-countdown-banner__item:first-child .qd-countdown-banner__promotion-entry--text {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
  }

  .qd-countdown-banner__item:first-child .qd-countdown-banner__promotion-entry--text .qd-countdown-banner__partition {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: break-word;
  }

  .qd-countdown-banner__item:first-child .qd-countdown-banner__promotion-entry--text .qd-countdown-banner__partition > span {
    width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: break-word;
  }

  .qd-countdown-banner__item:first-child .qd-countdown-banner__promotion-entry--countdown,
  .qd-countdown-banner__item:first-child .qd-countdown-banner__item--timer,
  .qd-countdown-banner__item:first-child .qd-countdown-banner__partition--timer {
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  .qd-countdown-banner__promotion-entry--text .qd-countdown-banner__partition {
    white-space: normal;
    overflow-wrap: break-word;
  }

  .qd-countdown-banner__timer-link {
    white-space: nowrap;
  }
}

/* ipad: 在允许第二行的同时保留配置的PC宽度。 */
@media (min-width: 768px) and (max-width: 1023px) {
  .qd-countdown-banner {
    padding: var(--countdown-mobile-padding-y) var(--countdown-mobile-padding-x);
  }

  .qd-countdown-banner__list {
    flex-wrap: wrap;
  }

  .qd-countdown-banner__item {
    flex: 0 0 var(--countdown-item-width-mobile, 100%);
    width: var(--countdown-item-width-mobile, 100%);
    max-width: var(--countdown-item-width-mobile, 100%);
  }

  .qd-countdown-banner__item[data-mobile-hide="true"],
  .qd-countdown-banner__item[data-prefix-mobile-hide="true"] .qd-countdown-banner__prefix-text,
  .qd-countdown-banner__item[data-mobile-timer-link-hide="true"] .qd-countdown-banner__timer-link {
    display: none;
  }

  .qd-countdown-banner__promotion-entry[data-mobile-hide="true"],
  .qd-countdown-banner__promotion-entry[data-prefix-mobile-hide="true"] .qd-countdown-banner__prefix-text,
  .qd-countdown-banner__promotion-entry[data-mobile-timer-link-hide="true"] .qd-countdown-banner__timer-link {
    display: none;
  }

  .qd-countdown-banner__partition {
    min-height: var(--countdown-banner-min-height);
    padding-inline: var(--countdown-mobile-content-gap);
    font-size: var(--countdown-mobile-text-size, var(--countdown-text-size, inherit));
  }

  .qd-countdown-banner__partition > span {
    width: auto;
  }

  .qd-countdown-banner__timer {
    max-width: none;
    padding: 0 30px 0 20px;
    gap: min(var(--countdown-unit-gap), 8px);
  }

  .qd-countdown-banner__unit {
    flex-basis: var(--countdown-mobile-block-width);
    width: var(--countdown-mobile-block-width);
    height: var(--countdown-mobile-block-height);
  }

  .qd-countdown-banner__value {
    font-size: var(--countdown-mobile-number-size, var(--countdown-number-size));
  }

  .qd-countdown-banner__label {
    font-size: var(--countdown-mobile-label-size, var(--countdown-label-size));
  }

  .qd-countdown-banner__timer-link {
    white-space: normal;
  }
  /* .qd-countdown-banner {
    padding-inline: min(var(--countdown-padding-x), 32px);
  }

  .qd-countdown-banner__list {
    flex-wrap: wrap;
    justify-content: center;
  }

  .qd-countdown-banner__item {
    flex: 0 0 var(--countdown-item-width-pc, 50%);
    width: var(--countdown-item-width-pc, 50%);
    max-width: var(--countdown-item-width-pc, 50%);
  }

  .qd-countdown-banner__item[data-pc-hide="true"],
  .qd-countdown-banner__item[data-prefix-pc-hide="true"] .qd-countdown-banner__prefix-text {
    display: none;
  }

  .qd-countdown-banner__partition {
    padding-inline: max(8px, calc(var(--countdown-content-gap) / 2));
  }

  .qd-countdown-banner__timer-content {
    gap: max(8px, calc(var(--countdown-content-gap) / 2));
  } */
}

/* Mobile: 使用移动宽度、间距、排版和可见性设置。 */
@media (max-width: 767px) {
  .qd-countdown-banner {
    padding: var(--countdown-mobile-padding-y) var(--countdown-mobile-padding-x);
  }

  .qd-countdown-banner__list {
    flex-wrap: wrap;
  }

  .qd-countdown-banner__item {
    flex: 0 0 var(--countdown-item-width-mobile, 100%);
    width: var(--countdown-item-width-mobile, 100%);
    max-width: var(--countdown-item-width-mobile, 100%);
  }

  .qd-countdown-banner__item[data-mobile-hide="true"],
  .qd-countdown-banner__item[data-prefix-mobile-hide="true"] .qd-countdown-banner__prefix-text,
  .qd-countdown-banner__item[data-mobile-timer-link-hide="true"] .qd-countdown-banner__timer-link {
    display: none;
  }

  .qd-countdown-banner__promotion-entry[data-mobile-hide="true"],
  .qd-countdown-banner__promotion-entry[data-prefix-mobile-hide="true"] .qd-countdown-banner__prefix-text,
  .qd-countdown-banner__promotion-entry[data-mobile-timer-link-hide="true"] .qd-countdown-banner__timer-link {
    display: none;
  }

  .qd-countdown-banner__partition {
    min-height: var(--countdown-banner-min-height);
    padding-inline: var(--countdown-mobile-content-gap);
    font-size: var(--countdown-mobile-text-size, var(--countdown-text-size, inherit));
  }

  /* .qd-countdown-banner__countdown-prefix {
    width: 15% !important;
  } */

  .qd-countdown-banner__countdown-prefix {
    padding-right: 10px;
  }

  .qd-countdown-banner__partition > span {
    width: auto;
  }

  .qd-countdown-banner__timer {
    max-width: none;
    /* padding: 0 30px 0 20px; */
    gap: min(var(--countdown-unit-gap), 8px);
  }

  .qd-countdown-banner__unit {
    flex-basis: var(--countdown-mobile-block-width);
    width: var(--countdown-mobile-block-width);
    height: var(--countdown-mobile-block-height);
  }

  .qd-countdown-banner__value {
    font-size: var(--countdown-mobile-number-size, var(--countdown-number-size));
  }

  .qd-countdown-banner__label {
    font-size: var(--countdown-mobile-label-size, var(--countdown-label-size));
  }

  .qd-countdown-banner__timer-link {
    white-space: normal;
  }
}

/* Mobile and tablet use one full-width slide, matching the partition promotion carousel. */
@media (max-width: 1023px) {
  .qd-countdown-banner__list {
    flex-wrap: nowrap;
  }

  .qd-countdown-banner__item {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
  }
}
