/* =============================================
   FG16 原有样式（全局筛选器，完整保留）
   ============================================= */
.ymm-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.ymm-filter-container select {
    padding: 8px 12px;
    min-width: 150px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.ymm-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.ymm-no-products, .ymm-loading {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
}
.ymm-loading::before {
    content: "⏳ ";
}

/* 未选择时占位符灰色（品牌以外的下拉框） */
.ymm-filter-container .ymm-placeholder-gray {
    color: #999;
}

/* 品牌下拉框永远黑色：用更高优先级覆盖灰色 */
#ymm-make {
    color: #000;
}

/* 下拉框内的选项始终黑色 */
.ymm-filter-container select option {
    color: #000;
}

/* =============================================
   FG17 新增样式（产品页弹窗 + 触发器）
   ============================================= */

/* 触发器区域 */
.ymm-fitment-trigger {
    background: #f8f8f8;
    padding: 12px 15px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    margin: 15px 0;
    flex-wrap: wrap;
}
.ymm-fitment-count {
    color: #333;
}
.ymm-fitment-view {
    color: #007cba;
    font-weight: bold;
    margin-left: auto;
}
.ymm-fitment-view:hover {
    text-decoration: underline;
}

/* 通用配件 */
.ymm-fitment-summary {
    margin: 15px 0;
    padding: 10px 12px;
    background: #f0f8ff;
    border-radius: 4px;
}

/* 弹窗遮罩 */
.ymm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    overflow-y: auto;
}

/* 弹窗内容 */
.ymm-modal-content {
    background: #fff;
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* 关闭按钮 */
.ymm-modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    color: #666;
}
.ymm-modal-close:hover {
    color: #000;
}

/* 级联筛选区域 */
.ymm-modal-filters {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ymm-modal-filters select {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 140px;
}

/* 加载状态 */
.ymm-modal-loading {
    text-align: center;
    padding: 30px;
    color: #666;
}

/* 表格滚动容器 */
.ymm-table-scroll {
    max-height: 400px;
    overflow: auto;
    margin-bottom: 10px;
}

/* 弹窗表格 */
.ymm-modal-table {
    width: 100%;
    border-collapse: collapse;
}
.ymm-modal-table th,
.ymm-modal-table td {
    border: 1px solid #ddd;
    padding: 8px;
    font-size: 14px;
    text-align: left;
}
.ymm-modal-table th {
    background: #f2f2f2;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* 分页 */
.ymm-pagination {
    margin-top: 15px;
    text-align: center;
}
.ymm-pagination button {
    margin: 0 5px;
    padding: 5px 12px;
    cursor: pointer;
}
.ymm-page-btn {
    background: #007cba;
    color: #fff;
    border: none;
    border-radius: 3px;
}
.ymm-page-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* 空结果提示 */
#ymm-modal-empty {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .ymm-modal-content {
        margin: 10px;
        padding: 15px;
    }
    .ymm-modal-filters select {
        width: 100%;
    }
    .ymm-modal-table th,
    .ymm-modal-table td {
        padding: 6px;
        font-size: 13px;
    }
    .ymm-fitment-trigger {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .ymm-fitment-view {
        margin-left: 0;
    }
}