/**
 * 推荐商家模块样式
 * 依赖：style.css（前端主样式）、admin.css（后台主样式）
 */

/* ========== 公共 ========== */
.merchant-page-banner {
    background: linear-gradient(135deg, #0831CB 0%, #062A9E 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}
.merchant-page-banner h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 10px;
}
.merchant-page-banner p {
    font-size: 15px;
    opacity: .8;
    margin: 0;
}

/* ========== 列表页 ========== */
.merchant-search-bar {
    max-width: 600px;
    margin: 0 auto 30px;
}
.merchant-search-bar .input-group {
    display: flex;
    gap: 0;
}
.merchant-search-bar .form-control {
    flex: 1;
    border-radius: 8px 0 0 8px;
    border-right: none;
}
.merchant-search-bar .btn {
    border-radius: 0 8px 8px 0;
    white-space: nowrap;
}

.merchant-cat-tabs {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.merchant-cat-tabs .btn {
    border-radius: 20px;
    font-size: 13px;
    padding: 6px 18px;
}

/* 商家卡片 */
.merchant-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    transition: all .3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.merchant-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,.12);
}
.merchant-card-logo {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
    overflow: hidden;
}
.merchant-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
}
.merchant-card-logo .bi {
    font-size: 48px;
    color: #94A3B8;
}
.merchant-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.merchant-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1E293B;
    margin: 0 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}
.merchant-badge-recommend {
    background: #F59E0B;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    flex-shrink: 0;
}
.merchant-card-cat {
    display: inline-block;
    background: #EFF6FF;
    color: #0831CB;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 8px;
}
.merchant-card-summary {
    font-size: 13px;
    color: #64748B;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 8px;
    flex: 1;
}
.merchant-card-phone {
    font-size: 12px;
    color: #94A3B8;
    margin: 4px 0 0;
}
.merchant-card-phone .bi {
    color: #0831CB;
}

/* 空状态 */
.merchant-empty {
    text-align: center;
    padding: 60px 20px;
}
.merchant-empty .bi {
    font-size: 48px;
    color: #CBD5E1;
}
.merchant-empty p {
    color: #94A3B8;
    margin-top: 15px;
}

/* 入驻按钮 */
.merchant-apply-section {
    text-align: center;
    margin-top: 40px;
}
.merchant-apply-section .btn {
    border-radius: 25px;
    padding: 12px 40px;
    font-size: 15px;
}

/* ========== 详情页 ========== */
.merchant-detail-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    margin-bottom: 24px;
}
.merchant-detail-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
}
.merchant-detail-avatar {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: center;
}
.merchant-detail-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}
.merchant-detail-avatar .bi {
    font-size: 48px;
    color: #94A3B8;
}
.merchant-detail-name {
    font-size: 24px;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.merchant-badge-recommend-lg {
    background: #F59E0B;
    color: #fff;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 500;
}
.merchant-detail-cat {
    display: inline-block;
    background: #EFF6FF;
    color: #0831CB;
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 10px;
}
.merchant-detail-services {
    color: #64748B;
    font-size: 14px;
    margin: 8px 0;
}
.merchant-detail-services .bi {
    color: #0831CB;
}

/* 联系方式网格 */
.merchant-contact-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 16px 0;
    border-top: 1px solid #F1F5F9;
    border-bottom: 1px solid #F1F5F9;
    margin-bottom: 24px;
}
.merchant-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.merchant-contact-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #EFF6FF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.merchant-contact-icon .bi {
    color: #0831CB;
}
.merchant-contact-label {
    font-size: 12px;
    color: #94A3B8;
}
.merchant-contact-value {
    font-size: 14px;
    font-weight: 600;
    color: #1E293B;
}

/* 详情区块标题 */
.merchant-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 3px solid #0831CB;
}
.merchant-section-content {
    color: #475569;
    line-height: 1.8;
    font-size: 14px;
}

/* 侧边栏 */
.merchant-sidebar-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    margin-bottom: 20px;
}
.merchant-sidebar-title {
    font-size: 15px;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 15px;
}
.merchant-sidebar-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.merchant-sidebar-info-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #F8FAFC;
    font-size: 13px;
}
.merchant-sidebar-info-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.merchant-sidebar-info-list .label {
    color: #94A3B8;
}
.merchant-sidebar-info-list .value {
    font-weight: 600;
    color: #1E293B;
}
.merchant-sidebar-info-list .value.text-success {
    color: #10B981;
}
.merchant-sidebar-actions .btn {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 10px;
}
.merchant-sidebar-actions .btn:last-child {
    margin-bottom: 0;
}

/* ========== 入驻申请页 ========== */
.merchant-steps {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.merchant-step {
    flex: 1;
    min-width: 180px;
    text-align: center;
    padding: 20px;
    background: #F8FAFC;
    border-radius: 10px;
}
.merchant-step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #0831CB;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-weight: 700;
    font-size: 18px;
}
.merchant-step-title {
    font-size: 15px;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 8px;
}
.merchant-step-desc {
    font-size: 13px;
    color: #94A3B8;
    margin: 0;
}

/* 入驻须知正文 */
.merchant-notice {
    color: #475569;
    line-height: 1.8;
    font-size: 14px;
}
.merchant-notice h4 {
    font-size: 15px;
    color: #1E293B;
    margin: 20px 0 10px;
}
.merchant-notice ul {
    padding-left: 20px;
}
.merchant-notice strong {
    color: #0831CB;
}

/* 申请表单 */
.merchant-apply-form .form-group {
    margin-bottom: 16px;
}
.merchant-apply-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}
.merchant-apply-form label .required {
    color: #EF4444;
}
.merchant-apply-form .form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color .2s;
}
.merchant-apply-form .form-control:focus {
    border-color: #0831CB;
    outline: none;
    box-shadow: 0 0 0 3px rgba(8,49,203,.1);
}
.merchant-apply-form .form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
}
.merchant-apply-form .form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0831CB;
}

/* 成功提示 */
.merchant-alert-success {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #166534;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.merchant-alert-error {
    background: #FFF2F0;
    border: 1px solid #FFCCC7;
    color: #CF1322;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* 入驻形式选择 */
.merchant-apply-types {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.merchant-apply-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 12px;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
    background: #fff;
}
.merchant-apply-type input {
    display: none;
}
.merchant-apply-type.active,
.merchant-apply-type:hover {
    border-color: #0831CB;
    background: #EFF6FF;
}
.merchant-apply-type-label {
    font-size: 15px;
    font-weight: 700;
    color: #1E293B;
}
.merchant-apply-type-price {
    font-size: 13px;
    color: #0831CB;
    font-weight: 600;
}

/* 入驻支付 */
.merchant-pay-card {
    padding: 36px 28px;
}
.merchant-pay-amount {
    font-size: 32px;
    font-weight: 700;
    color: #D97706;
    margin-bottom: 8px;
}
.merchant-wechat-pay-box {
    margin-top: 20px;
    padding: 20px;
    background: #F8FAFC;
    border-radius: 10px;
}
.merchant-wechat-qrcode {
    width: 220px;
    height: 220px;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    background: #fff;
}

@media (max-width: 768px) {
    .merchant-apply-types {
        grid-template-columns: 1fr;
    }
}

/* ========== 后台管理 ========== */
.merchant-admin-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
    margin-bottom: 20px;
}
.merchant-admin-table .merchant-logo-cell {
    width: 60px;
}
.merchant-admin-table .merchant-logo-cell img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 6px;
    background: #F1F5F9;
    padding: 4px;
}
.merchant-admin-table .status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}
.merchant-admin-table .status-badge.active {
    background: #F0FDF4;
    color: #16A34A;
}
.merchant-admin-table .status-badge.inactive {
    background: #FEF2F2;
    color: #DC2626;
}

/* ========== 响应式 ========== */
@media (max-width: 767.98px) {
    .merchant-page-banner {
        padding: 40px 0;
    }
    .merchant-page-banner h1 {
        font-size: 24px;
    }
    .merchant-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .merchant-detail-name {
        justify-content: center;
    }
    .merchant-contact-grid {
        flex-direction: column;
    }
    .merchant-steps {
        flex-direction: column;
    }
}
