/**
 * YiwuPage 商业目录子页 — Phase 13.6
 * commercial-directory.css
 *
 * 优化：减展示、加变现
 * 结构: .yp-ad-top / .yp-hero-compact / .yp-vip-gold / .yp-main-layout / .yp-sidebar / .yp-mobile-float / .yp-footer-clean
 */

/* === Base === */
.yp-commercial-page { background: #f8fafc; color: #1e293b; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; margin: 0; }
.yp-container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* === ① Top Ad (728×90) === */
.yp-ad-top { background: #f1f5f9; border-bottom: 1px solid #e2e8f0; padding: 8px 0; text-align: center; min-height: 90px; display: flex; align-items: center; justify-content: center; }
.yp-ad-label { display: block; font-size: 9px; color: #94a3b8; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 4px; }
.yp-ad-label-small { display: block; font-size: 9px; color: #94a3b8; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; text-align: center; }
.yp-ad-link { display: inline-block; max-width: 728px; width: 100%; }
.yp-ad-img { max-width: 100%; height: auto; border-radius: 8px; }
.yp-ad-placeholder { background: linear-gradient(135deg, #f8fafc, #e2e8f0); border: 1px dashed #cbd5e1; border-radius: 8px; padding: 16px; text-align: center; color: #64748b; }
.yp-ad-empty { color: #94a3b8; font-size: 12px; }

/* === Header === */
.yp-header-v3 { background: #fff; border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; z-index: 100; }
.yp-header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.yp-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.yp-logo-mark { width: 36px; height: 36px; background: #0284c7; color: #fff; font-weight: 900; font-size: 18px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.yp-logo-name { font-weight: 900; font-size: 20px; color: #0f172a; }
.yp-logo-dot { color: #f97316; }
.yp-logo-sub { display: block; font-size: 9px; color: #94a3b8; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; }
.yp-gnb { display: flex; gap: 24px; }
.yp-gnb-link { font-size: 14px; font-weight: 700; color: #475569; text-decoration: none; padding: 16px 0; transition: color .15s; }
.yp-gnb-link:hover, .yp-gnb-active { color: #0284c7; border-bottom: 2px solid #0284c7; }
.yp-gnb-cta { color: #f97316; }
.yp-mobile-menu-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }

/* === Hero (Compact) === */
.yp-hero-compact { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; margin: 16px auto; max-width: 1200px; padding: 20px 24px; box-shadow: 0 2px 8px rgba(0,0,0,.03); }
.yp-hero-inner { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: center; }
.yp-hero-badge { display: inline-flex; align-items: center; background: #0f172a; color: #fff; font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 20px; margin-bottom: 8px; }
.yp-hero-h1 { font-size: 24px; font-weight: 900; line-height: 1.3; color: #0f172a; margin: 0 0 10px; }
.yp-hero-real-stats { display: flex; gap: 12px; margin-bottom: 12px; }
.yp-hero-stat { background: #f1f5f9; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; color: #475569; border: 1px solid #e2e8f0; }
.yp-hero-stat strong { color: #0f172a; }
.yp-hero-stat-vip { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.yp-hero-stat-vip strong { color: #b45309; }
.yp-hero-search { display: flex; gap: 0; margin-bottom: 10px; }
.yp-hero-search-input { flex: 1; border: 1px solid #e2e8f0; border-radius: 10px 0 0 10px; padding: 8px 12px; font-size: 13px; outline: none; }
.yp-hero-search-input:focus { border-color: #0284c7; }
.yp-hero-search-btn { background: #0284c7; color: #fff; border: none; padding: 8px 16px; border-radius: 0 10px 10px 0; font-weight: 700; font-size: 13px; cursor: pointer; }
.yp-hero-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.yp-hero-tag { font-size: 11px; font-weight: 700; color: #0284c7; text-decoration: none; padding: 3px 8px; background: #f0f9ff; border-radius: 12px; }
.yp-hero-tag:hover { background: #e0f2fe; }
.yp-hero-right { }
.yp-hero-ad-product { background: #0f172a; color: #fff; padding: 16px; border-radius: 12px; text-align: center; }
.yp-hero-ad-title { font-weight: 800; font-size: 13px; }
.yp-hero-ad-desc { font-size: 10px; color: #94a3b8; margin-top: 4px; }
.yp-hero-ad-cta { display: inline-block; margin-top: 8px; background: #fbbf24; color: #0f172a; font-size: 11px; font-weight: 800; padding: 6px 12px; border-radius: 8px; text-decoration: none; }
.yp-hero-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid #f1f5f9; }
.yp-pill { font-size: 12px; font-weight: 700; padding: 6px 14px; border-radius: 20px; background: #f1f5f9; color: #475569; text-decoration: none; transition: all .15s; }
.yp-pill:hover { background: #e2e8f0; }
.yp-pill-active { background: #0284c7; color: #fff; }
.yp-pill-cta { background: #fbbf24; color: #0f172a; }

/* === ② VIP Gold Section === */
.yp-vip-gold { background: linear-gradient(135deg, #fffbeb, #fff); border: 1.5px solid #f59e0b; border-radius: 18px; margin: 0 auto 16px; max-width: 1200px; padding: 14px 16px; position: relative; overflow: hidden; box-shadow: 0 4px 15px rgba(245,158,11,.12); }
.yp-vip-gold::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3.5px; background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b); }
.yp-vip-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid rgba(245,158,11,.3); }
.yp-vip-title { font-size: 13px; font-weight: 900; color: #78350f; }
.yp-vip-cta-btn { font-size: 11px; background: #fbbf24; color: #0f172a; font-weight: 800; padding: 4px 10px; border-radius: 6px; text-decoration: none; }
.yp-vip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.yp-vip-card { display: flex; align-items: center; gap: 12px; background: #fff; padding: 12px; border-radius: 12px; border: 1px solid #fde68a; text-decoration: none; color: inherit; transition: box-shadow .15s; }
.yp-vip-card:hover { box-shadow: 0 4px 12px rgba(245,158,11,.15); }
.yp-vip-badge { background: #f59e0b; color: #fff; font-size: 9px; font-weight: 900; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.yp-vip-info { flex: 1; min-width: 0; }
.yp-vip-name { font-size: 14px; font-weight: 800; color: #0f172a; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yp-vip-desc { font-size: 11px; color: #64748b; margin: 2px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yp-vip-wechat-btn { background: #fbbf24; color: #0f172a; font-size: 11px; font-weight: 800; padding: 6px 10px; border-radius: 8px; border: none; cursor: pointer; white-space: nowrap; }

/* === Main Layout (8+4) === */
.yp-main-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; margin-top: 0; padding-top: 0; }

/* === Directory List === */
.yp-directory-main { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.03); }
.yp-directory-header { background: #0f172a; color: #fff; padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; }
.yp-directory-title { font-size: 13px; font-weight: 800; }
.yp-directory-sort { font-size: 12px; display: flex; gap: 8px; align-items: center; }
.yp-directory-sort span { opacity: .5; }
.yp-directory-sort button { background: none; border: none; color: #fff; cursor: pointer; font-weight: 700; font-size: 12px; }
.yp-sort-active { text-decoration: underline; }

/* List Top Ad */
.yp-list-top-ad { background: #f8fafc; padding: 10px 16px; border-bottom: 1px solid #e2e8f0; text-align: center; }
.yp-list-top-ad-link { display: flex; justify-content: center; align-items: center; gap: 8px; color: #0284c7; text-decoration: none; font-size: 13px; font-weight: 700; }

/* Company List Items */
.yp-company-list { }
.yp-list-item { display: flex; justify-content: space-between; align-items: flex-start; padding: 14px 16px; border-bottom: 1px solid #f1f5f9; border-left: 4px solid #e2e8f0; transition: background .1s; gap: 12px; }
.yp-list-item:hover { background: #f8fafc; }
.yp-list-item-vip { border-left-color: #0284c7; }
.yp-list-item-main { display: flex; gap: 12px; flex: 1; min-width: 0; }
.yp-list-avatar { width: 48px; height: 48px; background: #f0f9ff; color: #0284c7; border-radius: 8px; font-weight: 900; font-size: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1px solid #e0f2fe; }
.yp-list-info { flex: 1; min-width: 0; }
.yp-list-name-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.yp-list-name { font-size: 15px; font-weight: 800; color: #0f172a; margin: 0; }
.yp-verified-icon { display: inline-flex; width: 16px; height: 16px; background: #0284c7; color: #fff; font-size: 10px; border-radius: 50%; align-items: center; justify-content: center; }
.yp-list-tag { font-size: 10px; font-weight: 700; color: #0284c7; background: #f0f9ff; padding: 2px 6px; border-radius: 4px; }
.yp-list-desc { font-size: 12px; color: #64748b; margin: 3px 0 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yp-list-location { font-size: 11px; color: #94a3b8; margin: 3px 0 0; }
.yp-list-actions { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.yp-btn-call { display: block; background: #059669; color: #fff; font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 6px; text-decoration: none; text-align: center; }
.yp-btn-detail { display: block; background: #f1f5f9; color: #475569; font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 6px; text-decoration: none; text-align: center; }
.yp-btn-detail:hover { background: #e2e8f0; }

/* Native Ad (inserted in list) */
.yp-native-ad { background: #f8fafc; padding: 12px 16px; border-bottom: 1px solid #e2e8f0; }
.yp-native-ad-link { display: flex; justify-content: space-between; align-items: center; text-decoration: none; color: inherit; }
.yp-native-ad-content { }
.yp-native-ad-content strong { display: block; font-size: 13px; color: #0f172a; }
.yp-native-ad-content span { font-size: 11px; color: #64748b; }
.yp-native-ad-arrow { font-size: 18px; color: #0284c7; }

/* Pagination */
.yp-pagination { padding: 12px 16px; background: #f8fafc; border-top: 1px solid #e2e8f0; display: flex; justify-content: center; gap: 4px; }
.yp-page-btn { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 12px; font-weight: 700; color: #475569; text-decoration: none; }
.yp-page-active { background: #0284c7; color: #fff; border-color: #0284c7; }

/* === Sidebar === */
.yp-sidebar { display: flex; flex-direction: column; gap: 12px; }

/* Sidebar Ad */
.yp-sidebar-ad { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px; text-align: center; min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.yp-sidebar-ad-link { display: block; }
.yp-sidebar-ad-img { max-width: 100%; height: auto; border-radius: 8px; }
.yp-sidebar-ad-placeholder { padding: 20px; text-align: center; }
.yp-sidebar-ad-placeholder strong { font-size: 13px; color: #475569; }
.yp-sidebar-ad-empty { text-align: center; padding: 20px; color: #94a3b8; }
.yp-sidebar-ad-empty p { font-size: 12px; margin: 0 0 6px; }
.yp-sidebar-ad-empty a { font-size: 12px; color: #0284c7; text-decoration: none; font-weight: 700; }

/* WeChat CTA Card */
.yp-sidebar-wechat { background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 12px; padding: 16px; text-align: center; }
.yp-sidebar-wechat-badge { background: #059669; color: #fff; font-size: 9px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.yp-sidebar-wechat-icon { font-size: 28px; margin: 6px 0; }
.yp-sidebar-wechat-title { font-size: 14px; font-weight: 800; color: #0f172a; margin: 0; }
.yp-sidebar-wechat-desc { font-size: 11px; color: #64748b; margin: 4px 0; }
.yp-sidebar-wechat-btn { width: 100%; background: #059669; color: #fff; font-size: 12px; font-weight: 700; padding: 8px; border: none; border-radius: 8px; cursor: pointer; margin-top: 8px; }

/* Recruit Card */
.yp-sidebar-recruit { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; }
.yp-sidebar-recruit-title { font-size: 14px; font-weight: 800; color: #0f172a; margin: 0 0 8px; }
.yp-sidebar-recruit-list { list-style: none; padding: 0; margin: 0; }
.yp-sidebar-recruit-list li { font-size: 12px; color: #475569; padding: 3px 0; }
.yp-sidebar-recruit-btn { display: block; text-align: center; background: #fbbf24; color: #0f172a; font-size: 12px; font-weight: 800; padding: 8px; border-radius: 8px; text-decoration: none; margin-top: 10px; }

/* Sticky Sidebar Ad */
.yp-sidebar-sticky { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px; text-align: center; position: relative; opacity: 0; transform: translateY(20px); transition: all .3s ease; pointer-events: none; min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.yp-sidebar-sticky.yp-sticky-visible { opacity: 1; transform: translateY(0); pointer-events: auto; position: sticky; bottom: 16px; }
.yp-sidebar-sticky-link { display: block; text-decoration: none; color: inherit; }
.yp-sidebar-sticky-content strong { display: block; font-size: 14px; color: #0f172a; margin-bottom: 4px; }
.yp-sidebar-sticky-content span { font-size: 11px; color: #64748b; }
.yp-sidebar-sticky-close { position: absolute; top: 4px; right: 4px; background: none; border: none; font-size: 14px; cursor: pointer; color: #94a3b8; padding: 2px 6px; }

/* === Mobile Float (WeChat CTA) === */
.yp-mobile-float { display: none; }

/* === Footer (Clean White) === */
.yp-footer-clean { background: #fff; border-top: 1px solid #e2e8f0; padding: 24px 0; margin-top: 24px; }
.yp-footer-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #f1f5f9; margin-bottom: 12px; }
.yp-footer-brand { font-weight: 900; color: #0f172a; font-size: 15px; }
.yp-footer-links { display: flex; gap: 16px; }
.yp-footer-links a { font-size: 12px; color: #64748b; text-decoration: none; }
.yp-footer-links a:hover { color: #0f172a; }
.yp-footer-desc { font-size: 11px; color: #94a3b8; line-height: 1.6; margin: 0 0 8px; }
.yp-footer-copy { font-size: 11px; color: #94a3b8; margin: 0; }

/* === Responsive === */
@media (max-width: 768px) {
    .yp-gnb { display: none; }
    .yp-gnb.yp-mobile-nav-open { display: flex; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: #fff; border-bottom: 1px solid #e2e8f0; padding: 8px 16px; gap: 0; z-index: 99; }
    .yp-gnb.yp-mobile-nav-open .yp-gnb-link { padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
    .yp-mobile-menu-btn { display: block; }
    .yp-hero-inner { grid-template-columns: 1fr; }
    .yp-hero-right { display: none; }
    .yp-hero-h1 { font-size: 18px; }
    .yp-main-layout { grid-template-columns: 1fr; }
    .yp-sidebar { order: 2; }
    .yp-sidebar-sticky { display: none; }
    .yp-vip-grid { grid-template-columns: 1fr; }
    .yp-list-item { flex-direction: column; }
    .yp-list-actions { flex-direction: row; width: 100%; }
    .yp-list-actions a { flex: 1; }
    .yp-mobile-float { display: block; position: fixed; bottom: 16px; right: 16px; z-index: 200; }
    .yp-mobile-float-btn { background: #059669; color: #fff; border: none; font-size: 13px; font-weight: 700; padding: 10px 16px; border-radius: 24px; cursor: pointer; box-shadow: 0 4px 12px rgba(5,150,105,.3); display: flex; align-items: center; gap: 6px; }
    .yp-footer-top { flex-direction: column; gap: 8px; align-items: flex-start; }
}

@media (max-width: 480px) {
    .yp-hero-compact { margin: 8px; padding: 14px; border-radius: 12px; }
    .yp-hero-h1 { font-size: 16px; }
    .yp-hero-real-stats { flex-direction: column; gap: 6px; }
    .yp-pill { font-size: 11px; padding: 5px 10px; }
}
