
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    background-color: #f5f5f5;
    font-size: 14px;
}
a {
    text-decoration: none;
}
a:hover {
    text-decoration: none;
}
/* 导航栏 */
.top-nav {
    background-color: #ff4400;
}
.top-nav .nav-link {
    color: #fff;
}
.search-btn {
    background-color: #ff4400;
    color: #fff;
}
/* 商品卡片基础 */
.goods-card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}
.goods-card:hover {
    box-shadow: 0 3px 12px rgba(1,1,1,0.3);
    color: inherit;
    text-decoration: none;
}
.goods-card img {
    object-fit: contain;
}
.price-now {
    color: #ff4400;
    font-size: 18px;
    font-weight: bold;
}
.price-old {
    color: #999;
    text-decoration: line-through;
    font-size: 12px;
    margin-left: 6px;
}
.category-item {
    text-align: center;
    margin: 10px 0;
}
.category-item i {
    font-size: 24px;
    color: #ff4400;
}
.sec-kill-title {
    border-left: 4px solid #ff4400;
    margin-bottom: 0;
    padding: 5px 10px;
    margin-top: 5px;
    color: #e62828;
    font-weight: 700;
}
.fixed-bottom-bar {
    background: #fff;
    border-top: 1px solid #eee;
    height: 56px; /* 固定底部导航高度，方便占位计算 */
}

/* ========== 1.限时秒杀专用样式（电脑+手机统一上下结构） ========== */
.sec-kill-wrap {
    position: relative;
}
/* 滚动箭头 PC显示 手机隐藏 */
.scroll-arrow {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: none;
    box-shadow: 0 1px 6px rgba(0,0,0,0.18);
    font-size: 16px;
    color: #333;
    z-index: 9;
    cursor: pointer;
}
.scroll-arrow.left {left: 4px;}
.scroll-arrow.right {right: 4px;}
.scroll-arrow:disabled {opacity: 0.35;cursor: not-allowed;}
@media (min-width: 768px) {
    .scroll-arrow {display: block;}
}
.scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}
.scroll-wrapper {
    display: flex;
    flex-wrap: nowrap;
    padding: 10px 0;
    gap: 15px; /* 明确间距 */
}
.scroll-item {
    width: 160px;
    flex-shrink: 0; /* 防止移动端挤压 */
}
/* PC一行4个，单项宽度23%适配4列 */
@media (min-width: 1200px) {
    .scroll-item {width: calc(20% - 15px);} /* 适配4列 */
}
@media (min-width: 768px) and (max-width:1199px) {
    .scroll-item {width: calc(33.33% - 15px);} /* 适配3列 */
}
@media (max-width:767px) {
    .scroll-item {width: calc(45% - 15px);} /* 移动端适配 */
}
/* 秒杀卡片强制上下布局，全端生效 */
.sec-kill-wrap .goods-card {
    display: flex;
    flex-direction: column;
    height: 100%; /* 统一卡片高度 */
}
.sec-kill-wrap .goods-card img {
    width: 100%;
    /*height: 160px;*/
}
.sec-kill-wrap .goods-info {
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap:6px;
    flex: 1; /* 内容区自适应 */
}
/* 秒杀滚动条隐藏 */
.scroll-container::-webkit-scrollbar {display: none;}
.scroll-container {-ms-overflow-style: none;scrollbar-width: none;}

/* 新增：移动端滑动提示样式 */
.scroll-tips {
    display: none;
    text-align: center;
    color: #999;
    font-size: 12px;
    padding: 5px 0 10px;
}
.scroll-tips i {
    color: #ff4400;
    margin: 0 3px;
    animation: slideTips 1.5s infinite alternate;
}
@keyframes slideTips {
    0% {transform: translateX(0);}
    100% {transform: translateX(5px);}
}
@media (max-width:767px) {
    .scroll-tips {display: block;}
}

/* ========== 2.热门推荐：值得买横向列表样式（全站左图右文） ========== */
.recommend-box .goods-list-item {
    background: #fff;
    display: flex;
    padding: 15px;
    margin-bottom: 12px;
    gap: 15px;
    border-bottom: 1px solid #f6f6f6;
    align-items: center;
    transition: all 0.25s ease;
    border-radius: 5px;
}
.recommend-box .goods-list-item:last-child {
    border-bottom: none;
}
.recommend-box .goods-list-item:hover {
    background: #fdf6f6;
    transform: translateY(-2px);
    box-shadow: 0 1px 1px #f6f6f6;
}
.recommend-box .goods-list-item img {
    width: 160px;
    height: 160px;
    flex-shrink: 0;
    border-radius: 4px;
}
.recommend-box .goods-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.recommend-box .goods-list {
    display: block;
    width: 100%;
}
.goods-top a {
    color: #333;
}
.goods-top a:hover h5 {
    color: #5188a6;
}
.goods-top a > h5 {
    color: #000;
    -webkit-line-clamp: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    width: 100%;
    line-height: 21px;
    margin-top: 3px;
    margin-bottom: 9px;
    font-size: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    height: auto;
}
.goods-top .highlight {
    -webkit-line-clamp: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-height: 19px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 18px;
    margin-bottom: 13px;
    -webkit-font-smoothing: antialiased;
    color: #e62828;
    height: auto;
}
.goods-top .goods-descripe {
    color: #444;
    font-size: 14px;
    line-height: 24px;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    max-height: 48px;
    height: auto;
}
.goods-tag {
    background: #ffe8e8;
    color: #f53f3f;
    padding: 3px 8px;
    font-size: 12px;
    display: inline-block;
}
.goods-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.goods-stat span {
    color: #999;
    margin-right: 15px;
}
.buy-btn {
    font-size: 12px;
    background: #f5222d;
    color: #fff;
    border: none;
    padding: 2px 5px;
    border-radius: 4px;
}

.category-quick-right {
    flex: 1; /* 右侧分类自适应剩余宽度 */
    border: 1px solid #eee;
    padding: 15px;
}
/* 选项卡头部 */
.tab-header {
    display: flex;
    border-bottom: 1px solid #eee;
}
.tab-item {
    padding: 5px 10px;
    font-size: 16px;
    cursor: pointer;
    position: relative;
}
.tab-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 3px;
    background-color: #f00;
}
/* 隐藏非当前面板 */
.tab-panel {
    display: none;
    padding: 20px 15px;
}
.tab-panel.active {
    display: block;
}
/* 分类样式 */
.category-block {
    margin-bottom: 24px;
}
.category-big {
    font-size: 16px;
    margin-bottom: 12px;
}
.category-small {
    font-size: 14px;
    color: #999;
    margin-bottom: 8px;
}

/* 移动端适配缩略图大小（优化：缩小而非隐藏） */
@media (max-width: 767px) {
    .sec-kill-wrap .goods-info h6{
        font-size: 14px;
    }
    .recommend-box .goods-list-item {
        gap: 0;
    }.recommend-box .goods-list-item img {
         /*width: 100px;*/
         /*height: 100px;*/
         display: none;
     }
    .goods-top a > h5 {
        font-size: 14px;
    }
    .goods-top .highlight {
        font-size: 14px;
        margin-bottom: 0;
    }
    .goods-top .goods-descripe {
        -webkit-line-clamp: 2;
    }
    .category-quick-right {
        display: none;
    }
    footer {
        margin-bottom: 30px;
    }
}