
/* CSS 变量定义  ----------材料3类 */
:root {
    --primary-color: #0f403f;
    --light-bg: #ffffff;
    --text-color-default: #0f403f;
    --text-color-hover: #ffffff;
    --background-color: #f5f5f5; /* 页面背景色 */
}

/* 整体容器样式 */
.collection-section {
    background-color: var(--background-color);
    padding: 50px 0;
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    text-align: center;
}

/* 头部内容样式 */
.header-content {
    max-width: 1400px;
    margin: 0 auto 50px;
    padding: 0 20px;
}

.main-title {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 16px;
    line-height: 1.6;
    color: #0f403f;
}

/* 图片网格布局 */
.collections-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3x3 布局 */
    gap: 20px; /* 网格间距 */
    padding: 0 20px;
}

/* 单个图片卡片容器 */
.collection-card {
    position: relative;
    overflow: hidden;
    /* 移除 border-radius, 因为描述部分不需要 */
    /* border-radius: 5px; */
    
    /* 调整 card 本身的对齐方式，让描述文本居中对齐网格 */
    text-align: left; /* **核心修改：确保卡片内部内容左对齐** */
}

/* 图片容器，用于保持宽高比 */
.image-container {
    width: 100%;
    position: relative; /* 用于 name-overlay 的定位参考 */
    overflow: hidden; /* 用于图片放大效果 */
    border-radius: 5px; /* 图片本身添加圆角 */
}

/* 图片样式 */
.collection-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

/* 鼠标悬停时图片轻微放大 */
.collection-card:hover .collection-img {
    transform: scale(1.05);
}

/* 底部名称覆盖层 (可点击链接) */
.name-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px 10px;
    
    background-color: rgba(255, 255, 255, 0.5);
    
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease;
    z-index: 10;
    cursor: pointer;
}

/* 底部名称文本 */
.category-name {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-color-default);
    transition: color 0.3s ease;
    display: block;
}

/* 鼠标悬停效果：改变背景和文字颜色 */
.name-overlay:hover {
    background-color: var(--primary-color);
}

.name-overlay:hover .category-name {
    color: var(--text-color-hover);
}

/* **新增：描述文本框样式** */
.description-box {
    padding: 15px 0 0; /* 在图片下方增加间距 */
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    text-align: left; /* **核心要求：左对齐** */
    width: 100%; /* **使其宽度与图片容器保持一致** */
}

/* 响应式调整 */
@media (max-width: 992px) {
    .collections-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .collections-grid {
        grid-template-columns: 1fr;
    }
}
