/* --- ★ 精准链接样式重置 (去除不必要的虚线下划线) ★ --- */

/* 1. 全局移除链接的默认下划线 */
a {
    text-decoration: none !important;
}

/* 2. 只给正文内容区域的链接，加上下划线 */
.entry-content a,
.woocommerce-MyAccount-content p a,
.comment-content a {
    text-decoration: underline !important;      /* 使用实线下划线 */
    text-decoration-style: dotted !important;   /* 虚线样式 */
    text-decoration-color: #aaa !important;   /* 颜色淡一点 */
    transition: text-decoration-color 0.3s ease !important;
}

/* 3. 正文链接悬停时，下划线变实、颜色变深 */
.entry-content a:hover,
.woocommerce-MyAccount-content p a:hover,
.comment-content a:hover {
    text-decoration-style: solid !important;
    text-decoration-color: var(--color-primary) !important;
}

/* --- 1. 全局定义 --- */
:root {
    --color-primary: #b7282e;    /* 茜色 */
    --color-secondary: #333333;  /* 墨色 */
    --color-base: #fcfaf2;       /* 生成色 */
    --color-accent: #c8c2be;     /* 浅灰 */
}

/* 字体与背景 */
body {
    font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif !important;
    background-color: var(--color-base) !important;
    color: var(--color-secondary) !important;
}

/* --- 2. Header (头部) --- */
.site-header, header.site-header {
    background-color: var(--color-base) !important;
    box-shadow: none !important;
    border-bottom: 1px solid #eee !important;
}

/* 菜单文字 */
.gMenu .nav > li > a {
    font-size: 15px !important;
    letter-spacing: 0.1em !important;
    color: var(--color-secondary) !important;
    transition: color 0.3s ease !important;
    position: relative !important;
}

/* 菜单下划线动画 */
.gMenu .nav > li > a::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 50% !important;
    width: 0 !important;
    height: 2px !important;
    background-color: var(--color-primary) !important;
    transition: width 0.3s ease, left 0.3s ease !important;
}
.gMenu .nav > li > a:hover::after {
    width: 100% !important;
    left: 0 !important;
}
.gMenu .nav > li > a:hover {
    background-color: transparent !important;
    color: var(--color-primary) !important;
}

/* Logo 居中修正 */
.site-header .container, .site-header-row {
    display: flex !important;
    align-items: center !important;
}

/* --- 3. WooCommerce 商品列表 (核心修复) --- */

/* 卡片容器：优雅的圆角白卡片 */
ul.products li.product {
    background-color: #fff !important;
    border-radius: 10px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05) !important; /* 淡阴影 */
    padding: 15px !important; /* 给内部留呼吸空间 */
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    overflow: hidden !important;
    border: none !important;
}

/* 悬停上浮 */
ul.products li.product:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 12px 25px rgba(0,0,0,0.1) !important;
}

/* 图片圆角 */
ul.products li.product img {
    border-radius: 8px !important;
}

/* 标题 */
ul.products li.product h2 {
    text-align: center !important;
    font-size: 16px !important;
    color: var(--color-secondary) !important;
    margin: 15px 0 5px !important;
    line-height: 1.5 !important;
    font-weight: normal !important; /* 去掉粗体更优雅 */
}

/* 价格 */
ul.products li.product .price {
    text-align: center !important;
    font-size: 18px !important;
    color: var(--color-primary) !important;
    font-family: "Lato", sans-serif !important;
    font-weight: bold !important;
    display: block !important;
    margin-bottom: 15px !important;
}

/* --- 购物车按钮终极居中修复 (2025最终版) --- */

/* 1. 父容器：只负责居中 */
ul.products li.product .add_to_cart_button {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 15px 0 10px !important;
    padding: 0 !important;
}

/* 2. 按钮本身：只负责自己的长相 */
ul.products li.product .button {
    /* 核心修复：内部不再使用 Flex，交给父级处理 */
    display: inline-block !important; /* 改回行内块 */
    
    /* 形状和大小 */
    width: 85% !important;
    max-width: 220px !important;
    border-radius: 50px !important;
    padding: 15px 20px !important; /* 上下15px，左右20px，让它饱满 */
    
    /* 颜色和字体 */
    background-color: var(--color-primary) !important;
    color: #fff !important;
    font-weight: bold !important;
    text-align: center !important;
    line-height: 1.2 !important; /* 稍微增加行高 */
    
    /* 动画 */
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
}

/* 3. 按钮内的图标 */
ul.products li.product .button .wc-forward::after {
    margin-left: 8px !important; /* 给图标和文字之间加点空隙 */
}

/* 4. 悬停效果 */
ul.products li.product .button:hover {
    background-color: #9a2126 !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(183, 40, 46, 0.35) !important;
}


/* 修复 Sale 标签 */
ul.products li.product .onsale {
    top: 10px !important;
    right: 10px !important;
    border-radius: 50% !important;
}

/* --- 4. 动画与全局体验 --- */
/* 淡入动画 */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.main-section {
    animation: fadeInUp 0.8s ease-out !important;
}

/* 全局标题留白 */
h2, h3 { margin-top: 30px !important; margin-bottom: 20px !important; }
p { line-height: 1.8 !important; }

/* --- 5. Footer (页脚) 深度清理 --- */
.site-footer {
    background-color: #333 !important;
    color: #fff !important;
    padding-top: 40px !important;
    border: none !important;
}

/* 隐藏 Lightning 自带版权信息 (Powered by...) */
.site-footer-copyright p:nth-child(2),
.site-footer-copyright span:nth-child(2) {
    display: none !important;
}

/* 只保留我们自己的 Copyright */
.site-footer-copyright {
    font-size: 12px !important;
    opacity: 0.6;
    margin-top: 20px !important;
}

/* --- 6. WooCommerce "我的账户"页面现代化重构 --- */

/* 页面主标题居中 */
.woocommerce-account .page-title,
.woocommerce-MyAccount-content .entry-title {
    text-align: center !important;
    margin-bottom: 30px !important;
}

/* 将左侧导航菜单变成横向标签页 */
.woocommerce-MyAccount-navigation {
    width: 100% !important;
    margin-bottom: 30px !important;
    border: none !important;
}

.woocommerce-MyAccount-navigation ul {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 10px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 美化标签页按钮 */
.woocommerce-MyAccount-navigation ul li {
    margin: 0 !important;
    flex: 0 0 auto !important;
}

.woocommerce-MyAccount-navigation ul li a {
    display: block !important;
    padding: 12px 24px !important;
    background-color: #f5f5f5 !important;
    color: var(--color-secondary) !important;
    border-radius: 25px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    font-weight: normal !important;
    border: 1px solid #e0e0e0 !important;
}

/* 标签页悬停效果 */
.woocommerce-MyAccount-navigation ul li a:hover {
    background-color: #e8e8e8 !important;
    color: var(--color-primary) !important;
}

/* 激活状态的标签页：品牌红背景 + 白色文字 */
.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--active a {
    background-color: var(--color-primary) !important;
    color: #fff !important;
    border-color: var(--color-primary) !important;
}

/* 右侧内容区域：白色圆角卡片 */
.woocommerce-MyAccount-content {
    width: 100% !important;
    background-color: #fff !important;
    border-radius: 12px !important;
    padding: 30px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08) !important;
}

/* 移动端响应式优化 */
@media (max-width: 768px) {
    .woocommerce-MyAccount-navigation ul {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .woocommerce-MyAccount-navigation ul li {
        width: 100% !important;
    }
    
    .woocommerce-MyAccount-navigation ul li a {
        text-align: center !important;
    }
}

/* 移除导航菜单的多余边框和分割线 */
.woocommerce-MyAccount-navigation,
.woocommerce-MyAccount-navigation ul,
.woocommerce-MyAccount-navigation hr {
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
}

.woocommerce-MyAccount-navigation hr {
    display: none !important;
}

/* 移除内容区域表格的所有边框 */
.woocommerce-MyAccount-content table,
.woocommerce-MyAccount-content table thead,
.woocommerce-MyAccount-content table tbody,
.woocommerce-MyAccount-content table tr,
.woocommerce-MyAccount-content table th,
.woocommerce-MyAccount-content table td {
    border: none !important;
}

/* 表头样式：浅灰色背景 */
.woocommerce-MyAccount-content table thead {
    background-color: #f8f8f8 !important;
}

.woocommerce-MyAccount-content table thead th {
    padding: 15px 10px !important;
    font-weight: 600 !important;
    color: var(--color-secondary) !important;
}

/* 表格行内边距，让每一行更舒展 */
.woocommerce-MyAccount-content table tbody tr td {
    padding: 15px 10px !important;
}

/* 表格行悬停效果：浅灰色背景 */
.woocommerce-MyAccount-content table tbody tr:hover {
    background-color: #f9f9f9 !important;
    transition: background-color 0.2s ease !important;
}

/* 美化"查看"按钮：品牌红背景 + 胶囊圆角 */
.woocommerce-MyAccount-content .woocommerce-button,
.woocommerce-MyAccount-content .button {
    background-color: var(--color-primary) !important;
    color: #fff !important;
    border-radius: 25px !important;
    padding: 8px 20px !important;
    border: none !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
    font-size: 14px !important;
}

.woocommerce-MyAccount-content .woocommerce-button:hover,
.woocommerce-MyAccount-content .button:hover {
    background-color: #9a2126 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(183, 40, 46, 0.3) !important;
}

