/**
 * CryingSea 云商城 — 参考腾讯云 / 阿里云控制台选购体验
 * 直角 · 浅灰底 · 白面板 · 步骤条 · 卡片网格 · 右侧订单摘要
 */

/* 顶栏高度：用户中心 48px / 官网 56px */
body.body-csc-cart {
  --csc-sticky-top: var(--uc-topbar-h, 48px);
}

body.zjmf-home-hw .csc-cart-web {
  --csc-sticky-top: 56px;
}

/* ========== 布局壳：仅顶栏 + 可滚动 ========== */
body.body-csc-cart,
body.zjmf-home-hw .csc-cart-web {
  overflow-y: auto !important;
  height: auto !important;
}

body.body-csc-cart #layout-wrapper {
  overflow: visible !important;
  min-height: auto !important;
}

body.body-csc-cart .main-content {
  margin-left: 0 !important;
  width: 100% !important;
  display: block !important;
  overflow: visible !important;
  min-height: auto !important;
}

body.zjmf-home-hw .csc-cart-web {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

body.body-csc-cart .page-content {
  display: block !important;
  flex: none !important;
  overflow: visible !important;
  min-height: auto !important;
  background: #f2f3f5 !important;
  padding-top: var(--csc-sticky-top, 56px) !important;
  padding-bottom: 48px !important;
}

body.body-csc-cart .page-content > .container-fluid {
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: visible !important;
}

body.body-csc-cart .vertical-menu,
body.body-csc-cart #vertical-menu-btn,
body.body-csc-cart .navbar-brand-box {
  display: none !important;
}

body.body-csc-cart .footer,
body.body-csc-cart footer.footer {
  margin-left: 0 !important;
  width: 100% !important;
}

body.body-csc-cart .uc-page-title-strip {
  display: none !important;
}

body.body-csc-cart #page-topbar {
  left: 0 !important;
  width: 100% !important;
}

body.body-csc-cart #page-topbar .uc-topbar-page-chip--off {
  display: none !important;
}

body.body-csc-cart #page-topbar .uc-topbar-page-chip {
  display: inline-flex !important;
}

/* ========== 设计令牌 ========== */
body.body-csc-cart .csc-page,
.csc-cart-web {
  --csc-primary: var(--uc-primary, #2b6de5);
  --csc-primary-hover: var(--uc-primary-hover, #2259c7);
  --csc-primary-bg: rgba(43, 109, 229, 0.08);
  --csc-primary-bg-active: rgba(43, 109, 229, 0.14);
  --csc-page-bg: #f7f7f9;
  --csc-surface: #ffffff;
  --csc-border: #d4d6d9;
  --csc-border-light: #f1f1f1;
  --csc-text: #181818;
  --csc-text-2: #495057;
  --csc-muted: #999999;
  --csc-sidebar-w: 220px;
  --csc-prod-min-w: 200px;
  --csc-prod-gap: 12px;
  --csc-max: none;
  color: var(--csc-text);
  font-size: 14px;
  line-height: 1.5;
}

body.body-csc-cart .csc-page,
.csc-cart-web,
body.body-csc-cart .csc-page *,
.csc-cart-web * {
  border-radius: 0 !important;
}

body.body-csc-cart .csc-page a.csc-btn-buy,
.csc-cart-web a.csc-btn-buy,
body.body-csc-cart .csc-page a.csc-btn-buy:hover,
.csc-cart-web a.csc-btn-buy:hover,
body.body-csc-cart .csc-page a.csc-btn-buy-block,
.csc-cart-web a.csc-btn-buy-block,
body.body-csc-cart .csc-page a.csc-btn-buy-block:hover,
.csc-cart-web a.csc-btn-buy-block:hover {
  color: #fff !important;
}

body.body-csc-cart .csc-page a.csc-sub-link:not(.is-active),
.csc-cart-web a.csc-sub-link:not(.is-active) {
  color: var(--csc-text) !important;
}

body.body-csc-cart .csc-page a.csc-sub-link.is-active,
.csc-cart-web a.csc-sub-link.is-active {
  color: var(--csc-text) !important;
}

.csc-shell {
  max-width: var(--csc-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== 选购页：侧栏 + 主区 ========== */
.csc-shop-layout {
  display: block;
  min-height: calc(100vh - var(--csc-sticky-top, 56px));
  background: var(--csc-page-bg);
}

.csc-shop-main {
  margin-left: var(--csc-sidebar-w);
  min-height: calc(100vh - var(--csc-sticky-top, 56px));
  padding: 16px 16px 32px;
  box-sizing: border-box;
}

.csc-region-hd {
  margin-bottom: 12px;
}

.csc-region-hd__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--csc-text);
  line-height: 1.4;
}

.csc-region-hd__desc {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--csc-text-2);
  line-height: 1.5;
}

.csc-login-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: #e8f3ff;
  border: 1px solid #bedaff;
  color: var(--csc-text-2);
  font-size: 13px;
  line-height: 1.6;
}

.csc-login-tip .bx {
  flex-shrink: 0;
  font-size: 18px;
  color: var(--csc-primary);
  margin-top: 1px;
}

.csc-login-tip p {
  margin: 0;
}

.csc-login-tip a {
  color: var(--csc-primary) !important;
  text-decoration: underline !important;
}

.csc-products-wrap {
  width: 100%;
}

/* ========== 左侧分类导航 ========== */
.csc-sidebar {
  position: fixed;
  top: var(--csc-sticky-top, 56px);
  left: 0;
  z-index: 997;
  width: var(--csc-sidebar-w);
  height: calc(100vh - var(--csc-sticky-top, 56px));
  background: var(--csc-surface);
  border-right: 1px solid var(--csc-border-light);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.csc-sidebar-search {
  flex-shrink: 0;
  padding: 14px 10px;
  border-bottom: 1px solid var(--csc-border-light);
  background: var(--csc-surface);
}

.csc-search-box {
  position: relative;
}

.csc-search-box .form-control {
  height: 36px;
  padding-left: 34px;
  font-size: 13px;
  border: 1px solid var(--csc-border) !important;
  background: #fff !important;
  color: var(--csc-text);
  box-shadow: none !important;
}

.csc-search-box .form-control:focus {
  border-color: var(--csc-primary) !important;
  outline: none;
}

.csc-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--csc-muted);
  cursor: pointer;
  z-index: 2;
}

.csc-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 12px;
}

.csc-sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.csc-sidebar-nav::-webkit-scrollbar-thumb {
  background: #e6e6e6;
}

.csc-sidebar-empty {
  padding: 24px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--csc-muted);
}

.csc-cat-item {
  border-bottom: 1px solid var(--csc-border-light);
  background: #f7f7f9;
}

.csc-cat-l1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--csc-text);
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.csc-cat-l1:hover,
.csc-cat-l1.is-active {
  background: var(--csc-primary-bg);
}

.csc-cat-arrow {
  font-size: 14px;
  color: var(--csc-muted);
  transition: transform 0.2s;
  transform: rotate(90deg);
}

.csc-cat-item.is-open .csc-cat-arrow {
  transform: rotate(270deg);
  color: var(--csc-primary);
}

.csc-cat-sub {
  max-height: 0;
  overflow: hidden;
  background: #f9f9f9;
  transition: max-height 0.25s ease;
}

.csc-cat-item.is-open .csc-cat-sub {
  max-height: 600px;
}

.csc-sub-link {
  display: block;
  padding: 10px 14px 10px 28px;
  font-size: 12px;
  color: var(--csc-text) !important;
  text-decoration: none !important;
  border-left: 3px solid transparent;
  transition: background 0.15s;
}

.csc-sub-link:hover {
  background: var(--csc-primary-bg);
}

.csc-sub-link.is-active {
  background: var(--csc-primary-bg-active);
  border-left-color: var(--csc-primary);
  font-weight: 500;
}

.csc-sub-link__text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ========== 步骤条（结算/完成页） ========== */
.csc-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 20px 24px;
  background: var(--csc-surface);
  border-bottom: 1px solid var(--csc-border);
}

.csc-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--csc-muted);
  white-space: nowrap;
}

.csc-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #c9cdd4;
  color: var(--csc-muted);
  background: #fff;
}

.csc-step.is-done {
  color: var(--csc-text-2);
}

.csc-step.is-done .csc-step__num {
  border-color: var(--csc-primary);
  background: var(--csc-primary);
  color: #fff;
}

.csc-step.is-current {
  color: var(--csc-text);
  font-weight: 600;
}

.csc-step.is-current .csc-step__num {
  border-color: var(--csc-primary);
  color: var(--csc-primary);
  background: var(--csc-primary-bg);
}

.csc-step-line {
  width: 48px;
  height: 1px;
  background: #e5e6eb;
  margin: 0 12px;
  flex-shrink: 0;
}

.csc-step-line.is-done {
  background: var(--csc-primary);
}

/* ========== 产品网格（云厂商卡片） ========== */
.csc-prod-grid {
  display: grid;
  width: 100%;
  gap: var(--csc-prod-gap);
  grid-template-columns: repeat(auto-fill, minmax(var(--csc-prod-min-w), 1fr));
  margin-bottom: 8px;
  align-items: stretch;
}

.csc-prod-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--csc-surface);
  border: 1px solid var(--csc-border);
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.csc-prod-item:hover {
  border-color: #b8c4d9;
  box-shadow: 0 4px 16px rgba(43, 109, 229, 0.08);
}

.csc-prod-item__hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 14px 12px;
  background: #f7f7f9;
  border-bottom: 1px solid #eee;
}

.csc-prod-item__title {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #000;
  line-height: 1.35;
  word-break: break-all;
}

.csc-prod-item__tag {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  color: #fe5f47;
  background: #fcf1eb;
  vertical-align: middle;
}

.csc-prod-item__stock {
  flex-shrink: 0;
  padding-left: 10px;
  font-size: 12px;
  color: var(--csc-muted);
  border-left: 1px solid #d4d6d9;
  white-space: nowrap;
}

.csc-prod-item__stock.is-warn {
  color: #f0c000;
}

.csc-prod-item__stock.is-danger {
  color: #f87878;
}

.csc-prod-item__body {
  flex: 1;
  padding: 12px 14px 0;
  background: #fff;
}

.csc-spec-list {
  margin: 0;
  padding: 0;
}

.csc-spec-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  line-height: 1.5;
  border-bottom: 1px solid #f5f5f5;
}

.csc-spec-row:last-child {
  border-bottom: none;
}

.csc-spec-row dt {
  flex: 0 0 72px;
  max-width: 46%;
  margin: 0;
  font-weight: 400;
  color: var(--csc-muted);
  white-space: nowrap;
}

.csc-spec-row dd {
  flex: 1;
  margin: 0;
  text-align: right;
  color: var(--csc-text-2);
  word-break: break-all;
}

.csc-prod-fallback {
  margin: 0;
  font-size: 12px;
  color: var(--csc-muted);
  line-height: 1.6;
}

.csc-prod-item__ft {
  padding: 8px 14px 0;
  margin-top: auto;
  background: #fff;
}

.csc-prod-item__price {
  margin-bottom: 8px;
}

.csc-price-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px;
  color: #ff4d4f;
  line-height: 1.3;
}

.csc-price-currency {
  font-size: 14px;
}

.csc-price-amount {
  font-size: 20px;
  font-weight: 500;
}

.csc-price-from {
  font-size: 12px;
  margin-left: 2px;
}

.csc-price-period {
  font-size: 12px;
  color: var(--csc-muted);
  margin-left: 2px;
}

.csc-price-original {
  font-size: 11px;
  color: var(--csc-muted);
  margin-top: 2px;
}

.csc-price-trial {
  font-size: 11px;
  color: #d46b08;
  margin-top: 2px;
}

.csc-btn-buy-block {
  display: block;
  width: calc(100% + 28px);
  margin: 0 -14px;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  text-decoration: none !important;
  color: #fff !important;
  background: var(--csc-primary) !important;
  border: none;
  transition: background 0.15s;
}

.csc-btn-buy-block:hover {
  background: var(--csc-primary-hover) !important;
  color: #fff !important;
}

.csc-btn-soldout-block {
  display: block;
  width: calc(100% + 28px);
  margin: 0 -14px;
  padding: 11px 12px;
  font-size: 13px;
  text-align: center;
  color: var(--csc-muted);
  background: #f8f9fa;
  cursor: not-allowed;
}

.csc-btn-buy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff !important;
  background: var(--csc-primary) !important;
  border: 1px solid var(--csc-primary) !important;
  text-decoration: none !important;
  white-space: nowrap;
}

.csc-btn-buy:hover {
  background: var(--csc-primary-hover) !important;
  border-color: var(--csc-primary-hover) !important;
  color: #fff !important;
}

.csc-empty {
  grid-column: 1 / -1;
  padding: 72px 24px;
  text-align: center;
  background: var(--csc-surface);
  border: 1px dashed var(--csc-border);
  color: var(--csc-muted);
}

.csc-empty .mdi {
  font-size: 44px;
  opacity: 0.25;
  display: block;
  margin-bottom: 12px;
}

.csc-pager {
  padding: 16px 0 8px;
  display: flex;
  justify-content: center;
}

.csc-pager .page-link {
  font-size: 13px;
  border-color: var(--csc-border) !important;
  color: var(--csc-text-2) !important;
  min-width: 32px;
  text-align: center;
}

.csc-pager .page-item.active .page-link {
  background: var(--csc-primary) !important;
  border-color: var(--csc-primary) !important;
  color: #fff !important;
}

/* ========== 结算页 ========== */
.csc-checkout-body {
  padding: 24px 0;
}

.csc-checkout-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
  align-items: start;
}

.csc-block {
  background: var(--csc-surface);
  border: 1px solid var(--csc-border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.csc-block-hd {
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--csc-text);
  border-bottom: 1px solid var(--csc-border-light);
  background: #fafbfc;
}

.csc-block-bd {
  padding: 20px;
}

.csc-order-aside {
  position: sticky;
  top: calc(var(--csc-sticky-top, 56px) + 16px);
}

.csc-order-aside .csc-block-hd {
  background: linear-gradient(90deg, #fafbfc, #f5f8ff);
}

.csc-line-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--csc-border-light);
}

.csc-line-item:last-child {
  border-bottom: none;
}

.csc-checkout .addfunds-payment,
.csc-checkout .checkboxDiv {
  border: 1px solid var(--csc-border) !important;
  padding: 10px 12px !important;
  margin-bottom: 8px;
  cursor: pointer;
  background: var(--csc-surface) !important;
}

.csc-checkout .addfunds-payment.active,
.csc-checkout .checkboxSelect {
  border-color: var(--csc-primary) !important;
  background: var(--csc-primary-bg) !important;
}

.csc-checkout .goods_info .title {
  color: var(--csc-primary);
  cursor: pointer;
  font-size: 12px;
}

.csc-order-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 0 4px;
  margin-top: 8px;
  border-top: 1px solid var(--csc-border);
}

.csc-order-total span {
  font-size: 13px;
  color: var(--csc-text-2);
}

.csc-order-total strong {
  font-size: 22px;
  font-weight: 600;
  color: #f53f3f;
}

.csc-checkout .submit-btn {
  width: 100%;
  height: 42px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 12px;
}

body.body-csc-cart .csc-checkout .btn-group-toggle .btn-primary.active,
.csc-cart-web.csc-checkout .btn-group-toggle .btn-primary.active,
body.body-csc-cart .csc-checkout .btn-group-toggle label.btn-primary.active,
.csc-cart-web.csc-checkout .btn-group-toggle label.btn-primary.active,
body.body-csc-cart .csc-checkout .cart-register .btn-primary.active,
.csc-cart-web.csc-checkout .cart-register .btn-primary.active,
body.body-csc-cart .csc-checkout .cart-login .btn-primary.active,
.csc-cart-web.csc-checkout .cart-login .btn-primary.active {
  background: var(--csc-primary) !important;
  border-color: var(--csc-primary) !important;
  color: #fff !important;
}

body.body-csc-cart .csc-checkout .btn-group-toggle .btn-primary:not(.active),
.csc-cart-web.csc-checkout .btn-group-toggle .btn-primary:not(.active) {
  background: #f7f8fa !important;
  border-color: var(--csc-border) !important;
  color: var(--csc-text-2) !important;
}

.csc-m-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1050;
  padding: 10px 16px;
  background: var(--csc-surface);
  border-top: 1px solid var(--csc-border);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
}

/* ========== 完成页 ========== */
.csc-done-panel {
  max-width: 520px;
  margin: 32px auto;
  padding: 40px 32px;
  text-align: center;
  background: var(--csc-surface);
  border: 1px solid var(--csc-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.csc-done-panel .mdi-check-circle {
  font-size: 52px;
  color: #00b42a;
  line-height: 1;
  margin-bottom: 16px;
}

.csc-done-panel h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
}

.csc-done-panel p {
  font-size: 13px;
  color: var(--csc-muted);
  margin: 0 0 24px;
  line-height: 1.6;
}

.csc-done-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.csc-done-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  height: 38px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
}

.csc-done-actions .primary {
  background: var(--csc-primary);
  border: 1px solid var(--csc-primary);
  color: #fff !important;
}

.csc-done-actions .ghost {
  background: var(--csc-surface);
  border: 1px solid var(--csc-border);
  color: var(--csc-text-2) !important;
}

/* ========== 配置摘要 ========== */
.csc-summary {
  background: var(--csc-surface);
  border: 1px solid var(--csc-border);
  padding: 16px 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.csc-summary .table td {
  padding: 8px 4px !important;
  border: none !important;
  font-size: 13px;
}

.csc-summary .color-999 {
  color: var(--csc-muted) !important;
}

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
  body.body-csc-cart .csc-page {
    --csc-prod-min-w: 180px;
  }
}

@media (max-width: 768px) {
  body.body-csc-cart .csc-page {
    --csc-sidebar-w: 0px;
    --csc-prod-min-w: 100%;
  }

  .csc-sidebar {
    transform: translateX(-100%);
    width: 260px;
    transition: transform 0.25s ease;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.08);
  }

  .csc-sidebar.is-open {
    transform: translateX(0);
  }

  .csc-shop-main {
    margin-left: 0;
    padding: 12px 10px 24px;
  }

  .csc-shell {
    padding: 0 16px;
  }

  .csc-steps {
    padding: 14px 16px;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .csc-step-line {
    width: 24px;
    margin: 0 6px;
  }

  .csc-checkout-grid {
    grid-template-columns: 1fr;
  }

  .csc-order-aside {
    position: static;
  }

  .csc-m-bar {
    display: block;
  }

  body.body-csc-cart .page-content {
    padding-bottom: 88px !important;
  }
}
