/* 年付优惠标注（2026-10-18）
   选购卡片 + 配置页共用；颜色沿用站点促销橙，避免和主色蓝抢焦点。 */
.shopping-item.has-annual-deal .price-box-left {
  flex-direction: column;
  align-items: flex-end;
  row-gap: 2px;
}

/* 角标占住标题右上角，标题整体下移一行，避免长商品名被盖住 */
.shopping-item.has-annual-deal .goods-name {
  padding-top: 26px;
}

.k8-annual-flag {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border: 0;
  border-radius: 0 0 0 10px;
  background: linear-gradient(135deg, #ff8a1f, #ff4d00);
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .1px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 90, 0, .2);
  transition: filter .16s ease, transform .16s ease;
}

.k8-annual-flag:hover {
  filter: brightness(1.06);
  transform: translateY(1px);
}

.k8-annual-hint {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-top: 3px;
  color: #d9480f;
  font-size: 11.5px;
  line-height: 1.35;
  text-align: right;
  cursor: pointer;
}

.k8-annual-hint-main {
  font-weight: 600;
}

.k8-annual-hint-sub {
  color: #9a6a4a;
  font-size: 11px;
}

.k8-annual-hint-arrow {
  color: #ff6a00;
  font-size: 14px;
  line-height: 1;
}

.k8-annual-hint:hover .k8-annual-hint-main {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== 列表顶部的年付提示 / 筛选 ===== */
.k8-annual-banner {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #ffe1c7;
  border-radius: 8px;
  background: linear-gradient(90deg, #fff7ef, #fffdf9);
  color: #8a5a3b;
  font-size: 12px;
  line-height: 1.5;
}

.k8-annual-banner.is-filtering {
  border-color: #ffc89e;
  background: linear-gradient(90deg, #fff1e3, #fffaf4);
}

.k8-annual-banner-icon {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #ff6a00;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
}

.k8-annual-banner-text {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 10px;
  min-width: 0;
}

.k8-annual-banner-text strong {
  color: #d9480f;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.k8-annual-banner-sub {
  color: #9a6a4a;
}

.k8-annual-filter {
  flex: none;
  margin-left: auto;
  height: 28px;
  padding: 0 12px;
  border: 1px solid #ffc89e;
  border-radius: 6px;
  background: #fff;
  color: #d9480f;
  font-family: inherit;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}

.k8-annual-filter:hover {
  border-color: #ff9a54;
  background: #fff4e9;
}

.k8-annual-only .shopping-item:not(.has-annual-deal) {
  display: none !important;
}

/* ===== 配置页 / 底栏 ===== */
.k8-annual-cycle-btn {
  position: relative;
}

.k8-annual-cycle-save {
  margin-left: 1px;
  white-space: nowrap;
}

.k8-annual-callout {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid #ffe1c7;
  border-radius: 8px;
  background: #fff8f0;
  color: #8a5a3b;
  font-size: 12px;
  line-height: 1.5;
}

.k8-annual-callout.is-on {
  border-color: #bfe8cd;
  background: #f1fbf5;
  color: #1f7a45;
}

.k8-annual-callout-tag {
  flex: none;
  padding: 2px 7px;
  border-radius: 4px;
  background: #ff6a00;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.k8-annual-callout.is-on .k8-annual-callout-tag {
  background: #1f9d55;
}

.k8-annual-callout-text {
  min-width: 0;
  flex: 1 1 240px;
}

.k8-annual-callout-text b {
  color: #e8590c;
  font-weight: 700;
}

.k8-annual-callout.is-on .k8-annual-callout-text b {
  color: #16803c;
}

.k8-annual-pick {
  flex: none;
  height: 28px;
  padding: 0 12px;
  border: 1px solid #ff9a54;
  border-radius: 6px;
  background: #ff6a00;
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}

.k8-annual-pick:hover {
  border-color: #e85d00;
  background: #e85d00;
}

/* ===== CDN 卡片内标注 ===== */
.k8-cdn-save-pill {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff3e8;
  color: #ff6a00;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.5;
  vertical-align: 1px;
  white-space: nowrap;
}

.k8-cdn-promo-save {
  margin-left: auto;
  color: #d9480f;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .k8-annual-banner {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    padding: 9px 10px;
  }
  .k8-annual-banner-text {
    flex: 1 1 calc(100% - 36px);
  }
  .k8-annual-filter {
    margin-left: 34px;
  }
  .k8-annual-callout {
    align-items: flex-start;
  }
  .k8-annual-callout-text {
    flex-basis: calc(100% - 70px);
  }
  .k8-annual-pick {
    margin-left: 58px;
  }
  .k8-cdn-promo-save {
    margin-left: 0;
    flex-basis: 100%;
  }
}

@media (max-width: 480px) {
  .k8-annual-flag {
    height: 22px;
    padding: 0 7px;
    font-size: 10px;
  }
  .k8-annual-hint {
    font-size: 11px;
  }
  .k8-annual-hint-sub {
    font-size: 10.5px;
  }
  .k8-annual-banner-sub {
    display: block;
    width: 100%;
  }
  .k8-annual-banner-text strong {
    font-size: 12px;
  }
}

/* 2026-10-23 fixed card layout:
   年付优惠只显示在价格行内，不再改变卡片高度、标题留白和按钮位置。 */
.shopping-item.has-annual-deal .goods-name {
  padding-top: 0;
}
.shopping-item.has-annual-deal .price-box-left {
  width: 100%;
  flex-direction: row;
  align-items: baseline;
  justify-content: flex-start;
  flex-wrap: nowrap;
  column-gap: 6px;
  row-gap: 0;
}
.shopping-item.has-annual-deal .k8-annual-flag {
  position: static;
  flex: 0 0 auto;
  align-self: center;
  height: 18px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 18px;
  box-shadow: none;
}
.shopping-item.has-annual-deal .k8-annual-flag:hover {
  transform: none;
}
.shopping-item.has-annual-deal .k8-annual-hint {
  display: none !important;
}