:root {
    --bg-color: #fff5f5;
    --text-color: #4a4a4a;
    --header-bg: rgba(255, 255, 255, 0.95);
    /* 定义全息动态效果的关键帧动画 */
    @keyframes holographic {
        0% {
            background-position: 0% 50%;
        }
        50% {
            background-position: 100% 50%;
        }
        100% {
            background-position: 0% 50%;
        }
    }
    --nav-hover: linear-gradient(45deg, #00ffea, #ff00ff, #00ffea);
    --nav-hover-animation: holographic 3s ease infinite;
    /* --hero-bg: url('img/anime_banner.jpg'); */
    --card-bg: #ffffff;
    --footer-bg: #fff5f5;
}

/* 新导航样式 */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: var(--header-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

nav {
    /* 修改为 100% 宽度 */
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--nav-hover);
    font-family: 'MS PGothic', sans-serif;
}

nav a {
    margin: 0 1.5rem;
    color: var(--text-color);
    transition: color 0.3s;
}

nav a:hover {
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
    background-image: var(--nav-hover);
    animation: var(--nav-hover-animation);
}

/* 汉堡菜单按钮样式 */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 24px;
    margin-right: 1rem;
}

/* 导航链接容器样式 */
.nav-links {
    display: flex;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--header-bg);
    min-width: 160px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    color: var(--nav-hover);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* 移动设备样式 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--header-bg);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links a {
        margin: 1rem;
    }

    .dropdown-content {
        position: static;
        background-color: transparent;
        box-shadow: none;
    }

    .dropdown-content a {
        margin-left: 2rem;
    }
}

/* 新英雄区域 */
.hero {
    /* 增加顶部外边距，避免被横幅遮挡 */
    margin-top: 120px;
    height: 30vh;
    background: linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3)), var(--hero-bg);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    background: rgba(255, 255, 255, 0.9);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 新商品布局 */
.featured-products {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.product-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    height: 250px;
    object-fit: cover;
    border-bottom: 3px solid var(--nav-hover);
}

/* 主题切换器位置调整 */
.theme-switcher {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    flex-direction: column;
    z-index: 100;
}

/* 其他保持原有主题设置... */

.dropdown a {
    position: relative;
}

.dropdown-indicator {
    margin-left: 5px;
}

/* PC 端样式 */
@media (min-width: 769px) {
    .dropdown-indicator::after {
        content: '▼';
    }

    .dropdown:hover .dropdown-indicator::after {
        content: '▲';
    }
}

/* 移动端样式 */
@media (max-width: 768px) {
    .dropdown-indicator::after {
        content: '+';
    }

    .dropdown.show .dropdown-indicator::after {
        content: '-';
    }
}

/* 横幅样式 */
.banner {
    margin: 0; /* 移除外边距 */
    padding: 0; /* 移除内边距 */
    width: 100%;
    height: 100px;
    /* 可根据需要调整高度 */
    background-color: #f0f0f0;
    /* 可根据需要调整背景颜色 */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #333;
}

.banner img {
    display: block; /* 使图片成为块级元素 */
    width: 100%; /* 设置图片宽度为 100% */
    max-width: 100%; /* 确保最大宽度不超过容器 */
}

.cart-button,
.login-button,
.register-button {
    margin: 0 1rem;
    color: var(--text-color);
    transition: color 0.3s;
    text-decoration: none;
}

.cart-button:hover,
.login-button:hover,
.register-button:hover {
    color: var(--nav-hover);
}

/* 移动设备样式调整 */
@media (max-width: 768px) {

    .cart-button,
    .login-button,
    .register-button {
        margin: 1rem;
    }
}

/* 容器样式 */
main.container {
    margin-top: 360px;
}

/* 筛选器包装样式 */
.filter-wrapper {
    margin-bottom: 20px;
}

/* 产品网格布局 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 20px;
}

/* 产品项样式 */
.product-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease-in-out;
}

.product-item:hover {
    transform: scale(1.02);
}

/* 产品图片样式 */
.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* 产品详情样式 */
.product-details {
    padding: 15px;
}

.product-price {
    font-weight: bold;
    color: #333;
}

.product-stock {
    color: #777;
}

/* 加入购物车按钮样式 */
.add-to-cart {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.add-to-cart:hover {
    background-color: #0056b3;
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-row {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
}

.product-image {
    width: 150px;
    margin-right: 20px;
}

.product-image img {
    width: 100%;
    height: auto;
}

.product-details {
    flex-grow: 1;
}

/* 悬浮侧边栏样式 */
.floating-sidebar {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 999;
    transition: left 0.3s ease;
}

.sidebar-toggle {
    background-color: #333;
    color: white;
    padding: 10px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 0 5px 5px 0;
}

.sidebar-content {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    width: 200px;
    padding: 20px;
    display: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.sidebar-content ul {
    list-style-type: none;
    padding: 0;
}

.sidebar-content ul li {
    margin-bottom: 10px;
}

.sidebar-content ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sidebar-content ul li a:hover {
    color: #ff6600;
}

/* 侧边栏展开状态 */
.floating-sidebar.show .sidebar-content {
    display: block;
}


