@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@400;500;600;700;800&display=swap');

@layer utilities {
    .content-auto {
        content-visibility: auto;
    }

    .text-shadow {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .card-hover {
        transition: all 0.3s ease;
    }

    .card-hover:hover {
        transform: translateY(-8px);
    }

    .nav-active {
        position: relative;
    }

    .nav-active::after {
        content: '';
        position: absolute;
        bottom: -6px;
        left: 0;
        width: 100%;
        height: 3px;
        background-color: #ffe500;
        border-radius: 3px;
    }

    .animate-fade-in {
        animation: fadeIn 0.8s ease forwards;
    }

    .product-gallery-thumb-active {
        border-color: #00316e;
        opacity: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .product-content p {
        margin-bottom: 1.25rem;
        line-height: 1.8;
    }

    .product-content h3 {
        font-size: 1.5rem;
        font-weight: 600;
        color: #00316e;
        margin: 2rem 0 1rem;
    }

    .product-content ul {
        margin-bottom: 1.25rem;
        padding-left: 1.5rem;
        list-style-type: disc;
    }

    .product-content li {
        margin-bottom: 0.5rem;
        line-height: 1.6;
    }

    .product-content img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
        margin: 1.5rem 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
}

html {
    scroll-behavior: smooth;
}

/* 动画效果 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* 产品画廊样式 */
.product-gallery-main {
    transition: all 0.5s ease;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 500px;
    width: auto;
    margin: 0 auto;
    object-fit: contain;
}

.product-gallery-thumb {
    transition: all 0.3s ease;
    opacity: 0.7;
    border: 2px solid transparent;
    border-radius: 8px;
    max-height: 130px;
    width: auto;
    margin: 0 auto;
}

.product-gallery-thumb:hover {
    opacity: 1;
    border-color: #00316e;
}

/* 规格表样式 */
.specs-table tr:nth-child(even) {
    background-color: #f8fafc;
}

.specs-table tr:hover {
    background-color: #f0f7ff;
}

/* 特性标签样式 */
.feature-tag {
    transition: all 0.3s ease;
}

.feature-tag:hover {
    transform: scale(1.05);
    background-color: #00316e;
    color: white;
}

/* 加载动画 */
.loader {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    display: none;
}

.loader.show {
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 按钮动画 */
.btn-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 229, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 229, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 229, 0, 0);
    }
}

/* 产品特性标签组 */
.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.product-tag {
    background-color: #f0f7ff;
    color: #00316e;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #e0e7ff;
}

.product-tag:hover {
    background-color: #00316e;
    color: white;
    transform: translateY(-2px);
}

/* 产品主图容器 */
.product-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    max-height: 540px; /* 容器也限制最大高度 */
    display: flex;
    align-items: center; /* 图片垂直居中 */
    justify-content: center; /* 图片水平居中 */
}

.product-image-zoom {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(0, 49, 110, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    cursor: zoom-in;
    transition: all 0.3s ease;
}

.product-image-zoom:hover {
    background-color: #00316e;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .modal-content-wrapper {
        height: 400px; /* 移动端降低高度 */
    }
}

@media (max-width: 480px) {
    .modal-content-wrapper {
        height: 300px; /* 小屏手机进一步降低 */
    }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
}

.close-modal:hover {
    color: #ffe500;
}

/* 应用场景卡片样式 */
.application-card {
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.application-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 49, 110, 0.1);
    border-color: #00316e;
}
