/* 基本スタイル */
body {
    font-family: '游ゴシック体', YuGothic, 'Yu Gothic', sans-serif;
    color: #333;
    line-height: 1.6;
    /* 新增全局暖色背景 */
    background: #fff5e6;
}

/* 記事ページスタイル */
.article-container {
    max-width: 800px;
    margin: 100px auto 50px;
    padding: 0 20px;
    position: relative;
    z-index: 1;
    /* 调整为和纸色调 */
    background: rgba(255,245,230,0.8);
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

/* 商品ページスタイル */
.product-list {
    padding: 150px 5% 50px; /* 增加顶部间距 */
    margin-top: 0; /* 移除之前的负边距 */
    position: relative;
    z-index: 0;
    background: linear-gradient(to bottom, #fff9f0 0%, #f5e9d8 100%);
}

/* 商品网格添加间隔阴影 */
.product-grid {
    display: grid;
    gap: 2rem;
    /* 新增卡片阴影 */
    padding: 20px 0;
}

/* 商品卡片样式调整 */
.product-card {
    background: #fffaf5; /* 暖白色背景 */
    border: 1px solid #f0e6db; /* 添加边框 */
    box-shadow: 0 5px 20px rgba(140, 94, 74, 0.08); /* 暖色阴影 */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(140, 94, 74, 0.15);
}

/* 商品图片容器 */
.product-card img {
    height: 240px;
    transition: transform 0.4s ease;
    border-bottom: 3px solid #f0e6db; /* 添加分隔线 */
}

.product-card:hover img {
    transform: scale(1.03);
}

/* 商品详情区域 */
.product-details {
    padding: 1.5rem;
    background: rgba(255,255,255,0.8); /* 半透明背景 */
}

.price {
    color: #8c5e4a; /* 日式赤茶色 */
    font-weight: 600;
    font-size: 1.2rem;
}

/* CTA按钮美化 */
.cta-button {
    background: #b87d5e; /* 陶器色 */
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: '游ゴシック体', YuGothic;
}

.cta-button:hover {
    background: #a56a5a;
    transform: translateY(-2px) rotate(1deg);
    box-shadow: 0 3px 12px rgba(165, 106, 90, 0.3);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .product-card {
        margin: 0 10px;
    }
    
    .product-card img {
        height: 180px;
    }
    
    .cta-button {
        padding: 8px 20px;
    }
}

/* 新增商品网格布局 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    /* 关键约束声明 */
    min-width: 0;
}

.product-image-container {
    /* 新增网格项约束 */
    min-width: 0;
    /* 修复Safari高度问题 */
    aspect-ratio: 4/3;
}

.product-image-container > img {
    /* 增加保护性声明 */
    min-height: 100% !important;
    max-height: none !important;
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .product-image-container {
        height: 240px;
    }
}

@media (max-width: 768px) {
    .product-image-container {
        height: 200px;
    }
}

/* 記事リストレイアウト更新 */
/* 调整主容器结构 */
.article-list-container {
    display: grid;
    grid-template-columns: 1fr 300px; /* 简化列定义 */
    gap: 2rem;
    max-width: 1600px;
    margin: 2rem auto;
    padding: 0 20px; /* 增大左右间距 */
}

/* 修复新闻卡片容器 */
.news-card {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    min-width: 0;
    flex: 1 1 0%;
    width: 100%;
    box-sizing: border-box;
    /* 新增溢出控制 */
    overflow: hidden;
}

.news-image {
    flex: 0 0 auto;
    width: 45%;
    min-width: 280px;
    max-width: 400px;
    height: 240px; /* 新增固定高度 */
    position: relative;
    padding-top: 0; /* 移除padding-top */
}

/* 修复图片实际尺寸 */
.news-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 统一移动端样式 */
/* 修复媒体查询嵌套问题 */
@media (max-width: 768px) {
    .news-card {
        flex-direction: column;
        padding: 1rem;
    }
    
    .news-image {
        width: 100%;
        height: 200px; /* 移动端固定高度 */
    }
}

/* 新增商品卡片图片容器 */
.product-card {
    position: relative;
    overflow: hidden;
    min-width: 0; /* 修复网格布局溢出 */
}

.product-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .product-card img {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .product-card img {
        height: 180px;
    }
}

/* フッター */
.main-footer {
    background: linear-gradient(135deg, #8c5e4a, #b87d5e); /* 赤茶色渐变 */
    color: #fff3e6;
    /* 保持其他定位属性不变 */
}

.footer-section h4::after {
    background: #a56a5a; /* 暖色调下划线 */
}

.footer-nav a {
    color: #e8d4c6; /* 浅米色文字 */
}

.footer-nav a:hover {
    color: #ffd8bf; /* 暖色悬停 */
}

.social-links a {
    background: rgba(255,255,255,0.15); /* 更柔和的按钮 */
}

.social-links a:hover {
    background: #c28d75; /* 陶器色悬停 */
}

.copyright {
    color: #f0e0d8; /* 浅米灰文字 */
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: #3498db;
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-nav a {
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 20px;
}

.footer-nav a::before {
    content: '▶';
    position: absolute;
    left: 0;
    opacity: 0;
    transition: all 0.3s ease;
}

.footer-nav a:hover {
    color: #3498db;
    padding-left: 25px;
}

.footer-nav a:hover::before {
    opacity: 1;
    left: -3px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px) rotate(5deg);
    background: #3498db;
}

.copyright {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.copyright:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-nav ul {
        align-items: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* 重置全局header样式 */ /* 新增重置规则 */
header {
    all: initial;
    display: block;
}

/* 在现有header样式基础上修改 */
header.main-header {
    /* 更新背景色与全站一致 */
    background: #fff5e6; /* 与body背景色统一 */
    box-shadow: 0 2px 15px rgba(140, 94, 74, 0.05); /* 调浅阴影 */
}

/* 修正嵌套错误并设置横向布局 */
.nav-menu {
    display: flex;
    gap: 1.5rem;
    margin-left: auto;  /* 新增右对齐关键属性 */
    padding-right: 2rem;
}

/* 调整导航菜单颜色 */
.nav-menu a {
    color: #8c5e4a; /* 日式赤茶色 */
    /* 保持原有基础样式 */
    text-decoration: none;
    padding: 0.8rem 1.2rem;
    transition: all 0.3s ease;
    
    /* 字体设置 */
    font-family: '游ゴシック体', YuGothic;
    font-weight: 500;
    letter-spacing: 0.5px;
    line-height: 1.8;
}

.nav-menu a:hover {
    color: #b87d5e; /* 加深悬停色 */
}

.nav-menu a::after {
    background: #b87d5e; /* 下划线颜色同步 */
}

/* 修改logo颜色 */
.logo {
    background: linear-gradient(to right, #8c5e4a 0%, #b87d5e 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* 移动端菜单背景调整 */
@media (max-width: 768px) {
    .nav-menu {
        background: rgba(255,245,230,0.95); /* 半透明白色 */
    }
    .nav-menu a {
        color: #8c5e4a;
    }
}
.logo {
    color: #fff3e6;
    font-size: 1.8rem;
    /* 添加渐变文字效果 */
    background: linear-gradient(to right, #fff3e6 0%, #ffd8bf 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* 添加悬浮动画 */
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    text-shadow: 0 2px 4px rgba(255, 216, 191, 0.3);
}

.nav-menu a {
    /* 删除嵌套在a选择器中的nav-menu规则（第483-516行） */
    .nav-menu a {
        /* 在现有nav-menu样式基础上修改 */
            
            nav {
                padding: 1rem;
                position: relative;
            }
        }

    }
    
    /* 合并重复的媒体查询（第525-555行和557-573行） */
    @media (max-width: 768px) {
        nav {
            position: relative;
            padding: 1rem !important;
            min-height: 60px;
        }
        
        .nav-menu {
            position: absolute;
            top: calc(100% + 5px);
            left: 0;
            width: 100%;
            margin-top: 0;
            z-index: 1001;
            background: rgba(255,245,230,0.98);
            /* 合并移动端样式 */
            display: none;
            opacity: 1;
            transform: translateY(0);
            flex-direction: column;
            padding: 1rem 0 !important;
        }
        
        .nav-menu.active {
            display: flex;
            transition: opacity 0.3s ease, transform 0.3s ease;
        }
        
        .nav-menu li {
            text-align: left;
            padding: 0.8rem 1.5rem;
        }
    }
    
    /* 保留唯一的nav-menu基础样式（第420-423行） */
    .nav-menu {
        display: flex;
        gap: 1.5rem;
        margin-left: auto;
        padding-right: 2rem;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .nav-menu {
        position: relative;  /* 新增定位基准 */
        padding: 1rem !important;
        min-height: 60px;  /* 新增最小高度 */
    }
    
    .nav-menu {
        position: absolute;
        top: calc(100% + 5px);  /* 增加微小间距 */
        left: 0;
        width: 100%;
        margin-top: 0;  /* 移除可能干扰的margin */
        z-index: 1001;  /* 提升层级 */
        background: rgba(255,245,230,0.98);  /* 匹配header背景色 */
    }

    /* 新增菜单项对齐方式 */
    .nav-menu li {
        text-align: left;
        padding: 0.8rem 1.5rem;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .nav-menu {
        position: absolute;
        top: calc(100% + 5px);
        left: 0;
        width: 100%;
        margin-top: 0;
        z-index: 1001;
        /* 删除背景色设置 */
        /* background: rgba(255,245,230,0.98); */
    }
}

/* 删除另一个媒体查询中的背景色设置 */
@media (max-width: 768px) {
    .nav-menu {
        /* 保持其他属性不变 */
        transform: translateY(-10px);
        opacity: 0;
        transition: all 0.3s ease;
        flex-direction: column;
    }
}

/* 修正main-visual的margin-top */ /* 添加间距补偿 */
/* 修正main-visual背景图路径 */
/* 修改主视觉区域 */
.main-visual {
    height: 70vh;
    margin-top: 68px;
    background-color: #f5e9d8;
    background-image: url('../images/main-visual.jpg');
    background-position: center;
    background-size: contain; /* 改为 contain 显示完整图片 */
    position: relative;
    overflow: hidden; /* 新增隐藏溢出 */
}

/* 新增图片强制显示规则 */
.main-visual::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(140, 94, 74, 0.05); /* 新增半透明遮罩 */
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .main-visual {
        background-size: contain;
        background-repeat: no-repeat;
    }
}

/* 新增文章页图片样式 */
.article-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(140, 94, 74, 0.1);
}

.sidebar-banner {
    width: 300px;
    height: 250px;
    object-fit: cover;
    border-radius: 6px;
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .article-image {
        height: 320px;
    }
}

@media (max-width: 768px) {
    .article-image {
        height: 240px;
        margin: 1.5rem 0;
    }
    
    .sidebar-banner {
        width: 100%;
        height: 180px;
    }
}

/* 汉堡菜单样式 */
.hamburger {
    display: none; /* 默认隐藏 */
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: #8c5e4a;
    transition: all 0.3s ease;
}

/* 移动端显示汉堡菜单 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        opacity: 1;  /* 修复：移除冲突的opacity设置 */
        transform: translateY(0);
        z-index: 1000;  /* 确保菜单在最上层 */
    }
    
    .nav-menu.active {
        display: flex;
        /* 添加过渡动画 */
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
}

/* 添加汉堡菜单激活状态 */
.hamburger.active span:first-child {
    transform: rotate(45deg) translate(6px, 6px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:last-child {
    transform: rotate(-45deg) translate(6px, -6px);
}