/**
 * 静态页面生成 - 公共样式
 * 基于 wyxdpc 现有风格
 */

/* ===================================================================
 * # 变量定义
 * ------------------------------------------------------------------- */
:root {
    /* 新版蓝绿色主题 */
    --color-primary: #00b4d8;
    --color-primary-light: #00d4aa;
    --color-primary-dark: #0096c7;
    --color-accent: #ff6b35;
    --color-success: #2ecc71;
    --color-warning: #f39c12;
    --color-danger: #e74c3c;
    
    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-muted: #999999;
    
    --color-bg: #f5f5f5;
    --color-bg-dark: #1a1a1a;
    --color-white: #ffffff;
    --color-border: #eeeeee;
    
    --font-family: "Nunito Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-family-heading: "Chivo", "PingFang SC", "Microsoft YaHei", sans-serif;
    
    /* 圆角系统 */
    --border-radius: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-pill: 50px;
    
    /* 阴影系统 */
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    /* 间距系统 */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 30px;
}

/* ===================================================================
 * # 内容区域
 * ------------------------------------------------------------------- */
.s-content {
    padding-top: 70px;
    min-height: 60vh;
    background-color: var(--color-bg);
}

/* 统一容器 */
.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

/* ===================================================================
 * # 通用组件
 * ------------------------------------------------------------------- */

/* 标签 - 新版蓝绿色 */
.tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 13px;
    color: var(--color-primary);
    background-color: rgba(0, 180, 216, 0.1);
    border: 1px solid rgba(0, 180, 216, 0.3);
    border-radius: 4px;
    margin-right: 8px;
    margin-bottom: 8px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
}

/* 认证标签 */
.auth-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 1.3rem;
    color: var(--color-success);
    background-color: rgba(46, 204, 113, 0.1);
    border-radius: 20px;
    margin-right: 8px;
    margin-bottom: 8px;
}

.auth-tag i {
    margin-right: 4px;
}

/* 徽章 */
.badge-auth,
.badge-guide {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-white);
    background-color: var(--color-primary);
    border-radius: 4px;
}

.badge-auth i {
    margin-right: 4px;
}

/* ===================================================================
 * # 按钮样式
 * ------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn--primary {
    color: var(--color-white);
    background: linear-gradient(135deg, #00b4d8 0%, #00d4aa 100%);
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3);
}

.btn--primary:hover {
    background: linear-gradient(135deg, #0096c7 0%, #00c49a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 180, 216, 0.4);
}

.btn--stroke {
    color: var(--color-primary);
    background-color: transparent;
    border: 2px solid var(--color-primary);
}

.btn--stroke:hover {
    background-color: rgba(0, 180, 216, 0.1);
}

/* 渐变按钮 - 胶囊形状 */
.btn-gradient {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--border-radius-pill);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-gradient.btn-primary {
    background: linear-gradient(135deg, #00b4d8 0%, #00d4aa 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3);
}

.btn-gradient.btn-primary:hover {
    background: linear-gradient(135deg, #0096c7 0%, #00c49a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 180, 216, 0.4);
}

.btn--secondary {
    color: var(--color-text);
    background-color: var(--color-border);
}

.btn--secondary:hover {
    background-color: #dddddd;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ===================================================================
 * # 卡片样式
 * ------------------------------------------------------------------- */
.card {
    background-color: var(--color-white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* 统一卡片组件 */
.card-unified {
    background: var(--color-white);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card-unified:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-unified .card-link {
    display: block;
    text-decoration: none;
}

/* 卡片封面 */
.card-unified .card-cover {
    position: relative;
    overflow: hidden;
}

.card-unified .card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.card-unified:hover .card-cover img {
    transform: scale(1.05);
}

/* 卡片信息 */
.card-unified .card-info {
    padding: 14px;
}

.card-unified .card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-unified .card-desc {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.6;
    margin: 8px 0 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 卡片价格 */
.card-unified .card-price {
    color: var(--color-accent);
    margin: 10px 0 0 0;
}

.card-unified .price-symbol {
    font-size: 14px;
    font-weight: 500;
}

.card-unified .price-value {
    font-size: 22px;
    font-weight: 700;
}

.card-unified .price-unit {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-left: 2px;
}

/* 卡片位置 */
.card-unified .card-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 8px 0 0 0;
}

.card-unified .icon-location {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* 卡片评分 */
.card-unified .card-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.card-unified .rating-stars {
    font-size: 14px;
    color: #ffb800;
}

.card-unified .rating-value {
    font-size: 14px;
    font-weight: 600;
    color: #ffb800;
}

/* ===================================================================
 * # 图片网格
 * ------------------------------------------------------------------- */
.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.image-grid .image-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.image-grid .image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-grid .image-item:hover img {
    transform: scale(1.05);
}

/* ===================================================================
 * # 区块标题
 * ------------------------------------------------------------------- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

.section-header h3 small {
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-muted);
}

.view-all {
    font-size: 14px;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.view-all:hover {
    color: var(--color-primary);
}

/* 新版区块头部 - 左右布局 */
.section-header-new {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--spacing-lg);
}

.section-header-left {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-md);
}

.section-header-new .section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.section-header-new .section-subtitle {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 0;
}

.section-more-link {
    font-size: 14px;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.section-more-link:hover {
    color: var(--color-primary);
}

/* ===================================================================
 * # 信息列表
 * ------------------------------------------------------------------- */
.info-list {
    margin: 0;
}

.info-list .info-item {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.info-list .info-item:last-child {
    border-bottom: none;
}

.info-list dt {
    flex: 0 0 120px;
    font-weight: 600;
    color: var(--color-text-light);
}

.info-list dt i {
    margin-right: 8px;
}

.info-list dd {
    flex: 1;
    color: var(--color-text);
    margin: 0;
}

/* ===================================================================
 * # 统计数据
 * ------------------------------------------------------------------- */
.stat-item {
    display: inline-flex;
    align-items: center;
    margin-right: 20px;
    font-size: 1.4rem;
    color: var(--color-text-light);
}

.stat-item i {
    margin-right: 6px;
    color: var(--color-text-muted);
}

.stat-item em {
    font-style: normal;
    font-weight: 600;
    color: var(--color-text);
    margin-right: 4px;
}

/* ===================================================================
 * # 弹窗样式
 * ------------------------------------------------------------------- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 400px;
    background-color: var(--color-white);
    border-radius: var(--border-radius-lg);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.4rem;
    color: var(--color-text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--color-text);
}

.modal-header {
    margin-bottom: 30px;
}

.modal-logo {
    width: 80px;
    height: auto;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 10px;
}

.modal-header p {
    font-size: 1.4rem;
    color: var(--color-text-light);
    margin: 0;
}

.modal-body .btn {
    margin-bottom: 12px;
}

.modal-body .btn:last-child {
    margin-bottom: 0;
}

/* ===================================================================
 * # 响应式
 * ------------------------------------------------------------------- */
@media only screen and (max-width: 992px) {
    .section-header-left {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }
}

@media only screen and (max-width: 768px) {
    .s-content {
        padding-top: 60px;
    }
    
    .section-container {
        padding: 0 15px;
    }
    
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .info-list .info-item {
        flex-direction: column;
    }
    
    .info-list dt {
        flex: none;
        margin-bottom: 4px;
    }
    
    .section-header-new {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media only screen and (max-width: 600px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-header h3 {
        margin-bottom: 10px;
    }
}
