/* product-gallery.css - 产品画廊页面样式 */

:root {
    --gallery-blue: #0a3dad;
    --gallery-blue-dark: #0830a0;
}

/* Gallery Hero Section */
.gallery-hero-section {
    background-color: var(--light);
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.3)), 
                      url('../images/gallery-hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 80px 0 50px;
    border-bottom: 1px solid var(--gray);
    text-align: center;
    color: var(--white);
    position: relative;
}

/* Add overlay for better text contrast */
.gallery-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1));
    pointer-events: none;
    z-index: 1;
}

.gallery-hero-section .container {
    position: relative;
    z-index: 2;
}

.gallery-hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 15px;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 3;
}

.gallery-hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 3;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.filter-btn {
    padding: 10px 24px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    backdrop-filter: blur(4px);
}

.filter-btn a {
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
    font-size: inherit;
}

.filter-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: var(--white);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.filter-btn.active {
    background-color: #0a3dad;
    border-color: #0a3dad;
    color: var(--white);
    box-shadow: 0 4px 15px rgba(10, 61, 173, 0.3);
}

.filter-btn.active:hover {
    background-color: #08308a;
    border-color: #08308a;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 60px 0;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

.gallery-item {
    background-color: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-8px);
}

.gallery-image {
    position: relative;
    height: auto;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-bottom: 1px solid var(--gray);
}

.gallery-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: var(--gray);
    transition: width 0.3s ease;
}

.gallery-item:hover .gallery-image::after {
    width: 100%;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(10, 61, 173, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.view-details-btn {
    background-color: var(--white);
    color: #0a3dad;
    padding: 12px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    transform: translateY(20px);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.gallery-item:hover .view-details-btn {
    transform: translateY(0);
}

.view-details-btn:hover {
    background-color: #0a3dad;
    color: var(--white);
}

.gallery-info {
    padding: 25px;
}

.gallery-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
    line-height: 1.3;
}

.gallery-title a {
    color: #1a1a1a;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-title a:hover {
    color: var(--primary);
}

.gallery-description {
    color: var(--secondary);
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 4.5rem;
    overflow: hidden;
}

.gallery-tags a,
.tag {
    display: inline-block;
    background-color: var(--light);
    color: #0a3dad;
    padding: 5px 14px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.25s ease;
}

.gallery-tags a:hover,
.tag:hover {
    background-color: #0a3dad;
    color: var(--white);
    border-color: #0a3dad;
}

/* Gallery Stats */
.gallery-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 40px 0;
    border-top: 1px solid var(--gray);
    border-bottom: 1px solid var(--gray);
    margin: 40px 0;
}

@media (max-width: 768px) {
    .gallery-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .gallery-stats {
        grid-template-columns: 1fr;
    }
}

.stat-item {
    text-align: center;
    padding: 20px;
    background-color: var(--light);
    border-radius: var(--radius);
    transition: var(--transition);
}

.stat-item:hover {
    background-color: #0a3dad;
    color: var(--white);
    transform: translateY(-5px);
}

.stat-item:hover .stat-number,
.stat-item:hover .stat-label {
    color: var(--white);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0a3dad;
    margin-bottom: 10px;
    transition: var(--transition);
}

.stat-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

/* Gallery Pagination */
.gallery-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 30px 0;
    border-top: 1px solid var(--gray);
}

.gallery-pagination .pagination-info {
    color: var(--metal);
    font-size: 0.9rem;
}

.gallery-pagination .pagination-controls {
    display: flex;
    gap: 8px;
}

.gallery-pagination .pagination-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--gray);
    background-color: var(--white);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    color: var(--secondary);
    transition: all 0.2s;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-pagination .pagination-btn:hover:not(.disabled) {
    border-color: #0a3dad;
    color: #0a3dad;
}

.gallery-pagination .pagination-btn.active {
    background-color: #0a3dad;
    color: var(--white);
    border-color: #0a3dad;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-hero-title {
        font-size: 2.2rem;
    }
    
    .gallery-hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }
    
    .gallery-filters {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 8px 18px;
        font-size: 0.9rem;
    }
    
    .gallery-grid {
        padding: 40px 0;
    }
    
    .gallery-pagination {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .gallery-hero-title {
        font-size: 1.8rem;
    }
    
    .gallery-hero-subtitle {
        font-size: 1rem;
    }
    
    .gallery-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-btn {
        white-space: nowrap;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-image {
        aspect-ratio: auto;
        height: 250px;
        width: 100%;
    }
    
    .gallery-tags {
        max-height: none;
        overflow: visible;
    }
}