/* ========== Detail Page – 严格复刻天眼查企业详情页 ========== */

.detail-page {
    max-width: var(--page-max-width);
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* --- 面包屑 (天眼查: 小灰字, > 分隔) --- */
.detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 0;
    font-size: 12px;
    color: #999;
}
.detail-breadcrumb a {
    color: #666;
}
.detail-breadcrumb a:hover {
    color: var(--color-primary);
}
.detail-breadcrumb .current {
    color: #333;
}

/* --- 企业概览头部 (天眼查: 白底, 无圆角, 底部1px灰线) --- */
.detail-profile {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #fff;
    border: 1px solid #e8e8e8;
    padding: 24px 20px;
    margin-bottom: 0;
}
.profile-logo {
    width: 68px;
    height: 68px;
    border-radius: 0;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    flex-shrink: 0;
}
.profile-logo-img {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}
.profile-logo-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.profile-body {
    flex: 1;
    min-width: 0;
}
.profile-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.profile-name-row h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: #333;
}
.badge-claimed {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 6px;
    border: 1px solid #00b578;
    border-radius: 2px;
    background: transparent;
    color: #00b578;
    font-size: 12px;
    font-weight: 400;
}
.badge-unclaimed {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 6px;
    border: 1px solid #ff8800;
    border-radius: 2px;
    background: transparent;
    color: #ff8800;
    font-size: 12px;
    font-weight: 400;
}
.profile-slogan {
    font-size: 14px;
    line-height: 1.7;
    color: #666;
    margin: 0 0 8px;
}
.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.profile-tag {
    display: inline-block;
    padding: 1px 6px;
    background: #f5f5f5;
    color: #666;
    border-radius: 0;
    font-size: 12px;
    border: 1px solid #e8e8e8;
}
.profile-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.profile-actions .btn-primary,
.profile-actions .btn-secondary,
.profile-actions .btn-danger-outline {
    width: 100px;
    height: 36px;
    font-size: 13px;
    text-align: center;
    box-sizing: border-box;
}
.profile-claim-btn {
    border-radius: 2px;
}
.btn-danger-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #e53e3e;
    border: 1px solid #e53e3e;
    cursor: pointer;
    transition: all .12s;
}
.btn-danger-outline:hover {
    background: #e53e3e;
    color: #fff;
}
.btn-danger-outline:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* --- 快速信息栏 (天眼查: 浅蓝底, 无圆角, 与头部连接) --- */
.detail-quickinfo {
    display: flex;
    align-items: center;
    background: #f0f6ff;
    border: 1px solid #e8e8e8;
    border-top: none;
    padding: 0 20px;
    margin-bottom: 12px;
    overflow-x: auto;
}
.qi-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 0;
    white-space: nowrap;
    flex-shrink: 0;
}
.qi-label {
    font-size: 13px;
    color: #999;
}
.qi-value {
    font-size: 13px;
    color: #333;
    font-weight: 400;
}
.qi-value a {
    color: var(--color-primary);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: bottom;
}
.qi-completeness {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.completeness-bar {
    display: inline-block;
    width: 60px;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}
.completeness-fill {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: var(--color-primary, #2563eb);
    min-width: 0;
    transition: width 0.3s;
}
.completeness-num {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}
.qi-divider {
    width: 1px;
    height: 14px;
    background: #d9d9d9;
    margin: 0 16px;
    flex-shrink: 0;
}

/* --- 两栏布局 --- */
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 12px;
    align-items: start;
}
.detail-main {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.detail-side {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* --- Tab 导航 (天眼查: 白底, 底部蓝色下划线, 无圆角) --- */
.detail-tabs {
    display: flex;
    gap: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-bottom: none;
    overflow-x: auto;
}
.detail-tab {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 20px;
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color .12s;
}
.detail-tab:hover {
    color: var(--color-primary);
}
.detail-tab.active {
    color: var(--color-primary);
    font-weight: 600;
    border-bottom-color: var(--color-primary);
}

/* --- Content Cards (天眼查: 无圆角, 连续白块, 上下边框相连) --- */
.detail-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-top: none;
    padding: 0;
}
.detail-card:last-child {
    border-radius: 0;
}
.card-title {
    font-size: 16px;
    font-weight: 600;
    padding: 16px 20px 0;
    margin: 0 0 12px;
    color: #333;
}
.card-body {
    padding: 0 20px 20px;
}
.detail-copy {
    font-size: 14px;
    line-height: 1.8;
    color: #666;
    white-space: pre-line;
}
.detail-empty {
    font-size: 14px;
    color: #999;
    padding: 12px 0;
}

/* --- Info Table (天眼查: 灰底label, 直角边框) --- */
.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.info-table td {
    padding: 10px 12px;
    border: 1px solid #e8e8e8;
}
.info-table .info-label {
    width: 100px;
    background: #fafafa;
    color: #999;
    font-weight: 400;
    white-space: nowrap;
}
.info-table .info-value {
    color: #333;
}
.info-table .info-value a {
    color: var(--color-primary);
    word-break: break-all;
}

/* --- Business Tags --- */
.business-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.business-tag {
    display: inline-block;
    padding: 3px 10px;
    background: #f5f5f5;
    color: #333;
    border-radius: 0;
    font-size: 13px;
    border: 1px solid #e8e8e8;
}

/* --- FAQ List --- */
.faq-list {
    display: flex;
    flex-direction: column;
}
.faq-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.faq-item:first-child {
    padding-top: 0;
}
.faq-q {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px;
}
.faq-a {
    font-size: 14px;
    line-height: 1.7;
    color: #666;
    margin: 0;
}

/* --- Product/Service Cards --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.product-card {
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow .2s;
}
.product-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.product-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f5f5f5;
}
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.product-info {
    padding: 12px;
}
.product-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px;
    line-height: 1.4;
}
.product-category {
    display: inline-block;
    font-size: 12px;
    color: #999;
    background: #f5f5f5;
    border: 1px solid #eee;
    padding: 1px 6px;
    border-radius: 2px;
    margin-bottom: 6px;
}
.product-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Certificate Cards --- */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.cert-card {
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    text-align: center;
}
.cert-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f9f9f9;
}
.cert-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.cert-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}
.cert-img-placeholder .iconfont {
    font-size: 40px;
    color: #d9d9d9;
}
.cert-info {
    padding: 10px 12px;
}
.cert-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px;
    line-height: 1.4;
}
.cert-issuer,
.cert-valid {
    font-size: 12px;
    color: #999;
    margin: 0;
    line-height: 1.5;
}

/* --- Gallery --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.gallery-item {
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f5;
    aspect-ratio: 4 / 3;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform .2s;
}
.gallery-item img:hover {
    transform: scale(1.03);
}

/* --- Side Cards (天眼查: 无圆角, 白底, 连续排列) --- */
.side-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    padding: 16px 16px;
    margin-bottom: -1px;
}
.side-card:first-child {
    border-radius: 0;
}
.side-card:last-child {
    border-radius: 0;
}
.side-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* Contact List */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.contact-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.contact-label {
    width: 36px;
    flex-shrink: 0;
    font-size: 13px;
    color: #999;
}
.contact-value {
    flex: 1;
    font-size: 13px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    word-break: break-all;
}
.contact-value a {
    color: var(--color-primary);
}
.btn-copy {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 6px;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    background: #fff;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    transition: all .12s;
    flex-shrink: 0;
}
.btn-copy:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Meta List */
.meta-list {
    display: flex;
    flex-direction: column;
}
.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.meta-row:last-child {
    border-bottom: none;
}
.meta-row span {
    font-size: 13px;
    color: #999;
}
.meta-row strong {
    font-size: 13px;
    font-weight: 400;
    color: #333;
}

/* Side CTA */
.side-cta .benefit-text {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 12px;
}
.btn-block {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 2px;
}
.action-status {
    margin-top: 8px;
    font-size: 12px;
    color: #999;
    text-align: center;
}

/* External link tooltip now uses global [data-tip] in base.css */

/* --- Responsive --- */
@media (max-width: 960px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }
    .detail-side {
        gap: 12px;
    }
    .side-card {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .detail-page {
        padding: 0 12px 24px;
    }
    .detail-profile {
        flex-direction: column;
        padding: 14px;
        gap: 12px;
    }
    .profile-logo {
        width: 52px;
        height: 52px;
        font-size: 24px;
    }
    .profile-name-row h1 {
        font-size: 18px;
    }
    .profile-actions {
        flex-direction: row;
        width: 100%;
        align-items: stretch;
    }
    .profile-actions .btn-primary,
    .profile-actions .btn-secondary,
    .profile-actions .btn-danger-outline {
        flex: 1;
        width: auto;
        justify-content: center;
        height: 40px;
    }
    .detail-quickinfo {
        padding: 0 12px;
        flex-wrap: wrap;
        gap: 4px;
    }
    .qi-item {
        padding: 8px 0;
    }
    .qi-divider {
        margin: 0 8px;
    }
    .detail-tabs {
        border: 1px solid #e8e8e8;
        border-bottom: none;
    }
    .detail-tab {
        height: 38px;
        padding: 0 14px;
        font-size: 13px;
    }
    .card-title {
        font-size: 15px;
        padding: 12px 14px 0;
    }
    .card-body {
        padding: 0 14px 14px;
    }
    .side-card {
        padding: 14px;
    }
    .business-tag {
        padding: 2px 8px;
        font-size: 12px;
    }

    /* Info table: override desktop border for mobile */
    .info-table,
    .info-table tbody,
    .info-table tr,
    .info-table td {
        display: block;
        width: 100%;
    }
    .info-table {
        border: none;
    }
    .info-table td {
        border: none !important;
        padding: 0;
    }
    .info-table tr {
        border-bottom: 1px solid #f0f0f0;
        padding: 0 0 6px;
        margin-bottom: 0;
    }
    .info-table tr:last-child {
        border-bottom: none;
    }
    .info-table .info-label {
        width: 100%;
        background: transparent;
        padding: 8px 0 0;
        font-size: 12px;
        color: #999;
    }
    .info-table .info-value {
        padding: 2px 0 8px;
        font-size: 14px;
        color: #333;
    }
}

@media (max-width: 480px) {
    .profile-name-row h1 {
        font-size: 16px;
    }
    .profile-slogan {
        font-size: 13px;
    }
    .detail-quickinfo {
        flex-direction: column;
        padding: 10px 12px;
        gap: 0;
    }
    .qi-divider {
        display: none;
    }
    .qi-item {
        padding: 4px 0;
        width: 100%;
        justify-content: space-between;
        border-bottom: 1px solid #f0f0f0;
    }
    .qi-item:last-child {
        border-bottom: none;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    .product-info {
        padding: 8px;
    }
    .product-name {
        font-size: 13px;
    }
}
