/* 基础重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 移除所有链接的默认样式 */
a {
    color: inherit;
    text-decoration: none;
    outline: none;
    display: inline-block;
}

/* 移除链接的焦点轮廓 */
a:focus {
    outline: none;
}

/* 移除链接的活动状态 */
a:active {
    color: inherit;
}

/* 移除链接的悬停默认效果 */
a:hover {
    text-decoration: none;
    color: inherit;
}

html {
    overflow-x: hidden;
    overflow-y: auto;
    touch-action: pan-y;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    background-color: white;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

/* 为所有p标签添加响应式字体大小基础设置 */
p {
    font-size: clamp(14px, 1.4vw, 16px);
    /* 基础字体大小响应式设置 */
    white-space: normal;
    /* 允许文本换行 */
    word-break: break-word;
    /* 防止长单词导致溢出 */
    max-width: 100%;
    /* 限制最大宽度 */
    box-sizing: border-box;
    /* 包含padding在宽度计算中 */
    line-height: 1.8;
    /* 良好的行高 */
    text-align: left;
}

/* 底部p标签样式 - 暂时移除，使用下面更完整的定义 */

/* 导航栏样式 - 改为固定定位，开始时透明背景，滚动时变化 */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: transparent;
    z-index: 1000;
    padding: 0;
    border-bottom: none;
    transition: all 0.5s ease-in-out;
    transform: translateY(0);
    opacity: 1;
}

/* 导航栏隐藏状态 */
header.hidden {
    transform: translateY(-100%);
    /* 向上移动到屏幕外 */
    opacity: 0;
    /* 完全透明 */
}

/* 导航栏滚动显示状态 - 添加背景和阴影 */
header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0;
}

/* 滚动时导航文字变为黑色 */
header.scrolled .main-nav ul li a {
    color: #333;
}

/* 滚动时导航文字悬停效果 */
header.scrolled .main-nav ul li a:hover,
header.scrolled .main-nav ul li a.active {
    color: #007bff;
}

/* 滚动时汉堡菜单图标变为黑色 */
header.scrolled .menu-icon {
    background-color: #333;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    height: 50px;
    box-sizing: border-box;
}

/* Logo样式 - 设置为左对齐 */
.logo {
    position: relative;
    top: auto !important;
    left: auto;
    transform: none;
    z-index: 1003;
    display: flex;
    align-items: center;
    margin: 0;
    width: auto;
    height: auto;
    margin-top: 6px;
    box-sizing: border-box;
}

.logo img {
    max-height: 40px;
    width: auto;
    transition: max-height 0.3s ease;
    /* 添加平滑大小过渡 */
}

/* 汉堡菜单样式 */
.menu-toggle {
    display: none;
    /* 默认隐藏，只在响应式断点处显示 */
    flex-direction: column;
    justify-content: space-between;
    width: 36px;
    /* 增大宽度 */
    height: 28px;
    /* 增大高度 */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: absolute;
    left: 20px;
    top: 3vh;
    /* 向下移动 */
    transform: translateY(-50%);
}

.menu-icon {
    display: block;
    width: 100%;
    height: 2px;
    /* 减小线条粗细 */
    background-color: #333;
    transition: all 0.3s ease;
}

/* 汉堡菜单激活状态 - 转换为X图标 */
.menu-toggle.active .menu-icon:nth-child(1) {
    transform: rotate(45deg) translateY(9px);
}

.menu-toggle.active .menu-icon:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .menu-icon:nth-child(3) {
    transform: rotate(-45deg) translateY(-9px);
}

/* 主导航样式 - 基础设置，在桌面端正常显示，在移动端将通过媒体查询重写为固定定位 */
.main-nav {
    display: flex;
    width: auto;
    background-color: transparent;
    opacity: 1;
    transform: translateX(0);
    position: relative;
    height: auto;
    box-shadow: none;
    padding-top: 0;
    margin-left: auto;
    margin-right: 0;
    z-index: 1000;
}

/* 桌面端导航链接样式 - 使用白色文字以适应深色背景 */
.main-nav ul {
    display: flex;
    list-style: none;
    margin: 20px 0 0 0;
    padding: 0;
    white-space: nowrap;
    /* 防止菜单项换行 */
}

.main-nav ul li {
    margin-right: 25px;
    /* 保持右侧边距 */
    margin-left: 0;
    /* 重置左侧边距 */
}

.main-nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 5px 0 0 0;
    transition: color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 大屏下英文显示样式 */
.nav-en {
    display: inline-block;
    font-size: 11px;
    margin-top: 0;
    opacity: 0.8;
}

/* 小屏下英文显示在中文右边 */
@media (max-width: 992px) {
    .main-nav ul li a {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
    }

    .nav-en {
        margin-top: 0;
        margin-left: 8px;
        font-size: 11px;
    }
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: #007bff;
}

/* 响应式导航栏样式 - 当水平菜单不能完全显示时切换为折叠菜单 */
/* 使用更适合的断点，确保水平菜单在空间不足时自动切换 */
@media (max-width: 992px) {

    /* 增大断点，提前适应较窄的屏幕 */
    /* 显示汉堡菜单 - 确保在左上角，向上移动8px */
    .menu-toggle {
        display: flex !important;
        position: fixed !important;
        top: 3vh !important;
        /* 向上移动8px */
        left: 20px !important;
        z-index: 2000 !important;
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        padding: 5px !important;
    }

    /* 导航图标显示为黑色 */
    .menu-icon {
        background-color: #333;
    }

    /* 完全重置并重新定义导航菜单样式 - 确保绝对定位在屏幕左上角 */
    .main-nav {
        /* 重置所有继承样式 */
        all: initial !important;
        /* 重新设置基本样式 */
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        height: 100vh !important;
        width: 40vw !important;
        /* 宽度为屏幕宽度的40% */
        background-color: rgba(255, 255, 255, 0.9) !important;
        /* 添加90%透明度 */
        box-shadow: 3px 0 10px rgba(0, 0, 0, 0.1) !important;
        z-index: 1500 !important;
        visibility: hidden !important;
        opacity: 0 !important;
        transform: translateX(-100%) !important;
        transition: visibility 0.3s ease, opacity 0.3s ease, transform 0.3s ease !important;
        overflow-y: auto !important;
    }

    /* 导航激活状态 - 确保正确显示在左上角 */
    .main-nav.active {
        visibility: visible !important;
        opacity: 1 !important;
        transform: translateX(0) !important;
    }

    /* 关闭图标默认保持黑色 */
    .menu-toggle.active .menu-icon {
        background-color: #333;
    }

    /* 移动端导航列表样式 - 重置并重新定义 */
    .main-nav ul {
        all: initial !important;
        display: block !important;
        padding: 62px 20px 20px !important;
        /* 顶部内边距减少8px */
        margin: 0 !important;
    }

    .main-nav ul li {
        all: initial !important;
        display: block !important;
        margin-bottom: 8px !important;
        /* 进一步减小菜单项间距，像素单位提供精确控制 */
    }

    .main-nav ul li a {
        all: initial !important;
        display: flex !important;
        align-items: center !important;
        color: #333 !important;
        font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
        font-size: 16px !important;
        text-decoration: none !important;
        padding: 10px 0 !important;
    }

    .main-nav ul li a:hover,
    .main-nav ul li a.active {
        color: #007bff !important;
    }

    .nav-en {
        font-size: 9px;
    }

    /* 移动端Logo调整 - 恢复居中位置 */
    .logo {
        position: absolute !important;
        top: 0 !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .logo img {
        max-height: 40px;
    }

    /* 移动端导航容器调整 - 保持flex布局 */
    .header-container {
        height: 50px;
        padding: 0 5px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    /* 移动端轮播图特殊处理 */
    .hero-slider {
        margin-top: 0 !important;
        padding-top: 0 !important;
        height: 100vh;
        /* 全屏高度 */
        max-height: 1680px;
        /* 最大高度限制 */
        min-height: 400px;
    }

    /* 移动端轮播图文字调整 */
    .slide h4 {
        font-size: 2rem !important;
        padding: 0 15px;
    }

    /* 商品网格两列显示 */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 超小屏幕响应式调整 */
@media (max-width: 576px) {

    /* 进一步调整汉堡菜单和导航菜单 */
    .menu-toggle {
        width: 38px !important;
        /* 小屏幕上增大汉堡菜单尺寸，使横线长度长一倍 */
        top: 3vh !important;
        /* 确保超小屏幕下也保持向上移动8px */
    }

    .main-nav {
        /* 保持与992px断点下相同的样式，使用相同的响应式宽度 */
        all: initial !important;
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        height: 100vh !important;
        width: 40vw !important;
        /* 宽度为屏幕宽度的40% */
        background-color: rgba(255, 255, 255, 0.9) !important;
        /* 添加90%透明度 */
        box-shadow: 3px 0 10px rgba(0, 0, 0, 0.1) !important;
        z-index: 1500 !important;
        visibility: hidden !important;
        opacity: 0 !important;
        transform: translateX(-100%) !important;
        transition: visibility 0.3s ease, opacity 0.3s ease, transform 0.3s ease !important;
        overflow-y: auto !important;
    }

    /* 在超小屏幕上应用14px字体大小 */
    .main-nav ul li a {
        font-size: 14px !important;
        display: flex !important;
        align-items: center !important;
    }

    /* 页脚响应式样式 - 统一缩小 */
    footer {
        padding: 30px 15px !important;
    }

    footer p {
        font-size: 1rem !important;
        margin-bottom: 15px !important;
    }

    .social-links {
        gap: 15px !important;
        margin-bottom: 15px !important;
    }

    .social-links span {
        font-size: 0.9rem !important;
    }

    /* 缩小社交媒体图标 */
    .social-icon {
        width: 24px !important;
        height: 24px !important;
    }

    .social-icon img {
        width: 24px !important;
        height: 24px !important;
    }

    /* 缩小二维码弹出框 */
    .qr-code-popup,
    #wechat-qr-popup {
        width: 120px !important;
        height: 120px !important;
        margin-left: -60px !important;
        top: -150px !important;
        padding: 6px !important;
    }

    .footer-links {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 20px;
        padding: 30px 0;
        flex-wrap: wrap;
    }

    .footer-links a,
    .footer-links span {
        font-size: 0.8rem !important;
    }

    /* 小屏幕Logo进一步缩小 - 保持距离上边缘3% */
    .logo {
        top: 0 !important;
        /* 统一使用百分比定位，距离上边缘3% */
    }

    .logo img {
        max-height: 40px;
    }

    /* 调整导航容器内边距 */
    .header-container {
        padding: 0 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    /* 轮播图文字进一步调整 */
    .slide h4 {
        font-size: 1.5rem !important;
        padding: 0 15px;
    }

    /* 超小屏幕轮播图高度设置 */
    .hero-slider {
        height: 100vh;
        /* 全屏高度 */
        max-height: 1680px;
        /* 最大高度限制 */
        min-height: 400px;
    }

    /* 轮播图控制按钮调整 */
    .control-btn {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }

    /* 内容区域进一步调整 */
    .content-section h1 {
        font-size: 1.6rem;
    }

    .content-section h2 {
        font-size: 1.2rem;
    }

    /* 商品网格单列显示 */
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* 样式已在前面定义，删除重复样式以避免冲突 */

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: #007bff;
}

/* 已在顶部合并.logo样式定义 */

/* 主要内容区域 */
main {
    margin-top: 120px;
}

/* 内容区域样式 */
.content-section {
    padding: 40px 0;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-section h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #333;
    font-weight: normal;
    text-align: center;
}

.content-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #666;
}

.content-section h2 {
    font-size: 1.5rem;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #333;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

/* 商品分类导航 */
.shop-categories {
    margin-bottom: 40px;
}

.category-nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 1px solid #eee;
    justify-content: center;
    flex-wrap: wrap;
}

.category-item {
    padding: 15px 30px;
    cursor: pointer;
    color: #666;
    font-size: 16px;
    position: relative;
    transition: color 0.3s;
}

.category-item:hover {
    color: #000;
}

.category-item.active {
    color: #000;
    font-weight: 500;
}

.category-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30px;
    right: 30px;
    height: 2px;
    background-color: #000;
}

/* 商品网格布局 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-item {
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-info h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

.product-info p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-price {
    font-size: 18px;
    font-weight: 500;
    color: #000;
    margin-top: auto;
}

.seasonal-note {
    font-size: 14px;
    color: #999;
    font-style: italic;
    margin-top: 10px;
}

.coffee-category,
.product-category,
.store-location,
.contact-info {
    margin: 30px 0;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 5px;
    background-color: #fafafa;
}

.coffee-category h2,
.product-category h2,
.store-location h2,
.contact-info h2 {
    font-size: 1.5rem;
    text-align: center;
    margin: 0 0 15px 0;
}

.coffee-category p,
.product-category p,
.store-location p,
.contact-info p {
    font-size: 1rem;
    text-align: center;
    margin: 0;
}

ul {
    max-width: 800px;
    margin: 20px auto;
    padding-left: 20px;
}

ul li {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #555;
}

/* 轮播图区域 - 作为导航栏的背景 */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    /* 全屏高度 */
    max-height: 1680px;
    /* 最大高度限制 */
    min-height: 600px;
    overflow: hidden;
    margin-top: 0 !important;
    /* 确保与导航栏紧密贴合，使用!important覆盖其他可能的样式 */
    padding-top: 0 !important;
    z-index: 1;
    /* 低于导航栏 */
    background-color: #333;
    /* 确保有背景色 */
}

/* 主内容区域样式调整 - 确保在所有尺寸下都紧贴页面顶部 */
main {
    margin-top: 0 !important;
    padding-top: 0 !important;
    position: relative;
}

/* 轮播图容器 */
.slider-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 为幻灯片添加深色背景，确保文字清晰可见 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    /* 移除背景固定效果，使图片随页面滚动 */
    /* 添加平滑过渡效果 */
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

/* 优化活动幻灯片的显示效果 */
.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* 图片加载状态样式 */
.slide.image-loading {
    /* 添加加载状态背景色，避免空白 */
    background-color: #f5f5f5;
    /* 添加加载动画效果 */
    position: relative;
}

/* 加载中动画指示器 */
.slide.image-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #333;
    animation: spin 1s ease-in-out infinite;
    z-index: 1;
}

/* 加载动画关键帧 */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 轮播图标题的样式优化 */
.slide h4 {
    transition: opacity 0.5s ease;
    position: relative;
    z-index: 2;
}

.slide:not(.image-loaded) h4 {
    opacity: 0;
}

.slide.image-loaded h4 {
    opacity: 1;
}

/* 轮播图文字样式 - 桌面端 */
.slide h4 {
    color: white;
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-align: left;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
    margin: 0;
    position: absolute;
    bottom: 20%;
    left: 0%;
    right: 0%;
    width: 100%;
    z-index: 10;
    white-space: normal;
}

/* 确保轮播图在不同屏幕尺寸下正确显示 */
@media (min-width: 768px) {
    .slide h4 {
        font-size: 2.5rem;
        left: 10%;
    }
}

@media (min-width: 992px) {
    .slide h4 {
        left: 20%;
        font-size: 3rem;
    }
}

@media (min-width: 1200px) {
    .slide {
        background-size: cover;
        background-position: center center;
    }

    .slide h4 {
        left: 20%;
        font-size: 3rem;
        text-align: left;
    }
}

@media (min-width: 1400px) {
    .slide h4 {
        font-size: 4rem;
    }
}

.slider-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

/* 轮播图控制按钮样式 - 精致设计 */
.control-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background-color: transparent;
    color: white;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-size: 10px;
    font-weight: 200;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.control-btn:hover {
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.control-btn.active {
    background-color: rgba(255, 255, 255, 0.95);
    color: #333;
    border-color: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

/* 引用区域默认样式 */
.quote-section {
    text-align: center;
    padding: 60px 20px;
    background-color: #fff;
}

.quote-section h4 {
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #333;
}

.quote-section p {
    font-size: 1rem;
    color: #666;
    font-style: italic;
}

/* 页脚样式 - 左对齐 - 100%宽度 */
footer {
    background-color: #222;
    padding: 40px 20px;
    text-align: left;
    border-top: 1px solid #eee;
    width: 100%;
    box-sizing: border-box;
    color: #ccc;
}

/* 页脚内容容器 - 继承父容器的最大宽度 */
footer .footer-content {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding: 0;
    text-align: left;
}

footer p {
    font-size: 1.3rem;
    font-weight: 500;
    margin: 0 0 20px 0;
    /* 明确设置所有边距 */
    padding: 0;
    color: #ccc;
    text-align: left;
    white-space: nowrap;
}

.social-links {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    margin: 20px 0;
}

/* 社交媒体图标样式 - 蓝瓶咖啡风格 */
.social-icon {
    display: inline-block;
    cursor: pointer;
    background-color: #222;
    position: relative;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    transition: all 0.3s ease-in-out;
}

.social-icon img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

/* 二维码弹出框样式 - 使用ID选择器 */
#wechat-qr-popup {
    display: none;
    position: absolute;
    top: -170px !important;
    /* 向上调整位置 */
    left: 50% !important;
    margin-left: -75px !important;
    /* 宽度的一半 */
    background-color: white !important;
    padding: 8px !important;
    /* 添加内边距，让框和图片之间有距离 */
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
    z-index: 9999 !important;
    width: 150px !important;
    /* 进一步缩小尺寸 */
    height: 150px !important;
    box-sizing: border-box !important;
}

/* 二维码弹出框三角形指示器 - 确保可见 */
#wechat-qr-popup::after {
    content: '' !important;
    position: absolute !important;
    top: 100% !important;
    /* 三角形在底部 */
    left: 50% !important;
    margin-left: -8px !important;
    margin-top: -1px !important;
    /* 稍微调整以消除间隙 */
    width: 0 !important;
    height: 0 !important;
    border-left: 8px solid transparent !important;
    border-right: 8px solid transparent !important;
    border-top: 8px solid white !important;
    z-index: 9998 !important;
    /* 略低于弹窗但确保可见 */
}

/* 使用ID选择器 - 最高优先级 */
#wechat-qr-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    max-width: none !important;
    max-height: none !important;
    background: none !important;
    box-sizing: border-box !important;
}

/* 社交图标容器样式 */
.social-icon {
    position: relative !important;
    display: inline-block !important;
}

/* 通用类选择器 - 确保所有弹窗都在上方 */
.qr-code-popup {
    display: none !important;
    position: absolute !important;
    top: -170px !important;
    /* 与微信弹窗保持一致 */
    left: 50% !important;
    margin-left: -75px !important;
    padding: 8px !important;
    /* 添加内边距，让框和图片之间有距离 */
    width: 150px !important;
    /* 与微信弹窗保持一致 */
    height: 150px !important;
    box-sizing: border-box !important;
    background-color: white !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
    z-index: 9999 !important;
}

/* 为所有弹窗添加三角形指示器 - 确保可见 */
.qr-code-popup::after {
    content: '' !important;
    position: absolute !important;
    top: 100% !important;
    /* 三角形在底部 */
    left: 50% !important;
    margin-left: -8px !important;
    margin-top: -1px !important;
    /* 稍微调整以消除间隙 */
    width: 0 !important;
    height: 0 !important;
    border-left: 8px solid transparent !important;
    border-right: 8px solid transparent !important;
    border-top: 8px solid white !important;
    z-index: 9998 !important;
    /* 略低于弹窗但确保可见 */
}

.qr-code-popup .qr-img,
.qr-code-popup img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 重置所有图片的可能限制 */
img {
    max-width: none !important;
    /* 覆盖可能的全局max-width限制 */
}

/* 显示二维码的类 - 同时支持类选择器和ID选择器 */
.qr-code-popup.show,
#wechat-qr-popup.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 9999 !important;
    position: absolute !important;
    top: -170px !important;
    left: 50% !important;
    margin-left: -75px !important;
    padding: 8px !important;
    width: 150px !important;
    height: 150px !important;
    background-color: white !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
    box-sizing: border-box !important;
}

/* 确保.social-icon能正确显示子元素 */
.social-icon {
    position: relative;
    overflow: visible !important;
}

.social-icon:hover {
    transform: scale(1.1);
}

/* 调整二维码显示容器样式 */
.qr-code-container {
    display: none;
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: 150px;
    height: 150px;
    text-align: center;
}

.qr-code-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 确保二维码在悬停时显示 */
.social-icon:hover .qr-code-container {
    display: block;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.footer-links span {
    color: #aaa;
    font-size: 1rem;
}

.footer-links a {
    text-decoration: none;
    color: #aaa;
    font-size: 1rem;
    display: inline-block;
    white-space: nowrap;
    /* 禁止换行 */
}

.footer-links a.active {
    color: #333;
    font-weight: bold;
}

/* 响应式设计 - 空间不足时分两行显示 */
@media (max-width: 600px) {
    .footer-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .footer-links span {
        font-size: 0.8rem !important;
        width: 100%;
        white-space: nowrap;
        align-items: flex-start;
        text-align: left;
        margin-top: 5px;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {

    /* 显示汉堡菜单 */
    .menu-toggle {
        display: flex;
    }

    /* 隐藏默认导航 */

    /* 引用区域响应式样式 */
    .quote-section {
        padding: 30px 15px !important;

    }

    .quote-section p {
        font-size: 0.9rem !important;
    }

    .quote-section h4 {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: auto;
        min-width: 150px;
        max-width: 80%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.9);
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
        padding-top: 80px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        visibility: hidden;
        opacity: 0;
    }

    /* 导航打开状态 */
    .main-nav.active {
        transform: translateX(0);
        visibility: visible;
        opacity: 1;
    }

    /* 移动设备导航样式 */
    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 20px;
        margin-top: 0;
    }

    .main-nav ul li {
        margin: 10px 0;
    }

    .main-nav ul li a {
        font-size: 16px;
        letter-spacing: 1px;
    }

    /* 调整页头样式 */
    header {
        padding: 10px 0;
    }

    .header-container {
        padding: 0 15px;
    }

    /* 轮播图适配 */
    .hero-slider {
        height: 100vh;
        /* 全屏高度 */
        max-height: 1680px;
        /* 最大高度限制 */
        min-height: 400px;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .slide h4 {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }

    /* 内容区域适配 */
    .content-section {
        padding: 30px 15px;
    }

    .content-section h1 {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .content-section h2 {
        font-size: 1.3rem;
        margin: 30px 0 15px 0;
    }

    .container {
        padding: 0 15px;
    }

    /* 商品分类导航响应式 */
    .category-nav ul {
        flex-direction: column;
        align-items: center;
    }

    .category-item {
        padding: 12px 20px;
        width: 100%;
        text-align: center;
    }

    .category-item.active::after {
        left: 20px;
        right: 20px;
    }

    /* 商品网格布局响应式 */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-item {
        min-height: 100px;
        padding: 15px;
    }

    .product-info h3 {
        font-size: 16px;
    }

    .product-info p {
        font-size: 12px;
    }

    .product-price {
        font-size: 16px;
    }

    /* 页脚适配 */
    footer {
        padding: 30px 15px;
    }

    footer .footer-content {
        padding: 0 15px;
    }

    .social-links {
        flex-wrap: wrap;
        gap: 15px;
    }

    .footer-links a {
        display: block;
    }
}

.footer-icp {
    font-size: 0.8rem;
    align-items: center;
    text-align: center;
    color: #444;
}