css
/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-light-gray);
    z-index: 100;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    text-decoration: none;
}

.nav-brand img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-xl);
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: var(--color-dark);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-base);
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.1);
}

.nav-qr {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-light);
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-base);
}

.nav-qr:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-qr img {
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-sm);
}

.nav-qr-text {
    font-size: var(--font-size-sm);
    color: var(--color-medium);
    font-weight: var(--font-weight-medium);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    border: none;
    cursor: pointer;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    position: relative;
    gap: 4px;
}

.nav-toggle:hover {
    background: var(--color-secondary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.nav-toggle::before {
    display: none;
}

.nav-toggle.active::before {
    display: none;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 1px;
    transition: all var(--transition-base);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* 移动端导航 */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 var(--spacing-md);
        height: 70px;
    }
    
    .nav-brand {
        font-size: var(--font-size-lg);
    }
    
    .nav-brand img {
        width: 32px;
        height: 32px;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: var(--spacing-md) 0;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out;
        z-index: 99;
        gap: 0;
        border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu a {
        display: block;
        width: 100%;
        padding: var(--spacing-md) var(--spacing-lg);
        text-align: left;
        font-size: var(--font-size-md);
        border-radius: 0;
        transition: all var(--transition-base);
    }
    
    .nav-menu a:hover,
    .nav-menu a.active {
        background: var(--color-light);
        color: var(--color-primary);
        transform: translateX(4px);
    }
    
    /* 移动端显示导航右侧扫码购买入口 */
    .nav-qr {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 101;
    }
}

/* Hero区域样式 */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 var(--spacing-lg);
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-lg);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    margin-bottom: var(--spacing-2xl);
    opacity: 0.9;
    line-height: 1.6;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition-base);
    border: 1px solid var(--color-light-gray);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-content {
    padding: var(--spacing-xl);
}

.card-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-dark);
    margin-bottom: var(--spacing-md);
}

.card-description {
    color: var(--color-medium);
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
}

/* 图片画廊样式 */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.gallery-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-content {
    text-align: center;
    color: white;
    padding: var(--spacing-lg);
}

.gallery-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-sm);
}

.gallery-description {
    font-size: var(--font-size-sm);
    opacity: 0.9;
    margin-bottom: var(--spacing-lg);
    line-height: 1.5;
}

.gallery-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--border-radius-md);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-base);
}

.gallery-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* 懒加载图片样式 */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.lazy-image.loaded {
    opacity: 1;
    background: none;
    animation: none;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: var(--spacing-xl);
    right: var(--spacing-xl);
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: white;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all var(--transition-base);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 90;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate {
    animation: fadeInUp 0.6s ease-out;
}

/* 产品网格样式 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

/* 产品卡片样式 */
.product-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition-base);
    border: 1px solid var(--color-light-gray);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    background: var(--color-primary);
    color: white;
    padding: 4px var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    z-index: 10;
}

.product-badge.out-of-stock {
    background: var(--color-medium);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--border-radius-md);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-base);
}

.product-btn:hover:not(:disabled) {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

.product-btn:disabled {
    background: var(--color-medium);
    cursor: not-allowed;
}

.product-info {
    padding: var(--spacing-lg);
}

.product-name {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-dark);
    margin-bottom: var(--spacing-sm);
}

.product-description {
    color: var(--color-medium);
    font-size: var(--font-size-sm);
    line-height: 1.5;
    margin-bottom: var(--spacing-md);
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--spacing-md);
}

.product-feature {
    background: var(--color-light);
    color: var(--color-primary);
    padding: 4px 8px;
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
}

.product-nutrition,
.product-includes {
    background: var(--color-light);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-md);
}

.product-nutrition {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: var(--spacing-sm);
}

.nutrition-item {
    text-align: center;
}

.nutrition-label {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--color-medium);
    margin-bottom: 2px;
}

.nutrition-value {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
}

.product-includes h4 {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-dark);
    margin-bottom: var(--spacing-sm);
}

.product-includes ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-includes li {
    font-size: var(--font-size-xs);
    color: var(--color-medium);
    padding: 2px 0;
}

.product-includes li:before {
    content: "✓";
    color: var(--color-primary);
    font-weight: bold;
    margin-right: 6px;
}

/* 产品库存状态样式 */
.product-stock {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    text-align: center;
    margin-top: var(--spacing-md);
    border-top: 1px solid var(--color-light-gray);
    padding-top: var(--spacing-md);
}

.product-stock.in-stock {
    background: rgba(76, 175, 80, 0.1);
    color: var(--color-primary);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.product-stock.out-of-stock {
    background: rgba(158, 158, 158, 0.1);
    color: var(--color-medium);
    border: 1px solid rgba(158, 158, 158, 0.3);
}

/* QR码样式 - 响应式设计 */
.qr-code {
    width: 96px;
    height: 96px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    flex-shrink: 0;
}

/* 首页二维码弹窗样式 */
.product-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
    /* 关闭时仍保持居中，避免左侧闪动 */
    align-items: center;
    justify-content: center;
}

.product-modal.show {
    display: flex;
}

.product-modal-content {
    position: relative;
    max-width: 420px;
    width: 90%;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s ease;
}

.product-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.product-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

.product-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.product-modal-image {
    min-height: auto;
    max-width: 360px;
}

.product-modal-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

.product-modal-info {
    text-align: center;
    margin-top: 12px;
}

@media (max-width: 768px) {
    .product-modal-content {
        width: 92%;
        max-width: 420px;
    }
}

/* QR码区域布局优化 */
.qr-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2xl);
    flex-wrap: wrap;
}

.qr-info {
    text-align: left;
    max-width: 300px;
}

@media (max-width: 768px) {
    .qr-section {
        flex-direction: column;
        gap: var(--spacing-lg);
        text-align: center;
    }
    
    .qr-info {
        text-align: center;
        max-width: none;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .qr-code {
        width: 112px;
        height: 112px;
    }
}

@media (min-width: 1025px) {
    .qr-code {
        width: 128px;
        height: 128px;
    }
}

.product-buy-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-sm);
}

.product-buy-btn:disabled {
    background: var(--color-medium);
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero {
        min-height: 550px;
    }
    
    .hero-background {
        background-attachment: scroll;
        background-size: cover;
        background-position: center center;
    }
    
    .gallery {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .gallery-image {
        height: 200px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: var(--spacing-lg);
    }
    
    .product-price-section {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: stretch;
    }
    
    .product-buy-btn {
        width: 100%;
        text-align: center;
    }
    
    .back-to-top {
        bottom: var(--spacing-lg);
        right: var(--spacing-lg);
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 500px;
    }
    
    .hero-background {
        background-attachment: scroll;
        background-size: cover;
        background-position: center center;
        object-fit: cover;
    }
    
    .hero-content {
        padding: 0 var(--spacing-md);
    }
    
    .card-content {
        padding: var(--spacing-lg);
    }
    
    .gallery-content {
        padding: var(--spacing-md);
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-nutrition {
        grid-template-columns: repeat(2, 1fr);
    }
}