/**
 * 华人网分类信息插件 - 前端样式
 */

/* ===== 通用样式 ===== */
.hcc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hcc-notice {
    padding: 15px;
    margin: 20px 0;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
}

.hcc-notice a {
    color: #0056b3;
    text-decoration: underline;
}

.hcc-error {
    padding: 15px;
    margin: 20px 0;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
}

.hcc-success {
    padding: 15px;
    margin: 20px 0;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
}

/* ===== 按钮样式 ===== */
.hcc-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #ff6600;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.3s;
}

.hcc-btn:hover {
    background: #e55a00;
    color: #fff;
}

.hcc-btn-secondary {
    background: #6c757d;
}

.hcc-btn-secondary:hover {
    background: #5a6268;
}

.hcc-btn-danger {
    background: #dc3545;
}

.hcc-btn-danger:hover {
    background: #c82333;
}

.hcc-btn-sm {
    padding: 5px 15px;
    font-size: 12px;
}

/* ===== 分类导航 ===== */
.hcc-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.hcc-category-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    text-decoration: none;
    color: #333;
}

.hcc-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #ff6600;
}

.hcc-category-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.hcc-category-name {
    font-size: 16px;
    font-weight: bold;
    margin: 10px 0 5px;
}

.hcc-category-count {
    font-size: 12px;
    color: #999;
}

/* ===== 信息列表 ===== */
.hcc-listings {
    margin: 30px 0;
}

.hcc-listing-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    transition: all 0.3s;
}

.hcc-listing-item:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.hcc-listing-featured {
    border-color: #ff6600;
    background: #fff5f0;
}

.hcc-listing-thumbnail {
    flex: 0 0 200px;
}

.hcc-listing-thumbnail img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

.hcc-listing-content {
    flex: 1;
}

.hcc-listing-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 10px;
    color: #333;
    text-decoration: none;
}

.hcc-listing-title:hover {
    color: #ff6600;
}

.hcc-listing-meta {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    font-size: 14px;
    color: #666;
}

.hcc-listing-price {
    color: #ff6600;
    font-size: 20px;
    font-weight: bold;
}

.hcc-listing-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 10px 0;
}

.hcc-listing-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 10px 0;
}

.hcc-stars {
    color: #ffc107;
}

.hcc-rating-count {
    color: #999;
    font-size: 12px;
}

/* ===== 搜索表单 ===== */
.hcc-search-form {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 30px 0;
}

.hcc-search-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.hcc-search-field {
    flex: 1;
    min-width: 200px;
}

.hcc-search-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

.hcc-search-field input,
.hcc-search-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* ===== 发布表单 ===== */
.hcc-submit-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 30px auto;
}

.hcc-form-group {
    margin-bottom: 20px;
}

.hcc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 14px;
}

.hcc-form-group label.required:after {
    content: " *";
    color: #dc3545;
}

.hcc-form-group input[type="text"],
.hcc-form-group input[type="number"],
.hcc-form-group select,
.hcc-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.hcc-form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.hcc-image-upload {
    border: 2px dashed #ddd;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
}

.hcc-image-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.hcc-image-item {
    position: relative;
    padding-top: 100%;
}

.hcc-image-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.hcc-image-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

/* ===== 详情页 ===== */
.hcc-single {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
}

.hcc-single-header {
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.hcc-single-title {
    font-size: 28px;
    font-weight: bold;
    margin: 0 0 15px;
}

.hcc-single-gallery {
    margin: 20px 0;
}

.hcc-gallery-main img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
}

.hcc-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.hcc-gallery-thumb {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
}

.hcc-gallery-thumb:hover,
.hcc-gallery-thumb.active {
    border-color: #ff6600;
}

.hcc-gallery-thumb img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.hcc-contact-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.hcc-contact-hidden {
    text-align: center;
}

.hcc-contact-info {
    display: none;
}

.hcc-contact-info.visible {
    display: block;
}

.hcc-contact-item {
    margin: 15px 0;
    padding: 15px;
    background: #fff;
    border-radius: 4px;
}

.hcc-contact-label {
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
}

.hcc-contact-value {
    font-size: 18px;
    color: #333;
}

/* ===== 评价系统 ===== */
.hcc-reviews {
    margin: 30px 0;
}

.hcc-rating-summary {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.hcc-overall-rating {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.hcc-rating-number {
    font-size: 48px;
    font-weight: bold;
    color: #ff6600;
}

.hcc-rating-distribution {
    margin: 20px 0;
}

.hcc-rating-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.hcc-rating-bar-fill {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.hcc-rating-bar-inner {
    height: 100%;
    background: #ffc107;
}

.hcc-review-item {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

.hcc-review-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.hcc-review-author {
    font-weight: bold;
}

.hcc-review-date {
    color: #999;
    font-size: 12px;
}

.hcc-review-content {
    margin: 15px 0;
    line-height: 1.6;
}

.hcc-review-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.hcc-review-tag {
    background: #e9ecef;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.hcc-review-tag.positive {
    background: #d4edda;
    color: #155724;
}

.hcc-review-tag.negative {
    background: #f8d7da;
    color: #721c24;
}

.hcc-review-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.hcc-review-images img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
}

.hcc-review-reply {
    background: #f8f9fa;
    padding: 15px;
    margin: 15px 0 0 30px;
    border-left: 3px solid #ff6600;
    border-radius: 4px;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .hcc-categories {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hcc-listing-item {
        flex-direction: column;
    }
    
    .hcc-listing-thumbnail {
        flex: 0 0 auto;
    }
    
    .hcc-search-row {
        flex-direction: column;
    }
    
    .hcc-search-field {
        min-width: 100%;
    }
    
    .hcc-submit-form {
        padding: 20px 15px;
    }
    
    .hcc-image-preview {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .hcc-categories {
        grid-template-columns: 1fr;
    }
    
    .hcc-image-preview {
        grid-template-columns: 1fr;
    }
}

/* ===== 加载动画 ===== */
.hcc-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,102,0,.3);
    border-radius: 50%;
    border-top-color: #ff6600;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== 工具类 ===== */
.hcc-text-center {
    text-align: center;
}

.hcc-mt-20 {
    margin-top: 20px;
}

.hcc-mb-20 {
    margin-bottom: 20px;
}

.hcc-hidden {
    display: none !important;
}

/* ===== 加载更多按钮样式 ===== */
.hcc-load-more-btn {
    display: inline-block;
    padding: 12px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.hcc-load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.hcc-load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.hcc-loading-indicator {
    color: #666;
    font-size: 14px;
}

.hcc-no-more {
    color: #999;
    font-size: 14px;
}
