/* ================================
   修复后的 style.css - 第1部分
   全局样式和用户中心布局修复
   ================================ */

/* 全局样式 */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
}

.main-content {
    min-height: calc(100vh - 200px);
}

/* 导航栏 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
}

/* 🔥 新增：自定义列宽度支持5列布局 */
@media (min-width: 1200px) {
    .col-xl-2dot4 {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

/* ================================
   🔥 用户中心布局修复 - 简化版本
   ================================ */

.user-center {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

.user-center .card-title {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: bold;
}

/* 桌面端用户信息布局 */
.user-info {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 15px;
    min-height: 80px;
}

/* 🔥 简化的移动端网格布局 */
@media (max-width: 768px) {
    .user-info {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        grid-template-rows: auto auto !important;
        grid-template-areas: 
            "info1 info2 info3"
            "button1 button1 button2" !important;
        gap: 12px !important;
        align-items: stretch !important;
        min-height: auto !important;
    }
    
    .user-info > *:nth-child(1) { grid-area: info1 !important; }
    .user-info > *:nth-child(2) { grid-area: info2 !important; }
    .user-info > *:nth-child(3) { grid-area: info3 !important; }
    .user-info > *:nth-child(4) { grid-area: button1 !important; }
    .user-info > *:nth-child(5) { grid-area: button2 !important; }
    
    /* 单按钮占满第二行 */
    .user-info > *:nth-child(4):last-child {
        grid-area: button1 / button1 / button1 / span 3 !important;
    }
    
    /* 隐藏占位元素 */
    .user-info .user-action-placeholder {
        display: none !important;
    }
}

/* 信息块样式 */
.user-info-item {
    flex: 1;
    min-width: 0;
    min-height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 15px;
}

.user-info-item label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
    display: block;
}

.user-info-item .value {
    font-size: 1.1rem;
    font-weight: bold;
    flex: 1;
    display: flex;
    align-items: center;
}

.user-action-item {
    flex: 1;
    min-width: 0;
    min-height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 15px;
}

.action-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-action-item .btn {
    width: 100%;
    white-space: normal;
    padding: 12px 20px;
    font-weight: bold;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.btn-main {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 2px;
}

.btn-trial .btn-main,
.btn-trial .btn-content label,
.btn-trial .btn-sub {
    white-space: nowrap;
    word-break: keep-all;
}

.btn-trial .btn-content label,
.btn-trial .btn-sub {
    display: block;
    font-size: 0.85rem;
    line-height: 1.1;
    margin-top: 2px;
}

.btn-trial {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    animation: pulse 2s infinite;
    padding: 10px 20px;
}

.btn-trial:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    color: white;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 桌面端登录状态优化 */
@media (min-width: 769px) {
    .user-info.four-blocks .user-info-item {
        flex: 1;
        max-width: calc(75% / 3);
    }

    .user-info.four-blocks .user-action-item {
        flex: 1;
        max-width: 25%;
    }

    .user-info.four-blocks {
        flex-wrap: nowrap;
    }

    .user-info.four-blocks .user-action-placeholder {
        display: none !important;
    }
}

/* 小屏幕优化 */
@media (max-width: 576px) {
    .user-center {
        padding: 15px;
    }
    
    .user-info {
        gap: 10px !important;
    }
    
    .user-info > * {
        min-height: 65px !important;
        padding: 8px 10px !important;
    }
    
    .user-info-item label {
        font-size: 0.8rem;
        margin-bottom: 3px;
    }
    
    .user-info-item .value {
        font-size: 0.9rem;
    }
    
    .user-action-item .btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .user-center {
        padding: 12px;
    }
    
    .user-info {
        gap: 8px !important;
    }
    
    .user-info > * {
        min-height: 60px !important;
        padding: 6px 8px !important;
    }
}

/* ================================
   服务承诺横幅样式
   ================================ */

.service-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    color: white;
    position: relative;
    overflow: hidden;
}

.service-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.service-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.service-promise {
    flex: 1;
    min-width: 200px;
}

.promise-text {
    font-size: 1.3rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 255, 255, 0.5); }
    to { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 255, 255, 0.8); }
}

.after-sales-group {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 20px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 500;
    min-width: 200px;
    text-align: center;
}

.group-number {
    font-weight: bold;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.3);
    padding: 4px 12px;
    border-radius: 15px;
    margin-left: 8px;
    display: inline-block;
    letter-spacing: 1px;
}

/* 公告栏 */
.announcement {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.announcement-header {
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 15px 20px;
    font-weight: bold;
}

.announcement-content {
    padding: 20px;
}

.announcement img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 10px 0;
}

/* ================================
   修复后的 style.css - 第2部分
   🔥 商品卡片样式 - 彻底修复版本
   ================================ */

/* 🔥 商品卡片基础样式 - 简化且高效 */
.product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    border: none;
    display: flex;
    flex-direction: column;
    /* 🔥 关键修复：移除固定高度，改用自适应 */
    height: auto;
    min-height: 0;
    max-height: none;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* 紧凑型商品卡片 */
.product-card-compact {
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.product-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* ================================
   🔥 商品图片区域 - 固定高度
   ================================ */

.product-image-container {
    position: relative;
    width: 100%;
    height: 140px; /* 固定图片区域高度 */
    overflow: hidden;
    flex-shrink: 0; /* 防止被压缩 */
    background: #f8f9fa;
}

.product-image-compact {
    height: 120px !important; /* 紧凑版本稍小 */
}

.product-image-carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.product-image,
.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持比例并填充 */
    object-position: center;
    transition: opacity 0.4s ease;
}

.carousel-image {
    opacity: 0;
}

.carousel-image.active {
    opacity: 1;
}

/* 单张图片样式 */
.product-image:not(.carousel-image) {
    position: relative;
    opacity: 1;
}

/* 图片导航按钮 */
.image-navigation {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-card:hover .image-navigation {
    opacity: 1;
    pointer-events: auto;
}

.nav-btn {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn-compact {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.6rem !important;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* 图片指示器 */
.image-indicators {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
}

.image-indicators-compact {
    padding: 2px 5px !important;
    font-size: 0.65rem !important;
    bottom: 6px !important;
    right: 6px !important;
}

/* 无图片占位符 */
.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    height: 100%;
}

.compact-placeholder i {
    font-size: 1.5rem !important;
}

.compact-placeholder small {
    font-size: 0.75rem !important;
}

/* ================================
   🔥 商品内容区域 - 核心修复
   ================================ */

.product-content {
    padding: 12px 15px 15px 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    /* 🔥 关键修复：使用 space-between 实现自然分布 */
    justify-content: space-between;
    min-height: 0;
    /* 🔥 设置最小内容高度，确保一致性 */
    min-height: 90px;
}

/* 🔥 移动端商品内容区域高度调整（由于不显示描述） */
@media (max-width: 768px) {
    .product-content {
        min-height: 65px; /* 移动端减少高度 */
    }
    
    .product-content-compact {
        min-height: 60px !important;
    }
}

.product-content-compact {
    padding: 10px 12px 12px 12px !important;
    min-height: 80px !important;
}

/* ================================
   🔥 商品标题 - 固定区域
   ================================ */

.product-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
    margin: 0 0 8px 0;
    /* 🔥 关键：固定高度确保一致性 */
    height: 2.6em; /* 约2行文字的高度 */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    flex-shrink: 0; /* 防止被压缩 */
}

.product-title-compact {
    font-size: 0.85rem !important;
    height: 2.4em !important;
    margin: 0 0 6px 0 !important;
}

/* ================================
   🔥 商品描述 - 智能显示
   ================================ */

.product-description {
    color: #666;
    font-size: 0.75rem;
    line-height: 1.3;
    margin: 0 0 8px 0;
    /* 🔥 固定高度，避免影响布局 */
    height: 2.6em; /* 约2行文字 */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex-shrink: 0;
}

.product-description-compact {
    font-size: 0.7rem !important;
    height: 2.4em !important;
    margin: 0 0 6px 0 !important;
}

/* 🔥 移动端完全隐藏所有描述内容 */
@media (max-width: 768px) {
    .product-description,
    .product-description-compact {
        display: none !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* ================================
   🔥 商品价格区域 - 底部固定
   ================================ */

.product-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    /* 🔥 关键修复：移除 margin-top: auto，改用 flex: 0 0 auto */
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    /* 固定高度确保一致性 */
    min-height: 32px;
}

.product-price-compact {
    gap: 6px !important;
    min-height: 30px !important;
}

.price-range {
    font-size: 0.85rem;
    font-weight: 700;
    color: #e74c3c;
    white-space: nowrap;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

.price-range-compact {
    font-size: 0.8rem !important;
}

/* ================================
   🔥 购买按钮 - 优化样式
   ================================ */

.btn-buy {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 65px;
    height: 28px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-buy-compact {
    padding: 5px 10px !important;
    font-size: 0.7rem !important;
    border-radius: 14px !important;
    min-width: 60px !important;
    height: 26px !important;
}

.btn-buy:hover {
    transform: translateY(-1px);
    color: white;
    opacity: 0.9;
    text-decoration: none;
}

.btn-buy:disabled {
    background: #6c757d !important;
    cursor: not-allowed !important;
    transform: none !important;
    opacity: 0.6 !important;
}

/* ================================
   🔥 响应式优化 - 渐进式
   ================================ */

/* 平板和小屏桌面 */
@media (max-width: 1200px) {
    .product-image-container {
        height: 130px;
    }
    
    .product-image-compact {
        height: 110px !important;
    }
    
    .product-content {
        padding: 10px 12px 12px 12px;
        min-height: 85px;
    }
    
    .product-content-compact {
        min-height: 75px !important;
    }
    
    .product-title {
        font-size: 0.85rem;
        height: 2.4em;
    }
    
    .product-title-compact {
        font-size: 0.8rem !important;
        height: 2.2em !important;
    }
}

/* 中等屏幕 */
@media (max-width: 992px) {
    .product-image-container {
        height: 120px;
    }
    
    .product-image-compact {
        height: 100px !important;
    }
    
    .product-title {
        font-size: 0.8rem;
        height: 2.2em;
    }
    
    .product-title-compact {
        font-size: 0.75rem !important;
        height: 2.0em !important;
    }
    
    .btn-buy {
        padding: 5px 10px;
        font-size: 0.7rem;
        min-width: 60px;
        height: 26px;
    }
    
    .btn-buy-compact {
        padding: 4px 8px !important;
        font-size: 0.65rem !important;
        min-width: 55px !important;
        height: 24px !important;
    }
}

/* 🔥 移动端 - 重点优化 */
@media (max-width: 768px) {
    .product-image-container {
        height: 100px;
    }
    
    .product-image-compact {
        height: 90px !important;
    }
    
    .product-content {
        padding: 8px 10px 10px 10px;
        /* 🔥 移动端减少最小高度 */
        min-height: 70px;
    }
    
    .product-content-compact {
        padding: 6px 8px 8px 8px !important;
        min-height: 65px !important;
    }
    
    .product-title {
        font-size: 0.75rem;
        height: 2.0em; /* 减少高度 */
        margin: 0 0 6px 0;
    }
    
    .product-title-compact {
        font-size: 0.7rem !important;
        height: 1.8em !important;
        margin: 0 0 4px 0 !important;
    }
    
    .product-price {
        min-height: 28px;
        gap: 6px;
    }
    
    .product-price-compact {
        min-height: 26px !important;
        gap: 4px !important;
    }
    
    .price-range {
        font-size: 0.75rem;
    }
    
    .price-range-compact {
        font-size: 0.7rem !important;
    }
    
    .btn-buy {
        padding: 4px 8px;
        font-size: 0.65rem;
        min-width: 50px;
        height: 24px;
        border-radius: 12px;
    }
    
    .btn-buy-compact {
        padding: 3px 6px !important;
        font-size: 0.6rem !important;
        min-width: 45px !important;
        height: 22px !important;
        border-radius: 10px !important;
    }
    
    /* 移动端图片导航按钮调整 */
    .nav-btn {
        width: 22px;
        height: 22px;
        font-size: 0.6rem;
    }
    
    .nav-btn-compact {
        width: 20px !important;
        height: 20px !important;
        font-size: 0.55rem !important;
    }
    
    .image-indicators {
        font-size: 0.65rem;
        padding: 2px 4px;
    }
    
    .image-indicators-compact {
        font-size: 0.6rem !important;
        padding: 1px 3px !important;
    }
}

/* 小屏手机 */
@media (max-width: 576px) {
    .product-image-container {
        height: 90px;
    }
    
    .product-image-compact {
        height: 80px !important;
    }
    
    .product-content {
        padding: 6px 8px 8px 8px;
        min-height: 65px;
    }
    
    .product-content-compact {
        padding: 5px 6px 6px 6px !important;
        min-height: 60px !important;
    }
    
    .product-title {
        font-size: 0.7rem;
        height: 1.8em;
        margin: 0 0 4px 0;
    }
    
    .product-title-compact {
        font-size: 0.65rem !important;
        height: 1.6em !important;
        margin: 0 0 3px 0 !important;
    }
    
    .product-price {
        min-height: 26px;
        gap: 4px;
    }
    
    .product-price-compact {
        min-height: 24px !important;
        gap: 3px !important;
    }
    
    .price-range {
        font-size: 0.7rem;
    }
    
    .price-range-compact {
        font-size: 0.65rem !important;
    }
    
    .btn-buy {
        padding: 3px 6px;
        font-size: 0.6rem;
        min-width: 45px;
        height: 22px;
    }
    
    .btn-buy-compact {
        padding: 2px 4px !important;
        font-size: 0.55rem !important;
        min-width: 40px !important;
        height: 20px !important;
    }
}

/* 极小屏幕 */
@media (max-width: 320px) {
    .product-image-container {
        height: 80px;
    }
    
    .product-image-compact {
        height: 70px !important;
    }
    
    .product-content {
        padding: 5px 6px 6px 6px;
        min-height: 60px;
    }
    
    .product-content-compact {
        padding: 4px 5px 5px 5px !important;
        min-height: 55px !important;
    }
    
    .product-title {
        font-size: 0.65rem;
        height: 1.6em;
        margin: 0 0 3px 0;
    }
    
    .product-title-compact {
        font-size: 0.6rem !important;
        height: 1.4em !important;
        margin: 0 0 2px 0 !important;
    }
}

/* ================================
   修复后的 style.css - 第3部分
   商品区域、对比表格、表单等样式
   ================================ */

/* ================================
   商品区域标签页
   ================================ */

.product-tabs {
    margin-bottom: 30px;
}

.custom-tabs {
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 20px;
}

.custom-tabs .nav-link {
    border: none;
    background: none;
    color: #666;
    padding: 12px 24px;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
    font-weight: 500;
    margin-right: 8px;
    position: relative;
}

.custom-tabs .nav-link:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-color: transparent;
}

.custom-tabs .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    border-color: transparent;
}

.custom-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Tab内容样式 */
.tab-content {
    min-height: 400px;
}

.tab-pane {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.tab-pane.active {
    opacity: 1;
}

/* 移动端标签页优化 */
@media (max-width: 768px) {
    .custom-tabs .nav-link {
        padding: 10px 16px;
        font-size: 0.9rem;
        margin-right: 4px;
    }
}

@media (max-width: 576px) {
    .custom-tabs .nav-link {
        padding: 8px 12px;
        font-size: 0.85rem;
        margin-right: 2px;
    }
}

/* ================================
   对比表格样式
   ================================ */

/* 移动端滚动提示 */
.mobile-scroll-hint {
    margin-bottom: 15px;
}

.mobile-scroll-hint .alert {
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    font-size: 0.9rem;
    padding: 12px 16px;
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.15);
}

.mobile-scroll-hint i.fa-hand-pointer {
    animation: pointRight 1.5s ease-in-out infinite;
}

@keyframes pointRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* 对比表格容器 */
.comparison-table-wrapper {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.comparison-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.table-responsive-custom {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f1f1;
}

.table-responsive-custom::-webkit-scrollbar {
    height: 8px;
}

.table-responsive-custom::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive-custom::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.table-responsive-custom::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #764ba2, #667eea);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.comparison-table table {
    margin-bottom: 0;
    min-width: 600px; /* 确保表格最小宽度 */
}

.comparison-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.comparison-table thead th {
    border: none;
    padding: 15px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.comparison-table tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
    vertical-align: middle;
}

.comparison-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.comparison-table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

/* 产品名称列特殊样式 */
.comparison-table .product-name-cell {
    background-color: rgba(102, 126, 234, 0.05) !important;
    font-weight: bold;
    text-align: center !important;
    vertical-align: middle !important;
}

.comparison-table .product-name-content {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    font-weight: bold !important;
}

/* 规格、设备、价格列样式 */
.comparison-table .spec-cell,
.comparison-table .devices-cell,
.comparison-table .price-cell {
    text-align: center !important;
    vertical-align: middle !important;
}

.comparison-table .spec-badge,
.comparison-table .devices-badge {
    display: inline-block !important;
    margin: 0 auto !important;
}

.comparison-table .price-display {
    text-align: center !important;
    margin: 0 auto !important;
}

/* 支持模型列样式 */
.comparison-table .models-cell {
    text-align: center !important;
    vertical-align: middle !important;
}

.comparison-table .supported-models-container {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 8px 4px !important;
}

.comparison-table .supported-models-text {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 说明列样式 */
.comparison-table .desc-cell {
    text-align: center !important;
    vertical-align: middle !important;
    padding: 12px 15px !important;
}

.comparison-table .description-container {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

.comparison-table .description-text {
    text-align: left !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 展开按钮样式 */
.comparison-table .expand-models-btn,
.comparison-table .expand-desc-btn {
    text-align: center !important;
}

/* ================================
   表单样式
   ================================ */

.form-control {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-color: transparent;
}

/* ================================
   登录/注册页面
   ================================ */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 400px;
    width: 100%;
}

.auth-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 30px 20px;
}

.auth-header h2 {
    margin: 0;
    font-weight: bold;
}

.auth-body {
    padding: 30px;
}

/* ================================
   购买流程
   ================================ */

.purchase-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.step {
    display: flex;
    align-items: center;
    color: #ccc;
    font-weight: 500;
}

.step.active {
    color: #667eea;
}

.step.completed {
    color: #28a745;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-weight: bold;
    font-size: 14px;
}

.step.active .step-number {
    background: #667eea;
    color: white;
}

.step.completed .step-number {
    background: #28a745;
    color: white;
}

.step::after {
    content: '→';
    margin: 0 20px;
    color: #ccc;
}

.step:last-child::after {
    display: none;
}

/* ================================
   交流群右侧栏样式
   ================================ */

.group-qr-sidebar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%) translateY(-50%);
        opacity: 0;
    }
    to {
        transform: translateX(0) translateY(-50%);
        opacity: 1;
    }
}

.group-qr-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
    overflow: hidden;
    width: 280px;
    color: white;
    position: relative;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: cardFloat 3s ease-in-out infinite;
}

@keyframes cardFloat {
    0%, 100% { 
        transform: translateY(0px);
        box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
    }
    50% { 
        transform: translateY(-5px);
        box-shadow: 0 20px 40px rgba(102, 126, 234, 0.5);
    }
}

.group-qr-header {
    background: rgba(255, 255, 255, 0.15);
    padding: 15px 20px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.group-qr-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.group-qr-content {
    padding: 20px;
    text-align: center;
}

.group-qr-image-container {
    background: white;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: scale(1);
    transition: all 0.3s ease;
}

.group-qr-image-container:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.group-qr-image {
    width: 100%;
    height: auto;
    max-width: 200px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.group-qr-description {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 12px;
    opacity: 0.95;
}

.group-qr-action {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 12px;
    margin-top: 12px;
}

.group-qr-action small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
}

/* 响应式设计 - 交流群侧栏 */
@media (max-width: 1399px) {
    .group-qr-sidebar {
        width: 260px;
    }
    
    .group-qr-card {
        width: 260px;
    }
}

@media (max-width: 1199px) {
    .group-qr-sidebar {
        display: none !important;
    }
}

/* 主容器适配 - 为右侧栏留出空间 */
@media (min-width: 1200px) {
    .container {
        max-width: calc(100% - 520px);
        margin-right: auto;
        margin-left: auto;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: calc(100% - 540px);
    }
}

/* ================================
   响应式设计调整
   ================================ */

@media (max-width: 768px) {
    .service-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .promise-text {
        font-size: 1.1rem;
    }
    
    .after-sales-group {
        min-width: auto;
        width: 100%;
    }
    
    .comparison-table thead th {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
    
    .comparison-table tbody td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .service-banner {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .promise-text {
        font-size: 1rem;
    }
    
    .group-number {
        font-size: 1rem;
        padding: 3px 10px;
    }
    
    .comparison-table thead th {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
    
    .comparison-table tbody td {
        padding: 6px 4px;
        font-size: 0.75rem;
    }
}

/* ================================
   修复后的 style.css - 第4部分（完结）
   加载动画、消息提示、滚动条等辅助样式
   ================================ */

/* ================================
   加载动画
   ================================ */

.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.spinner-border {
    width: 2rem;
    height: 2rem;
}

/* 加载覆盖层 */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#loadingOverlay .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

/* ================================
   成功/错误消息
   ================================ */

.alert {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
    position: relative;
}

.alert-success {
    background: linear-gradient(45deg, #56ab2f, #a8e6cf);
    color: white;
}

.alert-danger {
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
    color: white;
}

.alert-info {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    color: white;
}

.alert-warning {
    background: linear-gradient(45deg, #f093fb, #f5576c);
    color: white;
}

/* Toast通知样式 */
.toast {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-container {
    z-index: 1055;
}

/* ================================
   返回顶部按钮
   ================================ */

#backToTop {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#backToTop:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

/* ================================
   自定义滚动条
   ================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #764ba2, #667eea);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

::-webkit-scrollbar-corner {
    background: #f1f1f1;
}

/* Firefox滚动条 */
* {
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f1f1;
}

/* ================================
   动画效果
   ================================ */

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

@keyframes bounceIn {
    0%, 20%, 40%, 60%, 80% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    }
    0% {
        opacity: 0;
        transform: scale3d(.3, .3, .3);
    }
    20% {
        transform: scale3d(1.1, 1.1, 1.1);
    }
    40% {
        transform: scale3d(.9, .9, .9);
    }
    60% {
        opacity: 1;
        transform: scale3d(1.03, 1.03, 1.03);
    }
    80% {
        transform: scale3d(.97, .97, .97);
    }
    100% {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

.bounce-in {
    animation: bounceIn 0.8s ease-out;
}

/* ================================
   工具提示
   ================================ */

.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background: linear-gradient(45deg, #667eea, #764ba2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.bs-tooltip-top .tooltip-arrow::before,
.bs-tooltip-auto[x-placement^="top"] .tooltip-arrow::before {
    border-top-color: #667eea;
}

.bs-tooltip-right .tooltip-arrow::before,
.bs-tooltip-auto[x-placement^="right"] .tooltip-arrow::before {
    border-right-color: #667eea;
}

.bs-tooltip-bottom .tooltip-arrow::before,
.bs-tooltip-auto[x-placement^="bottom"] .tooltip-arrow::before {
    border-bottom-color: #667eea;
}

.bs-tooltip-left .tooltip-arrow::before,
.bs-tooltip-auto[x-placement^="left"] .tooltip-arrow::before {
    border-left-color: #667eea;
}

/* ================================
   表单辅助样式
   ================================ */

.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #28a745;
}

/* 密码强度指示器 */
.password-strength {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* 图片预览 */
.image-preview {
    margin-top: 0.5rem;
    text-align: center;
}

.image-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ================================
   导航栏滚动效果
   ================================ */

.navbar {
    transition: all 0.3s ease;
}

.navbar-scrolled {
    background-color: rgba(13, 110, 253, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-logo {
    border-radius: 4px;
    object-fit: contain;
    vertical-align: middle;
}

/* ================================
   页面底部留白
   ================================ */

body {
    padding-bottom: 60px;
}

/* ================================
   懒加载图片样式
   ================================ */

img[data-src] {
    filter: blur(5px);
    transition: filter 0.3s ease;
}

img[data-src].loaded {
    filter: blur(0);
}

/* ================================
   复制按钮样式
   ================================ */

.copy-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    color: white;
}

/* ================================
   搜索和筛选样式
   ================================ */

.search-container {
    position: relative;
    margin-bottom: 20px;
}

.search-container .form-control {
    padding-right: 40px;
}

.search-container .search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
}

.filter-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filter-option {
    margin-bottom: 15px;
}

.filter-option:last-child {
    margin-bottom: 0;
}

/* ================================
   分页样式
   ================================ */

.pagination {
    justify-content: center;
    margin-top: 30px;
}

.page-link {
    background: white;
    border-color: #dee2e6;
    color: #667eea;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-1px);
}

.page-item.active .page-link {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-color: #667eea;
    color: white;
}

/* ================================
   卡片悬停效果增强
   ================================ */

.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ================================
   按钮样式增强
   ================================ */

.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: white;
    color: white;
}

/* ================================
   阴影效果类
   ================================ */

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* ================================
   调试信息样式
   ================================ */

.product-debug {
    border-top: 1px solid #dee2e6;
    padding-top: 6px;
    font-size: 0.7rem;
    margin-top: 6px;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

/* ================================
   无障碍优化
   ================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus样式增强 */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* ================================
   打印样式
   ================================ */

@media print {
    .navbar,
    .group-qr-sidebar,
    #backToTop,
    .toast-container {
        display: none !important;
    }
    
    .product-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .service-banner,
    .user-center {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc;
    }
}

/* ================================
   高对比度模式支持
   ================================ */

@media (prefers-contrast: high) {
    .product-card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        background: #000 !important;
        border-color: #000 !important;
    }
    
    .service-banner,
    .user-center {
        background: #000 !important;
        color: #fff !important;
    }
}

/* ================================
   动画减少偏好支持
   ================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .fade-in,
    .slide-in-up,
    .bounce-in {
        animation: none;
    }
}

/* ================================
   IE兼容性修复（如需要）
   ================================ */

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .product-card {
        display: block;
    }
    
    .product-content {
        display: block;
    }
    
    .user-info {
        display: block;
    }
}

/* ================================
   移动端触摸优化
   ================================ */

@media (hover: none) and (pointer: coarse) {
    .product-card:hover {
        transform: none;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }
    
    .btn:hover::before {
        display: none;
    }
    
    .image-navigation {
        opacity: 1;
        pointer-events: auto;
    }
}

/* ================================
   最终确保样式优先级
   ================================ */

/* 确保重要样式不被覆盖 */
.product-card .product-content {
    justify-content: space-between !important;
}

.product-card .product-price {
    margin-top: 0 !important;
    flex: 0 0 auto !important;
}

/* 确保移动端网格布局 */
@media (max-width: 768px) {
    .user-info {
        display: grid !important;
        grid-template-areas: 
            "info1 info2 info3"
            "button1 button1 button2" !important;
    }
}

/* 结束样式文件 */