/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 页面头部样式 */
.page-header {
    margin-top: 70px;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/hero-bg.jpg') center/cover no-repeat;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.navbar-brand img {
    max-width: 120px;
    height: auto;
    transition: all 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

/* 下拉菜单样式优化 */
.dropdown-menu {
    background-color: white;
    border: 1px solid rgba(0,0,0,.15);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.175);
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
}

/* 确保下拉菜单在z-index上处于正确位置 */
.navbar .dropdown-menu {
    position: absolute !important;
    top: 100%;
    left: 0;
    z-index: 1050; /* 提高z-index值以确保在最顶层 */
    display: none;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 0.25rem;
}

.navbar .dropdown.show .dropdown-menu {
    display: block;
}

/* 修正导航栏固定定位的z-index */
.navbar.fixed-top {
    z-index: 1020;
}

/* 英雄区域样式 */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/hero-bg.jpg') center/cover no-repeat;
    height: 100vh;
    display: flex;
    align-items: center;
    margin-top: -70px;
    padding-top: 70px;
}

.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-section p {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 产品卡片样式 */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.product-card .card-img-top {
    height: 280px;
    object-fit: cover;
}

.product-card .card-body {
    padding: 1rem;
}

.product-card .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.product-card .card-text {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

/* 产品详情卡片样式 */
.card .row.g-0 {
    height: 100%;
}

.object-fit-cover {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

/* 产品导航样式 */
.product-nav .nav-pills .nav-link {
    border-radius: 0;
    font-weight: 500;
    transition: all 0.3s ease;
}

.product-nav .nav-pills .nav-link.active {
    background-color: #0d6efd;
    color: white;
}

.product-nav .nav-pills .nav-link:hover:not(.active) {
    background-color: #e9ecef;
    color: #0d6efd;
}

/* 底部样式 */
footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #ddd !important;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .hero-section {
        height: auto;
        padding: 100px 0;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .navbar-nav {
        text-align: center;
    }

    .hero-section .col-md-8 {
        text-align: center;
    }

    .product-card .card-img-top {
        height: 220px;
    }

    .product-card .card-body {
        padding: 0.75rem;
    }

    .product-card .card-title {
        font-size: 1rem;
    }

    .product-card .card-text {
        font-size: 0.85rem;
    }

    .card-body.d-flex.flex-column {
        align-items: center;
        text-align: center;
    }

    .card-body.d-flex.flex-column .btn {
        align-self: center;
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: auto;
        padding: 80px 0;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .hero-section p.lead {
        font-size: 1.1rem;
    }

    .product-card .card-img-top {
        height: 200px;
    }

    .product-card .card-body {
        padding: 0.6rem;
    }

    .product-card .card-title {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
    }

    .product-card .card-text {
        font-size: 0.8rem;
        margin-bottom: 0.6rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .page-header {
        margin-top: 60px;
    }

    /* 移动端优化导航 */
    .navbar-brand img {
        max-width: 100px;
        height: auto;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    .navbar-toggler {
        padding: 0.5rem 0.75rem;
        font-size: 1.25rem;
    }

    /* 移动端优化表单 */
    .form-control {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    /* 移动端优化按钮 */
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    /* 移动端优化卡片布局 */
    .col-md-4 {
        margin-bottom: 1.5rem;
    }

    /* 移动端优化产品详情页 */
    .card .row.g-0 {
        flex-direction: column;
    }

    .card .row.g-0 .col-md-4,
    .card .row.g-0 .col-md-8 {
        width: 100%;
    }

    .object-fit-cover {
        height: 200px;
        object-fit: cover;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 60px 0;
    }

    .hero-section h1 {
        font-size: 1.5rem;
    }

    .hero-section .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }

    .hero-section .mt-4 {
        margin-top: 1rem !important;
    }

    .btn-group-vertical .btn,
    .btn-group .btn {
        margin: 0.25rem 0;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .display-4 {
        font-size: 1.8rem;
    }

    /* 优化移动端内容间距 */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .mb-5 {
        margin-bottom: 2rem !important;
    }

    .mt-5 {
        margin-top: 2rem !important;
    }

    /* 移动端优化联系信息布局 */
    .contact-info .row > div {
        margin-bottom: 1.5rem;
    }

    /* 移动端优化社交媒体按钮 */
    .social-buttons .btn {
        margin: 0.25rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    /* 优化移动端产品分类导航 */
    .product-nav .nav-pills .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .product-nav .sticky-top {
        position: static;
    }
}

/* 触摸设备特定优化 */
@media (hover: none) and (pointer: coarse) {
    .product-card {
        transition: none;
    }

    .product-card:hover {
        transform: none;
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    }

    .btn:hover {
        transform: none;
    }

    .btn-primary:hover,
    .btn-primary:focus {
        transform: none;
        box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

/* 按钮悬停效果 */
.btn-primary:hover,
.btn-primary:focus {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

/* 悬浮电话按钮样式 */
.floating-phone {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.floating-phone:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
    color: white;
}

.floating-phone i {
    font-size: 1.5rem;
    margin-right: 10px;
    animation: phone-ring 1.5s ease-in-out infinite;
}

.floating-phone .phone-number {
    font-size: 1.1rem;
    font-weight: bold;
    white-space: nowrap;
}

/* 脉动动画 */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(102, 126, 234, 0.8);
    }
}

/* 电话图标摇动动画 */
@keyframes phone-ring {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30% {
        transform: rotate(-15deg);
    }
    20%, 40% {
        transform: rotate(15deg);
    }
}

/* 响应式悬浮电话按钮 */
@media (max-width: 768px) {
    .floating-phone {
        bottom: 20px;
        right: 20px;
        padding: 12px 16px;
    }

    .floating-phone .phone-number {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .floating-phone {
        bottom: 15px;
        right: 15px;
        padding: 10px 14px;
    }

    .floating-phone i {
        font-size: 1.2rem;
        margin-right: 8px;
    }

    .floating-phone .phone-number {
        font-size: 0.9rem;
    }
}