/* ============================================
   好物优选 - 公共样式
   适用于好物模块所有页面（列表、详情、搜索等）
   ============================================ */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    max-width: 430px;
    margin: 0 auto;
}

/* ---------- 顶部导航栏 - 黄色背景 ---------- */
.headerTop{
       background: linear-gradient(to right, #fee171, #fece2c);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    margin-bottom: 20px;
    padding-bottom: 40px;

    
}
.header_haowu {
    padding: 10px 14px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* position: sticky; */
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-icon {
    width: 32px;
    height: 32px;
    background-color: rgba(255,255,255,0.25);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-title {
    font-size: 19px;
    font-weight: 600;
    color: #333;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---------- 菜单图标 ---------- */
.headerbox_haowu .icon {
    display: block !important;
    width: 22px;
    height: 22px;
}

.headerbox_haowu .icon.i-menu {
    background: url(/Content/Images/header_icon/icon_menu.png) center center no-repeat;
    background-size: 4.4rem;
}

.search-box {
    position: relative;
    width: 160px;
        background: #ffffff url(../images/index1013/location_search.png) 1.5rem center no-repeat;
    background-size: 1.5rem;


     height: 34px;
    border: none;
    border-radius: 17px;
    padding: 0 36px 0 14px;
    font-size: 13px;
    outline: none;
    background-color: #fff;
margin-right: 20px;

}

.search-box input {
    width: 100%;
    height: 34px;
    border: none;
    border-radius: 17px;
    padding: 0 36px 0 14px;
    font-size: 13px;
    outline: none;
    background-color: #fff;
}

.search-box-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: #999;
    cursor: pointer;
}

.msg-icon {
    font-size: 22px;
    color: #333;
    cursor: pointer;
}

/* ---------- 分类标签栏 - 白色圆角卡片 ---------- */
.category-tabs {
        position: absolute;
    background-color: #fff;
    padding: 0 6px;
    display: flex;
    align-items: center;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: -10px;
    width: 94%;
    left: 3%;
}

.category-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 4px 16px;
    font-size: 15px;
    color: #333;
    position: relative;
    text-decoration: none;
    white-space: nowrap;
}

.category-tab.active {
    font-weight: 600;
}

.category-tab.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 3px;
    background: linear-gradient(to right, #fee171, #fece2c);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    border-radius: 2px;
}

.tab-icon {
    flex-shrink: 0;
}

.tab-arrow {
    font-size: 18px;
    color: #ccc;
}

.tab-divider {
    width: 1px;
    height: 24px;
    background-color: #f0f0f0;
}

/* ---------- 子分类标签 ---------- */
.sub-categories {
    background-color: #fff;
    padding: 14px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

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

.sub-category-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    background-color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

.sub-category-item.active {
    background-color: #FFD93D;
    color: #333;
    font-weight: 500;
}

/* ---------- 商品卡片网格布局 ---------- */
.product-list {
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    
}

.product-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #f9f9f9;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collect-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background-color: rgba(255,255,255,0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 14px;
    color: #999;
    cursor: pointer;
}

.product-info {
    padding: 10px 10px 12px;
}

.product-title {
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 39px;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 4px;
}

.author-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-size: 11px;
    color: #999;
}

.like-count {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: #999;
}

.like-count span:first-child {
    font-size: 13px;
}

/* ---------- 横向列表布局（一行一条） ---------- */
.product-list-row {
    display: block;
    padding: 12px;
}

.product-card-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    background-color: #fff;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 10px;
}

.product-card-row:last-child {
    margin-bottom: 0;
}

.product-img-wrapper-row {
    position: relative;
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background-color: #f9f9f9;
}

.product-img-wrapper-row .product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.product-info-row {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    min-width: 0;
}

.product-title-row {
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: auto;
    font-weight: 600;
    margin-bottom: 6px;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.product-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: #333;
    background: linear-gradient(to right, #fee171, #fece2c);
}

.product-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.product-footer-row .author-name {
    font-size: 12px;
    color: #999;
}

.product-footer-row .like-count {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #999;
}

.product-footer-row .like-count span:first-child {
    font-size: 14px;
}

.product-date {
    margin-left: 6px;
    font-size: 12px;
    color: #999;
}

/* ---------- 底部导航栏 ---------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background-color: #fff;
    display: flex;
    justify-content: space-around;
    padding: 8px 0 12px;
    border-top: 1px solid #f0f0f0;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: #999;
    font-size: 10px;
}

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

.nav-icon {
    font-size: 22px;
}

/* ---------- 分页组件（移动端友好） ---------- */
.page-nav {
    padding: 20px 16px 120px;

}

.haowu-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* 大按钮 - 方便手指点击 */
.haowu-pagination .pg-btn {
    flex: 1;
    max-width: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 44px;
    border-radius: 22px;
    font-size: 15px;
    color: #666;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #eee;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

.haowu-pagination .pg-btn:active {
    transform: scale(0.96);
}

.haowu-pagination .pg-btn.pg-prev {
    padding-left: 14px;
}

.haowu-pagination .pg-btn.pg-next {
    padding-right: 14px;
}

.haowu-pagination .pg-arrow {
    font-size: 20px;
    line-height: 1;
}

.haowu-pagination .pg-btn:hover {
    border-color: #FFB800;
    color: #FFB800;
}

.haowu-pagination .pg-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* 页码指示器 */
.haowu-pagination .pg-indicator {
    display: flex;
    align-items: baseline;
    gap: 3px;
    font-size: 16px;
    color: #999;
    user-select: none;
}

.haowu-pagination .pg-indicator .pg-current {
    font-size: 22px;
    font-weight: 700;
    color: #333;
}

.haowu-pagination .pg-indicator .pg-sep {
    margin: 0 2px;
}

.haowu-pagination .pg-indicator .pg-total {
    font-size: 15px;
}

/* 页码圆点 - 快速跳转 */
.pg-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}

.pg-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

/* 增大点击区域 */
.pg-dot::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    margin: -8px;
}

.pg-dot.active {
    background: linear-gradient(135deg, #fee171, #FFB800);
    width: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(255, 184, 0, 0.35);
}

/* ============================================
   好物详情页 - HaoWuInfo
   ============================================ */

/* 页面基础 */
.haowu-info-page {
    background: #FFF5F5;
    min-height: 100vh;
    padding-top: 4.4rem;
    padding-bottom: 80px;
}

/* 顶部导航 */
.info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: #FFF5F5;
}
.info-header .back-btn {
    display: flex;
    align-items: center;
    font-size: 16px;
    color: #333;
    text-decoration: none;
}
.info-header .back-btn svg {
    margin-right: 4px;
}
.info-header .more-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 标题 */
.info-title {
    padding: 5px 15px 15px;
    font-size: 22px;
    font-weight: bold;
    color: #222;
    line-height: 1.4;
}

/* 标签栏 */
.info-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    padding:0 15px 10px;
    flex-wrap: wrap;
}
.info-tag {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border-radius: 16px;
    font-size: 14px;
    color: #333;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.info-tag .arrow {
    margin-left: 4px;
    font-size: 10px;
    color: #999;
}
.info-tag.active {
    color: #FF6B6B;
    position: relative;
}
.info-tag.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 14px;
    right: 18px;
    height: 2px;
    background: #FF6B6B;
    border-radius: 1px;
}
.info-date {
    font-size: 14px;
    color: #999;
    margin-left: auto;
}

/* 白色卡片容器 */
.info-card {
    background: #fff;
    border-radius: 16px;
    margin: 0 15px 15px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

/* 图文摘要 */
.info-summary {
    display: flex;
    gap: 12px;
}
.info-summary .summary-img {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f8f8f8;
}
.info-summary .summary-text {
    flex: 1;
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

/* 正文内容 */
.info-content {
    font-size: 15px;
    color: #444;
    line-height: 1.85;
}
.info-content p {
    margin-bottom: 14px;
}

/* 底部操作栏 */
.info-footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 100;
}
.footer-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #FF7A7A;
    color: #fff;
    font-size: 15px;
    border: none;
    border-radius: 24px;
    padding: 10px 48px;
    box-shadow: 0 4px 12px rgba(255,122,122,0.35);
    cursor: pointer;
}

/* ---- 分享面板（底部弹出） ---- */
.share-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    align-items: flex-end;
    justify-content: center;
}
.share-overlay.active {
    align-items: flex-end;
}
.share-panel {
    background: #fff;
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 430px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.share-overlay.active .share-panel {
    transform: translateY(0);
}
.share-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}
.share-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.share-panel-body {
    display: flex;
    padding: 20px 16px;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.share-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
    font-size: 12px;
    flex-shrink: 0;
    min-width: 64px;
    -webkit-tap-highlight-color: transparent;
}
.share-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- 微信分享引导蒙层 ---- */
.wx-share-guide {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 300;
    align-items: flex-start;
    justify-content: flex-end;
}
.wx-guide-content {
    padding: 20px 24px;
    text-align: center;
}
.wx-guide-arrow {
    width: 80px;
    height: 80px;
    margin-bottom: 12px;
    margin-left: 40px;
    animation: wxGuideBounce 1.5s ease-in-out infinite;
}
.wx-guide-text {
    color: #fff;
    font-size: 16px;
    line-height: 1.8;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.wx-guide-text strong {
    font-size: 22px;
    color: #FFB800;
}
@keyframes wxGuideBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ---- Toast 提示 ---- */
.haowu-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.25s ease;
    pointer-events: none;
    white-space: nowrap;
}
.haowu-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ============================================
   好物详情页 - 相关好物推荐
   ============================================ */

/* 推荐区域 */
.related-section {
    margin-top: 0;
}

.related-title {
    font-size: 17px;
    font-weight: 700;
    color: #222;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.related-title-icon {
    font-size: 18px;
}

/* 推荐列表 */
.related-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 单条推荐项 */
.related-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    background: #FAFAFA;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.related-item:active {
    background: #F0F0F0;
}

/* 推荐图片 */
.related-img-wrap {
    width: 88px;
    height: 66px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

.related-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 推荐文字信息 */
.related-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.related-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.related-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #999;
}

.related-type {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    background: linear-gradient(to right, #fee171, #fece2c);
    color: #333;
    font-size: 11px;
    font-weight: 500;
}

.related-views {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.related-views::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z' fill='%23999'/%3E%3C/svg%3E") center no-repeat;
    background-size: 12px;
}

.related-date {
    margin-left: auto;
}

/* 查看更多链接 */
.related-more-link {
    display: block;
    text-align: center;
    padding: 12px 0 2px;
    font-size: 14px;
    color: #FF7A7A;
    text-decoration: none;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
}

.related-more-link:active {
    opacity: 0.7;
}
