/* =========================================================
   六六顺发卡系统 - 移动端修复
   ========================================================= */

@media (max-width: 768px) {

/* ========== 顶部导航 - 文字logo完整显示 ========== */
.header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.header .header-box {
    padding: 12px 15px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: auto !important;
}

.header .header-box > a {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    text-decoration: none;
    min-width: 0;
}

.header .header-box img {
    width: 36px !important;
    height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    border-radius: 8px;
    flex-shrink: 0;
    object-fit: cover;
}

.header .header-box .info {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #333 !important;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
    white-space: normal;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 查询按钮 */
.header .header-box .query {
    display: flex !important;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 16px;
    font-size: 12px !important;
    color: #666;
    text-decoration: none;
    flex-shrink: 0;
    margin-left: 10px;
}

.header .header-box .query svg {
    width: 14px !important;
    height: 14px !important;
}

/* 公告栏隐藏（首页有专门的） */
.header .notice { display: none !important; }

/* 背景图隐藏 */
.background { display: none !important; }

body {
    background: #f5f5f5 !important;
}

/* ========== 主容器宽度适配 ========== */
.layui-row { margin: 0 !important; }

.layui-col-md8.layui-col-md-offset2,
.layui-col-md8 {
    margin-left: 0 !important;
    width: 100% !important;
    float: none !important;
}

.main .main-box {
    margin: 12px 12px !important;
    width: calc(100% - 24px) !important;
    box-sizing: border-box !important;
    background: #fff;
    border-radius: 10px;
    padding: 15px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* ========== 商品详情页 ========== */
.main-box .goods-img {
    margin: 0 0 12px !important;
    width: 100% !important;
    height: 0 !important;
    padding-bottom: 100% !important;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.main-box .goods-img img {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: cover;
    border-radius: 8px;
}

.main-box .goods-msg {
    margin: 0 !important;
    width: 100% !important;
}

.main-box .goods-msg .goods-name {
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    word-break: break-word !important;
    color: #333;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #f0f0f0;
}

/* 价格 */
.price {
    margin: 10px 0 !important;
}

.price .price-sign {
    font-size: 14px;
    color: #e4393c;
    font-weight: 700;
}

.price .price-num {
    font-size: 24px;
    color: #e4393c;
    font-weight: 700;
}

.price .price-c {
    font-size: 12px;
    color: #999;
    margin-left: 5px;
}

/* 小标签 */
.small-tips {
    font-size: 10px;
    padding: 2px 6px;
    margin-left: 3px;
    margin-bottom: 4px;
    border-radius: 3px;
    line-height: 1.5;
    display: inline-block;
}

/* 购买表单 */
.entry { margin-top: 12px; }

.layui-form-item { margin-bottom: 10px; }

.layui-form-label {
    width: auto !important;
    padding: 8px 10px 8px 0 !important;
    font-size: 13px !important;
}

.layui-input-block {
    margin-left: 0 !important;
}

.layui-input, .layui-select, .layui-textarea {
    height: 38px !important;
    font-size: 14px !important;
    border-radius: 6px;
}

.layui-btn {
    height: 42px !important;
    line-height: 42px !important;
    font-size: 15px !important;
    width: 100% !important;
    border-radius: 6px !important;
}

/* ========== 标题栏 ========== */
.main .title {
    margin: 0 !important;
    padding: 0 0 10px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #333 !important;
    border-bottom: 1px solid #f0f0f0;
    word-break: break-word;
}

.pay-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    padding: 0 0 10px !important;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 10px !important;
    word-break: break-word;
    color: #333 !important;
}

/* ========== 订单详情 ========== */
.layui-card-body.info-box {
    padding: 10px 0 0 !important;
}

.order-list .layui-col-md4 {
    width: 100% !important;
    margin-bottom: 0 !important;
    float: none !important;
}

.info-ui {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-ui li {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
    line-height: 1.6;
    word-break: break-all;
    color: #333;
}

.info-ui li:last-child { border-bottom: none; }

.info-ui li strong {
    color: #666;
    font-weight: 500;
    margin-right: 5px;
}

.layui-table {
    width: 100% !important;
    font-size: 12px !important;
}

.layui-table th,
.layui-table td {
    padding: 8px 6px !important;
    word-break: break-all;
}

/* ========== 支付页 ========== */
.product-info p {
    padding: 0 !important;
    font-size: 14px !important;
    color: #666 !important;
    margin: 10px 0 !important;
    word-break: break-word !important;
    line-height: 1.6 !important;
    text-align: center;
}

.layui-card-body > div[style*="text-align: center"] {
    width: 260px !important;
    max-width: 100% !important;
    margin: 0 auto !important;
}

.layui-card-body > div[style*="text-align: center"] img {
    width: 180px !important;
    height: 180px !important;
}

/* ========== 通用文字修复 ========== */
body { word-break: break-word; overflow-wrap: break-word; }

p, span, div, li, td, th, a, button, input, textarea {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ========== 底部 ========== */
.footer {
    padding: 20px 15px !important;
    text-align: center !important;
    font-size: 12px !important;
    color: #999 !important;
    background: transparent !important;
}

.footer img { max-width: 100px !important; }

/* ========== 弹窗（购买提示等） ========== */
.layui-layer {
    width: 92% !important;
    max-width: 360px !important;
    max-height: 85vh !important;
    border-radius: 10px !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    bottom: auto !important;
    right: auto !important;
    display: flex !important;
    flex-direction: column !important;
}

.layui-layer-title {
    flex-shrink: 0 !important;
    font-size: 15px !important;
    padding: 0 50px 0 16px !important;
    height: 44px !important;
    line-height: 44px !important;
    border-radius: 10px 10px 0 0 !important;
    word-break: break-word !important;
    white-space: normal !important;
    height: auto !important;
    min-height: 44px !important;
    line-height: 1.4 !important;
    padding: 12px 50px 12px 16px !important;
}

.layui-layer-content {
    flex: 1 !important;
    padding: 14px 16px !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    word-break: break-word !important;
    max-height: calc(85vh - 100px) !important;
}

.layui-layer-content img {
    max-width: 100% !important;
    height: auto !important;
}

.layui-layer-close {
    top: 8px !important;
    right: 8px !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 20px !important;
    line-height: 32px !important;
    z-index: 10 !important;
}

/* 弹窗按钮组 */
.layui-layer-btn {
    flex-shrink: 0 !important;
    padding: 10px 12px 14px !important;
    border-radius: 0 0 10px 10px !important;
}

.layui-layer-btn a {
    height: 38px !important;
    line-height: 38px !important;
    font-size: 14px !important;
    border-radius: 6px !important;
    padding: 0 20px !important;
}

} /* @media end */

/* ========== 小屏手机优化 ========== */
@media (max-width: 375px) {
    .header .header-box .info { font-size: 15px !important; }
    .price .price-num { font-size: 22px; }
    .main-box .goods-msg .goods-name { font-size: 16px !important; }
}
