/*
Theme Name: Kcucu Shop
Theme URI: https://wp.kcucu.com
Author: Kcucu
Description: 简约清新风格的WordPress电商主题，完美适配WooCommerce，采用薄荷绿主色调
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: kcucu-shop
*/

/* ===== 全局重置 & 基础 ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --primary: #4ECDC4;
    --primary-dark: #3BB5AD;
    --primary-light: #E8F8F6;
    --accent: #FF6B6B;
    --accent-hover: #E55A5A;
    --text-dark: #2D3436;
    --text-mid: #636E72;
    --text-light: #B2BEC3;
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
    --bg-gray: #F1F3F5;
    --border: #E9ECEF;
    --border-dark: #DEE2E6;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.7;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

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

/* ===== 头部导航 ===== */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.site-title a {
    color: var(--primary);
}

.site-description {
    display: none;
}

.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 5px;
}

.main-navigation ul li a {
    display: block;
    padding: 8px 16px;
    color: var(--text-mid);
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item a {
    color: var(--primary);
    background: var(--primary-light);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-cart {
    position: relative;
}

.header-cart .cart-icon {
    font-size: 22px;
    color: var(--text-dark);
    padding: 8px;
    position: relative;
}

.header-cart .cart-count {
    position: absolute;
    top: -2px;
    right: -4px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ===== 首页英雄区 ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-light) 0%, #D4F5F2 50%, #C8F0EC 100%);
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(78, 205, 196, 0.08) 0%, transparent 50%);
    animation: heroFloat 15s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, -20px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 20px;
    line-height: 1.2;
}

.hero-title span {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-mid);
    margin: 0 0 35px;
    line-height: 1.6;
}

.hero-button {
    display: inline-block;
    padding: 16px 40px;
    background: var(--primary);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.hero-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.5);
    color: white;
}

/* ===== 内容区 ===== */
.content-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 10px;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    color: var(--text-mid);
    font-size: 16px;
    margin: 0 0 40px;
}

/* ===== WooCommerce 商品网格 ===== */
ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
}

li.product {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

li.product:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

li.product a {
    display: block;
    text-decoration: none;
}

li.product .woocommerce-loop-product__link {
    padding: 0;
}

li.product img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    margin: 0;
}

li.product .product-details {
    padding: 20px;
}

li.product .woocommerce-loop-product__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 8px;
    padding: 0;
    line-height: 1.4;
}

li.product .price {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 15px;
    display: block;
}

li.product .price del {
    font-size: 14px;
    color: var(--text-light);
    margin-right: 8px;
    font-weight: 400;
}

li.product .price ins {
    text-decoration: none;
}

li.product .button {
    display: inline-block;
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
}

li.product .button:hover {
    background: var(--primary-dark);
    color: white;
}

li.product .added_to_cart {
    display: none;
}

/* ===== 商品分类 ===== */
.product-categories-section {
    padding: 60px 0;
    background: var(--bg-white);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.category-card {
    text-align: center;
    padding: 30px 20px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.category-card .category-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.category-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--text-dark);
}

.category-card .count {
    font-size: 13px;
    color: var(--text-mid);
    margin-top: 5px;
}

/* ===== 页脚 ===== */
.site-footer {
    background: var(--text-dark);
    color: rgba(255,255,255,0.8);
    padding: 60px 20px 30px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-widget h3 {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

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

.footer-widget ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 14px;
    color: rgba(255,255,255,0.5);
}

/* ===== 商品详情页 ===== */
.single-product .product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.single-product .woocommerce-product-gallery {
    position: sticky;
    top: 90px;
}

.single-product .woocommerce-product-gallery img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.single-product .product_title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 20px;
}

.single-product .price {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 25px;
}

.single-product .price del {
    font-size: 18px;
    color: var(--text-light);
    font-weight: 400;
    margin-right: 10px;
}

.single-product .price ins {
    text-decoration: none;
}

.single-product .woocommerce-product-details__short-description {
    color: var(--text-mid);
    line-height: 1.8;
    margin: 0 0 25px;
}

.single-product .cart {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.single-product .quantity {
    display: flex;
    align-items: center;
}

.single-product .quantity input {
    width: 60px;
    height: 48px;
    text-align: center;
    font-size: 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
}

.single-product .quantity input:focus {
    border-color: var(--primary);
}

.single-product .single_add_to_cart_button {
    flex: 1;
    min-width: 200px;
    padding: 14px 32px;
    background: var(--primary);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.single-product .single_add_to_cart_button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ===== 购物车页面 ===== */
.woocommerce-cart .cart-empty {
    text-align: center;
    padding: 60px 20px;
    font-size: 20px;
    color: var(--text-mid);
}

.woocommerce-cart .return-to-shop {
    text-align: center;
    margin: 20px 0;
}

.woocommerce-cart .return-to-shop .button {
    display: inline-block;
    padding: 14px 36px;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    font-weight: 600;
}

.woocommerce-cart table.cart {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.woocommerce-cart table.cart th {
    background: var(--bg-light);
    padding: 15px 20px;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid var(--border);
}

.woocommerce-cart table.cart td {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.woocommerce-cart .cart-collaterals {
    margin-top: 30px;
}

.woocommerce-cart .cart_totals {
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

/* ===== 结算页 ===== */
.woocommerce-checkout .checkout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
}

.woocommerce-checkout #customer_details {
    padding: 0;
}

.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px;
}

.woocommerce-checkout .form-row {
    margin-bottom: 20px;
}

.woocommerce-checkout .form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.woocommerce-checkout .form-row input,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}

.woocommerce-checkout .form-row input:focus,
.woocommerce-checkout .form-row select:focus {
    border-color: var(--primary);
}

#order_review {
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

#order_review_heading {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px;
}

#payment {
    margin-top: 20px;
}

#payment .payment_methods {
    list-style: none;
    padding: 0;
    margin: 0;
}

#payment .payment_methods li {
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

#payment .payment_methods label {
    font-weight: 600;
    cursor: pointer;
}

#place_order {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

#place_order:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .single-product .product {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .woocommerce-checkout .checkout {
        grid-template-columns: 1fr;
    }
    
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 15px 20px;
        gap: 10px;
    }
    
    .main-navigation {
        order: 3;
        width: 100%;
    }
    
    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    ul.products {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
    li.product img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    ul.products {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    li.product .product-details {
        padding: 12px;
    }
    
    li.product .woocommerce-loop-product__title {
        font-size: 14px;
    }
    
    li.product .price {
        font-size: 16px;
    }
    
    li.product .button {
        padding: 8px 16px;
        font-size: 12px;
    }
}