/* 全局样式 */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --border-color: #ddd;
    --spacing: 1rem;
}

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing);
}

/* 头部样式 */
.site-header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
}

.site-title a {
    color: var(--primary-color);
    text-decoration: none;
}

/* 导航菜单 */
.main-navigation {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin-left: 1.5rem;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--secondary-color);
}

/* 主要内容区域 */
.site-main {
    padding: 2rem 0;
}

/* 文章网格 */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* 文章卡片 */
.post {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.post:hover {
    transform: translateY(-5px);
}

.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.entry-header {
    padding: 1rem;
}

.entry-title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
}

.entry-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.entry-meta {
    font-size: 0.875rem;
    color: #666;
}

.entry-content {
    padding: 1rem;
}

/* 产品页面样式 */
.product-single {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.product-gallery {
    position: relative;
}

.product-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.product-gallery-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-image img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.gallery-image img:hover {
    opacity: 0.8;
}

.product-details {
    padding: 1rem;
}

.product-price {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin: 1rem 0;
}

.product-specifications {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 4px;
}

.contact-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--secondary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.contact-button:hover {
    background: #2980b9;
}

/* 页脚样式 */
.site-footer {
    background: var(--light-gray);
    padding: 3rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-widget-area {
    margin-bottom: 1.5rem;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 0.5rem;
}

.footer-menu a {
    color: var(--text-color);
    text-decoration: none;
}

.site-info {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

/* 联系页面样式 */
.contact-page {
    padding: 2rem 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    padding-right: 2rem;
}

.contact-details {
    margin: 2rem 0;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-right: 1rem;
    margin-top: 0.25rem;
}

.contact-item h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.contact-item p {
    margin: 0;
}

.contact-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--secondary-color);
}

.contact-map {
    margin-top: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.contact-map iframe {
    width: 100%;
    height: 300px;
    border: none;
}

.contact-form {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 8px;
}

.contact-form h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.submit-button {
    background: var(--secondary-color);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background: #2980b9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .product-single {
        grid-template-columns: 1fr;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .main-navigation {
        margin-top: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        text-align: center;
    }

    .nav-menu li {
        margin: 0.5rem 0;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .contact-info {
        padding-right: 0;
    }
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-color);
}

.page-numbers.current {
    background: var(--secondary-color);
    color: #fff;
    border-color: var(--secondary-color);
}

/* 搜索表单 */
.search-form {
    display: flex;
    margin: 1rem 0;
}

.search-field {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
}

.search-submit {
    padding: 0.5rem 1rem;
    background: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* 侧边栏样式 */
.sidebar {
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 4px;
}

.widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

/* 产品分类页面样式 */
.product-category-page {
    padding: 2rem 0;
}

.category-header {
    text-align: center;
    margin-bottom: 3rem;
}

.category-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.category-description {
    max-width: 800px;
    margin: 0 auto;
    color: #666;
}

.category-filters {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.filter-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.filter-submit {
    background: var(--secondary-color);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.filter-submit:hover {
    background: #2980b9;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-content {
    padding: 1.5rem;
}

.product-title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
}

.product-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: var(--secondary-color);
}

.product-price {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.product-excerpt {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.product-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--secondary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.product-link:hover {
    background: #2980b9;
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    background: var(--light-gray);
    border-radius: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .filter-form {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .filter-submit {
        width: 100%;
    }
}

/* 小工具样式 */
.widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

/* 产品分类小工具 */
.product-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-categories-list li {
    margin-bottom: 0.5rem;
}

.product-categories-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.product-categories-list a:hover {
    background: var(--light-gray);
    color: var(--secondary-color);
}

.product-categories-list .count {
    font-size: 0.875rem;
    color: #666;
}

/* 热门产品小工具 */
.popular-products-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-products-list li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.popular-products-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-products-list .product-thumbnail {
    flex: 0 0 60px;
    margin-right: 1rem;
}

.popular-products-list .product-thumbnail img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.popular-products-list .product-info {
    flex: 1;
}

.popular-products-list .product-title {
    display: block;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
}

.popular-products-list .product-title:hover {
    color: var(--secondary-color);
}

.popular-products-list .product-price {
    display: block;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* 产品详情页样式 */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.product-gallery {
    position: relative;
}

.featured-image {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.gallery-thumbnail {
    position: relative;
    padding-bottom: 100%;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-thumbnail:hover img {
    transform: scale(1.1);
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.product-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.product-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-meta i {
    color: var(--primary-color);
}

.product-content {
    margin-bottom: 2rem;
    line-height: 1.6;
}

.product-attributes {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.product-attributes h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.product-attributes ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-attributes li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.product-attributes li:last-child {
    border-bottom: none;
}

.product-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.related-products {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.related-products h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.contact-form {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.contact-form h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
    }

    .gallery-thumbnails {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* 打印样式 */
@media print {
    .header,
    .footer,
    .product-actions,
    .related-products,
    .contact-form {
        display: none;
    }

    .product-detail {
        display: block;
    }

    .product-gallery {
        margin-bottom: 2rem;
    }

    .gallery-thumbnails {
        display: none;
    }

    .product-info {
        padding: 0;
    }
}

/* 主页样式 */
.main-content {
    padding: 2rem 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.post-thumbnail {
    position: relative;
    padding-bottom: 60%;
    overflow: hidden;
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.1);
}

.post-content {
    padding: 1.5rem;
}

.entry-title {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    line-height: 1.3;
}

.entry-title a {
    color: #333;
    text-decoration: none;
}

.entry-title a:hover {
    color: var(--primary-color);
}

.entry-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.entry-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.entry-meta i {
    color: var(--primary-color);
}

.entry-content {
    margin-bottom: 1.5rem;
    color: #666;
    line-height: 1.6;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}

.read-more:hover {
    color: var(--primary-dark);
}

.read-more i {
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(4px);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: #fff;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-numbers.current {
    background: var(--primary-color);
    color: #fff;
}

.page-numbers:hover:not(.current) {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* 无结果样式 */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
}

.no-results h2 {
    margin-bottom: 1rem;
    color: #333;
}

.no-results p {
    margin-bottom: 2rem;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .post-card {
        max-width: 500px;
        margin: 0 auto;
    }
}

/* 页眉美化 */
.site-header.enhanced-header {
    background: rgba(240, 240, 240, 0.85);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: none;
    backdrop-filter: blur(4px);
}
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.site-branding {
    display: flex;
    align-items: center;
}
.site-title {
    font-size: 1.6rem;
    font-weight: bold;
    margin: 0;
}
.site-title a {
    color: #222;
    text-decoration: none;
}
.main-navigation {
    display: flex;
    align-items: center;
}
.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-menu li a {
    color: #222;
    font-weight: 500;
    font-size: 1rem;
    padding: 8px 0;
    transition: color 0.2s;
}
.nav-menu li a:hover {
    color: #007bff;
}
.header-divider {
    height: 1px;
    background: #e0e0e0;
    width: 100%;
    margin-top: 0;
    opacity: 0.8;
}

/* 响应式导航 */
@media (max-width: 900px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        padding: 10px 0;
    }
    .main-navigation {
        width: 100%;
        margin-top: 10px;
    }
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
}

/* 页脚美化 */
.site-footer.enhanced-footer {
    background: #111;
    color: #fff;
    padding: 2.5rem 0 1.5rem 0;
    text-align: center;
}
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}
.footer-contact {
    font-size: 1rem;
    color: #fff;
    opacity: 0.85;
}
.footer-social {
    margin: 0.5rem 0 0.5rem 0;
}
.footer-social-icon {
    display: inline-block;
    margin: 0 0.5rem;
    color: #fff;
    font-size: 1.4rem;
    transition: color 0.2s;
}
.footer-social-icon:hover {
    color: #007bff;
}
.site-info {
    font-size: 0.95rem;
    color: #bbb;
    margin-top: 0.5rem;
}

@media (max-width: 600px) {
    .footer-content {
        gap: 0.7rem;
    }
    .footer-contact {
        font-size: 0.95rem;
    }
    .footer-social-icon {
        font-size: 1.1rem;
        margin: 0 0.3rem;
    }
} 