/**
 * 云主机订购页（官网壳）— 对齐 idcdao.cn/re-cloud-buy.html
 */

/* Vue 未编译前隐藏 {{ }} 模板泄漏 */
[v-cloak] {
  display: none !important;
}

#hw-line-switch[v-cloak] {
  display: none !important;
}

.hw-cart-mount .content.hw-cart-pending {
  visibility: hidden;
}

.hw-cart-mount .content.hw-cart-ready {
  visibility: visible;
}

/* cart 插件 rem 基准（须晚于 clientarea common.css 加载） */
html.hw-buy-root {
  font-size: 100px !important;
}

.hw-buy-page {
  background: var(--hw-color-bg-section, #F7F8FA);
  min-height: 60vh;
  font-family: var(--hw-font-family, "PingFang SC", "Microsoft YaHei", sans-serif);
  font-size: var(--hw-font-size-base, 14px);
  line-height: var(--hw-line-height-base, 1.5);
  color: var(--hw-color-text, rgba(0, 0, 0, 0.9));
}

.hw-buy-body {
  padding: var(--hw-space-5, 20px) 0 var(--hw-space-16, 64px);
  position: relative;
}

.hw-buy-wrap {
  max-width: var(--hw-container-max, 1440px);
  margin: 0 auto;
  padding: 0 var(--hw-container-padding, 20px);
}

.hw-breadcrumb {
  font-size: var(--hw-font-size-base, 14px);
  line-height: var(--hw-line-height-base, 1.5);
  color: var(--hw-color-text-secondary, rgba(0, 0, 0, 0.6));
  margin-bottom: var(--hw-space-4, 16px);
}

.hw-breadcrumb a {
  color: var(--hw-color-text-secondary, rgba(0, 0, 0, 0.6));
  text-decoration: none;
}

.hw-breadcrumb a:hover {
  color: var(--hw-color-primary, #1A56DB);
}

.hw-breadcrumb__sep {
  margin: 0 8px;
}

.hw-cart-mount {
  min-height: 400px;
}

/* 订购白卡片 */
.hw-buy-card {
  background: #fff;
  border: 1px solid var(--hw-color-border, #E6EAED);
  border-radius: var(--hw-radius-md, 6px);
  box-shadow: var(--hw-shadow-sm, 0 0 8px rgba(52, 52, 52, 0.06));
  overflow: visible;
}

.hw-buy-card__head:not(:empty) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 24px 20px 32px;
  border-bottom: 1px solid var(--hw-color-border, #E6EAED);
  background: #fff;
}

.hw-buy-card__head:empty {
  display: none;
}

.hw-buy-card .config-box {
  min-height: 360px;
}

.hw-buy-card .content {
  background: transparent;
}

.hw-cart-mount .template > .tit {
  display: none;
}

/* 底部价格栏：视口全宽固定，滚至页脚时由 JS 上抬 bottom */
.hw-buy-page .hw-order-bar {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  bottom: 0;
  z-index: 200;
  height: auto !important;
  min-height: 1.14rem;
  margin: 0;
  padding: 0;
  background: transparent;
  box-sizing: border-box;
  pointer-events: none;
  display: flex;
  align-items: stretch;
  font-size: 0.14rem;
}

.hw-buy-page .hw-order-bar .el-main {
  pointer-events: auto;
  display: flex;
  align-items: center;
  flex: 1;
  width: 100%;
  max-width: none;
  min-height: 1.14rem;
  margin: 0;
  padding: 0.2rem max(0.24rem, calc((100vw - var(--hw-container-max, 1440px)) / 2 + var(--hw-container-padding, 20px))) !important;
  box-sizing: border-box;
  border-radius: 0;
  border: none;
  border-top: 1px solid var(--hw-color-border, #E6EAED);
  background: #fff;
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.08);
}

.hw-buy-page .hw-order-bar .l-empty {
  display: none !important;
  width: 0 !important;
}

.hw-buy-page .hw-order-bar .main-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 0.74rem;
  padding: 0;
  box-sizing: border-box;
}

.hw-buy-page .hw-order-bar .main-card .left {
  display: flex;
  align-items: center;
  column-gap: 0.4rem;
}

.hw-buy-page .hw-order-bar .time {
  margin-right: 0.6rem;
}

.hw-buy-page .hw-order-bar .duration-select {
  width: 1.6rem;
}

.hw-buy-page .hw-order-bar .el-input-number {
  width: 1.5rem;
}

.hw-buy-page .hw-order-bar .l-txt {
  margin-right: 0.14rem;
  font-size: 0.14rem;
  line-height: 0.4rem;
}

.hw-buy-page .hw-order-bar .mid {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0 0.24rem;
}

.hw-buy-page .hw-order-bar .mid .link {
  align-self: center;
  line-height: 1.4;
  white-space: nowrap;
}

.hw-buy-page .hw-order-bar .line-empty {
  align-self: center;
  flex-shrink: 0;
  width: 1px;
  height: 0.24rem;
  margin: 0 0.5rem;
  border-left: 1px dashed #d6d6d6;
}

.hw-buy-page .hw-order-bar .bot-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  white-space: nowrap;
  min-width: 1.4rem;
  align-self: center;
  margin: 0 0 0 0.1rem;
  font-size: 0.14rem;
  line-height: 1;
  gap: 0.06rem;
}

.hw-buy-page .hw-order-bar .bot-price .new span {
  font-size: 0.24rem;
  font-weight: 700;
  margin-left: 0.08rem;
}

.hw-buy-page .hw-order-bar .bot-price .old {
  margin-top: 0;
  margin-left: 0;
  align-items: center;
}

.hw-buy-page .hw-order-bar .right {
  display: flex;
  align-items: center;
  align-self: center;
  flex-shrink: 0;
}

.hw-buy-page .hw-order-bar .right .buy {
  min-width: 1.6rem;
  height: auto;
  min-height: 0.42rem;
  line-height: 1;
  padding: 0.12rem 0.2rem;
  font-size: 0.16rem;
  font-weight: 500;
  text-align: center;
  background: var(--hw-color-primary, #1A56DB);
  border-radius: 0.04rem;
  box-sizing: border-box;
}

.hw-buy-page .hw-order-bar .right .add-cart {
  width: 0.6rem;
  height: 0.45rem;
  padding: 0;
  border-radius: 0.03rem;
  border-color: var(--hw-color-primary, #1A56DB);
  box-sizing: border-box;
}

.hw-buy-page .hw-order-bar .link {
  border-bottom: 1px dashed rgba(0, 0, 0, 0.9);
  line-height: 1.4;
}

.hw-buy-page .hw-order-bar .el-input__inner,
.hw-buy-page .hw-order-bar .el-select .el-input__inner {
  height: 0.4rem;
  line-height: 0.4rem;
  font-size: 0.14rem;
  border-radius: 0.04rem;
}

.hw-buy-page .hw-order-bar .bot-price .new {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  color: var(--hw-color-accent, #FF6739);
}

.hw-buy-page.hw-has-order-bar .hw-buy-body {
  padding-bottom: calc(var(--hw-order-bar-height, 1.14rem) + 24px);
}

/* mf_cloud 右栏 sticky 皮肤不受影响 */
.hw-buy-page .huiwww01-sidebar-order {
  position: static !important;
  left: auto !important;
  width: 100% !important;
  bottom: auto !important;
}

/* 商品切换 — 对齐 idcdao .select-text */
.hw-goods-item-name {
  cursor: pointer;
  padding: 0;
  border: none;
  color: #041730;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  font-size: var(--hw-font-size-lg, 18px);
  font-weight: var(--hw-font-weight-bold, 700);
  line-height: 1.5;
  max-width: 520px;
  background: transparent;
}

.hw-line-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hw-line-switch__label {
  font-size: var(--hw-font-size-base, 14px);
  font-weight: var(--hw-font-weight-normal, 400);
  color: rgba(0, 0, 0, 0.65);
  line-height: 1.5;
  flex-shrink: 0;
}

.hw-line-ref {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.hw-line-ref__title {
  font-size: var(--hw-font-size-lg, 18px);
  font-weight: var(--hw-font-weight-bold, 700);
  line-height: 1.4;
  color: inherit;
}

.hw-line-ref__subtitle {
  margin-top: 4px;
  font-size: var(--hw-font-size-sm, 12px);
  font-weight: var(--hw-font-weight-normal, 400);
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.45);
}

.hw-goods-item-name:hover .hw-line-ref__subtitle {
  color: rgba(0, 0, 0, 0.45);
}

.hw-goods-item-name:hover {
  color: var(--hw-color-primary, #1A56DB);
  background: transparent;
}

.hw-goods-item-name .el-icon-arrow-down {
  margin-left: var(--hw-space-1, 4px);
  font-weight: 700;
}

.hw-goods-change-box {
  max-width: 720px;
  padding: 0 !important;
}

.hw-goods-item-box {
  max-height: 480px;
  overflow-y: auto;
  padding: var(--hw-space-4, 16px);
  min-width: 520px;
}

.hw-goods-search {
  width: 100%;
  margin-bottom: var(--hw-space-4, 16px);
}

.hw-goods-search .el-input__inner {
  height: 0.4rem;
  line-height: 0.4rem;
  font-size: 0.14rem;
  border-radius: 0.04rem;
}

.hw-goods-group-item {
  margin-bottom: var(--hw-space-5, 20px);
}

.hw-goods-group-item:last-child {
  margin-bottom: 0;
}

.hw-goods-group-name {
  font-weight: var(--hw-font-weight-bold, 600);
  font-size: var(--hw-font-size-base, 14px);
  color: var(--hw-color-text, rgba(0, 0, 0, 0.9));
  margin-bottom: var(--hw-space-2, 8px);
  padding-bottom: var(--hw-space-2, 8px);
  border-bottom: 1px solid var(--hw-color-border, #E6EAED);
}

.hw-goods-group-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--hw-space-2, 8px) var(--hw-space-4, 16px);
}

.hw-goods-option {
  cursor: pointer;
  font-size: var(--hw-font-size-base, 14px);
  color: var(--hw-color-text-secondary, rgba(0, 0, 0, 0.75));
  padding: 0 0.2rem;
  height: 0.34rem;
  line-height: 0.34rem;
  border-radius: var(--hw-radius-sm, 3px);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hw-goods-option:hover {
  color: var(--hw-color-primary, #1A56DB);
  background: var(--hw-color-primary-light, rgba(26, 86, 219, 0.08));
}

.hw-goods-option.active {
  color: var(--hw-color-primary, #1A56DB);
  font-weight: 600;
  background: var(--hw-color-primary-light, rgba(26, 86, 219, 0.08));
}

.hw-line-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 52px;
  height: auto;
  line-height: 1.3;
  padding: 10px 14px;
  white-space: normal;
  text-align: left;
}

.hw-line-option__title {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--hw-color-text, #041730);
  transition: color 0.15s;
}

.hw-line-option:hover .hw-line-option__title,
.hw-line-option.active .hw-line-option__title {
  color: var(--hw-color-primary, #1A56DB);
}

.hw-line-option__subtitle {
  margin-top: 2px;
  font-size: var(--hw-font-size-base, 14px);
  font-weight: 400;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.38);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hw-line-option:hover .hw-line-option__subtitle,
.hw-line-option.active .hw-line-option__subtitle {
  color: rgba(0, 0, 0, 0.45);
}

.hw-line-item-box .hw-goods-group-info {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hw-line-item-box .hw-goods-group-item {
  margin-bottom: 12px;
}

.hw-line-item-box .hw-line-group-name {
  font-weight: 400;
  font-size: var(--hw-font-size-base, 14px);
  color: rgba(0, 0, 0, 0.32);
  letter-spacing: 0.02em;
  margin: 10px 0 6px;
  padding-bottom: 0;
  border-bottom: none;
}

.hw-goods-empty {
  text-align: center;
  color: var(--hw-color-text-secondary, rgba(0, 0, 0, 0.45));
  padding: var(--hw-space-6, 24px) 0;
  font-size: var(--hw-font-size-base, 14px);
}

/* cart 配置区 — 对齐 idcdao mf_cloud 字号与间距 */
.hw-buy-page .hw-cart-mount .mf-cloud {
  margin-top: 0;
  padding-bottom: 1rem;
}

.hw-buy-page .hw-cart-mount .mf-cloud .com-tit {
  font-size: 0.16rem;
  font-weight: 600;
  color: #041730;
  margin-bottom: 0.2rem;
  padding-left: 0;
  line-height: 1.5;
}

.hw-buy-page .hw-cart-mount .mf-cloud .com-tit::before {
  display: none;
}

.hw-buy-page .hw-cart-mount .mf-cloud .con {
  padding: 0 0.24rem 0.24rem;
}

.hw-buy-page .hw-cart-mount .mf-cloud .el-tabs .el-tabs__item {
  font-size: 0.18rem;
  height: auto;
  line-height: 1;
  color: rgba(0, 0, 0, 0.9);
  padding: 0 0.36rem 0.12rem !important;
}

.hw-buy-page .hw-cart-mount .mf-cloud .el-tabs__header {
  margin-bottom: 0.4rem;
}

.hw-buy-page .hw-cart-mount .mf-cloud .el-form .el-form-item {
  margin-bottom: 0.22rem;
  padding-left: 0;
}

.hw-buy-page .hw-cart-mount .mf-cloud .el-form-item__label {
  font-size: 0.14rem;
  font-weight: 400;
  line-height: 0.4rem;
  padding: 0 0.12rem 0 0;
  color: rgba(0, 0, 0, 0.9);
}

.hw-buy-page .hw-cart-mount .mf-cloud .el-form .el-radio-button__inner,
.hw-buy-page .hw-cart-mount .mf-cloud .el-form .flow-bw {
  min-width: 1.44rem;
  height: 0.4rem;
  line-height: 0.4rem;
  font-size: 0.14rem;
  font-weight: 500;
  padding: 0 0.1rem;
  background: #F7FAFC;
  color: #041730;
  border: 1px solid #ECEDEE;
  border-radius: 0.04rem;
  box-sizing: border-box;
}

.hw-buy-page .hw-cart-mount .mf-cloud .el-form .el-radio-button {
  margin-right: 2px;
}

.hw-buy-page .hw-cart-mount .mf-cloud .el-form .el-radio-button.is-active .el-radio-button__inner {
  background: #fff;
  border-color: var(--hw-color-primary, #1A56DB);
  color: var(--hw-color-primary, #1A56DB);
  box-shadow: 0 4px 16px rgba(10, 54, 84, 0.08);
}

.hw-buy-page .hw-cart-mount .el-input__inner,
.hw-buy-page .hw-cart-mount .el-select .el-input__inner,
.hw-buy-page .hw-cart-mount .el-input-number .el-input__inner {
  height: 0.4rem;
  line-height: 0.4rem;
  font-size: 0.14rem;
  border-radius: 0.04rem;
  padding: 0 0.15rem;
}

.hw-buy-page .hw-cart-mount .el-select-dropdown__item {
  font-size: 0.14rem;
  height: 0.34rem;
  line-height: 0.34rem;
  padding: 0 0.2rem;
}

.hw-buy-page .hw-cart-mount .mf-cloud .s-tip {
  font-size: 0.13rem;
  line-height: 1.5;
  margin-top: 0.1rem;
}

.hw-buy-page .hw-cart-mount .mf-cloud .cloud-box {
  margin-left: -0.1rem;
  margin-top: -0.1rem;
}

.hw-buy-page .hw-cart-mount .mf-cloud .cloud-box .cloud-item {
  width: 2.8rem;
  margin-left: 0.1rem;
  margin-top: 0.1rem;
  border-radius: 0.03rem;
}

.hw-buy-page .hw-cart-mount .mf-cloud .cloud-box .cloud-item .top {
  line-height: 0.46rem;
  padding: 0 0.26rem;
  font-size: 0.14rem;
}

.hw-buy-page .hw-cart-mount .mf-cloud .cloud-box .info {
  padding: 0.1rem 0.26rem;
}

.hw-buy-page .hw-cart-mount .mf-cloud .cloud-box .info p {
  line-height: 0.24rem;
  font-size: 0.13rem;
}

.hw-buy-page .hw-cart-mount .mf-cloud .cloud-box .info .name {
  width: 0.9rem;
  margin-right: 0.05rem;
}

/* loading */
#mainLoading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  z-index: 20;
}

#mainLoading .ddr {
  width: 8px;
  height: 8px;
  margin: 0 4px;
  border-radius: 50%;
  background: var(--hw-color-primary, #1A56DB);
  animation: hw-buy-loading 0.9s infinite ease-in-out;
}

#mainLoading .ddr2 { animation-delay: 0.15s; }
#mainLoading .ddr3 { animation-delay: 0.3s; }
#mainLoading .ddr4 { animation-delay: 0.45s; }
#mainLoading .ddr5 { animation-delay: 0.6s; }

@keyframes hw-buy-loading {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

@media (max-width: 992px) {
  .hw-goods-item-box {
    min-width: 280px;
  }

  .hw-goods-group-info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hw-buy-card__head:not(:empty) {
    padding: 20px 16px 16px 20px;
  }

  .hw-buy-page .hw-order-bar .el-main {
    padding: 0.16rem 0.2rem !important;
  }

  .hw-buy-page .hw-order-bar .main-card {
    flex-wrap: wrap;
    row-gap: 0.12rem;
  }

  .hw-buy-page .hw-order-bar .main-card > .left {
    flex: 1 1 auto;
    min-width: 0;
    column-gap: 0.2rem;
  }

  .hw-buy-page .hw-order-bar .mid {
    flex: 1 1 auto;
    flex-wrap: wrap;
    min-width: 0;
    gap: 0.08rem 0.16rem;
  }

  .hw-buy-page .hw-order-bar .right {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .hw-buy-page .hw-cart-mount .mf-cloud .con {
    padding: 0 0.16rem 0.16rem;
  }

  .hw-buy-page .hw-cart-mount .mf-cloud .cloud-box .cloud-item {
    width: 100%;
  }
}
