/* ============================================
   产品中心页面 - 现代工业风格设计系统
   ============================================ */

/* CSS 变量定义 - 统一设计 tokens */
:root {
    --primary-color: #ea5a2d;
    --primary-dark: #d14a20;
    --primary-light: #ff7a52;
    --secondary-color: #1a365d;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

/* ============================================
   分类导航区域 - 卡片式现代设计
   ============================================ */
.w-m-page {
    padding-bottom: 60px;
}

.w-m-page .category {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@media (min-width: 1500px) {
    .w-mf .container {
        width: 100% !important;
        max-width: 1520px;
        margin: 0 auto;
        padding: 0px 20px;
    }
}

@media (min-width: 1401px) and (max-width: 1599px) {
    .w-mf .container {
        width: 100% !important;
        padding: 0px 20px;
    }
}

@media (max-width: 1400px) {
    .w-mf .container {
        width: 100% !important;
        padding: 0px 20px;
        ;
    }
}

.w-m-page .category-title {
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    flex: none;
    padding: 24px 32px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.w-m-page .category-title::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 70%);
    animation: shine 4s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.w-m-page .menu {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 24px;
    flex: 1;
    background: var(--bg-secondary);
}

.w-m-page .menu-item {
    color: var(--text-secondary);
    background: var(--bg-primary);
    border: 2px solid transparent;
    font-weight: 500;
    border-radius: var(--radius-full);
    overflow: hidden;
    transition: all var(--transition-base);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.w-m-page .menu-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.w-m-page .menu-item:hover,
.w-m-page .menu-item.current {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.w-m-page .menu-item:hover::before,
.w-m-page .menu-item.current::before {
    opacity: 1;
}

.w-m-page .menu-item a {
    display: block;
    padding: 12px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    position: relative;
    z-index: 1;
    transition: color var(--transition-base);
    font-size: 14px;
}

.w-m-page .menu-item:hover a,
.w-m-page .menu-item.current a {
    color: #fff;
}

/* 当前选中项特殊效果 */
.w-m-page .menu-item.current {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(234, 90, 45, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(234, 90, 45, 0);
    }
}

/* ============================================
   产品列表区域 - 玻璃拟态卡片设计
   ============================================ */
.w-m-page .product-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
    padding: 40px 0;
    perspective: 1000px;
}

.w-m-page .product-item {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    position: relative;
    border: 1px solid var(--border-color);
    animation: fadeInUp 0.6s ease-out backwards;
}

/* 交错动画 */
.w-m-page .product-item:nth-child(1) {
    animation-delay: 0.05s;
}

.w-m-page .product-item:nth-child(2) {
    animation-delay: 0.1s;
}

.w-m-page .product-item:nth-child(3) {
    animation-delay: 0.15s;
}

.w-m-page .product-item:nth-child(4) {
    animation-delay: 0.2s;
}

.w-m-page .product-item:nth-child(5) {
    animation-delay: 0.25s;
}

.w-m-page .product-item:nth-child(6) {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.w-m-page .product-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.w-m-page .product-item:hover {
    transform: translateY(-8px) rotateX(2deg);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.w-m-page .product-item:hover::before {
    transform: scaleX(1);
}

.w-m-page .product-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.w-m-page .product-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    position: relative;
    padding: 24px;
}

/* 图片加载占位 shimmer 效果 */
.w-m-page .product-img::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.4) 50%,
            transparent 100%);
    animation: shimmer-img 2s infinite;
    z-index: 1;
}

@keyframes shimmer-img {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.w-m-page .product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--transition-slow);
    position: relative;
    z-index: 2;
}

.w-m-page .product-item:hover .product-img img {
    transform: scale(1.08);
}

/* 图片悬停遮罩 */
.w-m-page .product-img::after {
    content: 'View details';
    position: absolute;
    inset: 0;
    background: rgba(234, 90, 45, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: 3;
}

.w-m-page .product-item:hover .product-img::after {
    opacity: 1;
}

.w-m-page .product-text {
    padding: 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: var(--bg-primary);
    position: relative;
    transition: color var(--transition-base);
}

.w-m-page .product-item:hover .product-text {
    color: var(--primary-color);
}

/* ============================================
   响应式设计 - 完整断点适配
   ============================================ */

/* 大型桌面 (1200px+) */
@media screen and (min-width: 1400px) {
    .w-m-page .product-info {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 平板设备断点 (1024px) */
@media screen and (max-width: 1024px) {
    .w-m-page .category {
        flex-direction: column;
    }

    .w-m-page .category-title {
        padding: 16px 24px;
        font-size: 16px;
    }

    .w-m-page .menu {
        padding: 16px;
        gap: 10px;
    }

    .w-m-page .menu-item a {
        padding: 10px 18px;
        font-size: 13px;
    }

    .w-m-page .product-info {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 24px;
        padding: 32px 0;
    }
}

/* 小型平板断点 (768px) */
@media screen and (max-width: 768px) {
    .w-mf {
        height: 60px;
        line-height: 60px;
    }

    .w-mf-name {
        font-size: 18px;
    }

    .w-m-page .category-title {
        padding: 14px 20px;
        font-size: 14px;
    }

    .w-m-page .menu {
        padding: 12px;
        gap: 8px;
    }

    .w-m-page .menu-item a {
        padding: 8px 14px;
        font-size: 12px;
    }

    .w-m-page .product-info {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
        padding: 24px 0;
    }

    .w-m-page .product-text {
        padding: 16px;
        font-size: 14px;
    }

    .w-m-page .product-img::after {
        font-size: 12px;
        letter-spacing: 1px;
    }
}

/* 移动端断点 (480px) */
@media screen and (max-width: 480px) {
    .w-mf {
        height: 50px;
        line-height: 50px;
    }

    .w-mf-name {
        font-size: 16px;
        padding-left: 16px;
    }

    .w-mf-location {
        font-size: 13px !important;
        flex-wrap: wrap;
        gap: 0px !important;
    }

    .w-m-page .category {
        border-radius: var(--radius-md);
    }

    .w-m-page .category-title {
        padding: 12px 16px;
        font-size: 13px;
        letter-spacing: 0.5px;
    }

    .w-m-page .menu {
        padding: 10px;
        gap: 6px;
    }

    .w-m-page .menu-item {
        border-radius: var(--radius-sm);
    }

    .w-m-page .menu-item a {
        padding: 8px 12px;
        font-size: 11px;
    }

    .w-m-page .product-info {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 16px 0;
    }

    .w-m-page .product-item {
        border-radius: var(--radius-sm);
    }

    .w-m-page .product-item:hover {
        transform: translateY(-4px);
    }

    .w-m-page .product-img {
        aspect-ratio: 1 / 1;
        padding: 10px;
    }

    .w-m-page .product-img::after {
        display: none;
    }

    .w-m-page .product-text {
        padding: 12px;
        font-size: 12px;
    }
}

/* 超小屏幕断点 (320px) */
@media screen and (max-width: 320px) {
    .w-m-page .product-info {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .w-m-page .menu-item a {
        padding: 6px 10px;
        font-size: 10px;
    }
}

/* ============================================
   性能优化 - 减少动画偏好
   ============================================ */
@media (prefers-reduced-motion: reduce) {

    .w-m-page .category,
    .w-m-page .product-item,
    .w-m-page .menu-item,
    .w-m-page .product-img img,
    .w-m-page .category-title::after,
    .w-m-page .category::before {
        animation: none;
        transition: none;
    }
}

/* ============================================
   打印样式优化
   ============================================ */
@media print {

    .w-m-page .category,
    .w-m-page .product-item {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .w-m-page .menu-item.current {
        background: #eee;
        border: 2px solid #333;
    }
}