/**
 * microservice.css - 微服务页面样式
 * 作者：之马工场
 * 创建日期：2026-01-01
 */

/* ========== 服务分类标签 ========== */
.service-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.tab-btn {
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.15) 0%, rgba(108, 92, 231, 0.15) 100%);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ========== 服务网格 ========== */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

/* ========== 服务卡片 ========== */
.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-normal);
}

.service-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.service-header {
    margin-bottom: 16px;
}

.service-header:has(.service-image) {
    margin-bottom: 16px;
}

.service-header:has(.service-icon) {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.service-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.15) 0%, rgba(108, 92, 231, 0.15) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.service-icon svg {
    width: 28px;
    height: 28px;
}

.service-image {
    width: 100%;
    height: 160px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-tertiary);
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-tag {
    padding: 4px 12px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.service-tag.hot {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: white;
}

.service-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.service-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.service-features .feature {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.service-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.service-price {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* ========== 定制服务区块 ========== */
.custom-service {
    margin-top: 32px;
}

.custom-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px 40px;
    background: var(--bg-card);
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-xl);
}

.custom-icon {
    width: 64px;
    height: 64px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-color);
}

.custom-icon svg {
    width: 32px;
    height: 32px;
}

.custom-content {
    flex: 1;
}

.custom-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.custom-content p {
    color: var(--text-secondary);
    margin: 0;
}

/* ========== 操作栏 ========== */
.page-body .action-bar {
    margin-bottom: 24px;
}

/* ========== 搜索表单 ========== */
.search-form {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.search-form .form-input {
    width: 240px;
    min-width: 180px;
}

/* ========== 空状态 ========== */
.service-grid .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.service-grid .empty-state .empty-icon {
    width: 64px;
    height: 64px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.service-grid .empty-state .empty-icon svg {
    width: 28px;
    height: 28px;
}

.service-grid .empty-state h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.service-grid .empty-state p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.875rem;
}

/* ========== 详情页样式 ========== */
.detail-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    margin-bottom: 48px;
}

.detail-main {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.detail-body {
    padding: 32px;
}

.detail-number {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.15) 0%, rgba(108, 92, 231, 0.15) 100%);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    line-height: 1.3;
}

.detail-content {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

.detail-content p {
    margin-bottom: 16px;
}

.detail-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 24px auto;
    border-radius: var(--radius-md);
}

/* ========== 购买卡片 ========== */
.buy-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    position: sticky;
    top: 100px;
}

.buy-card-title {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.buy-card-model {
    margin-bottom: 24px;
}

.buy-card-model label {
    display: block;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.buy-card-model select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.buy-card-model select:hover {
    border-color: var(--primary-color);
}

.buy-card-model select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.buy-card-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 24px;
}

.buy-card-price span {
    font-size: 1rem;
    font-weight: 400;
}

.buy-card-info {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.buy-card-info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.buy-card-info-item:last-child {
    border-bottom: none;
}

.buy-card-info-item label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.buy-card-info-item span {
    color: var(--text-primary);
    font-size: 0.875rem;
}

.buy-card .btn {
    width: 100%;
    padding: 16px;
    font-size: 1.125rem;
}

.buy-card-tip {
    margin-top: 16px;
    padding: 12px;
    background: rgba(0, 212, 170, 0.1);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
}

.buy-card-tip svg {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 6px;
    color: var(--primary-color);
}

/* ========== 返回链接 ========== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 24px;
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--primary-color);
}

.back-link svg {
    width: 18px;
    height: 18px;
}

/* ========== 响应式 ========== */
@media (max-width: 992px) {
    .detail-container {
        grid-template-columns: 1fr;
    }
    
    .buy-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .service-grid {
        grid-template-columns: 1fr;
    }
    
    .custom-card {
        flex-direction: column;
        text-align: center;
    }
    
    .search-form {
        width: 100%;
    }
    
    .search-form .form-input {
        flex: 1;
        width: auto;
    }
}

