/* 
 */

/* =========================================================
========================================================= */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    background-color: #ffffff !important; /* 修改点：底色由灰改白 */
    color: #64748b; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", sans-serif;
    font-size: 13px;
    line-height: 1.5;
    overflow-x: hidden;
    overflow-y: auto !important; 
    -webkit-font-smoothing: antialiased;
}

/* 极细拉条美化 */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* 骨架居中：1200px 巨量留白 */
.layui-container, .mall-container {
    max-width: 1200px !important;
    margin: 10px auto !important; 
    display: flex !important;
    align-items: flex-start;
    gap: 15px;
    padding: 0 15px !important;
    background: transparent !important;
}


/* =========================================================
   2. 头部导航栏 (黑金稳重风格)
========================================================= */
.layui-header {
    margin-top: 0 !important;
    background: #1f2937 !important; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    height: 60px;
    line-height: 60px;
    border: none !important;
    z-index: 1000;
}
.logo-area { display: flex; align-items: center; height: 60px; }
.logo-area img { display: block; height: 32px; max-width: 180px; object-fit: contain; border: none; }

/* 顶栏文字颜色修正 */
.layui-header .layui-nav-item a,
.layui-header .layui-nav-item a[style*="color"] {
    color: rgba(255,255,255,0.85) !important; 
    font-size: 13px !important;
    font-weight: 500;
}
.layui-header .layui-nav-item a:hover { color: #39c884 !important; }
.layui-header .layui-nav-child { top: 60px; background: #fff; border: 1px solid #e5e7eb; border-radius: 4px; }


/* =========================================================
   3. 左侧商品分类导航 - 【对调】：容器改为浅灰
========================================================= */
.mall-sidebar {
    width: 210px;
    max-height: calc(100vh - 60px); 
    background: #f4f6f8; /* 修改点：由白改灰 */
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    z-index: 100;
    overflow-y: auto; 
}
.sidebar-title {
    padding: 14px 18px; font-weight: bold; font-size: 13.5px;
    color: #374151 !important; background: #f8fafc; border-bottom: 1px solid #e5e7eb;
}
.mall-sidebar .layui-nav-tree { width: 100% !important; background: transparent !important; }
.mall-sidebar .layui-nav-item { border-bottom: 1px solid #f8fafc; }
.mall-sidebar .layui-nav-item a {
    color: #64748b !important; height: 40px; line-height: 40px;
    font-size: 12px !important; padding: 0 18px !important;
}
.mall-sidebar .layui-nav-item a:hover { background: #f0fdfa !important; color: #39c884 !important; }

/* 选中高亮改为淡绿 */
.mall-sidebar .layui-this a,
.mall-sidebar .layui-this a[style*="color"] { 
    background: #f0fdfa !important; 
    color: #009688 !important; 
    font-weight: bold !important; 
    border-left: 3px solid #009688 !important; 
}


/* =========================================================
   4. 商品展示区 & 公告栏 - 【对调】：容器改为浅灰
========================================================= */
.mall-main { flex: 1; min-width: 0; }

/* 首页公告栏 */
.mall-main > .notice-bar {
    background: #f4f6f8; /* 修改点：由白改灰 */
    border-radius: 8px; border: 1px solid #e5e7eb;
    padding: 10px 15px; margin-bottom: 12px; 
    border-left: 5px solid #009688 !important; 
    font-size: 14px; color: #4b5563 !important; line-height: 1.6;
}
.mall-main > .notice-bar i { color: #009688 !important; }
.mall-main > .notice-bar a { color: #64748b !important; text-decoration: none !important; border-bottom: none !important; }

/* 商品分类大框 */
.category-box { 
    background: #f4f6f8; /* 修改点：由白改灰 */
    border-radius: 8px; border: 1px solid #e5e7eb; 
    margin-bottom: 25px; padding: 0; overflow: hidden; 
}
.category-title { 
    font-size: 14px; font-weight: bold; color: #9ca3af !important; 
    padding: 12px 18px; border-bottom: 1px solid #f1f5f9; 
    background: #f4f6f8; /* 修改点：由白改灰 */
}

/* Grid 布局逻辑 */
.product-grid-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 75px 75px 75px 85px 85px !important;
    gap: 0; align-items: center;
}

/* 表头：彻底移除垂直隐线 */
.product-list-header { background: #f8fafc; border-bottom: 1px solid #e5e7eb; font-size: 12px; color: #94a3b8 !important; text-align: center; padding: 10px 10px; }
.product-list-header > div { 
    padding: 10px 5px; 
    border-right: none !important; /* 物理移除竖线 */
}
.product-list-header > div:first-child { text-align: left; padding-left: 18px; }

.product-item { border-bottom: 1px solid #f1f5f9; transition: background 0.2s; background: #fff; } /* 保持行内白色以突出 */
.product-item:hover { background: #f9fafb !important; }
.product-item:last-child { border-bottom: none; }

/* 单元格控制：彻底移除垂直隐线 */
.product-item > .product-grid-layout > div {
    padding: 8px 5px; 
    border-right: none !important; /* 物理移除竖线 */
    height: 100%; display: flex; align-items: center; justify-content: center;
}
.product-item > .product-grid-layout > div:first-child { justify-content: flex-start; padding-left: 18px; }

.name-text, .name-text a { font-weight: 500 !important; color: #64748b !important; font-size: 13px !important; white-space: normal !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.col-stock, .col-sales, .col-stock b { font-size: 12px !important; color: #9ca3af !important; font-weight: normal !important; }

/* 【核心修改】：自动发货标签颜色改为和购买按钮一致 (淡金色) */
.tag-mode { 
    font-size: 10px; padding: 2px 6px; 
    background: #fff1b8 !important; /* 改为淡金底 */
    color: #855d00 !important;     /* 改为茶褐色字 */
    border-radius: 4px; border: 1px solid #ffe58f !important; 
}
.tag-mode.manual { background: #f3f4f6; color: #94a3b8; border-color: #e5e7eb; }
.col-price { text-align: right; color: #888888 !important; font-weight: normal !important; font-size: 14px; justify-content: flex-end !important; }

/* 购买按钮 */
.btn-buy { 
    background: #fff1b8 !important; 
    color: #855d00 !important;     
    height: 26px; line-height: 26px; border-radius: 4px; font-size: 11.5px; 
    font-weight: bold; text-align: center; width: 56px; border: 1px solid #ffe58f !important; 
    transition: 0.2s; display: block; margin: 0 auto; 
}


/* =========================================================
   5. 回到顶部按钮 (避让客服 130px)
========================================================= */
.back-to-top {
    position: fixed !important; bottom: 130px !important; right: 30px !important; 
    width: 42px; height: 42px; background: #ffffff; border: 1px solid #e5e7eb; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.08); z-index: 99999;
}
.back-to-top:hover { border-color: #39c884; color: #39c884 !important; transform: translateY(-3px); }


/* =========================================================
   6. 详情页与全量内页 - 【对调】：背景改为浅灰
========================================================= */
.沉浸式布局 { max-width: 1000px !important; margin: 10px auto !important; background: transparent !important; border: none !important; box-shadow: none !important; padding: 10px !important; }
.detail-main-box { 
    background: #f4f6f8; /* 修改点：由白改灰 */
    border: 1px solid #e5e7eb; border-radius: 8px; padding: 20px 30px; 
}
#buy.layui-btn { background-color: #009688 !important; color: #fff !important; height: 46px; line-height: 46px; font-size: 16px; border-radius: 4px; }
.layui-form-pane .layui-form-label { width: 110px !important; background-color: #f8fafc !important; color: #374151 !important; }
.layui-form-pane .layui-input-block { margin-left: 110px !important; }


/* =========================================================
   7. 移动端终极适配
========================================================= */
@media screen and (max-width: 768px) {
    body { padding-top: 0 !important; }
    .logo-area { padding-left: 10px; }
    .logo-area img { height: 28px !important; }

    .layui-container, .mall-container { width: 94% !important; margin: 15px auto !important; display: block !important; padding: 0 !important; }
    .mall-sidebar, .product-list-header { display: none !important; }
    
    .product-item > .product-grid-layout.layui-hide-xs { display: none !important; }
    
    .product-item { display: block; padding: 12px; background: #f4f6f8; border-radius: 0; border: none; border-bottom: 1px solid #f1f5f9; }
    .product-item > .product-grid-layout > div { border: none; padding: 0; display: block; height: auto; }
    .name-text, .name-text a { white-space: normal !important; font-size: 14.5px !important; margin-bottom: 10px; color: #64748b !important; }
    .mobile-meta-row { display: flex; justify-content: space-between; align-items: center; background: #f8fafc; padding: 8px; border-radius: 6px; border: 1px solid #e5e7eb; }
    .col-price { font-size: 16px; text-align: left; color: #888 !important;}
    
    .btn-buy { width: 56px; margin: 0; background: #fff1b8 !important; color: #855d00 !important; border: 1px solid #ffe58f !important; }
    .img-matrix { grid-template-columns: 1fr !important; }
}



.btn-buy, #buy.layui-btn {
    background-color: #fff1b8 !important; /* 复刻图片里的淡金底色 */
    color: #855d00 !important;           /* 复刻图片里的茶褐色文字 */
    border: 1px solid #ffe58f !important; /* 配合一个极淡的边框 */
    box-shadow: none !important;
    font-weight: bold !important;
}

.btn-buy:hover, #buy.layui-btn:hover {
    background-color: #ffd666 !important;
    opacity: 0.9;
}

.detail-price-panel, 
.price-bg-box {
    background-color: #fff1f0 !important; /* 恢复浅红色背景 */
    border: 1px solid #ffccc7 !important; /* 配套的浅红边框 */
    border-radius: 6px !important;
    padding: 15px 20px !important;
}

/* =========================================================
   最终加固补丁：精准修正详情页颜色、按钮及间距
========================================================= */

/* 1. 【修正不生效】：强力覆盖详情页单价框背景为浅红色 */
.detail-main-box .detail-price-panel,
.detail-main-box .price-bg-box,
.detail-main-box div[style*="background: #f8fafc"] {
    background-color: #fff1f0 !important;
    border: 1px solid #ffccc7 !important;
}

/* 2. 【修正不生效】：购买按钮颜色对齐“自动发货”的淡黄色 */
#buy.layui-btn,
.detail-main-box .btn-buy,
.detail-main-box .layui-btn-fluid {
    background-color: #fff1b8 !important;
    color: #855d00 !important;
    border: 1px solid #ffe58f !important;
    font-weight: bold !important;
    box-shadow: none !important;
}

/* 3. 【下移间距】：重要申明与购买须知往下面挪几行，并恢复浅红色底 */
.detail-main-box .duck-tip-box {
    margin-top: 80px !important; /* 大幅度增加顶部间距，向下移动 */
    background-color: #fff1f0 !important;
    border: 1px solid #ffccc7 !important;
    border-left: 5px solid #ff4d4f !important;
    padding: 25px !important;
}

/* 4. 申明框内部标题颜色加深为红褐色 */
.detail-main-box .duck-tip-box h3 {
    color: #cf1322 !important;
}

/* =========================================================
   全站公告栏样式统合 (强制对齐首页精密视觉)
========================================================= */

.notice-bar {
    background-color: #ffffff !important; /* 强制白底，确保在灰色容器里也能顶出来 */
    border: 1px solid #e5e7eb !important; /* 细灰边框 */
    border-left: 5px solid #009688 !important; /* 招牌湖绿色粗边条 */
    border-radius: 8px !important;
    padding: 12px 18px !important;
    margin-bottom: 20px !important;
    font-size: 14px !important; /* 维持您要求的14px大字体 */
    color: #374151 !important; /* 深石墨灰文字 */
    line-height: 1.6 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02) !important; /* 极淡投影增加立体感 */
}

/* 统一公告栏内小喇叭图标颜色 */
.notice-bar i, 
.notice-bar .layui-icon-speaker {
    color: #009688 !important;
    margin-right: 8px !important;
    font-weight: bold !important;
}

/* 统一公告栏内链接颜色：去色降噪，仅在悬停时变色 */
.notice-bar a {
    color: #64748b !important; 
    text-decoration: none !important;
    border-bottom: 1px dashed #d1d5db !important; /* 用淡淡的虚线代替实线 */
}

.notice-bar a:hover {
    color: #009688 !important;
    border-bottom-style: solid !important;
}

/* 消除公告栏内部段落产生的额外空白高度 */
.notice-bar p, 
.notice-bar div {
    margin: 0 !important;
    padding: 2px 0 !important;
}

/* =========================================================
   手机端细节加固：增加分隔线、优化卡片层次感
========================================================= */
@media screen and (max-width: 768px) {
    /* 1. 为每个商品项增加底部细分割线 */
    .product-item {
        border-bottom: 1px solid #e5e7eb !important; /* 极细浅灰线 */
        padding-bottom: 15px !important;
        margin-bottom: 5px !important;
        background-color: #ffffff !important; /* 保持纯白卡片感 */
    }

    /* 最后一个商品去掉底线，保持整洁 */
    .product-item:last-child {
        border-bottom: none !important;
        margin-bottom: 0 !important;
    }

    /* 2. 增强卡片与背景的对比，防止颜色糊在一起 */
    .category-box {
        background-color: #f4f6f8 !important; /* 容器保持浅灰 */
        border: 1px solid #d1d5db !important; /* 强化容器边框线条 */
        padding: 10px !important;
    }

    /* 3. 手机端商品名称颜色微调：确保清晰且不刺眼 */
    .name-text {
        color: #4b5563 !important; /* 统一为柔和的石墨灰 */
        line-height: 1.4 !important;
    }
}

/* =========================================================
   支付页 (pay.html) 交互与手机端对齐补丁
   特点：PC表头精密对齐、手机端纵向极简标签、强制点击手型
========================================================= */

/* 1. PC端表格微调 */
.pay-pc-table {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}
.pay-pc-table th { background: #f8fafc; font-size: 12px; color: #6b7280; padding: 12px 10px; font-weight: bold; }
.pay-pc-table td { background: #fff; padding: 15px 10px; border-top: 1px solid #f1f5f9; font-size: 13px; color: #374151; }

/* 2. 手机端极简标签流 (无框化) */
.pay-mobile-item {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9; /* 仅保留极淡底线 */
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}
.pay-mobile-item:last-child { border-bottom: none; }

.pay-mobile-label {
    width: 60px; /* 固定宽度，确保冒号对齐 */
    font-size: 13px;
    color: #94a3b8; /* 雅致灰标签 */
    flex-shrink: 0;
}
.pay-mobile-value {
    flex: 1;
    font-size: 14px;
    color: #374151;
    word-break: break-all; /* 防止长单号溢出 */
    line-height: 1.4;
    padding-left: 10px;
}

/* 3. 支付渠道图标交互 - 锁定手型 */
.pay-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}
.pay-card-item {
    width: 180px;
    height: 70px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer !important; /* 【核心修正】：强制手型 */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.pay-card-item:hover {
    transform: translateY(-3px); /* 向上跳动交互感 */
    border-color: #39c884; /* 悬停绿框 */
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.pay-card-item button {
    width: 100%; height: 100%; background: none; border: none; 
    cursor: pointer !important; display: block;
}
.pay-card-item img { max-width: 85%; max-height: 85%; object-fit: contain; pointer-events: none; }

/* 移动端支付图标缩放 */
@media screen and (max-width: 768px) {
    .pay-card-item { width: calc(50% - 8px); height: 60px; }
    .pay-pc-table { display: none; } /* 手机端隐藏PC表格 */
}