/* ==========================================================
   复购网 · 移动端视觉适配（仅 <=900px 生效，电脑端完全不受影响）
   目标：顶栏干净、卡片统一、留白舒适、价格信息一眼看清
   ========================================================== */

@media screen and (max-width: 900px) {
    html {
        -webkit-text-size-adjust: 100%;
    }

    html, body {
        overflow-x: hidden;
    }

    body {
        font-size: 15px;
        line-height: 1.65;
    }

    img, video, iframe {
        max-width: 100%;
        height: auto;
    }

    /* 通用容器：电脑端 78% → 手机端 92% */
    .contaer, .contain {
        width: 92%;
    }

    /* ===== 首页顶部优惠券横幅 ===== */
    .bodydjs {
        display: block;
        margin: 10px 0 6px;
    }

    .coupon-banner {
        margin: 10px 12px 18px;
        border-radius: 18px;
        overflow: hidden;
        box-shadow: 0 12px 30px rgba(15, 23, 42, .10);
    }

    .banner-image {
        height: 258px !important;
        margin: 0;
        border-radius: 18px;
    }

    .banner-image img {
        object-fit: cover;
    }

    .image-overlay {
        padding: 16px;
        justify-content: flex-end;
        gap: 10px;
        background: linear-gradient(180deg, rgba(15, 23, 42, 0) 32%, rgba(15, 23, 42, .58) 100%);
    }

    .image-title {
        align-self: flex-start;
        margin: 0;
        padding: 8px 12px;
        font-size: 15px;
        line-height: 1.5;
        border: 1px solid rgba(255, 255, 255, .22);
        border-left: 1px solid rgba(255, 255, 255, .22);
        border-right: 1px solid rgba(255, 255, 255, .22);
        border-radius: 10px;
        background: rgba(255, 255, 255, .16);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }

    .price-group {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 6px 10px;
        padding: 10px 12px;
        border-radius: 12px;
        background: rgba(15, 23, 42, .55);
    }

    .price-item {
        font-size: 12px;
    }

    .discount-price {
        font-size: 1.6rem;
    }

    .action-bar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
        border-radius: 12px;
        background: rgba(15, 23, 42, .55);
    }

    .countdown {
        font-size: .95rem;
    }

    .copy-btn {
        padding: 8px 16px;
        font-size: 13px;
        border-radius: 16px;
    }

    /* ===== 首页卡片：统一圆角、阴影、间距 ===== */
    .simplify-module {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 0 12px;
        margin: 18px auto;
    }

    .simplify-card {
        border-radius: 16px;
        box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
        border: 1px solid #eef1f6;
    }

    .main-image img {
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }

    .current-simple {
        font-size: 20px;
    }

    .action-area {
        padding: 12px 14px;
        gap: 10px;
    }

    .product-image {
        width: 100%;
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }

    .product-module {
        gap: 14px;
        padding: 0 12px;
    }

    .product-card {
        border-radius: 16px;
        box-shadow: 0 8px 24px rgba(15, 23, 42, .07);
        overflow: hidden;
    }

    .minimal-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 0 12px;
        margin: 16px auto;
    }

    .minimal-item {
        border-radius: 14px;
        border: 1px solid #eef1f6;
        box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
        background: #fff;
    }

    .minimal-item .img-box img {
        aspect-ratio: 1 / 1;
        object-fit: cover;
        width: 100%;
    }

    /* 首页其它百分比网格：手机端统一降列 */
    .coupon-list {
        grid-template-columns: 1fr;
    }

    .coupon-section {
        padding: 22px 0;
    }

    .coupon-item {
        min-height: 0;
        border-radius: 16px;
    }

    .product-showcase {
        padding: 0 12px;
        gap: 14px;
        margin: 1.4rem auto;
    }

    .sytitle {
        padding: 12px 14px;
        font-size: 14px;
        letter-spacing: 1px;
    }

    .product-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    /* ===== 产品详情 ===== */
    .product-detail {
        max-width: 100%;
        padding: 0 14px;
        margin: 1rem auto;
    }

    .classic-layout {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 16px;
        border-radius: 14px;
    }

    .thumbnails {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    /* ===== 页脚二维码（页脚主体样式在 foot.html 内） ===== */
    .qbox {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        gap: 16px;
        flex-wrap: wrap;
    }

    .qrcode-box, .qrcodebox {
        float: none;
    }

    .qrcode-box img, .qrcodebox img {
        max-width: 128px;
    }

    /* 长表格/代码块避免撑破页面 */
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    pre, code {
        white-space: pre-wrap;
        word-break: break-word;
    }

    .modal, .popup, .dialog {
        max-width: 92vw;
    }
}

@media screen and (max-width: 480px) {
    .minimal-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 0 10px;
    }

    .thumbnails {
        gap: 5px;
    }

    .banner-image {
        height: 230px !important;
    }

    .discount-price {
        font-size: 1.45rem;
    }

    .copyright {
        font-size: 13px;
    }
}

/* ==========================================================
   内容页专用（新闻列表 / 文章详情 / 产品页 / 单页）
   只覆盖手机端，电脑端保持原样
   ========================================================== */
@media screen and (max-width: 900px) {

    /* ---------- 通用页面骨架 ---------- */
    .container.pages {
        padding-left: 14px;
        padding-right: 14px;
    }

    .container.pages > h2,
    .pages h2 {
        font-size: 20px !important;
        line-height: 1.45 !important;
        letter-spacing: 0 !important;
        margin: 16px 0 12px !important;
        text-align: left !important;
    }

    /* 栏目大图：手机上不再占半屏 */
    .jumbotron {
        padding: 42px 16px 36px !important;
        margin-bottom: 14px !important;
        border-radius: 0 0 18px 18px;
        background-position: center center !important;
        background-size: cover !important;
    }

    .jumbotron h1 {
        font-size: 22px !important;
        line-height: 1.4 !important;
        letter-spacing: 0 !important;
        margin-bottom: 6px;
        text-shadow: 0 1px 8px rgba(15, 23, 42, .35);
    }

    .jumbotron p {
        font-size: 13px !important;
        line-height: 1.6 !important;
        margin: 0;
        opacity: .92;
    }

    /* ---------- 富文本正文 ---------- */
    .content,
    .article-content,
    .detail-section .content {
        font-size: 16px !important;
        line-height: 1.85 !important;
        letter-spacing: 0 !important;
        color: #334155;
        word-break: break-word;
    }

    .content p,
    .content div,
    .article-content p,
    .article-content div {
        font-size: 16px !important;
        line-height: 1.85 !important;
        letter-spacing: 0 !important;
    }

    .content p,
    .article-content p {
        margin: 0 0 1.05em !important;
    }

    .content h1, .content h2, .content h3, .content h4,
    .article-content h1, .article-content h2, .article-content h3, .article-content h4 {
        font-size: 19px !important;
        line-height: 1.5 !important;
        letter-spacing: 0 !important;
        margin: 1.4em 0 .7em !important;
        color: #1e293b;
    }

    .content ul, .content ol,
    .article-content ul, .article-content ol {
        padding-left: 1.25em !important;
        margin: 0 0 1.1em !important;
    }

    .content blockquote,
    .article-content blockquote {
        margin: 1.2em 0 !important;
        padding: 12px 14px !important;
        border-left: 3px solid #667eea;
        background: #f6f7fd;
        border-radius: 0 10px 10px 0;
        color: #475569;
        font-size: 15px !important;
        line-height: 1.8 !important;
    }

    .content img,
    .article-content img,
    .article-cover {
        display: block;
        max-width: 100% !important;
        width: auto !important;
        height: auto !important;
        margin: 1.1em auto !important;
        border-radius: 12px;
        box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
    }

    .content table,
    .article-content table {
        display: block;
        width: 100% !important;
        overflow-x: auto;
        font-size: 13px !important;
        -webkit-overflow-scrolling: touch;
    }

    .content iframe,
    .article-content iframe {
        width: 100% !important;
        max-width: 100%;
    }

    /* ---------- 新闻列表 ---------- */
    .news-container {
        max-width: 100%;
        padding: 0 14px 20px;
        margin: 0 auto;
    }

    .news-header {
        margin: 14px 0 14px;
    }

    .filter-tabs {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 2px 0 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .filter-tabs .tab {
        flex: 0 0 auto;
        display: inline-block;
        padding: 8px 14px;
        border-radius: 999px;
        background: #f1f3f9;
        color: #475569;
        font-size: 13px;
        line-height: 1.2;
        text-decoration: none;
        white-space: nowrap;
        transition: background .2s, color .2s;
    }

    .filter-tabs .tab.active {
        background: linear-gradient(135deg, #667eea, #764ba2);
        color: #fff;
        box-shadow: 0 4px 12px rgba(102, 126, 234, .28);
    }

    .news-list {
        gap: 14px;
        margin-bottom: 22px;
    }

    .news-item {
        flex-direction: column !important;
        border-radius: 16px;
        box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
    }

    .news-item:hover {
        transform: none;
        box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
    }

    .news-image-container {
        height: 176px !important;
        width: 100% !important;
        flex: none !important;
    }

    .news-content {
        padding: 14px 16px 16px !important;
    }

    .news-title {
        font-size: 17px !important;
        line-height: 1.55 !important;
        letter-spacing: 0 !important;
        margin-bottom: 8px !important;
    }

    .news-summary {
        font-size: 13px !important;
        line-height: 1.75 !important;
        letter-spacing: 0 !important;
        margin-bottom: 12px !important;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .news-meta {
        padding-top: 10px !important;
        font-size: 12px !important;
    }

    /* ---------- 文章详情 ---------- */
    .article-container {
        max-width: 100%;
        margin: 12px 14px 18px !important;
        padding: 18px 16px 20px !important;
        border-radius: 16px;
        box-shadow: 0 8px 24px rgba(15, 23, 42, .07);
    }

    .article-header {
        text-align: left !important;
        letter-spacing: 0 !important;
        padding-bottom: 14px !important;
        position: relative;
    }

    .article-header::after {
        content: "";
        display: block;
        width: 46px;
        height: 3px;
        margin-top: 12px;
        border-radius: 2px;
        background: linear-gradient(90deg, #667eea, #764ba2);
    }

    .article-title {
        font-size: 20px !important;
        line-height: 1.5 !important;
        letter-spacing: 0 !important;
        margin-bottom: 8px !important;
    }

    .article-meta {
        font-size: 12px !important;
        color: #8b98a9 !important;
        line-height: 1.8;
    }

    .article-content {
        font-size: 16px !important;
        line-height: 1.85 !important;
        letter-spacing: 0 !important;
        padding: 14px 0 0 !important;
    }

    .article-pagination {
        margin-top: 18px;
    }

    .article-pagination .d-flex {
        display: block !important;
    }

    .article-pagination .btn {
        display: block;
        width: 100%;
        margin: 0 0 8px !important;
        padding: 10px 12px !important;
        font-size: 12.5px !important;
        line-height: 1.5 !important;
        text-align: left;
        white-space: normal;
        border-radius: 10px;
    }

    .related-products {
        margin-top: 22px !important;
        padding: 0 !important;
        border-top: 0 !important;
    }

    .related-products h3 {
        font-size: 16px !important;
        letter-spacing: 0 !important;
        margin: 0 0 12px !important;
    }

    .related-products .product-list {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .related-products .product-item {
        border-radius: 12px;
    }

    .related-products .product-img {
        height: 108px !important;
    }

    .related-products .product-title {
        font-size: 13px !important;
        line-height: 1.5 !important;
        letter-spacing: 0 !important;
    }

    .related-products .product-desc {
        font-size: 11px !important;
        line-height: 1.55 !important;
        letter-spacing: 0 !important;
    }

    /* ---------- 列表分页 ---------- */
    .pagebar .pagination,
    .pagination {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        margin: 18px 0 26px !important;
    }

    .pagination a,
    .pagination .page-item {
        margin: 0 !important;
        padding: 8px 12px !important;
        font-size: 12px !important;
        line-height: 1.2 !important;
        border-radius: 10px !important;
    }

    /* ---------- 产品列表 ---------- */
    .product-showcase {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        padding: 0 14px !important;
        margin: 14px auto 20px !important;
    }

    .product-card {
        border-radius: 16px;
    }

    .sytitle {
        padding: 12px 14px !important;
        font-size: 14px !important;
        line-height: 1.6 !important;
        letter-spacing: 0 !important;
        text-shadow: none !important;
        background: #f6f7fb !important;
        box-shadow: none !important;
        border-radius: 0 0 16px 16px !important;
    }

    .price-corner {
        top: 10px !important;
        left: 10px !important;
        padding: 8px 10px !important;
        border-radius: 10px;
    }

    .price-line {
        font-size: 12px !important;
        gap: 8px !important;
    }

    .countdown-tag {
        top: 10px !important;
        right: 10px !important;
        padding: 6px 10px !important;
        font-size: 12px !important;
        border-radius: 14px;
    }

    .action-panel {
        padding: 12px !important;
    }

    .action-group {
        gap: 8px !important;
    }

    .tkl-copy, .coupon-btn {
        font-size: 13px !important;
    }

    /* ---------- 产品详情 ---------- */
    .product-detail {
        display: flex;
        flex-direction: column;
        padding: 0 14px !important;
        margin: 12px auto 20px !important;
    }

    .product-detail .classic-layout {
        order: 1;
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        padding: 14px !important;
        border-radius: 16px;
        width: 100%;
    }

    .product-detail .coupon-sidebar {
        order: 2;
        width: 100% !important;
        margin: 16px 0 0 !important;
        padding: 16px !important;
        border-radius: 16px;
    }

    .coupon-sidebar h3 {
        font-size: 16px !important;
        letter-spacing: 0;
    }

    .process-steps li {
        margin-bottom: 12px !important;
    }

    .step-content {
        font-size: 13px !important;
        line-height: 1.65 !important;
    }

    .tea-gallery {
        width: 100% !important;
    }

    .product-titlexq {
        font-size: 20px !important;
        line-height: 1.45 !important;
        letter-spacing: 0 !important;
        margin-bottom: 8px !important;
    }

    .platform-markxq {
        font-size: 13px !important;
        padding: 4px 12px !important;
        margin-bottom: 14px !important;
    }

    .action-box {
        gap: 8px !important;
        margin: 14px 0 !important;
    }

    .btn-getcoupon {
        font-size: 14px !important;
        padding: 11px 8px !important;
        letter-spacing: 0 !important;
        border-radius: 10px;
    }

    .pricedec {
        padding: 12px !important;
        font-size: 13px !important;
        line-height: 1.7 !important;
        margin-top: 14px !important;
    }

    .detail-section {
        padding: 14px !important;
        border-radius: 16px;
    }

    .detail-title {
        font-size: 17px !important;
        letter-spacing: 0 !important;
    }

    .detail-sidebar {
        width: 100% !important;
    }

    .detail-sidebar .product-list {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .detail-sidebar .product-item {
        border-radius: 12px;
    }

    /* 详情页内推荐商品：图不要占满整卡 */
    .detail-sidebar .product-item .product-image {
        height: 96px !important;
    }

    .article-nav {
        flex-direction: column;
        gap: 8px;
        margin-top: 18px !important;
    }

    .nav-link {
        max-width: 100% !important;
        font-size: 12.5px;
    }

    /* ---------- 复购友荐详情页 ---------- */
    .fgyj-detail h2 {
        font-size: 20px !important;
        line-height: 1.5 !important;
        letter-spacing: 0 !important;
    }

    .fgyj-detail div[style*="line-height: 36px"] {
        font-size: 15px !important;
        line-height: 1.7 !important;
        letter-spacing: 0 !important;
    }

    .fgyj-detail .fgyj-share-btn,
    .fgyj-detail .fgyj-coupon-btn {
        display: block !important;
        width: 100% !important;
        margin: 8px 0 !important;
        padding: 12px 10px !important;
        font-size: 15px !important;
        letter-spacing: 1px !important;
        text-align: center;
    }

    /* ---------- 留言 / 搜索表单 ---------- */
    .form-inline .form-control,
    .form-group .form-control {
        width: 100% !important;
    }

    .form-inline {
        display: block !important;
    }

    .form-inline .form-group {
        margin: 0 0 10px !important;
    }

    .form-inline .btn {
        width: 100%;
    }
}

/* 内容页补充细节（仍然只作用于手机） */
@media screen and (max-width: 900px) {

    /* 正文里即使是内联写的 5px 字距、42px 行高，也统一压回可读值 */
    .article-content #articleContent,
    .article-content #articleContent * {
        letter-spacing: 0 !important;
    }

    .article-content #articleContent p,
    .article-content #articleContent div,
    .article-content #articleContent span {
        line-height: 1.85 !important;
        font-size: inherit !important;
    }

    .article-content #articleContent h1,
    .article-content #articleContent h2,
    .article-content #articleContent h3 {
        line-height: 1.5 !important;
        font-size: 19px !important;
    }

    /* 产品详情主体铺满，不再留 78% 的窄条 */
    .product-detail {
        width: 100% !important;
        max-width: 100% !important;
    }

    .detail-content-wrapper {
        order: 3;
        flex-direction: column !important;
        gap: 14px !important;
        margin-top: 16px !important;
    }

    .price-section {
        padding: 14px !important;
        margin: 14px 0 !important;
        border-radius: 12px;
    }

    .current-price {
        font-size: 24px !important;
        margin-right: 10px !important;
    }

    .original-price {
        font-size: 13px !important;
    }

    .coupon-tag {
        font-size: 14px !important;
    }

    /* 产品详情里的二维码，不能被拉成整屏大图 */
    .ewmxq {
        text-align: center;
        margin-top: 10px;
    }

    .ewmxq img,
    .ewmxq .main-image {
        display: inline-block !important;
        width: 108px !important;
        max-width: 108px !important;
        height: 108px !important;
        margin: 0 auto !important;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
    }

    /* 商品详情正文 */
    .product-content {
        font-size: 15px !important;
        line-height: 1.8 !important;
        letter-spacing: 0 !important;
        word-break: break-word;
    }

    .product-content img {
        max-width: 100% !important;
        height: auto !important;
        border-radius: 10px;
    }

    /* 新闻/文章里的推荐卡片文字压缩，避免两列里挤成竖排 */
    .related-products .product-item a {
        display: block;
    }
}

