/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Arial', sans-serif;
    color: #333;
}

/* Header - 保持不变 */
.header {
    background: #FFFFFF;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Main Content */
.main-content {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #666666;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span:last-child {
    color: #333;
    font-weight: 500;
}

/* Content Wrapper */
.content-wrapper {
    display: flex;
    gap: 20px;
}

/* Sidebar */
.sidebar {
    display: block;
    position: relative;
    width: 220px;
    flex-shrink: 0;
}

.sidebar-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    max-height: 500px;
    overflow-y: auto;
}

.sidebar-header {
    background: #FFFFFF;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: #3ABDA2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-title i {
    color: #667eea;
}

/* Category List - Level 1 */
.category-list {
    list-style: none;
    padding: 8px 0;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    color: #555;
}

.category-item span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-item .arrow {
    font-size: 11px;
    color: #ccc;
    transition: all 0.2s ease;
}

.category-item.active {
    background-color: #F2F3F4;
    color: #3ABDA2;
}

.category-item.active .arrow {
    color: #3ABDA2;
}

.category-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #eee, transparent);
    margin: 8px 0;
}

/* Custom Scrollbar */
.sidebar-container::-webkit-scrollbar,
.flyout-panel::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.sidebar-container::-webkit-scrollbar-track,
.flyout-panel::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-container::-webkit-scrollbar-thumb,
.flyout-panel::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.sidebar-container::-webkit-scrollbar-thumb:hover,
.flyout-panel::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* Firefox */
.sidebar-container,
.flyout-panel {
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

/* Flyout Panel */
.category-flyout {
    position: absolute;
    left: 100%;
    margin-left: 8px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.category-flyout.visible {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.flyout-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
    padding: 0 15px;
    min-width: 200px;
    max-height: 350px;
    overflow-y: auto;
    opacity: 0;
    transform: translateX(-10px) translateY(5px);
    transition: all 0.15s ease;
}

.flyout-panel.visible {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

.flyout-panel h4 {
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

/* Level 2 List */
.category-list.level2 .category-item {
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 4px;
}

.category-list.level2 .category-item.active {
    background-color: #F2F3F4;
    color: #3ABDA2;
}

/* Level 3 Panel */
.level2-panel {
    position: relative;
    overflow: visible;
}

.level3-panel {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 8px;
    min-width: 220px;
    display: none;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 10px;
    z-index: 10;
}

.level3-panel.visible {
    display: block;
}

.category-list.level3 .category-item {
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 4px;
    justify-content: flex-start;
    cursor: pointer;
}

.category-list.level3 .category-item.active {
    background-color: #F2F3F4;
    color: #3ABDA2;
}

/* Product Grid */
.product-grid {
    width: calc(100% - 220px);
    min-height: 500px;
}

.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.grid-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.result-count {
    font-size: 13px;
    color: #999;
}

/* Grid Container */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(231px, 1fr));
    gap: 12px;
    justify-items: center;
    width: 100%;
    box-sizing: border-box;
}

.product-cards {
    width: 100%;
    max-width: 231px;
    padding-top: 12px;
    background: #FFFFFF;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #eee;
}

.product-cards:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
    border-color: #fafafa;
}

.product-image {
    width: calc(100% - 16px);
    max-width: 215px;
    height: auto;
    aspect-ratio: 1;
    margin: 0 auto;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-cards:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 12px;
}

.product-title {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.product-price {
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.page-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #666;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    color: #3ABDA2;
}

.page-btn.active {
    background: #3ABDA2;
    color: white;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-dots {
    padding: 0 10px;
    color: #999;
}

/* Footer */
.footers {
    background: #3F5953;
    color: white;
    padding: 40px 0 0 0;
    margin-top: 40px;
}

.footer-contents {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    padding: 0 20px;
    gap: 30px;
}

.footer-section {
    flex: 1;
    padding: 0 15px;
    min-width: 0;
}

.footer-section h4 {
    margin-bottom: 15px;
    font-size: 16px;
}

.footer-section p {
    font-size: 13px;
    line-height: 1.8;
    color: #aaa;
    margin-bottom: 8px;
}

.contact-info i {
    color: #667eea;
    margin-right: 10px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: #667eea;
    transform: translateY(-3px);
}

.footer-bottoms {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    font-size: 12px;
    color: #FFFFFF;
    background: #364542;
    padding-bottom: 20px;
}
.null-style-forever {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.null-style-forever img {
    width: 300px;
    height: 170px;
}
.null-style-forever-title {
    width: auto;
    height: auto;
    font-family: Source Han Sans, Source Han Sans;
    font-weight: 400;
    font-size: 14px;
    color: #999999;
    line-height: 20px;
    text-align: center;
    font-style: normal;
    text-transform: none;
}

/* 小手机屏幕 */
@media (max-width: 576px) {
    .grid-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .pagination {
        gap: 4px;
        margin-top: 16px;
        padding-top: 12px;
    }
    
    .page-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
        border-radius: 4px;
    }
    
    .page-dots {
        padding: 0 6px;
        font-size: 12px;
    }
}

/* 手机屏幕 */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .product-cards {
        max-width: 100%;
    }
    
    .pagination {
        gap: 6px;
        margin-top: 20px;
        padding-top: 14px;
    }
    
    .page-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
        border-radius: 5px;
    }
    
    .page-dots {
        padding: 0 8px;
        font-size: 13px;
    }
}

/* 平板屏幕 */
@media (min-width: 769px) and (max-width: 992px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 中等桌面屏幕 */
@media (min-width: 993px) and (max-width: 1200px) {
    .grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 原有的手机端样式 */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .search-box {
        width: 100%;
        order: 3;
    }
    
    .search-input {
        width: 100%;
    }
    
    .footer-content {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .footer-section {
        flex: 1 1 calc(50% - 20px);
        min-width: 250px;
    }
}