* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

li,
ol,
ul {
    list-style: none
}

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    background: #f5f5f5;
    padding-bottom: 60px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #333;
}

a {
    text-decoration: none;
}

/* 头部搜索 */
.header {
    background: linear-gradient(135deg, var(--taoke-lan) 0%, var(--taoke-zi) 100%);
    padding: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
}

.header a {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
}

.header h1 {
    font-size: 18px;
    margin: 0;
    flex: 1;
    color: #fff;
    margin-left: 8px;
}

.logo {
    flex: none;
    margin-right: 30px;
    line-height: 1;
}

.logo img {
    height: 40px;
    width: auto;
}

@media screen and (max-width: 768px) {
    .logo {
        margin-right: 10px;
    }

    .logo img {
        height: 22px;
    }

}

.search-box {
    display: flex;
    gap: 10px;
    flex: auto;
}

.search-box input {
    flex: auto;
    padding: 0 15px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    height: 36px;
    min-width: 0;
}

.search-box button {
    padding: 0 20px;
    background: #fff;
    color: var(--taoke-lan);
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    height: 36px;
    flex: none;
}

/* 分类导航 */
.category-nav {
    background: #fff;
    padding: 10px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    display: flex;
}

/* 分类导航 */

.category-nav a {
    display: inline-block;
    padding: 8px 16px;
    margin-right: 10px;
    background: #f0f0f0;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
}

.category-nav a:hover,
.category-nav a.active {
    background: var(--taoke-lan);
    color: #fff;
}

.category-nav li ul {
    display: none;
}

.filter-bar {
    background: #fff;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.filter-bar select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}


.detail-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
}

.goods-images {
    position: relative;
}

.main-img {
    width: 100%;
    height: auto;
    display: block;
}

.price-section {
    padding: 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4757 100%);
    color: #fff;
}

.current-price {
    font-size: 32px;
    font-weight: bold;
}

.current-price small {
    font-size: 18px;
}

.original-price {
    font-size: 14px;
    text-decoration: line-through;
    opacity: 0.8;
    margin-left: 10px;
}

.coupon-info {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    display: inline-block;
}

.info-section {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.info-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.6;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.info-label {
    color: #999;
}

.info-value {
    color: #333;
    font-weight: 500;
}

.desc-section {
    padding: 20px;
}

.desc-section h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 3px solid var(--taoke-lan);
}

.desc-content {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    white-space: pre-wrap;
}


.desc-content iframe,
.desc-content img,
.desc-content video {
    max-width: 100% !important;
    overflow: hidden !important;
}

.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 15px;
    display: flex;
    gap: 10px;
    z-index: 100;
}

.btn-home,
.btn-cart {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 25px;
    text-align: center;
    text-decoration: none;
    color: #666;
}

.btn-buy {
    flex: 2;
    padding: 12px;
    background: linear-gradient(135deg, var(--taoke-lan) 0%, var(--taoke-zi) 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

@media (min-width: 768px) {
    .detail-container {
        margin: 20px auto;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .bottom-bar {
        max-width: 800px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 8px 8px 0 0;
    }
}

/* 商品列表 */
.goods-list {
    padding: 10px;
}

.goods-item {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.goods-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.goods-info {
    padding: 12px;
}

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

.goods-title a {
    color: #333;
}

.goods-price {
    color: #ff4757;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.goods-price span {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}

.goods-tags {
    display: flex;
    gap: 5px;
    margin-top: 8px;
}

.goods-tag {
    padding: 3px 8px;
    background: #fff0f0;
    color: #ff4757;
    border-radius: 3px;
    font-size: 12px;
}

.pagination {
    text-align: center;
    padding: 20px;
}

.pagination>* {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 5px;
    background: #fff;
    color: var(--taoke-lan);
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.pagination a:hover,
.pagination .now-page {
    background: var(--taoke-lan);
    color: #fff;
    border-color: var(--taoke-lan);
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 100;
    border-top: 1px solid #f0f0f0;
}

.nav-item {
    text-align: center;
    text-decoration: none;
    color: #999;
    flex: 1;
    transition: all 0.3s ease;
}

.nav-item:hover {
    color: var(--taoke-lan);
}

.nav-item.active {
    color: var(--taoke-lan);
}

.nav-item i.fa {
    width: 24px;
    height: 24px;
    margin: 0 auto 4px;
    display: block;
    stroke: currentColor;
    font-size: 26px;
}

.nav-item.active i.fa {
    stroke-width: 2.5;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}

.nav-item span {
    font-size: 12px;
    font-weight: 500;
}

/* 响应式 */
@media (min-width: 768px) {
    .goods-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        padding: 20px;
    }

    .goods-item {
        margin-bottom: 0;
    }

    .goods-img {
        height: 250px;
    }
}

@media (min-width: 1024px) {
    .goods-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 榜单样式 */
.ranking-section {
    padding: 20px 10px 0 10px;
    background: #f9f9f9;
}

.section-title {
    font-size: 20px;
    color: #333;
    margin: 0 0 15px 0;
    padding-left: 10px;
    border-left: 4px solid var(--taoke-lan);
}

.ranking-block {
    background: #fff;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, var(--taoke-lan) 0%, var(--taoke-zi) 100%);
}

.ranking-header h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
}

.more-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.9;
}

.more-link:hover {
    opacity: 1;
}

.ranking-list {
    padding: 10px;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
    transition: background 0.3s;
}

.ranking-item:hover {
    background: #f9f9f9;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-rank {
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    background: #ddd;
    color: #666;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 10px;
    flex-shrink: 0;
}

.ranking-item:nth-child(1) .ranking-rank {
    background: #ff4757;
    color: #fff;
}

.ranking-item:nth-child(2) .ranking-rank {
    background: #ff6b81;
    color: #fff;
}

.ranking-item:nth-child(3) .ranking-rank {
    background: #ffa502;
    color: #fff;
}

.ranking-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 10px;
    flex-shrink: 0;
}

.ranking-info {
    flex: 1;
    min-width: 0;
}

.ranking-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.price-current {
    color: #ff4757;
    font-size: 16px;
    font-weight: bold;
}

.price-coupon {
    color: #ff6b6b;
    font-size: 12px;
    background: #fff0f0;
    padding: 2px 6px;
    border-radius: 3px;
}

.ranking-sales {
    font-size: 12px;
    color: #999;
}


.pop-box {
    position: fixed;
    z-index: 200;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    left: 0;
    opacity: 0;
    visibility: hidden;
}

.pop-box.on {
    opacity: 1;
    visibility: visible;
}

.pop-box .pop-info {
    background-color: #fff;
    position: relative;
}

.pop-bottom {
    bottom: 0;
}

.pop-bottom .pop-info {
    width: 100%;
    max-width: 800px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-radius: 8px 8px 0 0;
}

.pop-off {
    position: absolute;
    right: 20px;
    top: 10px;
}

.form-box ol {
    padding: 10px;
}

.form-box input[type="text"],
.form-box select {
    width: 100%;
    height: 32px;
    border: 1px solid #eee;
    padding: 0 0.6em;
    border-radius: 5px;
}

.form-box input[type="submit"] {
    width: 100%;
    height: 40px;
    background: linear-gradient(135deg, var(--taoke-lan) 0%, var(--taoke-zi) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: 0;
    border-radius: 5px;
}

.footer {
    padding: 10px 20px 20px 20px;
    text-align: center;
    font-size: 12px;
    color: #aaaaaa;
}

.footer a {
    color: #999999;
}