﻿@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);
    }