
/* 基础样式 */
 * {
     box-sizing: border-box;
     margin: 0;
     padding: 0;
 }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-top {
    background: linear-gradient(to bottom, #FFE7B3, #F6C462);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.28rem 0;
}

.header-bottom {
    background: linear-gradient(to bottom, #F6C462, #EDBC5D, #E1B257);
}

.nav-main {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 60px;
    text-decoration: none;
    color: white;
    font-size: 14px;
    transition: all 0.3s;
}

.nav-link:hover {
    font-weight: 500;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: -12px;
    background: white;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-16px);
    transition: all 0.3s;
    z-index: 10;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 8px 24px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    white-space: nowrap;
}

.dropdown-item:hover {
    color: #D39B2C;
    background-color: #F8F8F8;
}

.search-box {
    position: relative;
}

.search-input {
    width: 200px;
    padding: 8px 32px 8px 12px;
    font-size: 14px;
    color: white;
    background: transparent;
    border: 1px solid white;
    border-radius: 9999px;
    outline: none;
}

.search-input::placeholder {
    color: white;
}

.search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
}

/* 主内容样式 */
main {
    margin-top: 140px;
    min-height: 500px;
}

/* 藏品网格 */
.collection-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -8px;
}

.collection-item {
    width: 33.333%;
    padding: 8px;
}

@media (max-width: 768px) {
    .collection-item {
        width: 50%;
    }
}

.collection-card {
    border: 1px solid #e4e4e5;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: all 0.3s;
}

.collection-card:hover {
    transform: scale(1.05);
}

.collection-card:hover h3 {
    color: #D39B2C;
}
.collection-image {
    position: relative;
    height: 308px;
    background-color: #f8fafc;
    /* 添加移动端响应式 */
}

/* 确保图片容器内的图片自适应 */
.collection-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持图片比例并覆盖容器 */
    object-position: center; /* 图片居中显示 */
}

/* 移动端适配 */
@media (max-width: 768px) {
    .collection-image {
        height: 200px; /* 移动端减小高度 */
    }
}

@media (max-width: 480px) {
    .collection-image {
        height: 150px; /* 小屏幕进一步减小高度 */
    }
}
.collection-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.collection-info {
    padding: 16px;
    text-align: center;
}

.collection-title {
    font-size: inherit;
    font-weight: inherit;
    /* font-size: 18px; */
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    /* white-space: nowrap; */

}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 32px 0;
    list-style: none;
}

.pagination-item {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
}

.pagination-item.active {
    background-color: #F6C462;
    color: white;
}

.pagination-item a {
    text-decoration: none;
    color: inherit;
    padding: 0 12px;
}

/* 页脚样式 */
footer {
    background-color: #F6C462;
    color: white;
}

.footer-nav {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 60px;
    font-weight: 500;
}

.footer-links a {
    color: white;
    text-decoration: none;
}

.footer-content {
    padding: 40px 0;
    display: flex;
}

.footer-info {
    flex: 1;
}

.footer-qrcodes {
    display: flex;
    justify-content: center;
    text-align: center;
}

.qrcode {
    margin: 0 24px;
}

.qrcode-image {
    width: 112px;
    height: 112px;
    margin: 0 auto 8px;
    background: #E1B257;
    border-radius: 4px;
    overflow: hidden;
}

.qrcode-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 响应式 */
@media (max-width: 1024px) {
    .nav-main {
        height: 50px;
    }

    .nav-link {
        padding: 0 8px;
        font-size: 13px;
    }

    .search-input {
        width: 160px;
    }

    main {
        margin-top: 95px;
    }
}

@media (max-width: 768px) {
    .header-bottom {
        display: none;
    }

    main {
        margin-top: 55px;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-qrcodes {
        margin-top: 24px;
        flex-direction: column;
        gap: 24px;
    }
}
