/* ================================
   正奥石业官网 - 产品页面样式
   包含：产品列表页、产品详情页
   ================================ */

/* Hero 区域 */
.products-hero {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, #2D3436 0%, #4A4E52 100%);
    background-image:
        linear-gradient(135deg, rgba(45, 52, 54, 0.9) 0%, rgba(74, 78, 82, 0.85) 100%),
        url('https://images.unsplash.com/photo-1600607687939-ce8a6c25118c?w=1920&h=1080&fit=crop');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.products-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(45, 52, 54, 0.7) 0%, rgba(45, 52, 54, 0.85) 100%);
}

.products-hero .hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    max-width: 900px;
    padding: 0 20px;
}

.products-hero .hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    animation: fadeInUp 1s ease;
}

.products-hero .hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.products-hero .hero-divider {
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, transparent, #ffffff, transparent);
    margin: 0 auto;
    animation: fadeInUp 1s ease 0.4s backwards;
}

/* ====================
   产品筛选
   ==================== */
.products-filter-section {
    background-color: var(--bg-white);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 70px;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.products-categories {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 20px;
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.15);
}

.category-btn.active {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* ====================
   产品列表
   ==================== */
.products-content {
    padding: 3rem 0;
    background-color: var(--light-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #eee;
    animation: fadeInUp 0.6s ease backwards;
}

/* 为产品卡片添加渐进动画 */
.products-grid .product-card:nth-child(1) { animation-delay: 0.1s; }
.products-grid .product-card:nth-child(2) { animation-delay: 0.2s; }
.products-grid .product-card:nth-child(3) { animation-delay: 0.3s; }
.products-grid .product-card:nth-child(4) { animation-delay: 0.4s; }
.products-grid .product-card:nth-child(5) { animation-delay: 0.5s; }
.products-grid .product-card:nth-child(6) { animation-delay: 0.6s; }
.products-grid .product-card:nth-child(7) { animation-delay: 0.7s; }
.products-grid .product-card:nth-child(8) { animation-delay: 0.8s; }
.products-grid .product-card:nth-child(9) { animation-delay: 0.9s; }

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--accent-color);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: #E74C3C;
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
}

.product-content {
    padding: 1.5rem;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.product-header h3 {
    margin: 0 !important;
    flex: 1;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.product-category-tag {
    display: inline-block;
    background-color: #4A90E2;
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    flex-shrink: 0;
}

.product-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.product-origin {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.product-origin i {
    color: var(--accent-color);
    margin-right: 0.3rem;
}

.product-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.stock-status.in-stock {
    color: #27AE60;
}

.stock-status.out-stock {
    color: #E74C3C;
}

.stock-status i {
    font-size: 0.6rem;
}

.btn-view-detail {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

.btn-view-detail:hover {
    color: #357ABD;
    background-color: rgba(74, 144, 226, 0.1);
}

/* ====================
   分页
   ==================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.page-btn {
    padding: 8px 16px;
    background-color: white;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 52, 54, 0.2);
}

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

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-number {
    width: 40px;
    height: 40px;
    background-color: white;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-number:hover {
    background-color: var(--light-color);
    transform: translateY(-2px);
}

.page-number.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ====================
   产品详情页
   ==================== */
.product-detail-section {
    padding: 5rem 0 2rem 0;
    background-color: var(--bg-white);
}

.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.product-gallery {
    position: relative;
    animation: fadeInLeft 1s ease;
}

.product-info {
    padding: 0;
    animation: fadeInRight 1s ease;
}

.main-image {
    margin-bottom: 1rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.main-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.thumbnail-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.thumbnail {
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail:hover {
    border-color: var(--accent-color);
}

.thumbnail.active {
    border-color: var(--accent-color);
}

.thumbnail img {
    width: 100%;
    height: 90px;
    object-fit: cover;
}

.product-info {
    padding: 0;
}

.product-category-large {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
    vertical-align: middle;
}

.product-info h1 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.product-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.meta-item i {
    color: var(--accent-color);
}

.product-description-full,
.product-applications,
.product-specs-table {
    margin-bottom: 1.2rem;
}

.product-description-full h3,
.product-applications h3,
.product-specs-table h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.7rem;
}

.product-description-full p {
    color: var(--text-muted);
    line-height: 1.5;
    font-size: 0.95rem;
}

.application-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.application-tag {
    background-color: var(--secondary-color);
    color: var(--text-color);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
}

.product-specs-table table {
    width: 100%;
    border-collapse: collapse;
}

.product-specs-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.product-specs-table td:first-child {
    font-weight: 500;
    color: var(--primary-color);
    width: 40%;
}

.product-specs-table td:last-child {
    color: var(--text-muted);
}

.product-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.product-actions .btn {
    flex: 1;
    padding: 0.9rem 2rem;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-actions .btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #357ABD);
    color: white;
    border: none;
}

.product-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.3);
}

.product-actions .btn-full {
    width: 100%;
}

/* ====================
   纹理展示
   ==================== */
.texture-showcase {
    padding: 5rem 0;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
}

.texture-showcase .section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.texture-showcase .title-decoration {
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    margin: 0 auto 2rem;
    border-radius: 2px;
}

.texture-showcase .section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.texture-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.texture-viewer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.texture-magnifier {
    position: relative;
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.texture-magnifier img {
    width: 100%;
    height: auto;
    display: block;
}

.texture-info {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
}

.texture-info h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 0.75rem 0;
    color: var(--text-color);
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.feature-list li i {
    color: var(--accent-color);
}

/* ====================
   效果图
   ==================== */
.project-gallery {
    padding: 5rem 0;
    background: white;
}

.project-gallery .section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.project-gallery .title-decoration {
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    margin: 0 auto 2rem;
    border-radius: 2px;
}

.project-gallery .section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.project-image {
    height: 250px;
    overflow: hidden;
    margin-bottom: 0;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-info {
    padding: 1.5rem;
}

.project-info h4 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.project-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ====================
   产品页面响应式
   ==================== */
@media screen and (max-width: 968px) {
    .products-hero {
        height: 300px;
    }

    .products-hero .hero-title {
        font-size: 2rem;
    }

    .products-hero .hero-subtitle {
        font-size: 1.2rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .texture-gallery {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media screen and (max-width: 768px) {
    .product-detail-section {
        padding: 4rem 0 2rem 0;
    }

    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .main-image img {
        height: 400px;
    }

    .product-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .product-actions {
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .texture-showcase,
    .project-gallery {
        padding: 3rem 0;
    }

    .texture-showcase .section-title,
    .project-gallery .section-title {
        font-size: 2rem;
    }

    .texture-info {
        padding: 1.5rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 480px) {
    .product-detail-section {
        padding: 4rem 0 2rem 0;
    }

    .products-categories {
        gap: 0.5rem;
    }

    .category-btn {
        padding: 6px 16px;
        font-size: 0.85rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-info h1 {
        font-size: 1.5rem;
    }

    .main-image img {
        height: 280px;
    }

    .thumbnail img {
        height: 70px;
    }
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* 骨架屏加载动画 */
.loading-skeleton {
    opacity: 0.6;
}
