/* 通用样式 */
.custom-select-container {
    width: 100%;
    max-width: 400px;
    margin: 5px 0;
}

/* 下拉选项容器 - 统一样式，无分组 */
.custom-select-options {
    width: 400px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: none;
    z-index: 1000;
    padding: 8px 0;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
}

.custom-select-options.open {
    display: block;
}

/* 下拉选项样式 */
.custom-select-option {
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    border-bottom: 1px solid #f5f5f5;
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover {
    background-color: #e6f7ff;
    color: rgb(8, 84, 220);
}

.custom-select-option.selected {
    background-color: #e6f7ff;
    color: rgb(8, 84, 220);
    font-weight: 500;
}

/* 标签样式 */
.discount-tag {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    background-color: #ff4d4f;
    color: white;
    font-size: 10px;
    padding: 1px 4px;
    font-weight: bold;
}

/* 选中值显示框 */
.custom-select-display {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    cursor: pointer;
    background-color: #fff;
    position: relative;
    padding-right: 30px;
}

.custom-select-display::after {
    content: '▼';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #666;
}

.custom-select-container.open .custom-select-display::after {
    transform: translateY(-50%) rotate(180deg);
}

/* 商品卡片样式 */
.product-card {
    border: 1px solid #e8e8e8;
    padding: 16px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
    position: relative;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: rgb(8, 84, 220);
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.product-name {
    margin: 0;
    font-size: 16px;
    color: #1f2937;
}

.product-type {
    font-size: 12px;
    color: #666;
    background-color: #f5f5f5;
    padding: 2px 8px;
}

.product-description {
    margin-bottom: 12px;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
    max-height: 120px;
    overflow-y: auto;
    background-color: #f9f9f9;
    padding: 8px;
}

.product-description pre {
    white-space: pre-wrap;
    margin: 0;
    font-family: inherit;
}

.product-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 14px;
}

.product-price, .setup-fee, .stock-info {
    display: flex;
    align-items: center;
}

.price-label, .fee-label, .stock-label {
    color: #666;
    margin-right: 4px;
    min-width: 60px;
}

.price-value {
    color: #ff4d4f;
    font-weight: 600;
}

.price-cycle {
    color: #999;
    margin-left: 4px;
    font-size: 12px;
}

.product-actions {
    text-align: right;
}

.view-detail-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: rgb(8, 84, 220);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.view-detail-btn:hover {
    background-color: rgb(8, 84, 220);
}

.btn-arrow {
    font-size: 12px;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.view-detail-btn:hover .btn-arrow {
    transform: translateX(4px);
}

.trial-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: #52c41a;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
}

/* 提示文本 */
.filter-prompt, .no-products {
    text-align: center;
    padding: 40px 0;
    color: #666;
    font-size: 16px;
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 状态样式 */
.hidden {
    display: none !important;
}

.loading-state {
    text-align: center;
    padding: 60px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid rgb(8, 84, 220);
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-state {
    text-align: center;
    padding: 60px 0;
}

.retry-button {
    margin-top: 16px;
    padding: 8px 16px;
    background-color: rgb(8, 84, 220);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-button:hover {
    background-color: rgb(8, 84, 220);
}

.empty-state {
    text-align: center;
    padding: 60px 0;
    color: #666;
}

/* 筛选器布局 - 分排显示核心样式 */
.filter-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.filter-row {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
}

.region-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #ff4d4f;
    font-weight: bold;
}
.zone-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #faad14;
    font-weight: bold;
}

.cycle-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
    font-weight: bold;
}

.billing-cycle-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 5px 0;
    align-items: center;
}

.cycle-button {
    padding: 8px 16px;
    border: 1px solid #d9d9d9;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.cycle-button.active {
    background-color: rgb(8, 84, 220);
    color: white;
    border-color: rgb(8, 84, 220);
}

.cycle-button:hover:not(.active) {
    border-color: rgb(8, 84, 220);
    color: rgb(8, 84, 220);
}

.filter-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background-color: #e6f7ff;
    border: 1px solid #91d5ff;
    font-size: 13px;
    color: rgb(8, 84, 220);
    margin-bottom: 24px;
    margin-top: 8px;
}

.tip-icon {
    width: 20px;
    height: 20px;
    background-color: rgb(8, 84, 220);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-style: italic;
}

/* 响应式适配 */
@media (min-width: 768px) 
{
    .custom-select-container {
        max-width: 500px;
    }
    .custom-select-options {
        width: 500px;
    }
}