/* ======================================================
   新外网络 - 产品页面样式 (product-page.css)
   用于：云虚拟主机、云服务器、企业邮箱、企业服务等
   ====================================================== */

/* ===== 页面头部 ===== */
.xw-product-hero {
    background: linear-gradient(135deg, var(--xw-primary) 0%, #1e40af 100%);
    padding: 60px 0;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.xw-product-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
}

.xw-product-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .03);
}

.xw-product-hero h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.xw-product-hero p {
    font-size: 16px;
    opacity: .85;
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.xw-product-hero-features {
    display: flex;
    gap: 32px;
    margin-top: 28px;
    position: relative;
    z-index: 1;
}

.xw-product-hero-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    opacity: .9;
}

.xw-product-hero-feature i {
    font-size: 16px;
}

/* ===== 服务器类型 Tab（大而明显） ===== */
.xw-server-tabs {
    display: flex;
    gap: 12px;
    border-bottom: none;
    margin-bottom: 36px;
    justify-content: center;
    flex-wrap: wrap;
}

.xw-server-tab {
    padding: 14px 36px;
    font-size: 16px;
    font-weight: 700;
    color: var(--xw-gray-500);
    cursor: pointer;
    border: 2px solid var(--xw-gray-150);
    border-radius: 999px;
    margin-bottom: 0;
    transition: all .25s ease;
    background: #fff;
}

.xw-server-tab:hover {
    color: var(--xw-primary);
    border-color: var(--xw-primary-200);
    background: rgba(37, 99, 235, .03);
}

.xw-server-tab.active {
    color: #fff;
    background: linear-gradient(135deg, var(--xw-primary), #3b82f6);
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(37, 99, 235, .3);
}

/* ===== 产品卡片网格 ===== */
.xw-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}

.xw-product-card {
    background: var(--xw-card-bg);
    border: 1px solid var(--xw-gray-100);
    border-radius: var(--xw-radius);
    padding: 28px 24px;
    transition: var(--xw-transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.xw-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .08);
    border-color: var(--xw-primary-50);
}

.xw-product-card.hot {
    border-color: var(--xw-primary);
}

.xw-product-hot-badge {
    position: absolute;
    top: -1px;
    right: 20px;
    background: var(--xw-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 0 0 6px 6px;
}

.xw-product-card-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--xw-gray-800);
    margin-bottom: 4px;
}

.xw-product-card-subtitle {
    font-size: 13px;
    color: var(--xw-gray-500);
    margin-bottom: 16px;
}

.xw-product-card-price {
    margin-bottom: 16px;
}

.xw-product-card-price .xw-price-amount {
    font-size: 32px;
    font-weight: 800;
    color: var(--xw-primary);
}

.xw-product-card-price .xw-price-unit {
    font-size: 13px;
    color: var(--xw-gray-500);
    margin-left: 2px;
}

.xw-product-card-price .xw-price-original {
    font-size: 13px;
    color: var(--xw-gray-400);
    text-decoration: line-through;
    margin-left: 8px;
}

.xw-product-card-specs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    flex: 1;
}

.xw-product-spec {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--xw-gray-100);
}

.xw-product-spec-label {
    color: var(--xw-gray-500);
}

.xw-product-spec-value {
    color: var(--xw-gray-700);
    font-weight: 600;
}

.xw-product-card-actions {
    margin-top: auto;
}

/* ===== 页面标题居中 ===== */
.xw-page-header-center {
    text-align: center;
    margin-bottom: 28px;
}

.xw-page-header-center h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--xw-gray-800);
    margin-bottom: 8px;
}

.xw-page-header-center p {
    font-size: 15px;
    color: var(--xw-gray-400);
    margin: 0;
}

/* Tab 居中（已内置，保留兼容） */
.xw-server-tabs-center {
    justify-content: center;
}

.xw-type-desc {
    text-align: center;
    color: var(--xw-gray-400);
    font-size: 14px;
    margin: 8px 0 24px;
}

/* ===== 虚拟主机卡片 - 简洁大气设计 ===== */
.xw-host-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e8ecf1;
    padding: 0;
    position: relative;
    overflow: hidden;
    transition: all .35s cubic-bezier(.25, 1, .5, 1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
    display: flex;
    flex-direction: column;
}

.xw-host-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 16px 40px rgba(37, 99, 235, .12),
        0 6px 16px rgba(0, 0, 0, .06);
    border-color: rgba(37, 99, 235, .18);
}

/* 热门推荐角标 */
.xw-host-badge {
    position: absolute;
    top: 14px;
    right: -28px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 36px;
    transform: rotate(45deg);
    z-index: 10;
    letter-spacing: .5px;
}

/* 卡片头部 - 渐变色条 */
.xw-host-card-header {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: #fff;
    padding: 26px 24px 22px;
    text-align: center;
}

.xw-host-card.hot .xw-host-card-header {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
}

.xw-host-card-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #fff;
    transition: none;
}

.xw-host-card:hover .xw-host-card-name {
    color: #fff;
}

.xw-host-card-subtitle {
    font-size: 12px;
    opacity: .85;
    color: #fff;
}

/* 价格区域 */
.xw-host-price-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    padding: 24px 20px 16px;
}

.xw-host-price-symbol {
    font-size: 20px;
    font-weight: 700;
    color: var(--xw-primary);
}

.xw-host-price-num {
    font-size: 38px;
    font-weight: 800;
    color: var(--xw-primary);
    line-height: 1;
}

.xw-host-price-unit {
    font-size: 13px;
    color: #94a3b8;
    margin-left: 2px;
}

.xw-host-price-old {
    font-size: 13px;
    color: #cbd5e1;
    text-decoration: line-through;
    margin-left: 8px;
}

/* 规格参数列表 */
.xw-host-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 0 20px 20px;
    padding: 16px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.xw-host-spec-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #475569;
    padding: 7px 8px;
    transition: all .2s ease;
    border-radius: 6px;
}

.xw-host-spec-item:hover {
    background: #f8fafc;
    color: var(--xw-primary);
}

.xw-host-card:hover .xw-host-spec-item {
    color: #334155;
}

.xw-host-spec-item i {
    width: 18px;
    text-align: center;
    color: #93c5fd;
    font-size: 13px;
    transition: all .2s ease;
}

.xw-host-spec-item:hover i,
.xw-host-card:hover .xw-host-spec-item i {
    color: var(--xw-primary);
    transform: none;
}

/* 网站环境占一整行 */
.xw-host-spec-full {
    grid-column: 1 / -1;
}

/* 赠送数据库标记 */
.xw-host-spec-gift {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
    font-weight: 600;
    border-radius: 8px;
    margin-top: 4px;
}

.xw-host-spec-gift i {
    color: #f59e0b;
}

/* 无数据库标记 */
.xw-host-spec-nogift {
    grid-column: 1 / -1;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 8px;
    margin-top: 4px;
}

.xw-host-spec-nogift i {
    color: #9ca3af;
}

/* 购买按钮 */
.xw-host-buy-btn {
    display: block;
    width: calc(100% - 32px);
    margin: 0 auto 20px;
    padding: 13px 0;
    text-align: center;
    background: var(--xw-primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s ease;
    text-decoration: none;
}

.xw-host-buy-btn:hover {
    background: #1d4ed8;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, .3);
}

.xw-host-buy-btn::before {
    display: none;
}

.xw-host-buy-btn i {
    margin-right: 6px;
}

.xw-product-buy-btn {
    display: block;
    width: 100%;
    padding: 12px 0;
    text-align: center;
    background: var(--xw-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    text-decoration: none;
}

.xw-product-buy-btn:hover {
    background: var(--xw-primary-dark, #1d4ed8);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, .3);
}

/* ===== 区块标题 ===== */
.xw-section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--xw-gray-800);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.xw-section-title i {
    color: var(--xw-primary);
}

.xw-section-desc {
    font-size: 14px;
    color: var(--xw-gray-500);
    margin-bottom: 24px;
}

/* ===== 优势特性 ===== */
.xw-product-advantages {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 48px 0;
}

.xw-advantage-item {
    text-align: center;
    padding: 28px 16px;
    background: var(--xw-card-bg);
    border: 1px solid var(--xw-gray-100);
    border-radius: var(--xw-radius);
    transition: var(--xw-transition);
}

.xw-advantage-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--xw-shadow);
}

.xw-advantage-item i {
    font-size: 28px;
    color: var(--xw-primary);
    margin-bottom: 12px;
}

.xw-advantage-item h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--xw-gray-800);
    margin-bottom: 6px;
}

.xw-advantage-item p {
    font-size: 13px;
    color: var(--xw-gray-500);
    line-height: 1.6;
}

/* ===== 联系客服弹窗 ===== */
.xw-contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.xw-contact-modal-inner {
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: xwModalIn .25s ease;
}

@keyframes xwModalIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.xw-contact-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    color: var(--xw-gray-400);
    cursor: pointer;
    line-height: 1;
}

.xw-contact-modal-close:hover {
    color: var(--xw-gray-700);
}

.xw-contact-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--xw-primary-50), var(--xw-primary-100));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: var(--xw-primary);
}

.xw-contact-modal-inner h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--xw-gray-800);
    margin-bottom: 4px;
}

.xw-contact-modal-info {
    text-align: left;
    background: var(--xw-gray-50);
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.xw-contact-modal-info div {
    font-size: 14px;
    color: var(--xw-gray-700);
}

.xw-contact-modal-info i {
    color: var(--xw-primary);
    width: 20px;
    text-align: center;
    margin-right: 8px;
}

/* ===== 购买提示 Toast ===== */
.xw-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 12px;
    padding: 20px 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .12);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: xwToastIn .3s ease;
    border-left: 4px solid var(--xw-primary);
}

@keyframes xwToastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-16px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.xw-toast i {
    font-size: 22px;
    color: var(--xw-primary);
}

.xw-toast-text {
    font-size: 14px;
    color: var(--xw-gray-700);
    line-height: 1.5;
}

.xw-toast-text strong {
    display: block;
    font-size: 15px;
    color: var(--xw-gray-800);
    margin-bottom: 2px;
}

/* ===== 响应式 ===== */
@media (max-width: 992px) {
    .xw-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .xw-product-advantages {
        grid-template-columns: repeat(2, 1fr);
    }

    .xw-product-hero-features {
        flex-wrap: wrap;
        gap: 16px;
    }

    /* 虚拟主机卡片 - 平板 */
    .xw-host-card-header {
        padding: 22px 18px 18px;
    }

    .xw-host-price-num {
        font-size: 32px;
    }

    .xw-host-specs {
        margin: 0 14px 16px;
    }
}

@media (max-width: 576px) {
    .xw-product-grid {
        grid-template-columns: 1fr;
    }

    .xw-product-advantages {
        grid-template-columns: 1fr;
    }

    .xw-product-hero h1 {
        font-size: 24px;
    }

    .xw-server-tabs {
        overflow-x: auto;
    }

    /* 虚拟主机卡片 - 手机 */
    .xw-host-card-header {
        padding: 20px 16px 16px;
    }

    .xw-host-price-num {
        font-size: 36px;
    }

    .xw-host-specs {
        grid-template-columns: 1fr;
        margin: 0 14px 16px;
    }

    .xw-host-buy-btn {
        width: calc(100% - 24px);
        margin-bottom: 16px;
    }
}