* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, #f9f9ff 0%, #f5f7ff 100%);
    color: #333;
    padding-bottom: 70px;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

/* 网站头部 */
.header {
    background: linear-gradient(135deg, #c3f1ff 0%, #ffb2c9 100%);
    color: white;
    padding: 5px 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 15px rgb(255 255 255 / 30%);
    border-radius: 0;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 38px;
    width: auto;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}

.nav-dropdown {
    position: relative;
}

.nav-btn {
    background: rgba(255,255,255,0.25);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.35);
}

.nav-btn i {
    margin-left: 5px;
    transition: transform 0.3s;
}

.nav-dropdown.active .nav-btn i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    width: 150px;
    padding: 8px 0;
    margin-top: 8px;
    display: none;
    z-index: 200;
}

.nav-dropdown.active .dropdown-menu {
    display: block;
    animation: fadeIn 0.3s;
}

.dropdown-menu a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.dropdown-menu a:hover {
    background: #fff5f7;
    color: #ff2a68;
}

.search-box {
    background: white;
    border-radius: 25px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.search-box input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
    padding: 2px 5px;
}

.search-box i {
    color: #aba9a8;
    margin-right: 10px;
    font-size: 16px;
}

/* 幻灯片（优化后） */
.slider-container {
    position: relative;
    overflow: hidden;
    margin: 15px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width: calc(100% - 30px); /* 确保容器宽度与边距匹配 */
}

.slider {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.slide {
    min-width: 100%;
    padding-top: 50%; /* 保持16:9比例 */
    background-size: cover; /* 图片完全覆盖容器 */
    background-position: center center; /* 居中显示 */
    background-repeat: no-repeat;
    height: 0; /* 配合padding-top实现比例控制 */
}

.slider-indicators {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10; /* 确保指示器在图片上方 */
}

.indicator {
    width: 8px;
    height: 3.5px;
    background: rgba(255,255,255,0.6);
    border-radius: 30%;
    cursor: pointer;
    transition: all 0.3s;
}

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

/* 商品分类 */
.categories {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 0 15px 20px;
}

/* 当前分类标题样式 */
.current-category {
    padding: 5px 15px;
}

.category-count {
    font-size: 14px;
    color: #777;
    font-weight: normal;
    margin-left: 8px;
}
    

.category {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s;
}

.category:hover {
    transform: translateY(-5px);
}

.category-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.category-icon img {
    width: 28px;
    height: 28px;
    transition: all 0.3s;
}

.category-name {
    font-size: 12px;
    text-align: center;
    line-height: 1.3;
    font-weight: 500;
}

/* 标题样式 */
.new-title {
    font-size: 16px;
    color: #333;
    padding: 10px 15px;
    margin: 0;
}

/* 推荐商品 */
.featured-products-container {
    padding: 0 15px 1px;
}

.featured-products {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 5px 0;
}

.featured-products::-webkit-scrollbar {
    display: none;
}

.product-card {
    min-width: 150px;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    text-decoration: none;
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.product-img {
    height: 80px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.product-info {
    padding: 12px;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #333;
    line-height: 1.4;
}

.product-price {
    color: #ff2a68;
    font-weight: bold;
    font-size: 17px;
    letter-spacing: -0.5px;
}

/* 精选分类（优化后 - 强制统一边距） */
#app-container .featured-categories {
    background: white;
    padding: 10px 15px !important; /* 强制应用15px左右边距 */
    margin: 0 !important; /* 清除可能存在的外部边距 */
    position: sticky;
    top: 94px;
    z-index: 90;
    width: 100% !important; /* 确保宽度充满父容器 */
    box-sizing: border-box !important; /* 确保padding不影响总宽度 */
    display: flex;
    align-items: center;
    height: 50px;
}

/* 分类滚动容器 - 确保内部元素不溢出 */
#app-container .featured-categories .categories-scroll {
    display: inline-flex;
    gap: 10px;
    width: 100% !important; /* 充满父容器 */
    overflow-x: auto;
    padding: 0 !important; /* 清除内部多余内边距 */
    margin: 0 !important; /* 清除内部多余外边距 */
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

/* 上方分类按钮样式 */
.category-item {
    height: 37px;
    padding: 0 8px;
    background: linear-gradient(135deg, #ededf7 0%, #ededf7 100%);
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    color: #333;
    border: 1px solid #f0f0f0;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    width: auto;
    margin-bottom: 0; /* 清除底部外边距，避免压缩容器 */
}

/* 上方分类按钮激活状态 */
.category-item.active {
    background: linear-gradient(135deg, #ff457b 0%, #ff324b 100%);
    color: white;
    min-width: 103px;
    padding: 0 12px;
    height: 37px;
}

/* 下方平台分类按钮 - 优化版 */
.category-item-platform {
    min-width: 70px; /* 确保有足够宽度 */
    padding: 5px 12px; /* 适当内边距 */
    height: 35px; /* 固定高度 */
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f0ff 100%);
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    border: 1px solid #e0efff;
    transition: all 0.3s;
    display: inline-flex; /* 确保元素按内容宽度显示 */
    flex-direction: row; /* 强制水平排列 */
    align-items: center; /* 垂直居中对齐 */
    justify-content: center; /* 水平居中对齐 */
    gap: 6px; /* 图标和文字间距 */
    white-space: nowrap; /* 防止文字换行 */
}

/* 下方平台分类按钮激活状态 - 优化版 */
.category-item-platform.active {
    background: linear-gradient(135deg, #459bff 0%, #327bff 100%);
    color: white;
    min-width: 70px; /* 保持一致宽度 */
    padding: 5px 12px;
    height: 35px;
    border-color: #bed6ff;
}

/* 平台按钮图标样式 */
.category-icon-small {
    font-size: 14px; /* 图标大小 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 调整文字大小 */
.category-item-platform .category-main,
.category-item-platform.active .category-main {
    font-size: 13px;
}

.category-main {
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 2px;
    transition: font-size 0.3s;
}

.category-item.active .category-main {
    font-size: 14px;
}

.category-item-platform.active .category-main {
    font-size: 14px;
}

.category-sub {
    font-size: 10px;
    line-height: 1.2;
    transition: font-size 0.3s;
}

.category-item.active .category-sub {
    font-size: 12px;
}

.category-item-platform.active .category-sub {
    font-size: 12px;
}

/* 新的商品样式 */
.new-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 15px; /* 与其他区域边距保持一致 */
}

.new-product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    text-decoration: none;
    transition: all 0.3s;
    flex-direction: column;
    display: flex;
}

.new-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* 商品图片容器 */
.new-product-img-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 正方形比例 */
    overflow: hidden;
}

.new-product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 左上角分类图标 */
.category-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 10;
}

.category-badge-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* 精选推荐标签 */
.featured-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    background-color: #ff2a68;
    color: white;
    font-size: 11px;
    border-radius: 4px;
    z-index: 10;
}

/* 商品信息区域 */
.new-product-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.new-product-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-shrink: 0;
}

.new-product-desc {
    font-size: 12px;
    color: #777;
    margin-bottom: 8px;
    line-height: 1.3;
    flex-shrink: 1;
}

/* 支持系统图标 */
.system-support {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.system-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 12px;
}

/* 价格和下单按钮区域 */
.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.new-product-price {
    color: #ff2a68;
    font-weight: bold;
    font-size: 16px;
}

.order-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #ff2a68;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(255, 42, 104, 0.3);
    transition: all 0.2s;
}

.order-btn:hover {
    background-color: #e01e5a;
    transform: scale(1.05);
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: white;
    border-top: 1px solid #eee;
    padding: 8px 0;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 -3px 10px rgba(0,0,0,0.05);
    border-radius: 0;
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #888;
    font-size: 11px;
    transition: all 0.3s;
    position: relative;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 3px;
    transition: all 0.3s;
}

.nav-item.active {
    color: #ff2a68;
}

.nav-item.active i {
    transform: translateY(-5px);
}

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

/* 响应式调整 */
@media (max-width: 380px) {
    .categories {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .product-card {
        min-width: 140px;
    }
    
    .category-item {
        min-width: 90px;
        padding: 8px 10px;
    }
    
    /* 小屏幕下平台按钮调整 */
    .category-item-platform {
        min-width: 60px;
        padding: 5px 8px;
        gap: 4px;
    }
    
    .category-item-platform .category-main {
        font-size: 12px;
    }
}

/* 全局链接样式 - 移除下划线 */
a {
    text-decoration: none;
}





/* 平台筛选容器及按钮高度优化（调整为30px按钮高度） */
.platform-filter-compact {
    top: 143px !important; /* 保持原有位置 */
    /* height: 45px !important; 容器高度适配30px按钮 */
    padding: 7.5px 15px !important; /* 内边距适配新高度 */
}

.platform-filter-compact .categories-scroll {
    justify-content: space-between;
    align-items: center;
    height: 100%; /* 容器高度适配按钮 */
}

/* 按钮容器间隔缩减 */
.platform-filter-compact .categories-scroll > div:first-child {
    display: flex;
    gap: 5px; /* 按钮间间隔保持5px */
}

/* 按钮样式调整（高度改为30px） */
.platform-filter-compact .category-item-platform {
    height: 30px !important; /* 按钮高度固定为30px */
    border-radius: 3px !important; /* 圆角保持3px */
    padding: 0 12px !important; /* 内边距适配新高度 */
    font-size: 14px !important; /* 文字大小适配 */
}

/* 图标大小调整 */
.platform-filter-compact .category-icon-small {
    font-size: 14px !important; /* 图标大小适配30px按钮 */
}

/* 商品数量显示区域对齐 */
.platform-filter-compact .category-count {
    height: 30px;
    display: flex;
    align-items: center; /* 垂直居中，与30px按钮保持一致 */
    margin: 0;
    padding: 0 5px;
    font-size: 14px; /* 确保文字大小协调 */
}

