/**
 * 产品详情页缩略图导航样式
 */

/* 缩略图容器 */
.gallery-thumbs-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

/* 缩略图滚动容器 */
.gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 5px 0;
    flex: 1;
}

/* 隐藏滚动条但保持功能 */
.gallery-thumbs::-webkit-scrollbar {
    display: none;
}

.gallery-thumbs {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 缩略图项 */
.thumb-item {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.thumb-item:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.thumb-item.active {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 缩略图箭头按钮 */
.gallery-thumb-arrow {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f5f5f5;
    border: 1px solid #ccc;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #666;
    font-size: 12px;
    z-index: 10;
}

/* 箭头显示状态 */
.gallery-thumb-arrow.show {
    display: flex !important;
}

.gallery-thumb-arrow:hover {
    background: #e0e0e0;
    border-color: #999;
    color: #333;
}

.gallery-thumb-arrow:active {
    transform: scale(0.9);
}

/* 箭头禁用状态 */
.gallery-thumb-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gallery-thumb-arrow.disabled:hover {
    background: #f5f5f5;
    color: #666;
    border-color: #ccc;
    transform: none;
}

.gallery-thumb-prev {
    margin-right: 5px;
}

.gallery-thumb-next {
    margin-left: 5px;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .gallery-thumbs-wrapper {
        gap: 8px;
    }
    
    .gallery-thumbs {
        gap: 8px;
    }
    
    .thumb-item {
        width: 60px;
        height: 60px;
    }
    
    /* 移动端隐藏箭头，使用触摸滑动 */
    .gallery-thumb-arrow {
        display: none !important;
    }
}

@media screen and (min-width: 769px) {
    /* 桌面端：当缩略图数量少于等于4个时隐藏箭头 */
    .gallery-thumbs-wrapper.few-items .gallery-thumb-arrow {
        display: none;
    }
}
