/* ========================================
   品牌信息滚动条 - 优化版本
   使用Bootstrap工具类，减少自定义CSS
   ======================================== */

/* 主容器 - 使用Bootstrap类 */
.brand-scroll-showcase {
    background: #000000;
    height: 63px;
    position: relative;
    overflow: hidden;
    z-index: 2;
    /* 性能优化 */
    contain: layout style paint;
    transform: translateZ(0);
}

/* 滚动容器 - 使用Bootstrap flexbox */
.brand-scroll-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Bootstrap: d-flex align-items-center */
    display: flex;
    align-items: center;
    touch-action: pan-y;
}

/* 轨道容器 - 简化样式 */
.track-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    /* Bootstrap: d-flex align-items-center */
    display: flex;
    align-items: center;
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
}

.track-container:active,
.track-container.dragging {
    cursor: grabbing;
}

.track-container.dragging .brand-scroll-track {
    transition: none;
}

/* 滚动轨道 - 核心动画 */
.brand-scroll-track {
    /* Bootstrap: d-flex */
    display: flex;
    gap: 8px;
    width: max-content;
    cursor: grab;
    user-select: none;
    /* animation: scroll 100s linear infinite; 由JavaScript控制 */
    /* 性能优化 */
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.brand-scroll-track:active,
.brand-scroll-track.dragging {
    cursor: grabbing;
    animation-play-state: paused;
}

.brand-scroll-track:hover {
    animation-play-state: paused;
}

/* 品牌卡片 - 使用Bootstrap工具类 */
.brand-info-card {
    flex-shrink: 0;
    height: 45px;
    /* Bootstrap: rounded-pill px-4 py-2 d-flex align-items-center */
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    min-width: 200px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* SEO友好模式：品牌滚动项样式 */
.brand-scroll-item {
    flex-shrink: 0;
    height: 45px;
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    /* background: rgba(41, 40, 46, 0.4); */
    backdrop-filter: blur(10px);
    min-width: 200px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-right: 12px;
}

/* 清除品牌滚动链接的下划线 */
.brand-scroll-link {
    text-decoration: none !important;
    color: inherit;
    display: flex;
    align-items: center;
    width: 100%;
}

.brand-scroll-link:hover {
    text-decoration: none !important;
}

.brand-scroll-link:focus {
    text-decoration: none !important;
}

.brand-scroll-link:visited {
    text-decoration: none !important;
}

.brand-info-card:hover {
    background: rgba(41, 40, 46, 0.596);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.brand-scroll-item:hover {
    background: rgba(41, 40, 46, 0.596);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.brand-scroll-item:hover .brand-scroll-link-icon {
    color: rgba(255, 255, 255, 0.9);
    opacity: 1;
    transform: scale(1.1);
}

.brand-info-card:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.brand-scroll-item:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* 品牌按钮 - 使用Bootstrap样式 */
.brand-info-button {
    /* Bootstrap: btn btn-outline-light btn-sm me-2 */
    background: transparent;
    border: 1px solid #535353;
    border-radius: 15px;
    padding: 4px 12px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* 品牌文本 - 使用Bootstrap文本类 */
.brand-info-text {
    /* Bootstrap: text-white fs-6 flex-fill */
    color: #ffffff;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    flex: 1;
}

/* SEO友好模式：品牌滚动内容样式 */
.brand-scroll-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 8px;
}

.brand-scroll-button {
    background: transparent;
    border: 1px solid #535353;
    border-radius: 15px;
    color: #ffffff;
    padding: 7px 12px;
    
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    flex-shrink: 0;
    margin: 0;
    line-height: 1.3;
    vertical-align: middle;
}

.brand-scroll-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 400;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    line-height: 1.2;
    vertical-align: middle;
}

.brand-scroll-link-icon {
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    margin-left: 8px;
    transition: all 0.3s ease;
    opacity: 0.7;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* 链接图标 - 简化样式 */
.brand-info-link-icon {
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    margin-left: 8px;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.brand-info-card:hover .brand-info-link-icon {
    color: rgba(255, 255, 255, 0.9);
    opacity: 1;
    transform: scale(1.1);
}

/* 渐变遮罩 - 合并重复样式 */
.scroll-mask-left,
.scroll-mask-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 10;
    pointer-events: none;
}

.scroll-mask-left {
    left: 0;
    background: linear-gradient(to right, #000000, transparent);
}

.scroll-mask-right {
    right: 0;
    background: linear-gradient(to left, #000000, transparent);
}

/* 滚动动画 */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 导航栏同步状态 */
.brand-scroll-showcase.nav-scrolled {
    margin-top: 0;
    transition: margin-top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 响应式设计 - 合并断点 */
@media (max-width: 768px) {
    .brand-scroll-showcase { height: 50px; }
    .brand-info-card { 
        height: 40px; 
        padding: 6px 12px; 
        min-width: 180px; 
    }
    .brand-scroll-item { 
        height: 40px; 
        padding: 6px 12px; 
        min-width: 180px; 
        margin-right: 8px;
    }
    .brand-info-button { 
        padding: 3px 8px; 
        font-size: 11px; 
        margin-right: 6px; 
    }
    .brand-scroll-button { 
        padding: 3px 8px; 
        font-size: 11px; 
        margin-right: 6px; 
    }
    .brand-info-text { font-size: 11px; }
    .brand-scroll-text { font-size: 11px; }
    .brand-scroll-link-icon { font-size: 9px; margin-left: 6px; }
    .scroll-mask-left, .scroll-mask-right { width: 40px; }
}

@media (max-width: 480px) {
    .brand-scroll-showcase { height: 45px; }
    .brand-info-card { 
        height: 35px; 
        padding: 5px 10px; 
        min-width: 160px; 
    }
    .brand-scroll-item { 
        height: 35px; 
        padding: 5px 10px; 
        min-width: 160px; 
        margin-right: 6px;
    }
    .brand-info-button { 
        padding: 2px 6px; 
        font-size: 10px; 
        margin-right: 4px; 
    }
    .brand-scroll-button { 
        padding: 2px 6px; 
        font-size: 10px; 
        margin-right: 4px; 
    }
    .brand-info-text { font-size: 10px; }
    .brand-scroll-text { font-size: 10px; }
    .brand-scroll-link-icon { font-size: 8px; margin-left: 4px; }
    .scroll-mask-left, .scroll-mask-right { width: 30px; }
}
