/* 商家详情页样式 */
.merchant-detail-page {
    min-height: 500px;
    padding-top: 20px;
    padding-bottom: 50px;
}

/* 面包屑导航 */
.breadcrumb {
    padding: 15px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
    margin: 0 5px;
}

.breadcrumb a:hover {
    color: #ff6b6b;
}

.breadcrumb span {
    color: #ff6b6b;
    margin-left: 5px;
}

/* 商家头部卡片 */
.merchant-header-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.merchant-header-left {
    text-align: center;
    padding: 20px 0;
}

.merchant-logo-wrapper {
    margin-bottom: 20px;
}

.merchant-logo {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.default-logo {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    margin: 0 auto;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.merchant-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.merchant-badges .layui-badge {
    border-radius: 12px;
    padding: 4px 12px;
    font-size: 12px;
}

.recommend-badge {
    background: linear-gradient(135deg, #ffa726, #ff9800) !important;
}

/* 商家头部信息 */
.merchant-header-info {
    padding: 20px 10px;
}

.merchant-name {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
}

/* 商家统计数据 */
.merchant-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.stat-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.stat-value i {
    margin-right: 8px;
    color: #ff6b6b;
}

.score-value.high-score {
    color: #ff6b6b;
}

.score-value.medium-score {
    color: #ff9900;
}

.score-value.low-score {
    color: #999;
}

/* 商家地址 */
.merchant-address {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.address-line {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.address-line i {
    color: #ff6b6b;
    margin-right: 8px;
    font-size: 16px;
}

.address-line .region {
    font-weight: 500;
    color: #333;
}

.address-detail {
    color: #666;
    font-size: 14px;
    padding-left: 24px;
}

/* 商家描述卡片 */
.merchant-description-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.merchant-description-card .layui-card-header {
    background: #f8f9fa;
    font-weight: 600;
    border-bottom: 1px solid #eee;
}

.description-content {
    line-height: 1.8;
    color: #444;
    font-size: 15px;
}

.description-content p {
    margin-bottom: 10px;
}

/* 商家商品卡片 */
.merchant-goods-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.merchant-goods-card .layui-card-header {
    background: #f8f9fa;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.more-link {
    font-size: 14px;
    color: #ff6b6b;
    text-decoration: none;
    font-weight: normal;
}

.more-link:hover {
    text-decoration: underline;
}

/* 商品列表 */
.goods-list {
    margin-top: 10px;
}

.goods-item {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    height: 100%;
}

.goods-item:hover {
    border-color: #ff6b6b;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.15);
    transform: translateY(-2px);
}

.goods-link {
    display: block;
    text-decoration: none;
    color: #333;
}

.goods-image {
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background: #f8f9fa;
    overflow: hidden;
}

.goods-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.goods-item:hover .goods-img {
    transform: scale(1.05);
}

.default-goods-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 40px;
}

.goods-info {
    padding: 12px;
}

.goods-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.goods-price {
    margin-bottom: 8px;
}

.current-price {
    font-size: 18px;
    color: #ff6b6b;
    font-weight: 600;
}

.original-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    margin-left: 5px;
}

.goods-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

/* 空商品状态 */
.empty-goods {
    padding: 40px 20px;
    color: #999;
}

.empty-goods i {
    margin-bottom: 10px;
}

/* 商家操作卡片 */
.merchant-action-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.merchant-action-card .layui-card-header {
    background: #f8f9fa;
    font-weight: 600;
    border-bottom: 1px solid #eee;
}

.action-buttons {
    padding: 5px 0;
}

.action-buttons .layui-btn {
    border-radius: 6px;
    height: 44px;
    line-height: 44px;
    font-size: 15px;
}

.action-buttons .layui-btn i {
    margin-right: 8px;
}

.collect-btn.collected {
    background: #ffa726 !important;
    border-color: #ffa726 !important;
}

/* 其他商家卡片 */
.other-merchants-card,
.merchant-cert-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.other-merchants-card .layui-card-header,
.merchant-cert-card .layui-card-header {
    background: #f8f9fa;
    font-weight: 600;
    border-bottom: 1px solid #eee;
}

.other-merchants-list {
    max-height: 400px;
    overflow-y: auto;
}

.other-merchant-item {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.other-merchant-item:last-child {
    border-bottom: none;
}

.merchant-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.merchant-link:hover {
    transform: translateX(5px);
}

.merchant-avatar {
    margin-right: 12px;
    flex-shrink: 0;
}

.avatar-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.default-avatar {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: linear-gradient(135deg, #66bb6a, #4caf50);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

.merchant-info {
    flex: 1;
    min-width: 0;
}

.merchant-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.merchant-score {
    font-size: 12px;
    color: #ff9900;
}

.score-text {
    color: #666;
}

/* 商家资质卡片 */
.cert-list {
    padding: 5px 0;
}

.cert-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cert-item:last-child {
    border-bottom: none;
}

.cert-item i {
    color: #4caf50;
    margin-right: 10px;
    font-size: 16px;
}

.cert-item span {
    color: #666;
    font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .merchant-logo {
        width: 100px;
        height: 100px;
    }
    
    .default-logo {
        width: 100px;
        height: 100px;
        font-size: 24px;
    }
    
    .merchant-name {
        font-size: 20px;
    }
    
    .merchant-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-value {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .merchant-header-left {
        padding: 15px 0;
    }
    
    .merchant-logo {
        width: 80px;
        height: 80px;
    }
    
    .default-logo {
        width: 80px;
        height: 80px;
        font-size: 20px;
    }
    
    .merchant-name {
        font-size: 18px;
    }
    
    .merchant-stats {
        grid-template-columns: 1fr;
    }
}