﻿@layer utilities {
    .content-auto {
        content-visibility: auto;
    }

    .text-shadow-sm {
        text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }

    .transition-transform-opacity {
        transition-property: transform, opacity;
    }

    .backdrop-blur-sm {
        backdrop-filter: blur(4px);
    }

    .product-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 2rem;
    }

    .product-card-hover {
        transition: all 0.3s ease;
    }

        .product-card-hover:hover {
            transform: translateY(-8px);
        }

    .nav-scrolled {
        @apply bg-white shadow-md;
    }

    .fade-in {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }

        .fade-in.visible {
            opacity: 1;
            transform: translateY(0);
        }

    .scale-in {
        opacity: 0;
        transform: scale(0.95);
        transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    }

        .scale-in.visible {
            opacity: 1;
            transform: scale(1);
        }

    .skeleton {
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200% 100%;
        animation: skeleton-loading 1.5s infinite;
    }

    @keyframes skeleton-loading {
        0% {
            background-position: 200% 0;
        }

        100% {
            background-position: -200% 0;
        }
    }
    /* 导航选中样式 */
    .nav-link.active,
    .nav-link:hover {
        color: #E63946 !important;
    }
    /* 侧边栏样式 */
    .category-sidebar {
        background-color: #fff;
        border-radius: 4px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .category-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
        border-radius: 6px;
        margin-bottom: 4px;
    }

        .category-item.active {
            background-color: #f8f9fa;
            font-weight: 500;
            border-left: 3px solid #E63946;
            padding-left: 9px;
        }

    .category-count {
        background-color: #f0f0f0;
        color: #666;
        min-width: 24px;
        text-align: center;
        padding: 2px 6px;
        font-size: 11px;
    }
}
html {
    scrollbar-width: none;
}

/* 针对 IE 和 Edge 的滚动条隐藏 */
body {
    -ms-overflow-style: none;
}

/* 在现有样式基础上添加 */
#navbar {
    transition: background-color 0.3s ease;
}

    #navbar.top-0 {
        background-color: transparent;
    }

    #navbar.scrolled {
        background-color: #000000;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}

.container {
    width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.product-area {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

/* 左侧产品分类样式 */
.product-category {
    width: 200px;
    border: 1px solid #eee;
    padding: 15px;
}

    .product-category h3 {
        font-size: 16px;
        margin-bottom: 15px;
        color: #333;
    }

.category-list {
    list-style: none;
}

    .category-list li {
        margin-bottom: 10px;
    }

        .category-list li a {
            text-decoration: none;
            color: #666;
            font-size: 14px;
            display: block;
            padding: 5px 0;
            transition: color 0.2s;
        }

            .category-list li a:hover,
            .category-list li a.active {
                color: #e63946;
                font-weight: 500;
            }

/* 右侧内容区（导航+产品） */
.product-content {
    flex: 1;
}

/* 联动导航栏样式 */
.product-subnav {
    border: 1px solid #eee;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
}

    .product-subnav h4 {
        font-size: 15px;
        margin-bottom: 10px;
        color: #333;
    }

.subnav-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

    .subnav-list li a {
        text-decoration: none;
        color: #666;
        font-size: 14px;
        transition: color 0.2s;
    }

        .subnav-list li a:hover {
            color: #e63946;
        }

/* 产品列表样式（保留原有基础样式） */
.product-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.product-item {
    border: 1px solid #eee;
    padding: 15px;
    text-align: center;
}

    .product-item img {
        max-width: 100%;
        margin-bottom: 10px;
    }

.product-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.product-desc {
    font-size: 12px;
    color: #999;
}
.category-item {
    transition: all 0.3s ease;
}

    .category-item.active {
        background-color: #f0f7ff;
        border-left: 3px solid #165DFF;
        color: #165DFF;
        font-weight: bold;
    }


.footer-menu a {
    transition: color 0.3s ease;
}

    .footer-menu a:hover {
        color: red !important;
    }