:root {
    --color-bg: #ffffff;
    --color-accent: #5D3891;
    --color-secondary: #8155BA;
    --color-text: #333333;
    --font-ja: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-en: Arial, sans-serif;
    --header-height: 50px;
    --container-width: 1440px;
    --spacing-unit: 1rem;
    --bottom-nav-height: 60px;
}

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

body {
    font-family: var(--font-ja);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
}

/* 现代化头部导航 */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--color-accent);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    box-shadow: 0 2px 12px rgba(93, 56, 145, 0.2);
}

.site-title {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    flex: 1;
    letter-spacing: 0.08em;
    white-space: nowrap;
    padding: 0 2rem;
    font-family: var(--font-en);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 700;
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .site-title {
        font-size: 1.2rem;
        letter-spacing: 0.1em;
        text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }
}

/* 主要内容区域 */
main {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    padding-bottom: calc(var(--bottom-nav-height) + 1rem);
}

/* 现代化轮播图 */
.carousel-section {
    width: 100%;
    background: var(--color-accent);
    margin-bottom: 0;
    padding: 1rem;
}

.carousel {
    position: relative;
    height: 26vh;
    max-height: none;
    overflow: hidden;
    border-radius: 12px;
}

.carousel-items {
    height: 100%;
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--color-accent);
    position: relative;
}

.carousel-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: none;
}

/* 商品展示区域 */
.featured-products {
    padding: 1rem 0;
    max-width: var(--container-width);
    margin: 0 auto;
}

.featured-products h2 {
    text-align: left;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0 var(--spacing-unit);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-family: var(--font-ja);
    letter-spacing: 0.05em;
}

.featured-products h2::before {
    content: '';
    width: 4px;
    height: 1.2em;
    background: var(--color-accent);
    display: inline-block;
}

/* 商品网格布局 */
.product-grid,
.products-grid {
    
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0 var(--spacing-unit);
    max-width: 800px;
    margin: 0 auto;
}

/* 商品卡片样式 */
.product-card {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(93, 56, 145, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(93, 56, 145, 0.16);
}

.product-link {
    display: block;
    padding: 1rem;
    text-decoration: none;
    color: var(--color-text);
    background: linear-gradient(to bottom, rgba(255,255,255,0.8), rgba(255,255,255,1));
}

.product-image {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 1rem;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* min-height: 80px; */
}

.product-name {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    font-family: var(--font-ja);
}

.product-company {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.8rem;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.company-logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.company-name {
    font-size: 0.9rem;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: calc(100% - 32px);
    font-family: var(--font-en);
    letter-spacing: 0.02em;
}

/* 现代化页脚 */
.site-footer {
    display: none;
}

/* 通用动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* 添加分类导航样式 */
.category-nav {
    position: sticky;
    top: var(--header-height);
    padding: 1rem;
    background: white;
    z-index: 100;
}

.category-list {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.category-list a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.category-list a.active {
    background: var(--color-accent);
    color: white;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
}

.bottom-nav a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.7rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.bottom-nav a i {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}

.bottom-nav a.active {
    color: var(--color-accent);
    background: rgba(93, 56, 145, 0.1);
}

.back-button {
    position: absolute;
    left: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.back-button:hover {
    transform: translateX(-2px);
}

.back-button .arrow {
    display: inline-block;
    line-height: 1;
}

/* 响应式布局调整 */
@media (min-width: 768px) {
    .product-grid,
    .products-grid {
        max-width: 1200px;
         margin-top:45px;
       
    }
}

@media (min-width: 1024px) {
    .product-grid,
    .products-grid {
        max-width: 1400px;
         margin-top:45px;
    }
}

/* 修改产品页面的布局 */
.products-page {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    padding-bottom: calc(var(--bottom-nav-height) + 1rem);
}

.category-sidebar {
    width: 120px;
    flex-shrink: 0;
    background: white;
    border-radius: 8px;
    padding: 1rem;
    height: fit-content;
    position: sticky;
    top: calc(var(--header-height) + 1rem);
}

.products-container {
   
    flex: 1;
    min-width: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    /*.products-page {*/
    /*    flex-direction: column;*/
    /*}*/
    .products-grid{
        margin-top:45px;
    }
    .category-sidebar {
        width: 100%;
        position: sticky;
        top: var(--header-height);
        padding: 0.5rem;
    }

    .category-list {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .category-list a {
        white-space: nowrap;
        /*padding: 0.5rem 1rem;*/
        padding: 0.2rem !important;
        font-size: 0.8rem !important;
    }
    
    .products-container {
        max-width: 100%;
    }
}

.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    transform: scale(1.2);
} 