/* 移动端适配样式 */

/* 桌面端隐藏移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
}

/* 移动端搜索栏 - 现代化设计 */
.mobile-search-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-brown) 0%, var(--dark-brown) 100%);
    padding: 0.8rem 1rem;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.mobile-search-container {
    max-width: 100%;
    margin: 0 auto;
}

.mobile-search-input {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(139, 69, 19, 0.1);
    border-radius: 25px;
    padding: 0.6rem 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-search-input:focus-within {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2), 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.mobile-search-input i.fa-search {
    color: var(--accent-gold);
    margin-right: 0.8rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.mobile-search-input:focus-within i.fa-search {
    color: var(--primary-brown);
}

.mobile-search-input input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    color: var(--text-dark);
    font-family: inherit;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.mobile-search-input input::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

.mobile-search-clear {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.mobile-search-clear:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary-brown);
    transform: scale(1.1);
}

.mobile-search-clear:active {
    transform: scale(0.9);
}

/* 移动端样式 - 小程序风格底部导航栏 */
@media (max-width: 768px) {
    /* 隐藏顶部导航栏 */
    .navbar {
        display: none;
    }
    
    /* 显示移动端搜索栏 */
    .mobile-search-bar {
        display: block;
    }
    
    /* 显示移动端底部导航栏 */
    .mobile-tabbar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background: var(--white);
        align-items: center;
        justify-content: space-around;
        border-top: 1px solid var(--border-color);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }
    
    .tabbar-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.5rem;
        text-decoration: none;
        color: var(--text-light);
        transition: all 0.3s ease;
        flex: 1;
        min-height: 60px;
    }
    
    .tabbar-item.active {
        color: var(--primary-brown);
    }
    
    .tabbar-icon {
        font-size: 1.2rem;
        margin-bottom: 0.2rem;
    }
    
    .tabbar-text {
        font-size: 0.7rem;
        font-weight: 500;
    }
    
    .tabbar-item.active .tabbar-icon {
        color: var(--primary-brown);
    }
    
    .tabbar-item.active .tabbar-text {
        color: var(--primary-brown);
        font-weight: 600;
    }
    
    
    
    /* 热门视频卡片布局 */
    .popular-videos .video-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        padding: 0 1rem;
    }
    
    /* 视频卡片 */
    .popular-videos .video-card {
        background: var(--white);
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
        transition: all 0.3s ease;
        border: none;
        margin-bottom: 0;
        min-height: auto;
        position: relative;
    }
    
    .popular-videos .video-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    }
    
    /* 视频缩略图 */
    .popular-videos .video-thumbnail {
        position: relative;
        width: 100%;
        height: 0;
        padding-bottom: 133%; /* 3:4 比例 */
        overflow: hidden;
        border-radius: 0;
        margin-bottom: 0;
    }
    
    .popular-videos .video-thumbnail img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0;
        padding: 0;
        background: none;
    }
    
    /* 视频时长标签 */
    .popular-videos .video-duration {
        position: absolute;
        bottom: 0.5rem;
        right: 0.5rem;
        background: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 0.3rem 0.6rem;
        border-radius: 12px;
        font-size: 0.7rem;
        font-weight: 600;
        backdrop-filter: blur(4px);
    }
    
    /* 播放按钮 */
    .popular-videos .play-button {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: all 0.3s ease;
        backdrop-filter: blur(4px);
    }
    
    .popular-videos .video-card:hover .play-button {
        opacity: 1;
    }
    
    .popular-videos .play-button i {
        color: var(--primary-brown);
        font-size: 1rem;
        margin-left: 2px;
    }
    
    /* 视频信息 */
    .popular-videos .video-info {
        padding: 0.8rem;
    }
    
    .popular-videos .video-info h3 {
        font-size: 0.9rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
        color: var(--text-dark);
        font-weight: 600;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 移动端标题内权限标签样式 */
    .popular-videos .video-info h3 .video-badge {
        display: inline-block;
        background: var(--accent-gold);
        color: var(--white);
        padding: 0.15rem 0.4rem;
        border-radius: 8px;
        font-size: 0.6rem;
        font-weight: bold;
        margin-left: 0.3rem;
        vertical-align: top;
        line-height: 1.2;
    }
    
    /* 统计信息 */
    .popular-videos .video-stats {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        font-size: 0.75rem;
        color: var(--text-light);
    }
    
    .popular-videos .video-stats span {
        display: flex;
        align-items: center;
        gap: 0.2rem;
    }
    
    .popular-videos .video-stats i {
        font-size: 0.8rem;
        color: var(--accent-gold);
    }
    
    /* 爱心和点赞图标 */
    .popular-videos .video-stats .fa-thumbs-up {
        color: #ff6b9d;
    }
    
    .popular-videos .video-stats .fa-eye {
        color: #4ecdc4;
    }
    
    /* 茶叶推荐卡片布局 */
    .tea-recommendation .tea-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        padding: 0 1rem;
    }
    
    /* 茶叶卡片 */
    .tea-recommendation .tea-card {
        background: var(--white);
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
        transition: all 0.3s ease;
        border: none;
        margin-bottom: 0;
        position: relative;
    }
    
    .tea-recommendation .tea-card:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }
    
    /* 茶叶图片区域 */
    .tea-recommendation .tea-card img {
        width: 100%;
        height: 140px;
        object-fit: cover;
        border-radius: 0;
        background: linear-gradient(135deg, #FFF8DC, #F5E6D3);
        padding: 8px;
        box-sizing: border-box;
    }
    
    /* 茶叶信息 */
    .tea-recommendation .tea-info {
        padding: 1rem;
        text-align: left;
    }
    
    .tea-recommendation .tea-info h3 {
        font-size: 1rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        color: var(--primary-brown);
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 价格标签 */
    .tea-recommendation .tea-price {
        color: var(--primary-brown);
        font-size: 1.1rem;
        font-weight: 800;
        margin-bottom: 0.8rem;
        display: flex;
        align-items: center;
        gap: 0.3rem;
    }
    
    .tea-recommendation .tea-price::before {
        content: "¥";
        font-size: 0.9rem;
        opacity: 0.8;
    }
    

    
    /* 添加一些茶叶卡片的装饰元素 */
    .tea-recommendation .tea-card::before {
        content: '';
        position: absolute;
        top: 12px;
        right: 12px;
        width: 24px;
        height: 24px;
        background: rgba(255, 107, 157, 0.1);
        border-radius: 50%;
        z-index: 1;
    }
    
    .tea-recommendation .tea-card:nth-child(even)::before {
        background: rgba(75, 192, 192, 0.1);
    }
    
    /* 茶叶标签 */
    .tea-tag {
        position: absolute;
        top: 8px;
        left: 8px;
        background: rgba(139, 69, 19, 0.9);
        color: white;
        padding: 0.3rem 0.6rem;
        border-radius: 12px;
        font-size: 0.7rem;
        font-weight: 600;
        z-index: 2;
        backdrop-filter: blur(4px);
    }
    
    .tea-recommendation .tea-card:nth-child(2n) .tea-tag {
        background: rgba(255, 107, 157, 0.9);
    }
    
    .tea-recommendation .tea-card:nth-child(3n) .tea-tag {
        background: rgba(75, 192, 192, 0.9);
    }
    

    
    /* 价格标签 */
    .tea-recommendation .tea-price {
        color: var(--primary-brown);
        font-size: 1.1rem;
        font-weight: 800;
        margin-bottom: 0.8rem;
    }
    
    /* 小屏幕适配 */
    @media (max-width: 480px) {
        .popular-videos .video-grid {
            gap: 0.6rem;
            padding: 0 0.8rem;
        }
        
        .popular-videos .video-card {
            border-radius: 10px;
        }
        
        .popular-videos .video-info {
            padding: 0.6rem;
        }
        
        .popular-videos .video-info h3 {
            font-size: 0.8rem;
        }
        
        .popular-videos .video-stats {
            font-size: 0.7rem;
            gap: 0.6rem;
        }
        
        .mobile-search-input {
            padding: 0.5rem 0.8rem;
        }
        
        .mobile-search-input input {
            font-size: 0.95rem;
        }
        
        /* 小屏幕下的茶叶卡片适配 */
        .tea-recommendation .tea-grid {
            gap: 0.6rem;
            padding: 0 0.8rem;
        }
        
        .tea-recommendation .tea-card {
            border-radius: 14px;
        }
        
        .tea-recommendation .tea-card img {
            height: 120px;
        }
        
        .tea-recommendation .tea-info {
            padding: 0.8rem;
        }
        
        .tea-recommendation .tea-info h3 {
            font-size: 0.9rem;
        }
        
        .tea-recommendation .tea-price {
            font-size: 1rem;
        }
        
        .tea-recommendation .order-btn {
            padding: 0.6rem 1rem;
            font-size: 0.85rem;
        }
    }
}

/* 移动端隐藏页脚 */
@media (max-width: 768px) {
    .footer {
        display: none !important;
    }
}

/* PC端样式 - 隐藏底部导航栏和移动端搜索栏 */
@media (min-width: 769px) {
    .mobile-tabbar {
        display: none !important;
    }
    
    .mobile-search-bar {
        display: none !important;
    }
    
    .navbar {
        display: flex !important;
    }
    
    .main-content {
        padding-bottom: 0 !important;
        padding-top: 0 !important;
    }
}

/* 茶叶订购页移动端样式 */
@media (max-width: 768px) {
    /* 移动端标签并排显示 */
    .product-filters {
        display: flex !important;
        justify-content: flex-start !important;
        gap: 0.5rem !important;
        margin-bottom: 1.5rem !important;
        flex-wrap: nowrap !important;
        padding: 0 1rem !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    .product-filters::-webkit-scrollbar {
        display: none; /* Chrome/Safari/Opera */
    }
    
    .filter-btn {
        background: var(--light-skin);
        border: 1px solid var(--border-color);
        color: var(--text-light);
        padding: 0.5rem 0.9rem;
        border-radius: 18px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 0.8rem;
        white-space: nowrap;
        flex-shrink: 0;
        min-width: fit-content;
        text-align: center;
        font-weight: 500;
    }
    
    /* 美化横向滚动条 */
    .product-filters::-webkit-scrollbar {
        height: 4px;
    }
    
    .product-filters::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.1);
        border-radius: 2px;
    }
    
    .product-filters::-webkit-scrollbar-thumb {
        background: var(--primary-brown);
        border-radius: 2px;
    }
    
    .product-filters::-webkit-scrollbar-thumb:hover {
        background: var(--dark-brown);
    }
    
    .filter-btn.active,
    .filter-btn:hover {
        background: var(--primary-brown);
        color: var(--white);
        border-color: var(--primary-brown);
    }
    
    /* 移动端茶叶商品列表形式展现 */
    .products-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        grid-template-columns: none !important;
        padding: 0 1rem;
    }
    
    .product-card {
        background: var(--white);
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 3px 15px var(--shadow);
        transition: all 0.3s ease;
        border: 1px solid var(--border-color);
        display: flex;
        flex-direction: row;
        align-items: stretch;
        min-height: 140px;
        margin-bottom: 0;
    }
    
    .product-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 20px var(--shadow);
    }
    
    /* 商品图片区域 */
    .product-image {
        position: relative;
        overflow: hidden;
        flex-shrink: 0;
        width: 150px;
        min-width: 150px;
    }
    
    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        min-height: 140px;
    }
    
    .product-badge {
        position: absolute;
        top: 8px;
        left: 8px;
        padding: 0.2rem 0.6rem;
        border-radius: 12px;
        font-size: 0.7rem;
        font-weight: bold;
    }
    
    /* 商品信息区域 */
    .product-info {
        padding: 1rem;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .product-info h3 {
        color: var(--primary-brown);
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        line-height: 1.2;
        font-weight: 600;
    }
    
    .product-desc {
        color: var(--text-light);
        font-size: 0.8rem;
        margin-bottom: 0.8rem;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .product-specs {
        display: flex;
        gap: 0.8rem;
        margin-bottom: 0.8rem;
        font-size: 0.7rem;
        color: var(--text-light);
        flex-wrap: wrap;
    }
    
    .product-price {
        display: flex;
        align-items: baseline;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .current-price {
        color: var(--accent-gold);
        font-size: 1.2rem;
        font-weight: bold;
    }
    
    .original-price {
        color: var(--text-light);
        text-decoration: line-through;
        font-size: 0.9rem;
    }
    
    .unit {
        color: var(--text-light);
        font-size: 0.8rem;
    }
    
    /* 订购热线样式 */
    .product-contact {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0.5rem 0;
        margin-top: auto;
    }
    
    .contact-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        text-align: center;
    }
    
    .contact-info i {
        color: var(--primary-brown);
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .contact-info span {
    color: var(--primary-brown);
    font-weight: bold;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.3rem;
}

.contact-info span:last-child {
    color: var(--text-light);
    font-weight: normal;
    font-size: 0.9rem;
    margin-bottom: 0;
}
    
    /* 视频分类标签 - 与订单页保持一致 */
    .category-tabs {
        display: flex !important;
        justify-content: flex-start !important;
        gap: 0.5rem !important;
        margin-bottom: 1.5rem !important;
        flex-wrap: nowrap !important;
        padding: 0 1rem !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    .category-tabs::-webkit-scrollbar {
        display: none; /* Chrome/Safari/Opera */
    }
    
    .category-tab {
        background: var(--light-skin);
        border: 1px solid var(--border-color);
        color: var(--text-light);
        padding: 0.5rem 0.9rem;
        border-radius: 18px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 0.8rem;
        white-space: nowrap;
        flex-shrink: 0;
        min-width: fit-content;
        text-align: center;
        font-weight: 500;
       
    }
    
    .category-tab.active,
    .category-tab:hover {
        background: var(--primary-brown);
        color: var(--white);
        border-color: var(--primary-brown);
    }
    
    /* 美化横向滚动条 */
    .category-tabs::-webkit-scrollbar {
        height: 4px;
    }
    
    .category-tabs::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.1);
        border-radius: 2px;
    }
    
    .category-tabs::-webkit-scrollbar-thumb {
        background: var(--primary-brown);
        border-radius: 2px;
    }
    
    .category-tabs::-webkit-scrollbar-thumb:hover {
        background: var(--dark-brown);
    }
    
    /* 小屏幕优化 */
    @media (max-width: 480px) {
        .category-tabs {
            gap: 0.3rem !important;
            padding: 0 5.8rem !important;
            margin-bottom: 1rem !important;
        }
        
        .category-tab {
            padding: 0.4rem 0.7rem;
            font-size: 0.75rem;
            border-radius: 16px;
            border-width: 1px;
        }
        
        .product-filters {
            gap: 0.3rem !important;
            padding: 0 0.8rem !important;
            margin-bottom: 1rem !important;
        }
        
        .filter-btn {
            padding: 0.4rem 0.7rem;
            font-size: 0.75rem;
            border-radius: 16px;
            border-width: 1px;
        }
    }
    
    /* 超小屏幕优化 */
    @media (max-width: 375px) {
        .category-tabs,
        .product-filters {
            padding: 0 5.6rem !important;
            gap: 0.25rem !important;
        }
        
        .category-tab,
        .filter-btn {
            padding: 0.35rem 0.6rem;
            font-size: 0.7rem;
            border-radius: 14px;
        }
    }
}

