﻿.product-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: auto;
    top: 0;
    left: 0;
    position: relative;
}

.product-list {
    margin-top: 40px;
    padding-bottom: 60px;
}

.product-header {
    display: flex;
    flex-direction: column;
    text-align: left;
    width: 85%;
    max-width: 1200px;
    color: #000;
    margin: auto;
    margin-top: 2.5rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 0;
}

.filter-container {
    position: relative;
}

.filter-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: #000;
}

.filter-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.filter-icon {
    font-size: 1.2rem;
}

.filter-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 200px;
    margin-top: 0.5rem;
    z-index: 1000;
    display: none;
}

.filter-dropdown.show {
    display: block;
}

.filter-header {
    font-size: 0.8rem;
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-header span {
    font-weight: 600;
}

.close-filter {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
}

.filter-options {
    padding: 0.5rem 0;
}

.filter-option {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    white-space: nowrap;
}

.filter-option:hover {
    background: #f5f5f5;
}

.filter-option.active {
    background: #f0f0f0;
    font-weight: 600;
}

.filter-option.active::after {
    content: "×";
    color: #666;
    cursor: pointer;
    margin-left: 1rem;
}

.filter-option.active:hover::after {
    color: #333;
}

.product-header h1 {
    margin: auto 0;
    line-height: 2;
    color: #333333;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-header p {
    margin: auto 0;
    line-height: 1.5;
    color: #555555;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    white-space: normal;
    overflow: visible;
}

.production {
    display: grid;
    width: 90%;
    max-width: 1200px;
    height: auto;
    padding: 0;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    overflow: visible;
}

.product {
    background: #f7f7f7;
    max-width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-sizing: border-box;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* 确保卡片高度一致 */
}

.product.visible {
    opacity: 1;
    transform: translateY(0);
}

.product-image {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    position: relative;
}

.product img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

.silver-gradient-animation {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #f7f7f7, #c0c0c0, #f7f7f7, #e0e0e0);
    background-size: 400% 400%;
    animation: silverShift 2s ease infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.silver-gradient-animation img {
    width: 20%;
    height: auto;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.silver-gradient-animation p {
    color: #323232;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

@keyframes silverShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

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

.information {
    padding: 1rem;
    background: #f7f7f7;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    flex-shrink: 0;
    /* 防止被压缩 */
}

.info-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.product .series {
    font-size: 0.6rem;
    color: #666666;
    font-weight: 400;
    margin: 0 0 0.15rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    white-space: normal;
    word-break: break-word;
    /* 防止文字溢出 */
}

.product h2 {
    font-size: 0.8rem;
    color: #000000;
    font-weight: 600;
    margin: 0;
    text-align: left;
    white-space: normal;
    flex: 1;
    /* 允许标题占据剩余空间 */
}

.product .price {
    font-size: 0.6rem;
    color: #000000;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    align-self: flex-end;
    text-align: right;
    /* 价格不换行 */
}

.product .price .price-value {
    font-size: 1rem;
    font-weight: 700;
}

.price-usd-label {
    font-size: 0.45rem;
    font-weight: 300;
    font-style: italic;
    color: #888;
    line-height: 1;
    vertical-align: baseline;
    margin-left: 1px;
}

.page {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 3rem;
    display: flex;
    justify-content: space-between;
    margin: auto;
    margin-top: 0;
}

.page .prev,
.page .next {
    position: static;
    height: auto;
    width: auto;
    top: auto;
    transform: none;
    background: none;
    color: #000;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 10;
    font-size: 1.5rem;
}

.page .prev {
    left: 0;
}

.page .next {
    right: 0;
}

/* 移动端：产品区标题、描述、筛选两端对齐 */
@media (max-width: 768px) {
    .product-header {
        width: 92%;
    }

    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .product-header h1 {
        margin: 0;
        text-align: left;
        flex: 1;
        font-size: 1.05rem;
        line-height: 1.6;
    }

    .filter-container {
        margin-left: auto;
        flex-shrink: 0;
    }

    .product-header p {
        margin: 0;
        margin-top: 0.3rem;
        text-align: left;
        width: 100%;
        font-size: 0.7rem;
        line-height: 1.5;
    }

    .information {
        padding: 0.5rem;
    }
}

/* iPad 横屏优化 */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .production {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .product-image {
        aspect-ratio: 3 / 4;
    }

    .information {
        padding: 0.8rem;
    }

    .product .series {
        font-size: 0.55rem;
    }

    .product h2 {
        font-size: 0.75rem;
    }

    .product .price .price-value {
        font-size: 0.9rem;
    }
}

/* iPad 竖屏优化 */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .production {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }

    .product-image {
        aspect-ratio: 3 / 4;
    }

    .information {
        padding: 0.8rem;
    }

    .product .series {
        font-size: 0.6rem;
    }

    .product h2 {
        font-size: 0.85rem;
    }

    .product .price .price-value {
        font-size: 1rem;
    }
}

@media (min-width: 1025px) {

    /* 桌面端 */
    .production {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .product h2 {
        font-size: 1rem;
        color: #000000;
        font-weight: 600;
        margin: 0;
        text-align: left;
        white-space: normal;
    }

    .product .price {
        font-size: 0.8rem;
        color: #000000;
        font-weight: 700;
        margin: 0;
    }

    .product .price .price-value {
        font-size: 1.2rem;
        font-weight: 700;
    }
}

@media (prefers-color-scheme: dark) {

    .page .prev,
    .page .next {
        color: #f7f7f7;
    }

    .banner-slide img {
        filter: brightness(0.8);
    }

    .product-header h1,
    .product-header p {
        color: #ddd;
    }

    .product {
        background: #333333;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .information {
        background: #333333;
    }

    .product .series {
        color: #aaa;
    }

    .product h2,
    .product .price {
        color: #f7f7f7;
    }

    .price-usd-label {
        color: #aaa;
    }

    .filter-btn {
        background: none;
        border: none;
        color: #f7f7f7;
    }

    .filter-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .filter-dropdown {
        background: #333333;
        border: 1px solid #555555;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }

    .filter-header {
        border-bottom: 1px solid #444444;
    }

    .filter-header span {
        color: #f7f7f7;
    }

    .close-filter {
        color: #aaa;
    }

    .filter-option {
        color: #f7f7f7;
        display: flex;
        justify-content: space-between;
        align-items: center;
        white-space: nowrap;
    }

    .filter-option:hover {
        background: #444444;
    }

    .filter-option.active {
        background: #444444;
    }

    .filter-option.active::after {
        color: #aaa;
        margin-left: 1rem;
    }

    .filter-option.active:hover::after {
        color: #f7f7f7;
    }

    .information img {
        filter: brightness(0.8);
    }
}