/* 首页特有样式 */
/* 英雄区域 */
.hero {
    background: var(--primary-gradient);
    color: white;
    position: relative;
    overflow: hidden;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.3;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* 英雄区域装饰元素 */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    border-radius: 50%;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translateX(-50%) scale(1.1);
        opacity: 1;
    }
}

.search-container {
    background-color: white;
    border-radius: 50px;
    padding: 20px 32px;
    display: inline-flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

.search-tabs {
    display: flex;
    background-color: rgba(247, 250, 252, 0.9);
    border-radius: 20px;
    padding: 8px;
}

.search-tab {
    padding: 12px 24px;
    border: none;
    background: none;
    border-radius: 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition-normal);
    color: var(--light-text);
}

.search-tab.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-input {
    border: none;
    outline: none;
    padding: 14px 20px;
    font-size: 16px;
    width: 400px;
    border-radius: 20px;
    background-color: rgba(247, 250, 252, 0.9);
    transition: var(--transition-normal);
}

.search-input:focus {
    background-color: white;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
    transform: scale(1.02);
}

.search-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 24px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 16px;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.search-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 102, 255, 0.6);
}

.search-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.6s;
}

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

/* 服务卡片区域 */
.services {
    padding: 60px 0;
    background-color: white;
    position: relative;
    z-index: 2;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero {
        height: 280px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .search-container {
        padding: 16px 24px;
        flex-direction: column;
        gap: 12px;
        width: 90%;
        max-width: 500px;
    }
    
    .search-tabs {
        width: 100%;
        justify-content: center;
    }
    
    .search-input {
        width: 100%;
        max-width: 400px;
    }
    
    .search-btn {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 768px) {
    .hero {
        height: 260px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .search-container {
        padding: 12px 16px;
        gap: 8px;
    }
    
    .search-tab {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .search-input {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .search-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 240px;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .search-container {
        padding: 8px 12px;
    }
    
    .search-input {
        width: 100%;
    }
}

/* 服务卡片响应式设计 */
@media (max-width: 768px) {
    .section-title {
        font-size: 28px;
    }
    
    .section-subtitle {
        font-size: 15px;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }
    
    .service-card {
        padding: 30px 20px;
    }
    
    .service-icon {
        font-size: 48px;
        width: 80px;
        height: 80px;
    }
    
    .service-title {
        font-size: 18px;
    }
    
    .service-description {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 24px;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-card {
        padding: 25px 15px;
    }
    
    .service-icon {
        font-size: 40px;
        width: 70px;
        height: 70px;
    }
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-color);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--light-text);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    border: none;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    font-size: 56px;
    margin-bottom: 24px;
    opacity: 0.8;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.1) 0%, rgba(0, 198, 255, 0.1) 100%);
}

.service-card:hover .service-icon {
    opacity: 1;
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.15) 0%, rgba(0, 198, 255, 0.15) 100%);
}

.service-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.service-card:hover .service-title {
    color: var(--primary-color);
}

.service-description {
    font-size: 15px;
    color: var(--light-text);
    line-height: 1.6;
    margin: 0 0 24px;
    transition: color 0.3s ease;
}

.service-card:hover .service-description {
    color: var(--text-color);
}

.service-link {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(0, 102, 255, 0.05);
}

.service-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

.service-link:hover {
    color: white;
    background: var(--primary-gradient);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.service-link:hover::after {
    width: 80%;
}

/* 服务推荐区域 */
.service-recommendations {
    padding: 40px 0;
    background-color: var(--bg-color);
}

.slider-container {
    position: relative;
    overflow: hidden;
    padding: 0 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.service-item {
    min-width: 240px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

/* Swiper导航按钮样式 */
.swiper-button-prev,
.swiper-button-next {
    color: var(--primary-color) !important;
    width: 44px !important;
    height: 44px !important;
    background: white !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 50% !important;
    box-shadow: var(--shadow-sm) !important;
    transition: all 0.3s ease !important;
    margin-top: -22px !important;
    opacity: 1 !important;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
    box-shadow: var(--shadow-md) !important;
}

.swiper-button-prev::after,
.swiper-button-next::after {
    font-size: 20px !important;
    font-weight: 600 !important;
    background: none !important;
    color: inherit !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 移除Swiper默认的背景样式 */
.swiper-button-prev.swiper-button-disabled,
.swiper-button-next.swiper-button-disabled {
    opacity: 0.35 !important;
    background: white !important;
    color: var(--primary-color) !important;
}

.service-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.service-image {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    transition: all 0.3s ease;
}

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

.service-info {
    padding: 20px;
}

.service-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.service-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 6px;
}

.service-spec {
    font-size: 13px;
    color: var(--lighter-text);
    line-height: 1.4;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.slider-btn-prev {
    left: 0;
}

.slider-btn-next {
    right: 0;
}

/* 产品推荐区域 */
.product-recommendations {
    padding: 40px 0;
    background-color: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.product-item {
    background-color: var(--card-bg);
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.product-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.product-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.05) 0%, rgba(0, 198, 255, 0.05) 100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-item:hover .product-image {
    background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
}

.product-item:hover .product-image::before {
    opacity: 1;
}

.product-image .placeholder {
    opacity: 0.5;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
    line-height: 1.4;
    height: 48px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-spec {
    font-size: 13px;
    color: var(--lighter-text);
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-brand {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.product-vendor {
    font-size: 13px;
    color: var(--lighter-text);
    margin-bottom: 10px;
}

.product-price-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

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

.product-original-price {
    font-size: 14px;
    color: var(--lighter-text);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.buy-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.2);
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 255, 0.3);
}

.compare-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid #cbd5e0;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    color: var(--lighter-text);
}

.compare-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(0, 102, 255, 0.05);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }
    
    .search-container {
        flex-direction: column;
        gap: 10px;
        background: none;
        box-shadow: none;
    }
    
    .search-input {
        width: 100%;
        background-color: white;
        border-radius: 20px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .slider-btn {
        display: none;
    }
    
    .slider-container {
        padding: 0;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 24px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .service-slider {
        gap: 10px;
    }
    
    .service-item {
        min-width: 160px;
    }
}