/* ========================================
   PbootCMS 企业官网 - 通用样式
   ======================================== */

/* CSS Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
}

a {
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #1890ff;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

ul, ol {
    list-style: none;
}

input, textarea, button {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 清除浮动 */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ========================================
   通用组件样式
   ======================================== */

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 24px;
    font-size: 14px;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    line-height: 1.5;
}

.btn-primary {
    background-color: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

.btn-primary:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
    color: #fff;
}

.btn-outline {
    background-color: transparent;
    color: #1890ff;
    border-color: #1890ff;
}

.btn-outline:hover {
    background-color: #1890ff;
    color: #fff;
}

.btn-lg {
    padding: 12px 30px;
    font-size: 16px;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group .required {
    color: #ff4d4f;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

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

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a {
    padding: 8px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    color: #333;
    transition: all 0.3s ease;
}

.pagination a:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.pagination a.active {
    background-color: #1890ff;
    border-color: #1890ff;
    color: #fff;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state p {
    font-size: 16px;
}

/* 区块 */
.section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 32px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.section-subtitle {
    font-size: 16px;
    color: #999;
}

/* ========================================
   头部导航
   ======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo img {
    height: 40px;
}

.nav-list {
    display: flex;
    gap: 40px;
}

.nav-item a {
    position: relative;
    padding: 5px 0;
    color: #333;
    font-size: 15px;
}

.nav-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #1890ff;
    transition: width 0.3s ease;
}

.nav-item a:hover::after,
.nav-item.active a::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #333;
    transition: all 0.3s ease;
}

/* 移动端导航 */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.mobile-nav-header img {
    height: 40px;
}

.close-btn {
    font-size: 28px;
    color: #999;
    cursor: pointer;
}

.mobile-nav-list {
    padding: 20px;
}

.mobile-nav-list li {
    border-bottom: 1px solid #eee;
}

.mobile-nav-list a {
    display: block;
    padding: 15px 0;
    font-size: 16px;
}

/* ========================================
   页面标题区
   ======================================== */

.page-header {
    padding: 120px 0 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
}

.page-header h1 {
    font-size: 36px;
    margin-bottom: 15px;
    font-weight: 600;
}

.breadcrumb {
    font-size: 14px;
    opacity: 0.9;
}

.breadcrumb a {
    color: #fff;
}

.breadcrumb span {
    opacity: 0.7;
}

/* ========================================
   首页
   ======================================== */

.main.home {
    padding-top: 70px;
}

/* 轮播 */
.banner {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.banner-swiper {
    height: 100%;
}

.banner-swiper .swiper-slide img {
    width: 100%;
    height: 600px;
    object-fit: cover;
}

/* 服务项目 */
.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.service-item {
    text-align: center;
    padding: 30px 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
}

.service-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-item h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.service-item p {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

/* 产品展示 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.product-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.product-pic {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-item:hover .product-pic img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-info h3 a {
    color: #333;
}

.product-info p {
    color: #999;
    font-size: 13px;
    margin-bottom: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    color: #ff4d4f;
    font-size: 18px;
    font-weight: 600;
}

/* 新闻 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.news-pic {
    height: 180px;
    overflow: hidden;
}

.news-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-item:hover .news-pic img {
    transform: scale(1.05);
}

.news-info {
    padding: 20px;
}

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

.news-info h3 {
    font-size: 16px;
    margin: 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-info h3 a {
    color: #333;
}

.news-info p {
    color: #666;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.more-link {
    position: absolute;
    right: 0;
    color: #1890ff;
    font-size: 14px;
}

/* 关于我们 */
.about-content {
    display: flex;
    gap: 60px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.about-text p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.about-pic {
    flex: 1;
}

.about-pic img {
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 案例 */
.case-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.case-item {
    position: relative;
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
}

.case-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.case-item:hover img {
    transform: scale(1.05);
}

.case-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.case-item:hover .case-overlay {
    opacity: 1;
}

.case-overlay h4 {
    color: #fff;
    font-size: 18px;
}

/* ========================================
   页脚
   ======================================== */

.footer {
    background-color: #1a1a2e;
    color: #fff;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 15px;
}

.footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.8;
}

.footer-col h4 {
    font-size: 16px;
    margin-bottom: 20px;
    color: #fff;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.footer-col ul a:hover {
    color: #fff;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 10px;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
}

.qrcode img {
    width: 120px;
    height: 120px;
}

/* ========================================
   客服悬浮
   ======================================== */

.service-fixed {
    position: fixed;
    z-index: 999;
}

.service-right {
    right: 20px;
    bottom: 100px;
}

.service-bottom {
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
}

.service-btn {
    width: 50px;
    height: 50px;
    background-color: #1890ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(24, 144, 255, 0.4);
    transition: all 0.3s ease;
}

.service-btn:hover {
    transform: scale(1.1);
}

.service-icon {
    width: 24px;
    height: 24px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z"/></svg>') center/contain no-repeat;
}

.service-popup {
    position: absolute;
    right: 60px;
    bottom: 0;
    width: 280px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: none;
}

.service-btn:hover + .service-popup,
.service-popup:hover {
    display: block;
}

.service-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.service-popup-header h4 {
    font-size: 16px;
}

.close-popup {
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

.service-popup-content {
    padding: 20px;
}

.service-qrcode {
    text-align: center;
}

.service-qrcode img {
    width: 150px;
    height: 150px;
    margin-bottom: 10px;
}

.service-qrcode p {
    color: #666;
    font-size: 13px;
}

.service-phone {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.service-phone p {
    color: #999;
    font-size: 13px;
    margin-bottom: 5px;
}

.service-phone a {
    font-size: 20px;
    color: #1890ff;
    font-weight: 600;
}

/* ========================================
   产品列表
   ======================================== */

.product-page .product-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* ========================================
   产品详情
   ======================================== */

.product-detail {
    display: flex;
    gap: 50px;
    margin-bottom: 50px;
}

.product-gallery {
    flex: 1;
}

.gallery-main {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.gallery-main img {
    width: 100%;
}

.product-detail .product-info {
    flex: 1;
    padding: 0;
}

.product-detail h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.product-detail .subtitle {
    color: #999;
    font-size: 16px;
    margin-bottom: 20px;
}

.product-detail .price {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.product-detail .price .label {
    color: #999;
    margin-right: 15px;
}

.product-detail .price .value {
    color: #ff4d4f;
    font-size: 28px;
    font-weight: 600;
}

.product-detail .summary {
    color: #666;
    line-height: 1.8;
    margin-bottom: 30px;
}

.product-detail .actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.product-detail .meta {
    display: flex;
    gap: 30px;
    color: #999;
    font-size: 13px;
}

/* 销售链接按钮 */
.product-detail .sale-links {
    margin-bottom: 30px;
}
.product-detail .sale-links .label {
    display: block;
    color: #999;
    margin-bottom: 10px;
}
.product-detail .sale-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.product-detail .sale-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    color: #fff;
    transition: all 0.3s;
}
.product-detail .sale-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.product-detail .sale-btn.pinduoduo { background: #ee2a2a; }
.product-detail .sale-btn.taobao { background: #ff5000; }
.product-detail .sale-btn.jingdong { background: #e2231a; }
.product-detail .sale-btn.weidian { background: #a60e16; }

.product-content {
    margin-top: 50px;
}

.content-tabs {
    border: 1px solid #eee;
    border-radius: 8px;
}

.tab-nav {
    display: flex;
    border-bottom: 1px solid #eee;
}

.tab-nav span {
    padding: 15px 30px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab-nav span.active {
    color: #1890ff;
    border-bottom-color: #1890ff;
}

.tab-content {
    padding: 30px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.content-body {
    line-height: 1.8;
    color: #666;
}

.content-body h3 {
    font-size: 18px;
    color: #333;
    margin: 20px 0 10px;
}

.content-body ul {
    padding-left: 20px;
    margin: 10px 0;
}

.content-body ul li {
    list-style: disc;
    margin-bottom: 5px;
}

/* ========================================
   新闻列表
   ======================================== */

.news-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.news-list .news-item {
    display: flex;
    gap: 30px;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.news-list .news-pic {
    flex-shrink: 0;
    width: 280px;
    height: 180px;
}

.news-list .news-info {
    flex: 1;
    padding: 0;
}

.news-list .news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.read-more {
    color: #1890ff;
}

/* ========================================
   新闻详情
   ======================================== */

.article {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.article-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.article-header h1 {
    font-size: 28px;
    margin-bottom: 15px;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    color: #999;
    font-size: 14px;
}

.article-pic {
    margin-bottom: 30px;
}

.article-pic img {
    width: 100%;
    border-radius: 8px;
}

.article-content {
    line-height: 1.8;
    color: #666;
}

.article-content p {
    margin-bottom: 15px;
}

.article-tags {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.article-tags a {
    display: inline-block;
    padding: 5px 15px;
    margin-right: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
}

.article-tags a:hover {
    background-color: #1890ff;
    color: #fff;
}

.article-nav {
    margin-top: 30px;
}

.back-list {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f5f5f5;
    border-radius: 4px;
    color: #666;
}

.related-articles {
    margin-top: 50px;
}

.related-articles h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-item a {
    display: block;
}

.related-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

.related-item span {
    display: block;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================
   联系我们
   ======================================== */

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.contact-info h2,
.contact-form h2 {
    font-size: 24px;
    margin-bottom: 30px;
}

.contact-list li {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.contact-list i {
    width: 40px;
    height: 40px;
    background-color: #1890ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-address::before { content: '📍'; }
.icon-phone::before { content: '📞'; }
.icon-email::before { content: '✉️'; }
.icon-qq::before { content: '💬'; }

.contact-list strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.contact-list p {
    color: #666;
}

.contact-list a {
    color: #1890ff;
}

.contact-map {
    margin-top: 40px;
}

.contact-map h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.map-container {
    height: 400px;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.map-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 1200px) {
    .service-grid,
    .product-grid,
    .case-grid,
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .related-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .mobile-nav {
        display: block;
    }

    .header .container {
        height: 60px;
    }

    .banner {
        height: 300px;
    }

    .banner-swiper .swiper-slide img {
        height: 300px;
    }

    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 24px;
    }

    .service-grid,
    .product-grid,
    .case-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        flex-direction: column;
    }

    .product-detail {
        flex-direction: column;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .news-list .news-item {
        flex-direction: column;
    }

    .news-list .news-pic {
        width: 100%;
    }

    .article {
        padding: 20px;
    }

    .article-header h1 {
        font-size: 22px;
    }

    .related-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-right {
        right: 10px;
        bottom: 80px;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 100px 0 30px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .btn-lg {
        padding: 10px 20px;
        font-size: 14px;
    }

    .product-page .product-grid {
        grid-template-columns: 1fr;
    }
}
