/* 微信浏览器兼容性修复 */

/* 修复产品下拉菜单在微信浏览器中的显示问题 */
.watch-options-dropdown {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: white !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    z-index: 9999 !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* 确保下拉选项可点击 */
.watch-option {
    display: flex !important;
    align-items: center !important;
    padding: 12px !important;
    cursor: pointer !important;
    border-bottom: 1px solid #f0f0f0 !important;
    transition: background-color 0.2s ease !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1) !important;
}

.watch-option:hover,
.watch-option:active {
    background-color: #f8f9fa !important;
}

.watch-option:last-child {
    border-bottom: none !important;
}

/* 修复图片显示 */
.watch-option-img {
    width: 60px !important;
    height: 60px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    margin-right: 12px !important;
}

.watch-option-info {
    flex: 1 !important;
}

.watch-option-info h6 {
    margin: 0 0 4px 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
}

.watch-option-info p {
    margin: 0 !important;
    font-size: 12px !important;
    color: #666 !important;
    line-height: 1.4 !important;
}

/* 修复产品切换按钮 */
.category-item {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1) !important;
    touch-action: manipulation !important;
}

/* 微信浏览器特定修复 */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .watch-options-dropdown {
        -webkit-transform: translateZ(0) !important;
        transform: translateZ(0) !important;
    }
    
    .watch-option {
        -webkit-transform: translateZ(0) !important;
        transform: translateZ(0) !important;
    }
}

/* 强制显示下拉菜单的修复 */
.watch-options-dropdown[style*="display: none"] {
    display: none !important;
}

.watch-options-dropdown[style*="display: block"],
.watch-options-dropdown.show {
    display: block !important;
}

/* 修复触摸滚动 */
.watch-options-dropdown {
    -webkit-overflow-scrolling: touch !important;
    overflow-scrolling: touch !important;
}

/* 修复Bootstrap模态框在微信中的问题 */
.modal {
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
}

.modal-dialog {
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
}

/* 修复轮播图在微信中的问题 */
.carousel-item {
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
}

/* 修复按钮点击问题 */
button, .btn, [onclick] {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1) !important;
    touch-action: manipulation !important;
    cursor: pointer !important;
}

/* 修复产品指示器 */
.product-indicators .indicator {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1) !important;
    touch-action: manipulation !important;
    cursor: pointer !important;
}