@charset "utf-8";
/* =============================================
   Tdyun 弹性云 - 现代配置购买页面样式
   参考设计: yisu.com 云服务器配置页
   适配: 桌面端 + 移动端响应式
   ============================================= */

/* ===== CSS 变量 ===== */
:root {
    --primary: #0066ff;
    --primary-light: #e8f0fe;
    --primary-dark: #0047b3;
    --accent: #ff4d4f;
    --accent-bg: #fff1f0;
    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-page: #f5f7fa;
    --bg-card: #ffffff;
    --border: #e5e7eb;
    --border-light: #f0f0f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

/* ===== 覆盖旧布局约束 ===== */
body .divMobiCenter {
    min-width: 0 !important;
}

/* ===== 现代购买区域容器 ===== */
.modern-buy-section {
    background: var(--bg-page);
    padding: 20px 0 80px;
    min-height: 600px;
    width: 100%;
    overflow: hidden;
}

.buy-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex !important;
    flex-direction: row !important;
    gap: 24px;
    align-items: flex-start !important;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

/* ===== 左侧配置面板 ===== */
.config-panel {
    flex: 1 1 0% !important;
    min-width: 0 !important;
}

/* ===== 性能提示 ===== */
.perf-tip {
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border: 1px solid #fed7aa;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13px;
    color: #c2410c;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* ===== 配置卡片 ===== */
.config-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: box-shadow 0.2s ease;
}

.config-card:hover {
    box-shadow: var(--shadow-md);
}

.config-card-simple {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
}

/* 卡片头部：标签 + 值 */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

/* 免费标签 */
.free-badge {
    display: inline-block;
    background: linear-gradient(135deg, #10b981, #34d399);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
}

/* ===== 滑块区域 ===== */
.slider-wrapper {
    position: relative;
}

/* 隐藏旧的 cloudText（刻度用新的 slider-ticks） */
.cloudText {
    display: none !important;
}

/* 滑块轨道 */
.cloudBox {
    position: relative !important;
    background: #e5e7eb !important;
    background-image: none !important;
    height: 6px !important;
    border-radius: 3px !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    cursor: pointer;
    box-sizing: border-box;
}

/* 滑块已选进度条 */
.cloudBox .ui-slider-range {
    background: linear-gradient(90deg, var(--primary), #4d94ff) !important;
    height: 6px !important;
    border-radius: 3px !important;
    background-image: none !important;
}

/* 滑块手柄 */
.cloudBox .ui-slider-handle {
    width: 22px !important;
    height: 22px !important;
    background: #fff !important;
    background-image: none !important;
    border: 3px solid var(--primary) !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(0,102,255,0.3) !important;
    top: -8px !important;
    cursor: grab;
    transition: box-shadow 0.2s ease;
}

.cloudBox .ui-slider-handle:active {
    cursor: grabbing;
    box-shadow: 0 2px 12px rgba(0,102,255,0.5) !important;
    transform: scale(1.1);
}

/* ===== 刻度标签 ===== */
.slider-ticks {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between;
    margin-top: 14px;
    padding: 0 !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0 !important;
}

.slider-ticks::-webkit-scrollbar {
    display: none;
}

.slider-ticks .tick {
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.slider-ticks .tick:hover {
    color: var(--primary);
}

.slider-ticks .tick.active {
    color: var(--primary);
    font-weight: 600;
    background: var(--primary-light);
    border-radius: 4px;
}

/* ===== 右侧订单摘要 ===== */
.order-summary {
    width: 360px !important;
    flex-shrink: 0 !important;
    position: sticky;
    top: 20px;
}

.summary-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.summary-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

/* ===== 表单组 ===== */
.form-group {
    margin-bottom: 14px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-hint {
    display: inline;
    font-size: 12px;
    font-weight: 400;
    color: #bbb;
    margin-left: 4px;
}

/* ===== 按钮组 ===== */
.billing-type-display {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.btn-option {
    flex: 1 1 0%;
    min-width: 0;
    padding: 10px 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: none;
    border-right: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}

.btn-option:last-child {
    border-right: none;
}

.btn-option:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.btn-option.active {
    color: var(--primary);
    background: var(--primary-light);
    font-weight: 600;
    box-shadow: inset 0 0 0 2px var(--primary);
}

/* ===== 加减按钮 ===== */
.stepper-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stepper-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stepper-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.stepper-btn:active {
    transform: scale(0.95);
}

.stepper-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    min-width: 50px;
    text-align: center;
}

.stepper-input {
    width: 60px;
    height: 36px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-page);
    outline: none;
    transition: border-color 0.2s ease;
    -moz-appearance: textfield;
}

.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.stepper-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,102,255,0.1);
    background: #fff;
}

.stepper-unit {
    font-size: 13px;
    color: var(--text-muted);
    margin-left: 4px;
}

/* ===== 自定义下拉选择器 ===== */
.custom-select {
    position: relative;
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 36px 10px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 20px;
}

.custom-select:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.custom-select.small {
    width: 100%;
}

.select-row {
    display: flex;
    gap: 12px;
}

.select-row .custom-select {
    flex: 1;
}

.select-value {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.4;
}

.select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--text-muted);
    transition: transform 0.2s ease;
}

.custom-select.open .select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* 下拉菜单 */
.select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    max-height: 240px;
    overflow-y: auto;
}

.select-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.select-dropdown ul li {
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s ease;
}

.select-dropdown ul li:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.select-dropdown ul li span {
    float: none;
}

/* ===== 表单输入框 ===== */
.form-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-page);
    color: var(--text-primary);
    transition: all 0.2s ease;
    box-sizing: border-box;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,102,255,0.1);
    background: #fff;
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* ===== 协议勾选 ===== */
.agreement {
    margin: 20px 0;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.agreement label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.agreement label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.agreement a {
    color: var(--primary);
    text-decoration: none;
}

.agreement a:hover {
    text-decoration: underline;
}

/* ===== 活动信息 ===== */
.activity-info {
    background: var(--accent-bg);
    border: 1px solid #ffccc7;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-top: 12px;
}

.activity-info em {
    font-style: normal;
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
}

/* ===== 底部价格栏 ===== */
.price-bar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.price-bar-inner {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-left {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.price-main {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.price-tag {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ff4d4f);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.price-amount {
    font-size: 14px;
    color: var(--text-secondary);
}

.price-amount #price {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.price-original {
    font-size: 14px;
    color: var(--text-muted);
}

.price-original del {
    color: var(--text-muted);
}

.price-monthly {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
    margin-top: 2px;
}

.price-right .btn-buy {
    background: linear-gradient(135deg, var(--primary), #4d94ff);
    color: #fff;
    border: none;
    padding: 14px 48px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(0,102,255,0.3);
    letter-spacing: 1px;
}

.price-right .btn-buy:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 6px 20px rgba(0,102,255,0.4);
    transform: translateY(-1px);
}

.price-right .btn-buy:active {
    transform: translateY(0);
}

.price-right .btn-buy:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ===== 隐藏旧元素 ===== */
.z_buymsg,
.cloudSlider,
.pack_nr,
.yue_du,
.jg_text,
.cloudt,
.cloudPart,
.cloudPart01,
.cloudPart02,
.cloudPart03,
.cloudPart04,
.xt_mf,
.ddTitle,
.ddChild,
.ddjg,
.cztext,
.mm_text,
.bfheight {
    display: none !important;
}

/* 旧的 clear div */
.clear {
    display: none !important;
}

/* ===== 产品优势 & 客户案例 保留原有样式 ===== */
.service,
.title,
.case {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ===== 桌面端产品优势 3 列卡片网格 ===== */
@media screen and (min-width: 769px) {
    .buy-container {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
    }

    .config-panel {
        flex: 1 1 0% !important;
        min-width: 0 !important;
    }

    .order-summary {
        width: 360px !important;
        flex-shrink: 0 !important;
        position: sticky !important;
        top: 20px !important;
    }

    .price-bar {
        position: static !important;
    }

    .price-bar-inner {
        border-radius: var(--radius-lg) !important;
        border: 1px solid var(--border) !important;
        box-shadow: var(--shadow-md) !important;
    }

    /* 产品优势区域 PC 端改造 */
    .service {
        height: auto !important;
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }

    .fw_bt {
        width: 100% !important;
        padding-left: 0 !important;
        margin-bottom: 24px !important;
    }

    .fw_bt h1 {
        font-size: 26px !important;
        color: var(--text-primary) !important;
    }

    .ser_nr {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }

    .ser_nr .box {
        width: 100% !important;
        height: auto !important;
        padding-top: 0 !important;
        background: var(--bg-card) !important;
        border-radius: var(--radius) !important;
        padding: 24px 20px !important;
        box-shadow: var(--shadow-sm) !important;
        border: 1px solid var(--border) !important;
        transition: box-shadow 0.2s ease, transform 0.2s ease !important;
        display: flex !important;
        align-items: flex-start !important;
        gap: 16px !important;
        box-sizing: border-box !important;
    }

    .ser_nr .box:hover {
        box-shadow: var(--shadow-md) !important;
        transform: translateY(-2px) !important;
    }

    .ser_nr .box .s_left {
        width: 56px !important;
        height: 56px !important;
        padding-top: 0 !important;
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .ser_nr .box .s_left img {
        width: 48px !important;
        height: 48px !important;
        object-fit: contain !important;
    }

    .ser_nr .box .s_right {
        width: auto !important;
        height: auto !important;
        padding-left: 0 !important;
        flex: 1 !important;
        min-width: 0 !important;
    }

    .ser_nr .box .s_right dl dt {
        height: auto !important;
        line-height: 1.4 !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        color: var(--text-primary) !important;
        margin-bottom: 8px !important;
    }

    .ser_nr .box .s_right dl p {
        font-size: 13px !important;
        color: var(--text-secondary) !important;
        line-height: 1.6 !important;
        margin: 0 !important;
    }

    /* 客户案例区域 PC 端改造 */
    .title {
        width: 100% !important;
        height: auto !important;
        line-height: 1.4 !important;
        margin-top: 20px !important;
        margin-bottom: 24px !important;
        font-size: 26px !important;
        color: var(--text-primary) !important;
        padding-bottom: 12px !important;
    }

    .title a {
        color: var(--text-primary) !important;
        text-decoration: none !important;
    }

    .case {
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        margin-top: 0 !important;
        margin-bottom: 40px !important;
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 16px !important;
    }

    .case > div {
        width: 100% !important;
        height: auto !important;
        float: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 16px 12px !important;
        background: var(--bg-card) !important;
        border-radius: var(--radius-sm) !important;
        box-shadow: var(--shadow-sm) !important;
        border: 1px solid var(--border) !important;
        transition: box-shadow 0.2s ease !important;
        box-sizing: border-box !important;
    }

    .case > div:hover {
        box-shadow: var(--shadow-md) !important;
    }

    .case > div.odd {
        background: var(--bg-card) !important;
    }

    .case > div img {
        width: 120px !important;
        height: auto !important;
        max-height: 60px !important;
        margin-top: 0 !important;
        margin-bottom: 10px !important;
        object-fit: contain !important;
    }

    .case > div p {
        width: 100% !important;
        height: auto !important;
        line-height: 1.4 !important;
        font-size: 13px !important;
        color: var(--text-secondary) !important;
        margin: 0 !important;
    }
}

/* ========================================
   移动端响应式 (max-width: 768px)
   ======================================== */
@media screen and (max-width: 768px) {
    .modern-buy-section {
        padding: 16px 0 20px;
        background: #f0f2f5;
    }

    .buy-container {
        flex-direction: column !important;
        padding: 0 12px;
        gap: 16px;
    }

    .config-panel {
        width: 100% !important;
        flex: none !important;
    }

    /* 性能提示 */
    .perf-tip {
        font-size: 12px;
        padding: 10px 12px;
        margin-bottom: 14px;
    }

    /* 配置卡片 */
    .config-card {
        padding: 18px 16px;
        margin-bottom: 12px;
        border-radius: var(--radius-sm);
    }

    .config-card-simple {
        padding: 14px 16px;
    }

    .card-header {
        margin-bottom: 16px;
    }

    .card-label {
        font-size: 15px;
    }

    .card-value {
        font-size: 16px;
    }

    /* 滑块 */
    .cloudBox {
        height: 5px !important;
    }

    .cloudBox .ui-slider-range {
        height: 5px !important;
    }

    .cloudBox .ui-slider-handle {
        width: 20px !important;
        height: 20px !important;
        top: -7px !important;
    }

    .slider-ticks {
        margin-top: 12px;
        flex-wrap: nowrap !important;
        gap: 2px;
    }

    .slider-ticks .tick {
        font-size: 11px;
        padding: 2px 5px;
    }

    /* 按钮组移动端 */
    .btn-option {
        padding: 10px 6px;
        font-size: 13px;
    }

    /* 加减按钮移动端 */
    .stepper-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .stepper-value {
        font-size: 20px;
        min-width: 40px;
    }

    /* 订单摘要 - 移到配置下方 */
    .order-summary {
        width: 100% !important;
        flex: none !important;
        position: static !important;
    }

    .summary-card {
        padding: 20px 16px;
        border-radius: var(--radius);
    }

    .summary-title {
        font-size: 16px;
        margin-bottom: 18px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .select-row {
        flex-direction: column;
        gap: 10px;
    }

    .billing-ticks .tick {
        font-size: 11px;
        padding: 2px 4px;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 15px;
    }

    /* 价格栏 - 跟随文档流，显示在购买区内（订单摘要下方） */
    .price-bar {
        position: static;
        max-width: 100%;
        padding: 0 12px;
        margin-top: 16px;
    }

    .price-bar-inner {
        border-radius: var(--radius);
        padding: 12px 14px;
        box-shadow: var(--shadow-md);
        gap: 10px;
    }

    .price-left {
        flex: 1;
        min-width: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }

    .price-main {
        gap: 8px;
        flex-wrap: nowrap;
    }

    .price-tag {
        font-size: 11px;
        padding: 2px 8px;
        border-radius: 10px;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .price-amount {
        white-space: nowrap;
    }

    .price-amount #price {
        font-size: 24px;
    }

    .price-original {
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .price-monthly {
        font-size: 11px;
        white-space: nowrap;
    }

    .price-right {
        flex-shrink: 0;
    }

    .price-right .btn-buy {
        padding: 11px 20px;
        font-size: 14px;
        letter-spacing: 0;
        white-space: nowrap;
    }

    /* 产品优势 & 客户案例 */
    .service,
    .title,
    .case {
        padding: 0 12px;
    }

    /* 移动端隐藏客户案例 */
    .title,
    .case {
        display: none !important;
    }
}

/* ===== 超小屏适配 (max-width: 480px) ===== */
@media screen and (max-width: 480px) {
    .region-tab {
        padding: 10px 14px;
        font-size: 13px;
        min-width: 80px;
    }
    .slider-ticks .tick {
        font-size: 10px;
        padding: 2px 3px;
    }

    .price-bar-inner {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        text-align: left;
        align-items: center;
    }

    .price-left {
        flex: 1 1 100%;
        align-items: flex-start;
    }

    .price-right {
        flex: 1 1 100%;
    }

    .price-right .btn-buy {
        width: 100%;
        padding: 12px;
    }
}
