/*
Theme Name: Tiantian Fresh
Theme URI: https://example.com
Author: 胡胡
Author URI: https://example.com
Description: 一个支持 WooCommerce 的主题
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: my-woo-theme
*/
/* 必须的主题头部信息 */
/*
Theme Name: 天天天鲜主题
Author: 你自己
Description: 基于 WooCommerce 的自定义商城主题
Version: 1.0
*/

/* 通用 */
body {
    margin: 0;
    font-family: "Microsoft Yahei", Arial, sans-serif;
    background: #fff;
    color: #333;
    font-size: 14px;
}

a {
    text-decoration: none;
    color: #333;
}

a:hover {
    color: #4CAF50;
}

/* 容器 */
.container {
    width: 1200px;
    margin: 0 auto;
}

/* 顶部导航 */
.top-bar {
    background: #f5f5f5;
    padding: 5px 0;
    font-size: 12px;
    color: #666;
}

.top-bar .left {
    float: left;
}

.top-bar .right {
    float: right;
}

.top-bar a {
    margin-left: 10px;
    color: #666;
}

/* 清除浮动 */
.top-bar::after,
.main-header::after {
    content: "";
    display: block;
    clear: both;
}

/* 主头部 */
.main-header {
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    max-height: 60px;
}

.search-box {
    flex: 1;
    margin: 0 50px;
}

.search-box form {
    display: flex;
    border: 2px solid #4CAF50;
    border-radius: 4px;
    overflow: hidden;
}

.search-box input[type="search"] {
    flex: 1;
    padding: 8px 10px;
    border: none;
    font-size: 14px;
}

.search-box button {
    background: #4CAF50;
    color: #fff;
    border: none;
    padding: 8px 20px;
    cursor: pointer;
}

/* 分类导航 */
.main-nav {
    background: #4CAF50;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav li {
    margin: 0;
}

.main-nav a {
    display: block;
    padding: 12px 20px;
    color: #fff;
    font-size: 14px;
}

.main-nav a:hover {
    background: #45a049;
}

/* 首页 Banner */
.homepage-banner {
    margin: 20px 0;
}

.homepage-banner img {
    width: 100%;
    border-radius: 4px;
}

/* 分类区块 */
.product-category-block {
    margin-bottom: 40px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #4CAF50;
    margin-bottom: 15px;
}

.category-header h2 {
    font-size: 18px;
    color: #4CAF50;
}

.category-header a {
    font-size: 12px;
    color: #999;
}

.category-products {
    display: flex;
    gap: 20px;
}

/* WooCommerce 默认产品卡片调整 */
.woocommerce ul.products li.product {
    width: 200px;
    text-align: center;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 4px;
    transition: box-shadow 0.3s;
}

.woocommerce ul.products li.product:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.woocommerce ul.products li.product img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.woocommerce ul.products li.product .price {
    color: #e60012;
    font-weight: bold;
    margin-top: 5px;
}

/* 分类页面样式 */
.main_wrap {
    width: 1200px;
    margin: 0 auto;
    margin-top: 20px;
}

.breadcrumb {
    padding: 10px 0;
    font-size: 12px;
    color: #999;
}

.breadcrumb a {
    color: #666;
    margin: 0 5px;
}

.l_wrap {
    width: 200px;
}

.r_wrap {
    width: 980px;
}

.new_goods h3,
.category_filter h3 {
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.new_goods ul,
.category_filter ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.new_goods li {
    margin-bottom: 20px;
}

.new_goods li img {
    width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.new_goods li h4 {
    font-size: 14px;
    margin: 0 0 5px 0;
}

.new_goods li h4 a {
    color: #333;
}

.new_goods li .prize {
    color: #e60012;
    font-weight: bold;
}

.category_filter ul li {
    margin-bottom: 10px;
}

.category_filter ul li a {
    color: #666;
    display: block;
    padding: 5px 0;
    border-bottom: 1px dashed #eee;
}

.category_filter ul li a:hover {
    color: #4CAF50;
}

.sort_bar {
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.woocommerce-ordering {
    float: right;
}

.woocommerce-ordering select {
    padding: 5px;
    border: 1px solid #ddd;
}

/*.goods_type_list {*/
/*    list-style: none;*/
/*    padding: 0;*/
/*    margin: 0;*/
/*    display: flex;*/
/*    flex-wrap: wrap;*/
/*}*/

/*.goods_type_list li {*/
/*    width: 220px;*/
/*    margin-right: 20px;*/
/*    margin-bottom: 20px;*/
/*    border: 1px solid #eee;*/
/*    padding: 10px;*/
/*    position: relative;*/
/*}*/

/*.goods_type_list li:nth-child(4n) {*/
/*    margin-right: 0;*/
/*}*/

/*.goods_type_list li img {*/
/*    width: 100%;*/
/*    height: auto;*/
/*    margin-bottom: 10px;*/
/*}*/

/*.goods_type_list li h4 {*/
/*    font-size: 14px;*/
/*    margin: 0 0 10px 0;*/
/*}*/

/*.goods_type_list li h4 a {*/
/*    color: #333;*/
/*}*/

/*.operate {*/
/*    display: flex;*/
/*    align-items: center;*/
/*    justify-content: space-between;*/
/*}*/

/*.prize {*/
/*    color: #e60012;*/
/*    font-weight: bold;*/
/*}*/

/*.unit {*/
/*    font-size: 12px;*/
/*    color: #999;*/
/*}*/

.add_goods {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #4CAF50;
    border-radius: 50%;
    position: relative;
}

.add_goods::before,
.add_goods::after {
    content: "";
    position: absolute;
    background: #fff;
}

.add_goods::before {
    width: 10px;
    height: 2px;
    top: 9px;
    left: 5px;
}

.add_goods::after {
    width: 2px;
    height: 10px;
    top: 5px;
    left: 9px;
}

.pagenation {
    text-align: center;
    margin-top: 30px;
}

.woocommerce-pagination {
    text-align: center;
}

.woocommerce-pagination ul {
    display: inline-block;
    list-style: none;
}

.woocommerce-pagination ul li {
    display: inline-block;
    margin: 0 5px;
}

.woocommerce-pagination a,
.woocommerce-pagination span {
    display: block;
    padding: 5px 10px;
    border: 1px solid #ddd;
    color: #666;
    text-decoration: none;
}

.woocommerce-pagination .current,
.woocommerce-pagination a:hover {
    background: #4CAF50;
    color: #fff;
    border-color: #4CAF50;
}

/* 产品详情页样式 */
.product_detail {
    width: 100%;
}

.detail_hd {
    display: flex;
    margin-bottom: 30px;
}

.detail_pic {
    width: 350px;
}

.detail_info {
    width: 600px;
}

.zoom_wrapper {
    border: 1px solid #eee;
    margin-bottom: 10px;
    text-align: center;
}

.zoom_wrapper img {
    max-width: 100%;
    height: auto;
}

.thumb_list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.thumb_list li {
    margin-right: 10px;
    border: 1px solid #eee;
    cursor: pointer;
}

.thumb_list li img {
    width: 60px;
    height: 60px;
    display: block;
}

.detail_info h3 {
    font-size: 20px;
    color: #333;
    margin: 0 0 20px 0;
}

.detail_price {
    margin-bottom: 20px;
}

.detail_price .price {
    font-size: 24px;
    color: #e60012;
    font-weight: bold;
}

.detail_price .unit {
    font-size: 14px;
    color: #999;
    margin-left: 10px;
}

.detail_extras {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
}

.extra_item {
    margin-bottom: 10px;
    display: flex;
}

.extra_item .label {
    width: 80px;
    color: #666;
}

.extra_item .old_price {
    color: #999;
}

.extra_item .sales_count,
.extra_item .review_count {
    color: #333;
}

.detail_action {
    display: flex;
    align-items: center;
}

.detail_action .quantity {
    margin-right: 20px;
}

.detail_action .quantity input {
    width: 50px;
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
}

.single_add_to_cart_button {
    padding: 10px 20px;
    background: #e60012;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.single_add_to_cart_button:hover {
    background: #c0000f;
}

.detail_bd {
    clear: both;
}

.detail_tab {
    border: 1px solid #eee;
}

.tab_hd {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    border-bottom: 2px solid #4CAF50;
}

.tab_hd li {
    padding: 10px 20px;
    cursor: pointer;
    border-right: 1px solid #eee;
}

.tab_hd li.active {
    background: #4CAF50;
    color: #fff;
}

.tab_bd {
    padding: 20px;
}

.tab_item {
    display: none;
}

.tab_item.active {
    display: block;
}

.product_description,
.product_attributes {
    line-height: 1.6;
}

.product_attributes table {
    width: 100%;
    border-collapse: collapse;
}

.product_attributes table th,
.product_attributes table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

/* 购物车页面 */
.cart-container {
    margin: 20px 0;
}

.woocommerce-cart-form .shop_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.woocommerce-cart-form .shop_table th,
.woocommerce-cart-form .shop_table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.woocommerce-cart-form .shop_table th {
    background-color: #f9f9f9;
    font-weight: bold;
}

.woocommerce-cart-form .product-remove a {
    display: inline-block;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    background: #f0f0f0;
    border-radius: 50%;
    color: #999;
    text-decoration: none;
}

.woocommerce-cart-form .product-remove a:hover {
    background: #e74c3c;
    color: #fff;
}

.woocommerce-cart-form .product-thumbnail img {
    max-width: 80px;
    height: auto;
}

.woocommerce-cart-form .product-name a {
    color: #333;
    font-weight: bold;
}

.woocommerce-cart-form .product-quantity input {
    width: 60px;
    padding: 5px;
    text-align: center;
    border: 1px solid #ddd;
}

.woocommerce-cart-form .actions {
    text-align: right;
    padding: 20px 0;
}

.woocommerce-cart-form .coupon {
    float: left;
}

.woocommerce-cart-form .coupon input[type="text"] {
    padding: 8px;
    border: 1px solid #ddd;
    margin-right: 10px;
}

.woocommerce-cart-form .coupon button,
.woocommerce-cart-form .actions button,
.woocommerce-cart-form .actions .button {
    padding: 10px 20px;
    background: #4CAF50;
    color: #fff;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.woocommerce-cart-form .coupon button:hover,
.woocommerce-cart-form .actions button:hover,
.woocommerce-cart-form .actions .button:hover {
    background: #45a049;
}

.cart-collaterals {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.cart-totals-container {
    flex: 1;
    margin-right: 30px;
}

.cart-actions {
    flex: 0 0 300px;
    text-align: center;
}

.cart-actions .button {
    display: block;
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    text-align: center;
    text-decoration: none;
}

.cart-actions .checkout-button {
    background: #e60012;
    color: #fff;
}

.cart-actions .checkout-button:hover {
    background: #c0000f;
}

.cart_totals h2 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
}

.cart_totals table {
    width: 100%;
    border-collapse: collapse;
}

.cart_totals table th,
.cart_totals table td {
    padding: 8px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

.cart_totals table th {
    text-align: left;
    background-color: #f9f9f9;
}

/* 底部 */
.site-footer {
    background: #f5f5f5;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    font-size: 12px;
    color: #666;
}

.site-footer a {
    color: #666;
    margin: 0 5px;
}

/* 添加到主题CSS文件中 */
.paid-content-locked {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-left: 4px solid #0073aa;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.paid-content-locked .button {
    background: #0073aa;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 3px;
    display: inline-block;
    margin-top: 10px;
}

.paid-content-locked .button:hover {
    background: #005a87;
}

#frontend-post-form p {
    margin-bottom: 15px;
}

#frontend-post-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#frontend-post-form input[type="text"],
#frontend-post-form input[type="number"],
#frontend-post-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* 文章分类页面样式 */
.post-categories-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 分类导航 */
.post-categories-page .category-navigation {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.post-categories-page .nav-title {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
}

.post-categories-page .category-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 12px;
}

.post-categories-page .category-item {
    margin: 0;
}

.post-categories-page .category-item a {
    display: block;
    padding: 10px 20px;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.post-categories-page .category-item a:hover {
    background-color: #e9e9e9;
}

.post-categories-page .category-item.active a {
    background-color: #0073aa;
    color: #fff;
}

.post-categories-page .category-item .count {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* 分类头部 */
.post-categories-page .category-header {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.post-categories-page .category-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 2rem;
}

.post-categories-page .post-count {
    font-size: 1rem;
    color: #666;
    font-weight: normal;
}

.post-categories-page .category-description {
    color: #666;
    line-height: 1.6;
    font-size: 1.1rem;
}

/* 无内容提示 */
.no-posts,
.no-categories {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.no-posts h2,
.no-categories h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 15px;
}

.no-posts p,
.no-categories p {
    color: #666;
    margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .post-categories-page {
        padding: 10px;
    }

    .post-categories-page .category-navigation {
        padding: 15px;
    }

    .post-categories-page .category-list {
        gap: 8px;
    }

    .post-categories-page .category-item a {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .post-categories-page .category-header {
        padding: 20px;
    }

    .post-categories-page .category-title {
        font-size: 1.5rem;
    }

    .post-content {
        padding: 15px;
    }

    .post-meta-info {
        flex-direction: column;
        gap: 10px;
    }
}
/* 标签云页面样式 */
.tag-cloud-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 标签云 */
.tag-cloud-container {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cloud-title {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.tag-item {
    display: inline-block;
    padding: 5px 12px;
    background-color: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.tag-item:hover {
    background-color: #0073aa;
    color: #fff;
    transform: translateY(-2px);
}

.tag-item.active {
    background-color: #0073aa;
    color: #fff;
    font-weight: bold;
}

/* 标签头部 */
.tag-header {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tag-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 2rem;
}

.post-count {
    font-size: 1rem;
    color: #666;
    font-weight: normal;
}

.tag-description {
    color: #666;
    line-height: 1.6;
    font-size: 1.1rem;
}

/* 文章列表 */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.post-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.post-item-inner {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .post-item-inner {
        flex-direction: row;
    }
}

.post-thumbnail {
    overflow: hidden;
}

@media (min-width: 768px) {
    .post-thumbnail {
        flex: 0 0 300px;
    }
}

.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-item:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #0073aa;
}

.post-excerpt {
    color: #666;
    line-height: 1.7;
    margin-bottom: 20px;
    flex-grow: 1;
}

.post-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: #888;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
}

.meta-item i {
    margin-right: 5px;
}

.post-categories-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.post-categories a,
.post-tags a {
    display: inline-block;
    padding: 4px 10px;
    margin: 0 5px 5px 0;
    background-color: #f0f0f0;
    color: #666;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.85rem;
}

.post-categories a:hover,
.post-tags a:hover {
    background-color: #0073aa;
    color: #fff;
}

/* 分页样式 */
.tag-cloud-page .pagination {
    text-align: center;
    margin-top: 30px;
    padding: 20px 0;
}

.tag-cloud-page .pagination a,
.tag-cloud-page .pagination span {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
}

.tag-cloud-page .pagination a:hover {
    background-color: #f5f5f5;
    border-color: #999;
}

.tag-cloud-page .pagination .current {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* 无内容提示 */
.no-posts,
.no-tags {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.no-posts h2,
.no-tags h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 15px;
}

.no-posts p,
.no-tags p {
    color: #666;
    margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tag-cloud-page {
        padding: 10px;
    }

    .tag-cloud-container {
        padding: 15px;
    }

    .tag-header {
        padding: 20px;
    }

    .tag-title {
        font-size: 1.5rem;
    }

    .post-content {
        padding: 15px;
    }

    .post-meta-info {
        flex-direction: column;
        gap: 10px;
    }

    .tag-cloud {
        gap: 8px;
    }

    .tag-item {
        padding: 4px 10px;
        font-size: 12px !important;
    }
}