/* ==================== 🗺️ 基础统一重置 ==================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: #f4f6f9; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: #333; line-height: 1.6; }
a { text-decoration: none; color: inherit; }

/* ==================== 📦 核心响应式安全容器 ==================== */
.container { 
    width: 100%; 
    max-width: 1200px; /* 电脑端标准宽度 */
    margin: 0 auto; 
    padding: 0 15px; 
}

/* ==================== 🎨 头部自适应重构 ==================== */
.site-header {
    background: linear-gradient(135deg, #15336c, #1f4994);
    color: #ffffff;
    padding: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.header-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px;
}
.header-center {
    text-align: center;
}
.header-center h1 a { color: #fff; font-size: 26px; font-weight: bold; }
.subtitle { color: #b0c8f2; font-size: 13px; margin-top: 4px; }

.header-right {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}
.admin-btn {
    background: #2e7d32;
    color: #fff;
    padding: 8px 16px;
    font-weight: bold;
    font-size: 14px;
    border-radius: 4px;
    white-space: nowrap;
    display: inline-block;
}
.admin-btn:hover { background: #1b5e20; }

/* 会员欢迎条 */
.user-welcome-bar {
    width: 100%;
    text-align: right;
    font-size: 13px;
    color: #666;
    margin: 15px 0 5px 0;
}

/* ==================== 🖼️ 广告位容器修复（防止排版崩塌） ==================== */
.ad-slot {
    width: 100%;
    min-height: 40px;
    background: #fffbe6; /* 未上传广告时，显示淡淡的底色占位 */
    border: 1px dashed #ffe58f; /* 优雅的占位虚线 */
    border-radius: 6px;
    padding: 10px;
    margin: 20px 0;
    text-align: center;
    color: #999;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ad-slot img {
    width: 100%;
    height: auto;
    max-height: 180px;
    border-radius: 4px;
    display: block;
    object-fit: cover; /* 确保图片缩放时不变形 */
}

/* ==================== 📊 栅格布局自适应 ==================== */
.section-title {
    font-size: 18px;
    font-weight: bold;
    color: #0f2042;
    margin: 25px 0 15px 0;
    border-left: 4px solid #1f4994;
    padding-left: 10px;
}
.grid-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 💻 电脑端：一行显示3个卡片 */
    gap: 20px;
    margin-bottom: 25px;
}
.shop-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #eef2f7;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.shop-card h3 {
    font-size: 18px;
    color: #0f2042;
    margin-bottom: 10px;
}
.tag {
    background: #e3f2fd;
    color: #0d47a1;
    padding: 3px 6px;
    margin-right: 5px;
    font-size: 12px;
    border-radius: 2px;
    display: inline-block;
    margin-top: 8px;
}
.card-footer-text {
    font-size: 12px; 
    color: #999; 
    margin-top: 15px;
    border-top: 1px solid #f5f5f5;
    padding-top: 8px;
}

/* ==================== 📱 核心媒体查询（手机和小程序端自适应转换） ==================== */
@media (max-width: 992px) {
    .grid-layout {
        grid-template-columns: repeat(2, 1fr); /* 平板显示2列 */
    }
}

@media (max-width: 576px) {
    .header-wrap {
        flex-direction: column;
        gap: 12px;
        padding-bottom: 5px;
    }
    .header-right {
        position: static;
        transform: none;
    }
    .grid-layout {
        grid-template-columns: 1fr; /* 📱 手机端/小程序：强制变为精美单列，绝不重叠 */
    }
    .header-center h1 a { font-size: 22px; }
    .user-welcome-bar { text-align: center; }
}

/* ==================== 🧱 底部优雅页脚样式 ==================== */
.site-footer {
    background: #22252a; /* 沉稳的深工业灰背景 */
    color: #9aa0ac;
    padding: 30px 0;
    margin-top: 50px;
    border-top: 4px solid #1f4994; /* 呼应顶部的科技蓝线条 */
    font-size: 14px;
    width: 100%;
}
.footer-wrap {
    display: flex;
    justify-content: space-between; /* 💻 电脑端：左边版权，右边管理员入口 */
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.footer-info p {
    margin: 4px 0;
}
.copyright {
    font-weight: 500;
    color: #ffffff; /* 亮白色突出版权声明 */
}
.notice {
    color: #8a92a2;
    font-size: 13px;
}
.admin-entry-btn {
    color: #bcc4d4;
    font-size: 13px;
    padding: 6px 12px;
    border: 1px solid #444952;
    border-radius: 4px;
    transition: all 0.2s;
    background: rgba(255,255,255,0.02);
}
.admin-entry-btn:hover {
    color: #ffffff;
    background: #1f4994;
    border-color: #1f4994;
}

/* 📱 手机和小程序端的底部自适应降级 */
@media (max-width: 576px) {
    .site-footer {
        text-align: center;
        padding: 25px 0;
    }
    .footer-wrap {
        flex-direction: column; /* 手机端自动变成居中上下排版 */
        justify-content: center;
        gap: 15px;
    }
}