/* frontend/assets/detail-normal.css */
.supplier-detail-container {
    max-width: 1366px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    color: #333;
    background: #fff;
}

/* 头部信息 */
.supplier-header {
    position: relative;
}

.supplier-banner {
    height: 300px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.supplier-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-placeholder {
    font-size: 24px;
    color: #999;
}

.supplier-basic-info {
    display: flex;
    padding: 30px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: -50px 30px 30px 30px;
    border-radius: 8px;
    position: relative;
    z-index: 2;
}

.logo-section {
    margin-right: 30px;
}

.supplier-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 8px;
}

.logo-placeholder {
    width: 120px;
    height: 120px;
    background: #0073aa;
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
}

.info-section h2 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 28px!important;
    font-weight: 500;
}

/* meta */
.supplier-meta {
    gap: 15px;
    margin-bottom: 10px;
}

.supplier-meta span {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.supplier-text{
    border-radius: 20px 0 0 20px;
    background: #dee2e6;
    padding: 5px 8px;
    font-size: 14px;
    font-weight: 500;
}
.region {
    background: #6f42c1;
    color: white;
    padding: 5px 10px 5px 5px;
    border-radius: 0 20px 20px 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 30px;
}
.level {
    background: #e9ecef;
    color: #495057;
}

.level.vip {
    background: #1e90ff;
    color: white;
}

.level.svip {
    background: #ffd700;
    color: #000;
}

.type {
    background: #28a745;
    color: white;
}

.type a{
    color: white;
}

.supplier-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: #f8f9fa;
    color: #495057;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 13px;
    border: 1px solid #dee2e6;
}

/* 内容区域 */
.supplier-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    padding: 0 30px 30px;
}

.content-sidebar {
    height: fit-content;
    position: sticky;
    top: 80px;
}

.content-sidebar h3 {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 20px!important;
    font-weight: 800;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

.basic-metrics{
    background: #f8f9fa; 
    margin-bottom: 20px;
    border-radius: 8px;
    padding: 20px 25px;
}
.metric-item {
    margin-bottom: 15px;
    font-size: 16px;    
}
.metric-item:last-child {
    margin-bottom: 0; 
}
.contact-info{
    background: #f8f9fa; 
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 20px;
}
.contact-item{
    margin-bottom: 15px;
    font-size: 16px;
}
.contact-item:last-child {
    margin-bottom: 0; 
}

.contact-item strong, .metric-item strong {
    display: block;
    color: #495057;
    margin-bottom: 3px;
}

.contact-item span, .metric-item span {
    color: #6c757d;
}

.contact-item a {
    color: #0073aa;
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.content-main h2 {
    color: #333;
    margin: 0 0 20px 0;
    font-size: 22px!important;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
    text-transform: capitalize;
}
.contact-restricted {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #6c757d;
}

.contact-restricted p {
    margin: 0 0 15px 0;
    font-size: 16px;
}

.contact-restricted i {
    margin-right: 8px;
    color: #ffc107;
}

.login-link, .upgrade-link {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.login-link:hover, .upgrade-link:hover {
    background: #005a87;
}

/* SVIP模板的特殊样式 */
.contact-restricted.premium {
    background: rgba(255,215,0,0.1);
    border: 1px solid rgba(255,215,0,0.3);
}

.login-link.premium, .upgrade-link.premium {
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    color: #000;
}

.login-link.premium:hover, .upgrade-link.premium:hover {
    background: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);
}
.company-description{
    margin-bottom: 20px;
}
.company-description p {
    line-height: 1.6;
    color: #555;
    font-size: 18px;
}
.product-lines{
    margin-bottom: 20px;
}

.category-group-list{
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 20px;
}

.category-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px; 
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-decoration: none;
}

.category-group h3 {
    background: #dee2e6;
    padding: 12px 15px;
    margin: 0 0 10px 0;
    border-radius: 8px 8px 0 0;
    font-size: 18px!important;
    font-weight: 600;
}

.category-group h3 a {
    color: #333;
    text-decoration: none;
}

.category-group ul {
    list-style: disc;
    padding-left: 10px;
}

.category-group li {
    margin-bottom: 8px;
}

.category-group a:hover {
    text-decoration: none;
    color: #007abc;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.product-tag {
    background: #0073aa;
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.custom-fields{
    background: #f8f9fa; 
    border-radius: 8px;
    padding: 20px 25px;
}
.custom-fields h3{
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 20px!important;
    font-weight: 800;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}
.custom-fields-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.custom-field-item {
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
}

.custom-field-item strong {
    display: block;
    color: #495057;
    margin-bottom: 5px;
}

.custom-field-item span {
    color: #6c757d;
    width: 100%;
    white-space: normal; 
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
}

.partner-item {
    text-align: center;
}

.partner-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
    border: 1px solid #eee;
    border-radius: 6px;
}

.partner-item span {
    font-size: 13px;
    color: #6c757d;
    display: block;
}

.products-placeholder {
    background: #f8f9fa;
    padding: 40px;
    text-align: center;
    border-radius: 8px;
    color: #6c757d;
    font-style: italic;
}

.service-regions-section {
    margin-bottom: 20px;
}

.service-regions-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.regions-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.region-tag {
    background: #dee2e6;    
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}
.region-tag:hover{
    background: #1e1e1e; 
}
.region-tag a {
    color: #000;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
}

.region-tag a:hover {
    color: #fff;
}

/* related-articles */
    .related-articles {
        margin: 40px 0;

    }
    
    .related-articles h2 {
        color: #333;
        margin: 0 0 20px 0;
        font-size: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid #dee2e6;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .related-articles.vip {
        background: rgba(30,144,255,0.05);
        border: 1px solid #1e90ff;
    }
    
    .related-articles.vip h2 {
        color: #1e90ff;
        border-bottom: 2px solid #1e90ff;
    }
    
    .related-articles.premium {
        background: rgba(255,255,255,0.95);
        border: 1px solid rgba(255,215,0,0.3);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .related-articles.premium h2 {
        color: #2c3e50;
        border-bottom: 2px solid #ffd700;
    }
    
    .sps-articles-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .sps-article-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;   
    }
    
    .sps-article-item:last-child {
        border-bottom: none;
    }
    
    .sps-article-title {
        flex: 1;
        text-decoration: none;
        font-size: 18px!important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-right: 15px;
    }
    .sps-article-title::before {
        content: "· ";
        font-weight: bold;

    }
    .sps-article-title:hover {
        text-decoration: underline;
    }
    
    .sps-article-date {
        color: #6c757d;
        font-size: 13px;
        white-space: nowrap;
    }

/* 视频容器样式 */
.supplier-video {
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
}

.supplier-video h2 {
    color: #333;
    margin: 0 0 20px 0;
    font-size: 22px!important;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

.supplier-video.vip h2 {
    color: #1e90ff;
    border-bottom: 2px solid #1e90ff;
}

.supplier-video.premium h2 {
    color: #2c3e50;
    border-bottom: 3px solid #ffd700;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-container.premium {
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* VIP模板特殊样式 */
.supplier-video.vip {
    background: rgba(30,144,255,0.1);
    border: 1px solid #1e90ff;
}

/* SVIP模板特殊样式 */
.supplier-video.premium {
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(255,215,0,0.3);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

/* 供应商相册样式 */
.supplier-gallery-section {
    margin: 40px 0;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.supplier-gallery-section h2 {
    color: #333;
    margin: 0 0 25px 0;
    font-size: 22px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gallery-main-viewer {
    text-align: center;
    margin-bottom: 20px;
}

.gallery-main-viewer img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background: white;
    padding: 10px;
}

.gallery-image-caption {
    margin-top: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.gallery-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.gallery-thumbnail {
    width: 100px;
    height: 100px;
    border: 3px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    padding: 3px;
}

.gallery-thumbnail:hover {
    border-color: #0073aa;
    transform: translateY(-3px);
}

.gallery-thumbnail.active {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.3);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-image-description {
    text-align: center;
    color: #555;
    font-size: 15px;
    line-height: 1.6;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .gallery-main-viewer img {
        max-height: 300px;
    }
    
    .gallery-thumbnail {
        width: 80px;
        height: 80px;
    }
    
    .gallery-thumbnails {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .gallery-main-viewer img {
        max-height: 250px;
    }
    
    .gallery-thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .gallery-image-caption {
        font-size: 16px;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .gallery-main-viewer img {
        max-height: 300px;
    }
    
    .gallery-thumbnail {
        width: 80px;
        height: 80px;
    }
    
    .gallery-thumbnails {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .gallery-main-viewer img {
        max-height: 250px;
    }
    
    .gallery-thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .gallery-image-caption {
        font-size: 16px;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .content-sidebar{
        order: 99; 
    }
    .supplier-basic-info {
        flex-direction: column;
        margin: -50px 15px 15px;
        padding: 20px;
        align-items: center;
    }
    
    .logo-section {
        margin-right: 0;
        margin-bottom: 20px;
    }
    .supplier-meta{
        display: flex;
        flex-direction: column;
    }
    
    .supplier-content {
        grid-template-columns: 1fr;
        padding: 0 15px 15px;
        gap: 20px;
    }
    
    .custom-fields-grid {
        grid-template-columns: 1fr;
    }
    
    .supplier-banner {
        height: 200px;
    }
}

@media (max-width: 480px) {
  /* 整体容器防止横向溢出 */
  .supplier-detail-container,
  .supplier-main-content {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  /* Banner 自适应，不要死撑宽度 */
  .supplier-banner {
    width: 100% !important;
    height: auto !important;
    min-height: 200px; /* 保持可视高度 */
    background-size: cover !important;
  }

  /* grid 和 flex 缩小间距 */
  .supplier-grid,
  .supplier-content {
    gap: 10px !important;
  }

  /* 标题、标签、meta 文本允许换行 */
  .sps-article-title,
  .download-meta,
  .supplier-sorting {
    white-space: normal !important;
  }

  /* 下载按钮和内容自适应 */
  .download-item,
  .download-btn {
    max-width: 100% !important;
    flex-wrap: wrap !important;
    box-sizing: border-box !important;
  }

  /* 图片类元素自适应缩放 */
  .partner-item img,
  .certification-image img,
  .sps-article-item img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }

  /* 弹窗缩小，避免撑爆 */
  .modal-content {
    width: 90% !important;
    max-width: 100% !important;
  }

  /* 卡片和 flex 子元素可换行 */
  .supplier-card,
  .sps-article-item {
    flex-wrap: wrap !important;
  }
  .category-group-list{
    display: grid;
    grid-template-columns: 1fr; 
    }
}

.supplier-products-section {
    margin: 40px 0;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.supplier-products-section h2 {
    color: #333;
    margin: 0 0 25px 0;
    font-size: 22px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 12px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 25px;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-color: #0073aa;
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-link:hover {
    text-decoration: none;
    color: inherit;
}

.product-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f8ff;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.product-image img {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
}

.product-placeholder {
    text-align: center;
    color: #999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.product-placeholder i {
    font-size: 48px;
    margin-bottom: 10px;
    color: #0073aa;
}

.product-info {
    padding: 20px;
}

.product-name {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    min-height: 45px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-name:hover {
    color: #0073aa;
}

.product-model, .product-moq {
    margin-bottom: 10px;
    font-size: 13px;
    color: #555;
}

.product-model strong, .product-moq strong {
    color: #333;
    font-weight: 600;
}

.view-all-products {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,115,170,0.2);
}

.view-all-link:hover {
    background: linear-gradient(135deg, #005a87 0%, #004360 100%);
    box-shadow: 0 6px 20px rgba(0,115,170,0.3);
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .supplier-products-section {
        padding: 20px 15px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .supplier-products-section h2 {
        font-size: 20px;
    }
    
    .product-image {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-name {
        font-size: 15px;
    }
    
    .view-all-link {
        padding: 10px 20px;
        font-size: 14px;
    }
}