@import "tailwindcss";
@import "@heroui/react/styles";

@keyframes theme-home-progress {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes theme-home-copy-in {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes theme-home-panel-in {
  from {
    opacity: 0.25;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes theme-home-item-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.theme-home-progress {
  animation: theme-home-progress 6s linear forwards;
}

.theme-home-hero-copy {
  animation: theme-home-copy-in 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.theme-home-feature-enter {
  animation: theme-home-item-in 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.theme-home-panel-enter {
  animation: theme-home-panel-in 440ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.theme-home-product-item-enter,
.theme-home-solution-feature-enter {
  animation: theme-home-item-in 460ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.theme-home-solution-enter {
  animation: theme-home-copy-in 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-motion-ready [data-home-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition-property: opacity, transform;
  transition-duration: 680ms;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.home-motion-ready [data-home-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.public-banner-copy {
  animation: theme-home-copy-in 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.public-motion-ready [data-public-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition-property: opacity, transform, box-shadow, border-color;
  transition-duration: 680ms;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.public-motion-ready [data-public-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Public solution/cooperation pages mirror the original www theme metrics. */
.www-public-container {
  width: 100%;
  max-width: 1280px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 40px;
  padding-left: 40px;
}

.www-public-banner {
  height: 430px;
}

.www-public-banner-mask {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.7) 48%, rgba(255, 255, 255, 0.08) 78%);
}

.www-public-banner-title {
  margin: 0 0 20px;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.5;
}

.www-public-banner-description {
  max-width: 720px;
  font-size: 18px;
  font-weight: 400;
  line-height: 2;
}

.www-public-banner-button {
  min-height: 44px;
  margin-top: 20px;
  padding: 10px 28px;
  box-shadow: 8px 8px 20px rgba(55, 99, 170, 0.1);
  transition: transform 300ms ease-out, background-color 300ms ease-out;
}

.www-public-banner-button:hover {
  background: #004de5;
  transform: scale(0.95);
}

.www-public-tabs {
  border-top: 1px solid #f4f4f5;
  border-bottom: 0.5px solid #e0e2e5;
  box-shadow: none;
}

.www-public-tab {
  height: 72px;
  margin: 0 32px;
  font-size: 16px;
  font-weight: 900;
}

.www-public-section {
  padding-top: 40px;
  padding-bottom: 100px;
}

.www-public-section-title {
  display: flex;
  width: 100%;
  margin-bottom: 46px;
  flex-direction: column;
  align-items: flex-start;
}

.www-public-section-title h2 {
  margin-bottom: 32px;
  color: #141625;
  font-size: 32px;
  font-weight: 700;
  line-height: 32px;
}

.www-public-section-title p {
  color: #141625;
  font-size: 20px;
  line-height: 1.6;
  opacity: 0.85;
}

.www-public-section-title:not(:has(p)) h2 {
  margin-bottom: 0;
}

.www-public-section-title + * {
  margin-top: 0 !important;
}

.www-advantage-card {
  min-height: 200px;
  padding: 26px 26px 36px;
}

.www-advantage-card:hover,
.www-detail-card:hover {
  box-shadow: rgba(16, 36, 94, 0.4) 0 2px 6px 0;
}

.www-advantage-icon {
  width: 72px;
  height: 72px;
}

.www-problem-grid {
  gap: 12px 20px;
  padding-top: 12px;
}

.www-problem-card {
  min-height: 152px;
  padding: 20px;
  border-radius: 2px;
  background: #fff url('/theme-pages/problem-card.png') center/cover no-repeat;
}

.www-architecture-copy {
  width: 479px;
  min-width: 479px;
  height: 500px;
}

.www-architecture-image {
  height: 530px;
  padding: 20px;
}

.www-product-grid {
  gap: 40px;
}

.www-product-card {
  padding: 30px 40px 36px;
}

.www-more-grid {
  height: 159px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 2px;
}

.www-aff-advantage-card {
  min-height: 170px;
  padding: 48px 40px;
}

.www-aff-flow-card {
  min-height: 278px;
  padding: 20px 40px 40px;
}

.www-aff-flow-card:first-child {
  background: linear-gradient(150deg, #f3f8ff 0%, #fff 72%);
}

.www-aff-mode-banner {
  height: 128px;
}

@media (max-width: 768px) {
  .www-public-container {
    max-width: 100%;
    padding-right: 16px;
    padding-left: 16px;
  }

  .www-public-banner {
    height: 249px;
  }

  .www-public-banner-mask {
    background: rgba(255, 255, 255, 0.76);
  }

  .www-public-banner-title {
    margin-bottom: 7px;
    font-size: 24px;
    line-height: 1.4;
  }

  .www-public-banner-description {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .www-public-banner-button {
    min-height: 36px;
    margin-top: 10px;
    padding: 6px 12px;
    font-weight: 400;
  }

  .www-public-tab {
    height: 52px;
    margin: 0 0 0 26px;
    font-size: 14px;
    font-weight: 700;
  }

  .www-public-tab:first-child {
    margin-left: 0;
  }

  .www-public-tab:not(:last-child)::after {
    position: absolute;
    top: 50%;
    right: -13px;
    width: 1px;
    height: 20px;
    background: #e0e2e5;
    content: '';
    transform: translateY(-50%);
  }

  .www-public-section {
    padding-top: 20px;
    padding-bottom: 40px;
  }

  .www-public-section-title {
    margin-bottom: 28px;
  }

  .www-public-section-title h2 {
    margin-bottom: 12px;
    font-size: 28px;
    line-height: 32px;
  }

  .www-public-section-title p {
    font-size: 14px;
    line-height: 24px;
  }

  .www-advantage-card {
    min-height: 142px;
    padding: 20px;
    align-items: flex-start;
    text-align: left;
  }

  .www-advantage-icon {
    position: absolute;
    top: 50%;
    left: 20px;
    width: 60px;
    height: 60px;
    transform: translateY(-50%);
  }

  .www-advantage-copy {
    padding-left: 74px;
  }

  .www-problem-grid {
    grid-template-columns: 1fr;
  }

  .www-problem-card {
    min-height: 148px;
  }

  .www-architecture-copy {
    width: 100%;
    min-width: 100%;
    height: auto;
  }

  .www-architecture-image {
    height: auto;
    min-height: 300px;
  }

  .www-product-grid {
    gap: 20px;
  }

  .www-product-card {
    padding: 20px;
  }

  .www-more-grid {
    height: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .www-aff-advantage-card {
    padding: 20px;
    flex-direction: column;
  }

  .www-aff-flow-card {
    min-height: 0;
    padding: 20px 40px 40px;
  }

  .www-aff-mode-banner {
    height: 200px;
  }
}

.theme-home-feature-icon {
  background-position: center top;
  background-size: 64px auto;
}

@media (prefers-reduced-motion: reduce) {
  .theme-home-progress {
    animation: none;
    width: 100%;
  }

  .theme-home-hero-copy,
  .theme-home-feature-enter,
  .theme-home-panel-enter,
  .theme-home-product-item-enter,
  .theme-home-solution-enter,
  .theme-home-solution-feature-enter {
    animation: none;
  }

  .home-motion-ready [data-home-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .public-banner-copy {
    animation: none;
  }

  .public-motion-ready [data-public-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Unified activity detail surface and real template-specific layouts. */
.activity-detail-page {
  background: #fff;
}

.activity-detail-main-band {
  background: #fff;
}

.activity-template-enter {
  animation: activity-content-in 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes activity-content-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.activity-detail-flow {
  padding-top: 56px;
  padding-bottom: 82px;
}

.activity-intro-block {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 70px;
  padding-bottom: 52px;
  align-items: start;
  border-bottom: 1px solid #e8ebf0;
}

.activity-intro-block.is-compact {
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  padding-bottom: 42px;
}

.activity-intro-block:not(:has(.activity-intro-content)) {
  display: block;
}

.activity-intro-block:not(:has(.activity-intro-content)) .activity-intro-heading {
  max-width: 820px;
}

.activity-intro-heading h2 {
  margin: 0;
  color: #111827;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.4;
}

.activity-intro-content {
  min-width: 0;
  color: #4f5c70;
  font-size: 15px;
  line-height: 1.9;
}

.activity-intro-content .qycw-rich-text-content > :first-child,
.activity-rules-block .qycw-rich-text-content > :first-child {
  margin-top: 0;
}

.activity-coupon-inline {
  grid-column: 1 / -1;
  display: flex;
  min-height: 76px;
  margin-top: -20px;
  padding: 15px 20px;
  align-items: center;
  justify-content: space-between;
  border-left: 4px solid #ff7a00;
  background: #fff7ed;
}

.activity-coupon-inline > div {
  display: flex;
  align-items: center;
  gap: 16px;
}

.activity-coupon-inline span {
  color: #8b5a2b;
  font-size: 13px;
}

.activity-coupon-inline strong {
  color: #9a3f00;
  font-size: 24px;
  overflow-wrap: anywhere;
}

.activity-sections {
  padding-top: 50px;
}

.activity-product-section + .activity-product-section {
  margin-top: 58px;
  padding-top: 54px;
  border-top: 1px solid #e8ebf0;
}

.activity-section-heading {
  display: flex;
  margin-bottom: 26px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  text-align: left;
}

.activity-section-heading > div {
  display: flex;
  align-items: center;
  gap: 13px;
}

.activity-section-heading > div > span {
  display: flex;
  width: 38px;
  height: 38px;
  flex: none;
  align-items: center;
  justify-content: center;
  background: #eaf3ff;
  color: #0868f5;
}

.activity-section-heading svg {
  width: 19px;
  height: 19px;
}

.activity-section-heading h2 {
  font-size: 26px;
}

.activity-section-heading p {
  max-width: 580px;
  margin: 0;
  text-align: right;
}

.activity-grid-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
  border: 1px solid #e2e8f0;
}

.activity-grid-overview > div {
  display: grid;
  min-height: 112px;
  padding: 20px 26px;
  grid-template-columns: 42px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 13px;
}

.activity-grid-overview > div + div {
  border-left: 1px solid #e2e8f0;
}

.activity-grid-overview svg {
  width: 30px;
  height: 30px;
  grid-row: 1 / 3;
  color: #0868f5;
}

.activity-grid-overview span {
  color: #7a8597;
  font-size: 12px;
}

.activity-grid-overview strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #172033;
  font-size: 20px;
}

.variant-product_grid .activity-product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.variant-product_grid .activity-product-card {
  min-height: 350px;
}

.variant-product_grid .activity-product-head,
.variant-product_grid .activity-product-specs,
.variant-product_grid .activity-product-footer {
  padding-right: 20px;
  padding-left: 20px;
}

.activity-flash-bar {
  color: #fff;
  background: #e6372f;
}

.activity-flash-inner {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.activity-flash-inner > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
}

.activity-flash-inner svg {
  width: 25px;
  height: 25px;
}

.activity-countdown {
  display: flex;
  align-items: center;
  gap: 7px;
}

.activity-countdown strong {
  display: inline-flex;
  width: 42px;
  height: 46px;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #d92e27;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.activity-countdown span {
  font-size: 12px;
}

.activity-flash-limit {
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.variant-flash_sale .activity-product-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.variant-flash_sale .activity-product-card {
  min-height: 330px;
  border-top: 3px solid #e6372f;
}

.variant-flash_sale .activity-section-heading > div > span {
  background: #fff0ef;
  color: #e6372f;
}

.variant-flash_sale .activity-product-footer > a {
  background: #e6372f;
}

.activity-stock-progress {
  height: 5px;
  margin: 0 25px;
  overflow: hidden;
  background: #fee2e2;
}

.activity-stock-progress span {
  display: block;
  height: 100%;
  background: #e6372f;
}

.activity-coupon-claim {
  display: grid;
  min-height: 164px;
  margin-bottom: 52px;
  padding: 30px 36px;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  border: 1px solid #ffd6ad;
  border-left: 7px solid #ff7a00;
  background: #fff8f0;
}

.activity-coupon-icon {
  display: flex;
  width: 62px;
  height: 62px;
  align-items: center;
  justify-content: center;
  background: #ff7a00;
  color: #fff;
}

.activity-coupon-icon svg {
  width: 30px;
  height: 30px;
}

.activity-coupon-copy span {
  color: #ad5b13;
  font-size: 12px;
  font-weight: 700;
}

.activity-coupon-copy h2 {
  margin: 5px 0;
  color: #8f3f00;
  font-size: 28px;
  overflow-wrap: anywhere;
}

.activity-coupon-copy p {
  margin: 0;
  color: #8b694b;
  font-size: 13px;
}

.activity-coupon-mode {
  color: #ad5b13;
  font-size: 14px;
  font-weight: 700;
}

.variant-coupon .activity-product-grid {
  grid-template-columns: minmax(0, 1fr);
}

.variant-coupon .activity-product-card {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1fr) minmax(280px, 0.85fr);
  align-items: stretch;
  border-left: 4px solid #ff7a00;
}

.variant-coupon .activity-product-head,
.variant-coupon .activity-product-specs,
.variant-coupon .activity-product-footer {
  border: 0;
}

.variant-coupon .activity-product-head,
.variant-coupon .activity-product-specs {
  border-right: 1px solid #edf0f4;
}

.variant-coupon .activity-product-footer {
  margin-top: 0;
}

.variant-coupon .activity-product-limit {
  display: none;
}

.variant-coupon .activity-section-heading > div > span {
  background: #fff3e6;
  color: #ff7a00;
}

.activity-no-products {
  display: grid;
  min-height: 148px;
  margin-top: 42px;
  padding: 28px 32px;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.activity-no-products > span {
  display: flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  background: #eaf3ff;
  color: #0868f5;
}

.activity-no-products > span svg {
  width: 26px;
  height: 26px;
}

.activity-no-products h2 {
  margin: 0;
  color: #172033;
  font-size: 21px;
}

.activity-no-products p {
  margin: 7px 0 0;
  color: #718096;
  font-size: 13px;
  line-height: 1.7;
}

.activity-no-products > a {
  display: inline-flex;
  min-width: 112px;
  height: 42px;
  padding: 0 20px;
  align-items: center;
  justify-content: center;
  background: #0868f5;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.activity-no-products > a:hover {
  background: #0057d9;
}

.activity-no-products.is-flash_sale {
  border-color: #fecaca;
  background: #fff7f7;
}

.activity-no-products.is-flash_sale > span {
  background: #fee2e2;
  color: #e6372f;
}

.activity-no-products.is-coupon {
  border-color: #fed7aa;
  background: #fff9f2;
}

.activity-no-products.is-coupon > span {
  background: #ffedd5;
  color: #e56700;
}

.activity-rules-block {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  margin-top: 62px;
  padding-top: 52px;
  border-top: 1px solid #e8ebf0;
}

.activity-rules-block header span {
  color: #0868f5;
  font-size: 11px;
  font-weight: 800;
}

.activity-rules-block h2 {
  margin: 7px 0 0;
  color: #172033;
  font-size: 26px;
}

@media (max-width: 1180px) {
  .variant-product_grid .activity-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .activity-intro-block,
  .activity-intro-block.is-compact {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .variant-product_grid .activity-product-grid,
  .variant-flash_sale .activity-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .variant-coupon .activity-product-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .variant-coupon .activity-product-footer {
    grid-column: 1 / -1;
    border-top: 1px solid #edf0f4;
  }
}

@media (max-width: 768px) {
  .activity-detail-flow {
    padding-top: 32px;
    padding-bottom: 48px;
  }

  .activity-intro-heading h2 {
    font-size: 25px;
  }

  .activity-grid-overview {
    grid-template-columns: minmax(0, 1fr);
  }

  .activity-grid-overview > div {
    min-height: 88px;
  }

  .activity-grid-overview > div + div {
    border-top: 1px solid #e2e8f0;
    border-left: 0;
  }

  .variant-product_grid .activity-product-grid,
  .variant-flash_sale .activity-product-grid,
  .variant-coupon .activity-product-grid,
  .variant-coupon .activity-product-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .variant-coupon .activity-product-footer {
    grid-column: auto;
  }

  .variant-coupon .activity-product-head,
  .variant-coupon .activity-product-specs {
    border-right: 0;
    border-bottom: 1px solid #edf0f4;
  }

  .activity-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .activity-section-heading p {
    padding-left: 51px;
    text-align: left;
  }

  .activity-flash-inner {
    min-height: 132px;
    flex-wrap: wrap;
    padding-top: 16px;
    padding-bottom: 16px;
    gap: 10px 18px;
  }

  .activity-countdown {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .activity-countdown strong {
    width: 36px;
    height: 40px;
    font-size: 18px;
  }

  .activity-coupon-claim,
  .activity-no-products {
    grid-template-columns: 52px minmax(0, 1fr);
    padding: 22px;
  }

  .activity-coupon-claim > :last-child,
  .activity-no-products > a {
    grid-column: 1 / -1;
    width: 100%;
  }

  .activity-rules-block {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
}

button,
.ant-btn,
[role="button"] {
  font-family: inherit;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

button svg,
a svg,
.ant-btn svg,
.ant-btn .anticon {
  flex-shrink: 0;
  display: inline-block;
  vertical-align: -0.125em;
}

.ant-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 500;
  line-height: 1.2;
}

.ant-btn > span:not(.ant-btn-icon) {
  line-height: 1.2;
}

button > span,
[role="button"] > span {
  line-height: 1.2;
}

button[class*="bg-sky-400"],
button[class*="bg-sky-500"],
button[class*="bg-sky-600"],
a[class*="bg-sky-400"],
a[class*="bg-sky-500"],
a[class*="bg-sky-600"] {
  color: #fff !important;
}

button[class*="bg-sky-400"] *,
button[class*="bg-sky-500"] *,
button[class*="bg-sky-600"] *,
a[class*="bg-sky-400"] *,
a[class*="bg-sky-500"] *,
a[class*="bg-sky-600"] * {
  color: inherit !important;
}

.qycw-auth-text-primary,
.qycw-auth-text-primary * {
  color: hsl(var(--heroui-primary, 199 89% 48%)) !important;
}

.qycw-auth-text-muted,
.qycw-auth-text-muted * {
  color: hsl(var(--heroui-default-500, 240 4% 46%)) !important;
}

.qycw-auth-text-strong,
.qycw-auth-text-strong * {
  color: hsl(var(--heroui-default-700, 240 5% 26%)) !important;
}

.qycw-auth-mode:hover,
.qycw-auth-mode:hover * {
  color: hsl(var(--heroui-default-700, 240 5% 26%)) !important;
}

.qycw-auth-bg-primary {
  background-color: hsl(var(--heroui-primary, 199 89% 48%)) !important;
}

.qycw-auth-bg-primary:hover {
  filter: brightness(0.96);
}

/* ========== 全局滚动条（清云互联风格） ========== */
/* 浅灰色调 / 圆角胶囊 / 悬浮加深 */

/* WebKit (Chrome, Edge, Safari, Electron) */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
  transition: background 0.2s ease;
}
*::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:active {
  background: #6b7280;
  background-clip: padding-box;
}
*::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}

/* 细滚动条变体（局部容器使用） — 加 class="scroll-thin" */
.scroll-thin::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.scroll-thin::-webkit-scrollbar-thumb {
  border-width: 1px;
}
.scroll-thin {
  scrollbar-width: thin;
}

/* 隐藏滚动条 — 加 class="scroll-hide" */
.scroll-hide::-webkit-scrollbar {
  display: none;
}
.scroll-hide {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.qycw-rich-text-editor .rsw-ce {
  min-height: 220px;
  font-size: 14px;
  line-height: 1.7;
  overflow-x: auto;
}

.qycw-rich-text-editor .rsw-toolbar {
  border-bottom: 1px solid #f0f0f0;
}

.qycw-rich-text-content {
  line-height: 1.7;
  word-break: break-word;
  max-width: 100%;
  overflow-x: auto;
  /* Performance: tell the browser this subtree is self-contained */
  contain: layout style paint;
}

/* Each direct child block in rich text can be independently paint-contained */
.qycw-rich-text-content > * {
  contain: layout style;
}

.qycw-rich-text-content p,
.qycw-rich-text-content ul,
.qycw-rich-text-content ol,
.qycw-rich-text-content blockquote,
.qycw-rich-text-content pre {
  margin: 0 0 8px;
}

.qycw-rich-text-content ul,
.qycw-rich-text-content ol {
  padding-left: 22px;
}

.qycw-rich-text-content blockquote {
  border-left: 3px solid #d9d9d9;
  color: #595959;
  padding-left: 10px;
}

.qycw-rich-text-content pre {
  background: #f6f8fa;
  border-radius: 6px;
  padding: 10px;
  overflow: auto;
}

.qycw-rich-text-editor .rsw-ce img,
.qycw-rich-text-content img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  /* Hint to the browser that these images can be rendered off-screen */
  content-visibility: auto;
  /* Reserve space to reduce layout shift */
  contain-intrinsic-size: 200px;
  /* Optimize for decode speed over quality at display size */
  image-rendering: auto;
}

/* ── Activity list page ─────────────────────────────────────────────────── */
.activity-public-page {
  background: #fff;
}

/* Detail page keeps white */
.activity-detail-page {
  background: #fff;
}

/* Soft bridge between the banner bottom and the tab bar */
.activity-public-page .www-public-banner {
  height: 380px;
}

/* Tabs – sticky, compact, seamlessly connected */
.activity-tabs-band {
  position: sticky;
  top: var(--home-header-height, 72px);
  z-index: 25;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid #e4e8f0;
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(20, 35, 64, 0.04);
}

.activity-tabs {
  display: flex;
  height: 60px;
  align-items: stretch;
  gap: 4px;
}

.activity-tabs button {
  position: relative;
  padding: 0 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #5a6477;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: color 180ms ease;
}

.activity-tabs button:hover {
  color: #0868f5;
  background: transparent;
}

.activity-tabs button.is-active {
  color: #0868f5;
  background: transparent;
}

/* List section */
.activity-list-section {
  min-height: 520px;
  padding: 44px 0 88px;
}

.activity-list-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

/* Card */
.activity-list-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(220, 228, 242, 0.9);
  background: #fff;
  color: inherit;
  box-shadow: 0 2px 12px rgba(20, 35, 80, 0.06), 0 1px 3px rgba(20, 35, 80, 0.04);
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
              border-color 300ms ease,
              box-shadow 300ms ease;
  animation: activity-content-in 460ms cubic-bezier(0.22, 1, 0.36, 1) both;
  text-decoration: none;
}

.activity-list-card:hover {
  border-color: #c8deff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.1), 0 2px 8px rgba(15, 23, 42, 0.06);
  transform: translateY(-4px);
}

/* Cover image */
.activity-list-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  background: #dde8f8;
  border-radius: 14px 14px 0 0;
}

.activity-list-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 640ms cubic-bezier(0.22, 1, 0.36, 1);
}

.activity-list-card:hover .activity-list-cover img {
  transform: scale(1.05);
}

/* Status badge – sits over the cover image */
/* Inline tag row above the title */
.activity-list-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.activity-status-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

.activity-status-badge.is-ongoing {
  background: #ecfdf5;
  color: #059669;
}

.activity-status-badge.is-upcoming {
  background: #eff6ff;
  color: #2563eb;
}

.activity-status-badge.is-ended {
  background: #f1f5f9;
  color: #94a3b8;
}

/* Label ribbon – flat inline tag */
.activity-ribbon {
  display: inline-block;
  padding: 2px 8px;
  background: #fff7ed;
  color: #ea580c;
  font-size: 12px;
  font-weight: 500;
}

/* Card body */
.activity-list-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px 24px 20px;
}

.activity-list-text {
  flex: 1;
}

.activity-list-body h2 {
  overflow: hidden;
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-list-body p {
  display: -webkit-box;
  overflow: hidden;
  margin: 10px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
  min-height: 48px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* Meta row – time on left, "查看活动" on right – single line */
.activity-list-meta {
  display: flex;
  margin-top: 18px;
  padding-top: 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #eef1f6;
}

.activity-list-time {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 20px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.activity-list-time svg {
  width: 14px;
  height: 14px;
  flex: none;
}

/* "查看活动" link – always in the meta row */
.activity-list-link {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 5px;
  color: #0868f5;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: gap 200ms ease;
}

.activity-list-link svg {
  width: 15px;
  height: 15px;
  transition: transform 200ms ease;
}

.activity-list-card:hover .activity-list-link svg {
  transform: translateX(4px);
}

/* Legacy .activity-status used by ActivityDetail page – keep working */
.activity-status {
  flex: none;
  font-size: 13px;
  font-weight: 700;
  color: #6b7280;
}

.activity-status.is-ongoing { color: #0a9b61; }
.activity-status.is-upcoming { color: #0868f5; }
.activity-status.is-ended   { color: #9ca3af; }

/* Loading / empty */
.activity-loading,
.activity-empty {
  display: flex;
  min-height: 380px;
  align-items: center;
  justify-content: center;
}

/* Bottom tip */
.activity-more-tip {
  margin: 52px 0 0;
  color: #94a3b8;
  font-size: 14px;
  text-align: center;
  letter-spacing: 0.02em;
}

.activity-detail-state {
  display: flex;
  min-height: 72vh;
  padding-top: var(--home-header-height, 112px);
  align-items: center;
  justify-content: center;
  background: #fff;
}

.activity-detail-summary-band {
  border-bottom: 1px solid #e6e9ee;
  background: #fff;
}

.activity-detail-summary {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.activity-back,
.activity-summary-meta,
.activity-summary-meta span {
  display: flex;
  align-items: center;
}

.activity-back {
  flex: none;
  gap: 8px;
  color: #4b5563;
  font-size: 14px;
}

.activity-back svg,
.activity-summary-meta svg {
  width: 16px;
  height: 16px;
}

.activity-summary-meta {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 28px;
  color: #697386;
  font-size: 13px;
}

.activity-summary-meta span {
  gap: 7px;
}

.activity-intro-section {
  padding: 60px 0;
  background: #fff;
}

.activity-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 72px;
  align-items: start;
}

.activity-eyebrow {
  margin: 0 0 12px;
  color: #0868f5;
  font-size: 12px;
  font-weight: 800;
}

.activity-intro-copy h2,
.activity-section-heading h2,
.activity-rules-content h2 {
  margin: 0;
  color: #151b26;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.4;
}

.activity-lead {
  margin: 16px 0 24px;
  color: #687386;
  font-size: 16px;
  line-height: 1.9;
}

.activity-coupon-panel {
  position: relative;
  overflow: hidden;
  min-height: 228px;
  padding: 28px;
  border-left: 4px solid #ff7a00;
  background: #fff7ed;
}

.activity-coupon-panel > span {
  color: #9a5a13;
  font-size: 13px;
}

.activity-coupon-panel strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 12px;
  color: #9a3f00;
  font-size: 28px;
  letter-spacing: 0;
}

.activity-coupon-panel p {
  margin: 10px 0 20px;
  color: #8b5a2b;
  font-size: 13px;
  line-height: 1.7;
}

.activity-products-section {
  padding: 56px 0 70px;
  background: #fff;
}

.activity-products-section + .activity-products-section {
  padding-top: 0;
}

.activity-section-heading {
  margin-bottom: 30px;
  text-align: center;
}

.activity-section-heading p {
  margin: 10px auto 0;
  color: #738094;
  font-size: 14px;
}

.activity-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.activity-product-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 390px;
  flex-direction: column;
  border: 1px solid #e1e6ee;
  background: #fff;
  box-shadow: 0 2px 7px #edf0f4;
  transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.activity-product-card:hover {
  border-color: #9ec5ff;
  box-shadow: 0 14px 34px rgba(24, 55, 104, 0.12);
  transform: translateY(-4px);
}

.activity-product-card.style-b {
  border-top: 4px solid #0868f5;
}

.activity-product-card.style-c {
  border-top: 4px solid #11a36a;
}

.activity-product-card.style-d {
  border-top: 4px solid #ff7a00;
}

.activity-product-head {
  display: flex;
  min-height: 132px;
  padding: 25px 25px 20px;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf0f4;
}

.activity-product-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.activity-product-title h3 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #172033;
  font-size: 21px;
  font-weight: 700;
}

.activity-product-title span,
.activity-discount {
  flex: none;
  padding: 3px 7px;
  background: #fff0e4;
  color: #e65e00;
  font-size: 11px;
  font-weight: 700;
}

.activity-product-head p {
  display: -webkit-box;
  overflow: hidden;
  margin: 10px 0 0;
  color: #7a8596;
  font-size: 13px;
  line-height: 22px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.activity-stock {
  flex: none;
  color: #e65e00;
  font-size: 12px;
}

.activity-product-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 24px 25px;
}

.activity-product-specs span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  overflow-wrap: anywhere;
  color: #596579;
  font-size: 13px;
}

.activity-product-specs svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: #11a36a;
}

.activity-product-footer {
  display: flex;
  margin-top: auto;
  padding: 22px 25px 24px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid #edf0f4;
}

.activity-price-block > div {
  display: flex;
  align-items: baseline;
  color: #ee3f32;
}

.activity-price-block small {
  font-size: 15px;
}

.activity-price-block strong {
  font-size: 30px;
  line-height: 1;
}

.activity-price-block > div span {
  margin-left: 4px;
  color: #707b8c;
  font-size: 12px;
}

.activity-price-block del {
  display: block;
  margin-top: 7px;
  color: #a0a8b4;
  font-size: 12px;
}

.activity-discount {
  display: inline-block;
  margin-bottom: 8px;
}

.activity-product-footer > a,
.activity-product-footer > button,
.activity-empty-products a {
  display: inline-flex;
  min-width: 104px;
  height: 42px;
  padding: 0 18px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: #0868f5;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transition: background-color 200ms ease, transform 200ms ease;
}

.activity-product-footer > a:hover {
  background: #0057d9;
  transform: translateY(-2px);
}

.activity-product-footer > button:disabled {
  background: #c8ced8;
  cursor: not-allowed;
}

.activity-product-limit {
  margin: -14px 25px 18px;
  color: #9aa3b2;
  font-size: 12px;
}

.activity-rules-section {
  padding: 64px 0 84px;
  background: #fff;
}

.activity-rules-content {
  max-width: 920px;
  margin: 0 auto;
}

.activity-rules-content h2 {
  margin-bottom: 28px;
  text-align: center;
}

.activity-empty-products {
  display: flex;
  min-height: 320px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #788397;
  text-align: center;
}

.activity-empty-products svg {
  width: 48px;
  height: 48px;
  color: #9fb4d0;
}

.activity-empty-products h2 {
  margin: 18px 0 0;
  color: #1a2333;
  font-size: 24px;
}

.activity-empty-products p {
  margin: 10px 0 20px;
}

@media (max-width: 1024px) {
  .activity-list-grid,
  .activity-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .activity-intro-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 36px;
  }
}

@media (max-width: 768px) {
  .activity-public-page .www-public-banner {
    height: 220px;
  }

  .activity-tabs-band {
    top: var(--home-header-height, 64px);
  }

  .activity-tabs {
    height: 50px;
    gap: 0;
    justify-content: space-between;
  }

  .activity-tabs button {
    min-width: 0;
    padding: 0 4px;
    border-radius: 0;
    font-size: 13px;
  }


  .activity-list-section {
    padding: 24px 0 48px;
  }

  .activity-list-grid {
    gap: 18px;
  }

  .activity-list-grid,
  .activity-product-grid,
  .activity-intro-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .activity-detail-summary {
    padding-top: 14px;
    padding-bottom: 14px;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .activity-summary-meta {
    gap: 7px 12px;
    justify-content: flex-start;
  }

  .activity-summary-meta span:nth-child(2),
  .activity-summary-meta span:nth-child(3),
  .activity-summary-meta span:nth-child(4) {
    display: none;
  }

  .activity-intro-section,
  .activity-products-section,
  .activity-rules-section {
    padding: 36px 0 46px;
  }

  .activity-intro-copy h2,
  .activity-section-heading h2,
  .activity-rules-content h2 {
    font-size: 25px;
  }

  .activity-coupon-panel {
    min-height: 0;
  }

  .activity-product-card {
    min-height: 360px;
  }

  .activity-product-footer {
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .activity-list-card,
  .activity-list-cover img,
  .activity-list-link svg,
  .activity-product-card,
  .activity-product-footer > a {
    transition: none;
  }

  .activity-list-card,
  .activity-template-enter {
    animation: none;
  }

  .activity-status-badge.is-ongoing .activity-status-dot {
    animation: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  }
}

.qycw-rich-text-editor .rsw-ce img {
  margin: 8px 0;
}

.qycw-rich-text-content img {
  margin: 8px 0 10px;
  cursor: zoom-in;
  /* Prevent the full-resolution decode until the image is visible */
  content-visibility: auto;
  contain-intrinsic-size: 200px;
  image-rendering: auto;
}
