/* ============================================
   AURAGI - 移动端优化样式
   参照 Alo Yoga 设计风格
   ============================================ */

/* ========== 移动端导航栏 ========== */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    z-index: 1000;
    border-bottom: 1px solid #e8e8e8;
}

.mobile-header .nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.5rem;
    max-width: 100%;
    position: relative;
    min-height: 60px;
}

/* 菜单按钮 - 左侧 */
.menu-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c2c2c;
    flex-shrink: 0;
    min-width: 44px;
}

.menu-toggle svg {
    width: 20px;
    height: 20px;
}

/* Logo - 中间 */
.mobile-header .logo {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #2c2c2c;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    flex: 1;
    text-align: center;
    white-space: nowrap;
}

/* 导航图标 - 右侧 */
.mobile-header .nav-icons {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    margin-left: auto;
}

.mobile-header .nav-icon {
    color: #2c2c2c;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.mobile-header .nav-icon {
    min-width: 25px;
    padding: 0.25rem;
}

.mobile-header .nav-icon svg {
    width: 18px;
    height: 18px;
}

.mobile-header .nav-icon.user-avatar-icon {
    position: relative;
    overflow: hidden;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-header .nav-icon .user-avatar-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    display: none;
}

.mobile-header .nav-icon.user-avatar-icon.has-avatar .default-avatar-icon {
    display: none;
}

.mobile-header .nav-icon.user-avatar-icon.has-avatar .user-avatar-img {
    display: block;
}

/* 语言选择器 - 只显示国旗 */
.lang-selector-mobile {
    position: relative;
}

.lang-flag-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
}

.flag-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    z-index: 1001;
    overflow: hidden;
}

.lang-option {
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #2c2c2c;
    transition: background-color 0.2s;
}

.lang-option:hover {
    background-color: #f5f5f5;
}

.lang-option .flag-icon {
    font-size: 1.25rem;
}

/* 登录提示条 - 独立于header，在product-categories-hero上方 */
.login-banner {
    position: relative;
    background-color: #333;
    color: #ffffff;
    padding: 0.75rem 1rem;
    text-align: center;
    display: flex; /* 默认显示 */
    align-items: center;
    justify-content: space-between;
    z-index: 999;
    width: 100%;
}

/* 桌面端登录条样式 */
@media (min-width: 768px) {
    .login-banner {
        padding: 1rem 2rem;
    }
    
    .login-banner-link {
        font-size: 1rem;
    }
}

.login-banner-link {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 0.875rem;
    font-weight: 400;
}

.login-banner-link span:first-child {
    flex: 1;
    text-align: left;
}

.login-banner-arrow {
    font-size: 1rem;
    margin-left: 0.5rem;
}

/* ========== 移动端菜单 ========== */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 2000;
    display: none;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background-color: #ffffff;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #e8e8e8;
}

.mobile-menu-header .logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c2c2c;
}

.menu-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #2c2c2c;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-close svg {
    width: 24px;
    height: 24px;
}

.mobile-menu-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.mobile-menu-link {
    display: block;
    padding: 1rem 1.5rem;
    color: #2c2c2c;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.2s;
}

.mobile-menu-link:hover,
.mobile-menu-link:active {
    background-color: #f5f5f5;
}

/* ========== 产品类别展示 - 参照Alo样式，横向滚动，正方形图片，文字在下方 ========== */
.product-categories-hero {
    margin-top: 0;
    padding: 1rem 0;
    background-color: #ffffff;
}

.categories-grid-hero {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    scroll-behavior: smooth;
}

.categories-grid-hero::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.category-card-hero {
    flex: 0 0 auto;
    width: 140px;
    text-decoration: none;
    display: block;
}

.category-image-hero {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.category-image-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card-hero:active .category-image-hero img {
    transform: scale(1.05);
}

/* 文字在图片下方，黑色显示 */
.category-info-hero {
    padding: 0.5rem 0;
    text-align: center;
}

.category-title-hero {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.125rem;
    color: #2c2c2c;
    line-height: 1.2;
}

.category-subtitle-hero {
    font-size: 0.75rem;
    color: #6b6b6b;
    font-weight: 400;
    line-height: 1.2;
}

/* ========== 移动端优化 ========== */
@media (min-width: 768px) {
    .mobile-header {
        display: none;
    }
    
    .product-categories-hero {
        margin-top: 0;
        padding: 2rem 0;
    }
    
    .categories-grid-hero {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 1rem;
        padding: 0 2rem;
        overflow-x: visible;
    }
    
    .category-card-hero {
        width: 100%;
    }
    
    .category-image-hero {
        aspect-ratio: 1;
        margin-bottom: 0.75rem;
    }
    
    .category-info-hero {
        text-align: center;
    }
    
    .category-title-hero {
        font-size: 1rem;
    }
    
    .category-subtitle-hero {
        font-size: 0.875rem;
    }
}

/* 桌面端隐藏移动端菜单 */
@media (min-width: 768px) {
    .mobile-menu {
        display: none !important;
    }
}

/* ========== 响应式调整 ========== */
@media (max-width: 767px) {
    /* 隐藏桌面端导航 */
    .header:not(.mobile-header) {
        display: none;
    }
    
    /* 小屏幕导航栏优化（395px及以下） */
    @media (max-width: 395px) {
        .mobile-header .nav-container {
            padding: 0.75rem 0.375rem;
        }
        
        .menu-toggle {
            padding: 0.375rem;
            min-width: 40px;
        }
        
        .menu-toggle svg {
            width: 18px;
            height: 18px;
        }
        
        .mobile-header .logo {
            font-size: 1rem;
        }
        
        .mobile-header .nav-icons {
            gap: 0.375rem;
        }
        
        .mobile-header .nav-icon {
            min-width: 28px;
            padding: 0.2rem;
        }
        
        .mobile-header .nav-icon svg {
            width: 16px;
            height: 16px;
        }
        
        .lang-flag-btn {
            min-width: 28px;
            padding: 0.2rem;
        }
        
        .flag-icon {
            font-size: 1.1rem;
        }
    }
    
    /* Hero部分改为正方形 */
    .hero {
        margin-top: 0;
        min-height: auto;
        aspect-ratio: 1;
        position: relative;
    }
    
    .hero-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    
    .hero-content {
        position: relative;
        z-index: 1;
        padding: 1.5rem;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: flex-start;
        text-align: left;
        width:68vh;
        padding-top:118px;
    }
    
    .hero-headline {
        font-size: 2rem;
        margin-bottom: 0.5rem;
        text-align: left;
        width: 100%;
        align-self: flex-start;
    }
    
    .hero-subheadline {
        font-size: 1rem;
        margin-bottom: 0.25rem;
        text-align: left;
        width: 100%;
        align-self: flex-start;
    }
    
    .hero-supporting {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
        text-align: left;
        width: 100%;
        align-self: flex-start;
    }
    
    .hero-tagline {
        font-size: 0.8rem;
        margin-bottom: 0;
        text-align: left;
        width: 100%;
        align-self: flex-start;
    }
    
    .hero-cta {
        display: flex;
        justify-content: flex-end;
        align-items: flex-end;
        width: 100%;
        margin-top: auto;
        padding-top: 0;
    }
    
    /* 移动端隐藏"探索工作室"按钮 */
    .hero-cta .btn-secondary {
        display: none;
    }
    
    .hero-cta .btn-primary {
        padding: 8px 20px;
        font-size: 16px;
        width: auto;
        margin-left: auto;
        align-self: flex-end;
    }
    
    /* 产品类别在登录提示条下方 */
    .product-categories-hero {
        margin-top: 0;
    }
    
    .section {
        padding: 3rem 1rem;
    }
    
    /* 产品网格调整 */
    .products-grid-featured {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .products-grid-display {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    /* 按钮调整 */
    .btn {
        padding: 10.8px 1.5rem;
        font-size: 0.9rem;
    }
    
    /* 文字大小调整 */
    .section-title {
        font-size: 1.5rem;
    }
    
    /* product-info 字体大小调整 - 移动端稍小 */
    .product-name {
        font-size: 0.95rem; /* PC版 1.1rem，移动端 1rem */
    }
    
    .product-type {
        font-size: 0.8rem; /* PC版 0.9rem，移动端 0.85rem */
    }
    
    .product-link {
        font-size: 0.8rem; /* PC版 0.9rem，移动端 0.85rem */
    }
}

/* ========== 页面内容顶部间距 ========== */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* 导航栏高度 */
.mobile-header .nav {
    height: 60px;
}

/* 登录提示条高度 */
.mobile-header .login-banner {
    height: 44px;
}

/* 产品类别在导航栏下方 */
.product-categories-hero {
    margin-top: 60px; /* 默认只有导航栏 */
}

/* 如果有登录提示条，增加间距 */
.login-banner:not([style*="display: none"]) ~ .product-categories-hero {
    margin-top: 104px; /* 导航栏 + 登录提示条 */
}

/* 登录提示条显示时的样式 */
.login-banner[style*="display: flex"] {
    display: flex !important;
}

@media (min-width: 768px) {
    .mobile-header {
        position: relative;
    }
    
}

