/* Enhanced Archive Product Page Styles - 增强版归档页面样式 */

/* ========================================
   PAGINATION STYLES (合并的分页样式)
   ======================================== */

/* === 翻页主容器 === */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0 20px;
    padding: 20px 0;
    clear: both;
}

/* === 翻页容器 === */
.pagination-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === 翻页链接样式 === */
.pagination-container a,
.pagination-container span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    text-decoration: none;
    color: #666666;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    background: #ffffff;
}

/* === 翻页链接悬停效果 === */
.pagination-container a:hover {
    background: #f8f9fa;
    color: #333333;
    border-color: #ccc;
}

/* === 当前页面样式 === */
.pagination-container .current {
    background: #0073aa;
    color: #ffffff;
    border-color: #0073aa;
}

/* === 上一页/下一页特殊样式 === */
.pagination-container .prev,
.pagination-container .next {
    font-weight: 500;
}

/* === 省略号样式 === */
.pagination-container .dots {
    color: #999999;
    font-weight: 500;
    font-size: 14px;
    padding: 0 8px;
}

/* === 响应式设计 === */
@media (max-width: 768px) {
    .pagination-wrapper {
        margin: 30px 0 20px;
    }
    
    .pagination-container {
        gap: 6px;
    }
    
    .pagination-container a,
    .pagination-container span {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .pagination-wrapper {
        margin: 20px 0 15px;
    }
    
    .pagination-container {
        gap: 4px;
    }
    
    .pagination-container a,
    .pagination-container span {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 12px;
    }
}

/* === 无障碍支持 === */
.pagination-container a:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.pagination-container a:focus:not(:focus-visible) {
    outline: none;
}

/* === 打印样式 === */
@media print {
    .pagination-wrapper {
        display: none;
    }
}

/* ========================================
   ENHANCED ARCHIVE PRODUCT STYLES
   ======================================== */

/* === 归档页面主容器 === */
/* 产品归档页面专用样式 - 使用更具体的选择器避免冲突 */
.archive-main.product-archive {
    background: #ffffff;
    min-height: 100vh;
    padding: 40px 0 60px;
}

.archive-main.product-archive .container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === 页面头部 - 全屏背景 === */
.archive-main.product-archive .page-header-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin-bottom: 40px;
}

.archive-main.product-archive .page-header-section .container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-header {
    text-align: center;
    padding: 60px 40px;
    background: transparent;
    margin-bottom: 0;
    border-radius: 12px;
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 16px;
    line-height: 1.2;
}

.page-description {
    font-size: 16px;
    color: #666666;
    line-height: 1.6;
    max-width: 900px;
    margin: 0 auto 20px;
}

.breadcrumb-nav {
    font-size: 14px;
    color: #666666;
    margin-top: 20px;
}

.breadcrumb-nav a {
    color: #4a90e2;
    text-decoration: none;
}

.breadcrumb-nav a:hover {
    color: #357abd;
}

.breadcrumb-nav span {
    color: #333333;
    font-weight: 500;
}

/* === 主内容布局 === */
.main-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 20px;
}

/* === 左侧边栏优化 === */
.sidebar {
    position: sticky;
    top: 20px;
    z-index: 1;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.category-section {
    background: #ffffff;
}

.category-title {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    padding: 20px 24px;
    background: #f8f9fa;
    margin: 0;
    border-bottom: 1px solid #e5e5e5;
    cursor: pointer;
}

.category-title:hover {
    background: #e9ecef;
}

.category-list {
    padding: 12px 0;
    max-height: none;
    overflow: visible;
}

/* === 分类项目样式 === */
.category-group {
    margin-bottom: 16px;
}

.category-group-title {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    padding: 12px 24px 8px;
    background: #f8f9fa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e9ecef;
}

.category-item {
    margin: 0;
}

.category-item:hover {
    background: #f8f9fa;
}

.category-item.current-category {
    background: #e3f2fd;
    border-left: 4px solid #4a90e2;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666666;
    text-decoration: none;
    font-size: 14px;
    padding: 10px 24px;
    position: relative;
}

.category-link:hover {
    color: #333333;
    padding-left: 28px;
}

.category-link:focus {
    outline: 2px solid #4a90e2;
    outline-offset: -2px;
}

.current-category .category-link {
    color: #4a90e2;
    font-weight: 500;
}

.category-name {
    flex: 1;
}

/* 子分类样式 */
.sub-category .category-link {
    padding-left: 40px;
    font-size: 14px;
}

.sub-category:hover .category-link {
    padding-left: 44px;
}

/* 三级分类样式 */
.sub-sub-category .category-link {
    padding-left: 56px;
    font-size: 13px;
    color: #777777;
}

.sub-sub-category:hover .category-link {
    padding-left: 60px;
}

.no-categories {
    text-align: center;
    color: #999999;
    font-style: italic;
    padding: 40px 24px;
    font-size: 14px;
}

/* === 内容区域 === */
.content-area {
    min-width: 0;
    min-height: 60vh;
    position: relative;
}

/* === 产品网格优化 === */
/* 产品网格 - 使用更具体的选择器避免冲突 */
.archive-main.product-archive .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
    padding-top: 20px;
}

/* 产品卡片 - 使用更具体的选择器避免冲突 */
.archive-main.product-archive .product-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.product-card:focus-within {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

/* === 产品标签 === */
.product-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
}

.badge {
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.badge.category {
    background: #004672;
    color: white;
}

.badge.out-of-stock {
    background: #dc3545;
    color: white;
}

/* === 产品图片优化 === */
.product-image-container {
    aspect-ratio: 1 / 1;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    display: block;
}

.product-image.loaded {
    opacity: 1;
}


.product-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #cccccc;
    height: 100%;
    gap: 12px;
    padding: 20px;
    text-align: center;
}

.product-image-placeholder svg {
    opacity: 0.5;
}

.placeholder-text {
    font-size: 12px;
    font-weight: 500;
}

/* === 产品信息优化 === */
.product-info {
    padding: 20px;
}

.product-name {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 8px;
    height: 42px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-name a {
    color: #333333;
    text-decoration: none;
}

.product-name a:hover {
    color: #4a90e2;
}

.product-sku {
    font-size: 12px;
    color: #999999;
    margin-bottom: 10px;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 3px;
    display: inline-block;
}

/* === 产品价格优化 === */
.product-price {
    margin-bottom: 16px;
}

.price-range,
.price-single {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    display: block;
}

.price-contact {
    font-size: 14px;
    color: #666666;
    font-style: italic;
}

/* === 产品操作按钮 === */
.product-actions {
    display: flex;
    justify-content: center;
}

.product-detail-btn {
    background: #004672;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    display: block;
    text-align: center;
    width: 100%;
    border: 2px solid #004672;
}

.product-detail-btn:hover {
    background: #004672;
    border-color: #004672;
    color: white;
}

.product-detail-btn:focus {
    outline: 2px solid #004672;
    outline-offset: 2px;
}

/* === 分页导航优化 === */
/* 分页样式已合并到此文件中 */

/* 分页样式已合并到此文件中 */

/* === 无产品状态 === */
.no-products {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    text-align: center;
}

.no-products-content {
    color: #666666;
    max-width: 400px;
}

.no-products-content svg {
    margin-bottom: 24px;
    opacity: 0.5;
    color: #4a90e2;
}

.no-products-content h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: #333333;
    font-weight: 600;
}

.no-products-content p {
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 1.5;
}

.reset-filters-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #4a90e2;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
}

.reset-filters-btn:hover {
    background: #357abd;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

/* === 页面底部支持信息 === */
.archive-page-footer {
    background: #f8f9fa;
    padding: 60px 0;
    border-top: 1px solid #e9ecef;
    margin-top: 80px;
    position: relative;
    z-index: 2;
    clear: both;
}

.archive-support-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.support-item {
    text-align: center;
    padding: 24px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.support-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.support-item h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 12px;
}

.support-item p {
    color: #666666;
    line-height: 1.6;
    font-size: 14px;
}

/* === 调试信息样式 === */
.debug-info {
    position: relative;
    z-index: 1000;
    font-family: monospace;
    line-height: 1.4;
    margin: 10px 0;
    border-radius: 4px;
}

/* === 响应式设计 === */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sidebar {
        position: static;
        width: 100%;
        order: -1;
        margin-bottom: 20px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .page-header {
        padding: 40px 20px;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    /* 移动端分类收起功能 */
    .category-list {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .category-section {
        cursor: pointer;
    }
    
    .category-section.expanded .category-list {
        max-height: 1000px;
    }
    
    .category-title::after {
        content: '▼';
        float: right;
        font-size: 12px;
        transition: transform 0.3s ease;
    }
    
    .category-section.expanded .category-title::after {
        transform: rotate(180deg);
    }
}

@media (max-width: 768px) {
    .archive-main .container {
        padding: 0 15px;
    }
    
    .archive-main .page-header-section .container {
        padding: 0 15px;
    }
    
    .archive-main .page-header-section {
        padding: 40px 0;
        margin-bottom: 30px;
    }
    
    .page-header {
        padding: 30px 15px;
        margin-bottom: 0;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .page-description {
        font-size: 14px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        margin-bottom: 40px;
    }
    
    .product-info {
        padding: 16px;
    }
    
    .product-name {
        font-size: 15px;
        height: 38px;
    }
    
    .pagination-container a,
    .pagination-container span {
        min-width: 40px;
        height: 40px;
        font-size: 13px;
    }
    
    .archive-support-info {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .support-item {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .archive-main .page-header-section .container {
        padding: 0 10px;
    }
    
    .archive-main .page-header-section {
        padding: 30px 0;
        margin-bottom: 20px;
    }
    
    .page-header {
        padding: 20px 10px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .archive-support-info {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .pagination-container a,
    .pagination-container span {
        min-width: 36px;
        height: 36px;
        padding: 0 12px;
        font-size: 12px;
    }
}

/* === 移动端筛选按钮 === */
.mobile-filter-toggle {
    display: none;
    width: 100%;
    justify-content: center;
    margin-bottom: 20px;
    border: 2px solid #4a90e2;
}

.mobile-filter-toggle:focus {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

/* === 加载状态 === */
.loading-overlay {
    background: rgba(248, 249, 250, 0.9);
    backdrop-filter: blur(2px);
    border-radius: 8px;
}

.loading-spinner {
    font-size: 16px;
    font-weight: 500;
}

.loading-spinner svg {
    color: #4a90e2;
}

/* === 可访问性增强 === */
.skip-links {
    position: absolute;
    top: -100px;
    left: 0;
    z-index: 1000;
}

.skip-link {
    background: #4a90e2;
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    font-weight: 500;
}

.skip-link:focus {
    top: 0;
}

/* === 高对比度模式支持 === */
@media (prefers-contrast: high) {
    .product-card {
        border-width: 2px;
        border-color: #333333;
    }
    
    .category-link {
        border-left: 2px solid transparent;
    }
    
    .current-category .category-link {
        border-left-color: #333333;
    }
    
    .badge {
        border: 2px solid currentColor;
    }
}

/* === 减少动画模式 === */
@media (prefers-reduced-motion: reduce) {
    .product-card,
    .category-link,
    .product-image,
    .product-detail-btn,
    .pagination-container a {
        transition: none;
    }
}

/* === 打印样式 === */
@media print {
    .sidebar,
    .pagination-wrapper,
    .archive-page-footer,
    .mobile-filter-toggle,
    .debug-info {
        display: none;
    }
    
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #333333;
    }
    
    .page-header {
        background: none;
        padding: 20px 0;
    }
}

/* === 深色模式支持 === */
@media (prefers-color-scheme: dark) {
    .archive-main {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .page-header {
        background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
    }
    
    .page-title {
        color: #ffffff;
    }
    
    .page-description {
        color: #cccccc;
    }
    
    .sidebar {
        background: #2a2a2a;
        border: 1px solid #444444;
    }
    
    .category-title {
        background: #333333;
        color: #ffffff;
    }
    
    .category-link {
        color: #cccccc;
    }
    
    .category-link:hover {
        color: #ffffff;
        background: #333333;
    }
    
    .product-card {
        background: #2a2a2a;
        border-color: #444444;
    }
    
    .product-name a {
        color: #ffffff;
    }
    
    .product-detail-btn {
        background: #004672;
        border-color: #004672;
    }
}
