/* ============================================
   nanhai 实例 - 组件样式 (components.css)
   ============================================ */

/* ===== VIP 卡片（贴合 panda969 风格） ===== */
.model-card {
    background: var(--bg-white);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.model-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.model-card .thumb {
    position: relative;
    padding-top: 130%;  /* 接近参考站的图片比例 */
    overflow: hidden;
    background: var(--bg-gray);
}

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

.model-card:hover .thumb img {
    transform: scale(1.03);
}

/* VIP 角标 */
.model-card .vip-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: var(--text-white);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* 卡片信息 */
.model-card .info {
    padding: 8px 6px 10px;
    text-align: center;
}

.model-card .name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-card .name a:hover {
    color: var(--primary);
}

.model-card .nationality {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.model-card .view-more {
    display: block;
    padding: 5px 0;
    background: #f5f5f5;
    border-radius: 3px;
    font-size: 11px;
    color: #666;
    transition: background 0.2s, color 0.2s;
}

.model-card .view-more:hover {
    background: #e8e8e8;
    color: var(--primary);
}

/* ===== 筛选器 ===== */
.filter-section {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.filter-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-group {
    flex: 1;
    min-width: 140px;
}

.filter-group label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

.filter-group select {
    width: 100%;
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--bg-white);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237f8c8d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ===== 列表卡片 ===== */
.listing-card {
    display: flex;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.listing-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.listing-card .thumb {
    width: 120px;
    min-height: 160px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background: var(--bg-gray);
}

.listing-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-card .info {
    flex: 1;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.listing-card .name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listing-card .name a:hover {
    color: var(--primary);
}

.listing-card .meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.listing-card .meta span {
    white-space: nowrap;
}

.listing-card .summary {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.listing-card .actions {
    display: flex;
    gap: var(--spacing-sm);
}

.listing-card .btn {
    flex: 1;
    padding: 8px 12px;
    text-align: center;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.listing-card .btn-primary {
    background: var(--primary);
    color: var(--text-white);
}

.listing-card .btn-primary:hover {
    background: var(--primary-dark);
    color: var(--text-white);
}

.listing-card .btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.listing-card .btn-secondary:hover {
    background: var(--bg-gray);
    color: var(--primary);
}

/* ===== 详情页组件 ===== */
.detail-header {
    position: relative;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-lg);
}

.detail-header .main-image {
    width: 100%;
    height: 360px;
    object-fit: cover;
}

.detail-header .gallery-thumbs {
    display: flex;
    gap: 4px;
    padding: var(--spacing-sm);
    background: var(--bg-light);
    overflow-x: auto;
    scrollbar-width: thin;
}

.detail-header .gallery-thumbs img {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.detail-header .gallery-thumbs img:hover,
.detail-header .gallery-thumbs img.active {
    opacity: 1;
}

/* 信息网格 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
}

.info-item {
    display: flex;
    gap: var(--spacing-xs);
    font-size: 14px;
}

.info-item .label {
    color: var(--text-secondary);
    white-space: nowrap;
}

.info-item .value {
    color: var(--text-primary);
    font-weight: 500;
}

/* 联系方式按钮 */
.contact-buttons {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.contact-btn {
    flex: 1;
    padding: 12px;
    text-align: center;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-white);
    transition: opacity 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.contact-btn:hover {
    opacity: 0.9;
    color: var(--text-white);
}

.contact-btn.telegram {
    background: #0088cc;
}

.contact-btn.whatsapp {
    background: #25d366;
}

.contact-btn.phone {
    background: #333;
}

/* 服务内容区 */
.service-section {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.service-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-light);
}

.service-section .content {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-primary);
}

.service-section .content p {
    margin-bottom: 8px;
}

.service-section .content p:last-child {
    margin-bottom: 0;
}

/* 价格表 */
.price-table {
    margin: var(--spacing-md) 0;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-light);
}

.price-row:last-child {
    border-bottom: none;
}

.price-row .label {
    font-weight: 600;
    font-size: 14px;
}

.price-row .value {
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
}

/* 加载更多 */
.load-more {
    display: block;
    width: 200px;
    margin: var(--spacing-lg) auto;
    padding: 12px;
    text-align: center;
    background: var(--bg-white);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.load-more:hover {
    background: var(--bg-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* 无限滚动触底哨兵（无按钮，滑到底自动加载） */
.list-scroll-sentinel {
    width: 100%;
    height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    pointer-events: none;
}

/* ===== 全站语言切换（固定右上角 · 地球图标 + 下拉） ===== */
.site-lang-switch {
    position: fixed;
    top: max(10px, env(safe-area-inset-top, 0px));
    right: max(10px, env(safe-area-inset-right, 0px));
    z-index: 300;
}

.site-lang-switch__form {
    margin: 0;
}

.site-lang-switch__control {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 4px 8px 4px 6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(20, 20, 24, 0.82);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    cursor: pointer;
}

.site-lang-switch__icon {
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.site-lang-switch__select {
    margin: 0;
    padding: 2px 18px 2px 0;
    border: 0;
    border-radius: 0;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23ffffffb3' d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right center;
    color: #ffffff;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;
    max-width: 118px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.site-lang-switch__select:focus {
    outline: none;
}

.site-lang-switch__select:focus-visible {
    outline: 2px solid rgba(239, 137, 32, 0.88);
    outline-offset: 2px;
    border-radius: 4px;
}

.site-lang-switch__select option {
    color: #111111;
    background: #ffffff;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.empty-state p {
    margin-bottom: var(--spacing-md);
}

/* 响应式组件 */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .listing-card {
        flex-direction: column;
    }
    
    .listing-card .thumb {
        width: 100%;
        min-height: 200px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-buttons {
        flex-direction: column;
    }
    
    .detail-header .main-image {
        height: 240px;
    }
}

@media (max-width: 480px) {
    .model-card .info {
        padding: 8px;
    }
    
    .model-card .name {
        font-size: 13px;
    }
    
    .listing-card .name {
        font-size: 16px;
    }
    
    .service-section {
        padding: var(--spacing-md);
    }
}
