/**
 * Brands A-Z Page Styles
 * 品牌字母索引页面样式
 */

/* 页面容器 */
.brands-page-wrapper {
    padding: 60px 0;
    background-color: #ffffff;
}

.brands-page-wrapper .container {
    max-width: 1640px;
    margin: 0 auto;
    padding: 0 30px;
}

/* 字母导航 */
.brands-alphabet-nav {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 30px;
    margin-bottom: 50px;
    padding-bottom: 0;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

.alphabet-btn {
    padding: 12px 0;
    background-color: transparent;
    border: none;
    color: #666666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: 'Arial Regular', Arial, sans-serif;
    position: relative;
}

.alphabet-btn::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background-color: #1b5326;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.alphabet-btn:hover {
    color: #1b5326;
}

.alphabet-btn.active {
    color: #1b5326;
    font-weight: 600;
}

.alphabet-btn.active::after {
    transform: scaleX(1);
}

/* 左右布局 */
.brands-content-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
}

/* 左侧边栏 */
.brands-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 搜索框容器 */
.brands-search-wrapper {
    position: relative;
}

/* 搜索框 */
.brands-search-box {
    display: flex;
    border: 1px solid #cccccc;
    overflow: hidden;
    background-color: #ffffff;
    transition: border-color 0.3s ease;
}

.brands-search-box.active {
    border-color: #1b5326;
}

.brands-search-input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    outline: none;
    font-size: 14px;
    font-family: 'Arial Regular', Arial, sans-serif;
}

.brands-search-input::placeholder {
    color: #999999;
}

.brands-search-btn {
    padding: 12px 20px;
    background-color: #1b5326;
    border: none;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.brands-search-btn:hover {
    background-color: #8f7556;
}

.brands-search-btn i {
    font-size: 16px;
}

/* 搜索结果下拉列表 */
.brands-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid #cccccc;
    border-top: none;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.brands-search-results.active {
    display: block;
}

.brands-search-result-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    font-family: 'Arial Regular', Arial, sans-serif;
    color: #333333;
}

.brands-search-result-item:last-child {
    border-bottom: none;
}

.brands-search-result-item:hover {
    background-color: #f5f5f5;
}

.brands-search-result-item strong {
    color: #1b5326;
    font-weight: 600;
}

.brands-search-no-results {
    padding: 20px 15px;
    text-align: center;
    color: #999999;
    font-size: 14px;
    font-family: 'Arial Regular', Arial, sans-serif;
}

/* 广告位 */
.brands-ad-block {
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
}

.brands-ad-link {
    display: block;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

/* 图片容器 */
.brands-ad-image-wrapper {
    position: relative;
    padding-bottom: 120%;
    overflow: hidden;
}

.brands-ad-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

/* 悬停时图片放大 */
.brands-ad-link:hover .brands-ad-image-wrapper img {
    transform: scale(1.1);
}

/* 渐变遮罩层 */
.brands-ad-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    padding: 30px 20px 20px;
    transition: opacity 0.4s ease, background 0.4s ease;
    z-index: 2;
}

/* 悬停时渐变消失 */
.brands-ad-link:hover .brands-ad-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 50%, transparent 100%);
}

/* 文案内容 */
.brands-ad-content {
    position: relative;
    transform: translateY(0);
    transition: transform 0.4s ease;
}

/* 悬停时文案上浮 */
.brands-ad-link:hover .brands-ad-content {
    transform: translateY(-15px);
}

/* 标题 */
.brands-ad-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.3;
    font-family: 'Arial Regular', Arial, sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 描述 */
.brands-ad-desc {
    color: #ffffff;
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
    font-family: 'Arial Regular', Arial, sans-serif;
    opacity: 0.95;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 右侧品牌列表 */
.brands-list-main {
    min-height: 600px;
}

/* 品牌列表容器 - 4列网格 */
#brandsListContainer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px 30px;
}

/* 品牌字母分组 */
.brands-letter-group {
    display: flex;
    flex-direction: column;
}

.brands-letter-group.hidden {
    display: none;
}

.brands-letter-title {
    font-size: 24px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 20px;
    padding-bottom: 12px;
    font-family: 'Arial Regular', Arial, sans-serif;
}

/* 品牌列表 - 垂直排列 */
.brands-letter-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.brand-item {
    padding: 0;
}

.brand-item.hidden {
    display: none;
}

.brand-item a {
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    display: inline-block;
    font-family: 'Arial Regular', Arial, sans-serif;
    line-height: 1.5;
}

.brand-item a:hover {
    color: #1b5326;
    text-decoration: underline;
}

/* 无品牌消息 */
.no-brands-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999999;
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .brands-content-layout {
        grid-template-columns: 280px 1fr;
        gap: 30px;
    }

    #brandsListContainer {
        grid-template-columns: repeat(3, 1fr);
        gap: 35px 25px;
    }
}

@media (max-width: 992px) {
    .brands-alphabet-nav {
        gap: 20px;
        flex-wrap: wrap;
    }

    .alphabet-btn {
        padding: 10px 0;
        font-size: 13px;
    }

    .brands-content-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .brands-sidebar {
        order: 2;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .brands-list-main {
        order: 1;
    }

    #brandsListContainer {
        grid-template-columns: repeat(3, 1fr);
        gap: 35px 20px;
    }
}

@media (max-width: 768px) {
    .brands-page-wrapper {
        padding: 40px 0;
    }

    .brands-page-wrapper .container {
        padding: 0 15px;
    }

    .brands-alphabet-nav {
        gap: 15px;
        margin-bottom: 30px;
    }

    .alphabet-btn {
        padding: 8px 0;
        font-size: 12px;
    }

    .brands-sidebar {
        grid-template-columns: 1fr;
    }

    #brandsListContainer {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 15px;
    }

    .brands-letter-title {
        font-size: 20px;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }

    .brand-item a {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .brands-alphabet-nav {
        gap: 10px;
    }

    .alphabet-btn {
        padding: 6px 0;
        font-size: 11px;
    }

    #brandsListContainer {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .brands-letter-title {
        font-size: 18px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
}

