/* ========== 全局重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f3f0; color: #1a1a1a; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* ========== 黑色金色主题 ========== */
:root {
    --primary: #0a0a0a;
    --gold: #d4a74a;
    --gold-light: #e8c96e;
    --gold-dark: #b8923a;
    --bg: #f8f6f3;
    --text: #1a1a1a;
    --text-light: #666;
}

/* ========== 头部导航 ========== */
.site-header {
    background: var(--primary);
    color: #fff;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ========== Logo 区域 ========== */
.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

/* ===== 方案C：摇摆 + 放大特效 ===== */
.logo-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: -8px;
}

.logo-emoji {
    font-size: 33px;
    line-height: 1;
    display: inline-block;
    animation: wobbleZoom 2.2s ease-in-out infinite;
    transform-origin: center center;
}

@keyframes wobbleZoom {
    0%, 100% {
        transform: rotate(-6deg) scale(1);
    }
    50% {
        transform: rotate(8deg) scale(1.2);
    }
}

/* ===== 文字区域（上下排列） ===== */
.logo-text-area {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    justify-content: center;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.logo-text .gold {
    color: #d4a74a;
}

.logo-domain {
    font-size: 13px;
    color: #888;
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .logo-icon {
        width: 38px;
        height: 38px;
    }
    .logo-emoji {
        font-size: 24px;
    }
    .logo-text {
        font-size: 16px;
    }
    .logo-domain {
        font-size: 11px;
    }
    .logo a {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .logo-icon {
        width: 32px;
        height: 32px;
    }
    .logo-emoji {
        font-size: 20px;
    }
    .logo-text {
        font-size: 14px;
    }
    .logo-domain {
        font-size: 10px;
    }
    .logo a {
        gap: 8px;
    }
}

.main-nav a {
    color: #ccc;
    margin: 0 12px;
    font-size: 14px;
    transition: color 0.3s;
}
.main-nav a:hover,
.main-nav a.active {
    color: var(--gold);
}
.user-area a {
    color: #ccc;
    margin-left: 12px;
    font-size: 14px;
}
.user-area a:hover {
    color: var(--gold);
}
.btn-register {
    background: var(--gold);
    color: #000 !important;
    padding: 6px 16px;
    border-radius: 4px;
}
.btn-register:hover {
    background: var(--gold-light);
}

/* ========== 通用按钮 ========== */
.btn {
    display: inline-block;
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: #222;
}
.btn-gold {
    background: var(--gold);
    color: #000;
}
.btn-gold:hover {
    background: var(--gold-light);
}
.btn-success {
    background: #28a745;
    color: #fff;
}
.btn-danger {
    background: #dc3545;
    color: #fff;
}
.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-block { display: block; width: 100%; }
.btn-disabled { background: #ccc; color: #999; cursor: not-allowed; }

/* ========== 认证页面（登录/注册） ========== */
.auth-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: calc(100vh - 200px);
}

.auth-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 48px 44px 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s;
}
.auth-card:hover {
    box-shadow: 0 24px 72px rgba(0,0,0,0.09);
}

/* 认证卡片头部 */
.auth-card .card-header {
    text-align: center;
    margin-bottom: 32px;
}
.auth-card .card-header .brand {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #1a1a1a;
}
.auth-card .card-header .brand .gold {
    color: #d4a74a;
}
.auth-card .card-header .brand .dot {
    color: #d4a74a;
    font-weight: 300;
}
.auth-card .card-header .slogan {
    font-size: 13px;
    color: #aaa;
    margin-top: 4px;
    letter-spacing: 0.5px;
}
.auth-card .card-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-top: 20px;
    margin-bottom: 2px;
}
.auth-card .card-header .sub {
    font-size: 14px;
    color: #999;
}

/* 认证表单 */
.auth-card .form-group {
    margin-bottom: 16px;
}
.auth-card .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}
.auth-card .form-group label .required {
    color: #e74c3c;
}
.auth-card .form-group input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e8e5e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.25s;
    background: #faf9f7;
    color: #1a1a1a;
}
.auth-card .form-group input:focus {
    border-color: #d4a74a;
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(212, 167, 74, 0.1);
}
.auth-card .form-group input::placeholder {
    color: #c5c2bd;
}
.auth-card .form-group .hint {
    font-size: 12px;
    color: #bbb;
    margin-top: 4px;
}

/* 认证按钮 */
.btn-auth {
    width: 100%;
    padding: 12px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    margin-top: 4px;
}
.btn-auth:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.btn-auth:active {
    transform: translateY(0);
}

/* 认证底部链接 */
.auth-card .card-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #999;
}
.auth-card .card-footer a {
    color: #d4a74a;
    text-decoration: none;
    font-weight: 600;
}
.auth-card .card-footer a:hover {
    text-decoration: underline;
}

/* 认证分割线 */
.auth-card .divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0 16px;
}
.auth-card .divider::before,
.auth-card .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #eee;
}
.auth-card .divider span {
    font-size: 12px;
    color: #ccc;
}

/* 认证成功状态 */
.auth-card .success-state {
    text-align: center;
    padding: 20px 0 8px;
}
.auth-card .success-state .big-icon {
    font-size: 56px;
    display: block;
    margin-bottom: 12px;
}
.auth-card .success-state h3 {
    font-size: 20px;
    color: #1e7e44;
    font-weight: 600;
}
.auth-card .success-state p {
    color: #888;
    font-size: 14px;
    margin: 6px 0 20px;
}
.btn-success-state {
    display: inline-block;
    padding: 10px 36px;
    background: #d4a74a;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s;
}
.btn-success-state:hover {
    background: #c49a3a;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(212, 167, 74, 0.25);
}

/* ========== 通用表单 ========== */
.auth-box,
.form-box {
    max-width: 400px;
    margin: 30px auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}
.form-group textarea { resize: vertical; }
.required { color: #dc3545; }
.form-hint { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.auth-link { text-align: center; margin-top: 15px; font-size: 14px; }

/* ========== 提示框 ========== */
.alert {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.alert-error {
    background: #fdf0ee;
    color: #b34033;
    border: 1px solid #f5dbd6;
}
.alert-success {
    background: #edf7f0;
    color: #1e7e44;
    border: 1px solid #d0e8d9;
}

/* ========== 搜索栏 ========== */
.search-section {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}
.search-section form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.search-section input,
.search-section select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    flex: 1;
    min-width: 120px;
}
.search-section input { flex: 2; }
.search-section button {
    padding: 8px 30px;
    background: var(--gold);
    color: #000;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

/* ========== 设备列表 ========== */
.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    padding: 20px 0;
}
.device-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}
.device-card:hover {
    transform: translateY(-4px);
}
.device-image {
    position: relative;
    height: 160px;
    background: #f0f0f0;
}
.device-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.device-level {
    position: absolute;
    top: 8px;
    right: 8px;
    left: auto;
    padding: 3px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    z-index: 2;
}
.level-1 { background: #28a745; color: #fff; }
.level-2 { background: var(--gold); color: #000; }
.level-3 { background: #dc3545; color: #fff; }

.device-info {
    padding: 12px 14px 14px;
}
.device-address {
    font-size: 12px;
    color: #999;
    margin: 2px 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.device-info h3 {
    font-size: 15px;
    margin-bottom: 4px;
}
.device-info h3 a {
    color: #1a1a1a;
    text-decoration: none;
}
.device-info h3 a:hover {
    color: var(--gold);
}
.device-config {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}
.device-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 4px;
}
.rent-price {
    color: var(--gold-dark);
    font-weight: 700;
    font-size: 16px;
}
.sell-price {
    color: #28a745;
    font-weight: 600;
    font-size: 14px;
}
.device-actions {
    display: flex;
    justify-content: center;
    margin-top: 6px;
}
.device-actions .btn {
    display: inline-block;
    padding: 6px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
}
.device-actions .btn-primary {
    background: var(--primary);
    color: #fff;
}
.device-actions .btn-primary:hover {
    background: #333;
}

/* ========== 手机端：等级标签只显示色块 ========== */
@media (max-width: 480px) {
    .device-level {
        width: 12px;
        height: 12px;
        padding: 0;
        border-radius: 50%;
        top: 8px;
        right: 8px;
        font-size: 0;
        text-indent: -9999px;
        overflow: hidden;
        min-width: 12px;
    }
    .level-1 { background: #28a745; }
    .level-2 { background: #d4a74a; }
    .level-3 { background: #dc3545; }
    
    .device-image {
        height: 120px;
    }
    .device-info h3 {
        font-size: 14px;
    }
    .device-config {
        font-size: 12px;
        min-height: 30px;
        -webkit-line-clamp: 1;
    }
    .device-address {
        font-size: 11px;
    }
    .rent-price {
        font-size: 14px;
    }
    .sell-price {
        font-size: 13px;
    }
    .device-actions .btn {
        font-size: 13px;
        padding: 4px 16px;
    }
}

/* ============================================================
   详情页（detail.php）
   ============================================================ */

/* ===== 详情页容器 ===== */
.detail-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px; 
}

/* ===== 图片区 ===== */
.detail-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.detail-images img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: transform 0.3s;
    cursor: pointer;
}
.detail-images img:hover {
    transform: scale(1.03);
}
.detail-images .no-image {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    padding: 40px 0;
    background: #f8f9fa;
    border-radius: 8px;
}

/* ===== 主信息区 ===== */
.detail-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 25px;
}

.detail-left h1 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.detail-left .config-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.8;
    color: #333;
}
.detail-left .config-box strong {
    color: #0a0a0a;
}

.detail-left .meta-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
    color: #666;
    margin: 10px 0;
}
.detail-left .meta-grid span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== 价格操作区 ===== */
.detail-right {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.price-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s;
}
.price-card.rent-card {
    border-color: #d4a74a;
}
.price-card.sell-card {
    border-color: #28a745;
}
.price-card .label {
    font-size: 13px;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.price-card .price {
    font-size: 32px;
    font-weight: 700;
    margin: 6px 0;
}
.price-card .price small {
    font-size: 16px;
    font-weight: 400;
    color: #999;
}
.price-card .price .original-price {
    font-size: 18px;
    font-weight: 400;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}
.price-card .saved-tip {
    font-size: 13px;
    color: #28a745;
    font-weight: 600;
    margin-bottom: 4px;
}
.price-card .sub {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}
.price-card .btn {
    display: inline-block;
    padding: 10px 40px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}
.price-card .btn-rent {
    background: #d4a74a;
    color: #000;
}
.price-card .btn-rent:hover {
    background: #c49a3a;
    transform: translateY(-2px);
}
.price-card .btn-buy {
    background: #28a745;
    color: #fff;
}
.price-card .btn-buy:hover {
    background: #218838;
    transform: translateY(-2px);
}
.price-card .btn-disabled {
    background: #e9ecef;
    color: #999;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== 会员折扣提示 ===== */
.discount-tip {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    color: #155724;
    text-align: center;
    margin-bottom: 12px;
}
.discount-tip .badge {
    display: inline-block;
    background: #28a745;
    color: #fff;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;

}

/* ===== 服务标签 ===== */
.service-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    margin: 2px 3px;
}
.service-tag.software {
    background: #e3f2fd;
    color: #0d47a1;
}
.service-tag.hardware {
    background: #fff3e0;
    color: #e65100;
}
.service-tag.badge-gold {
    background: #d4a74a;
    color: #fff;
}
.service-promo {
    font-size: 12px;
    color: #e65100;
    font-weight: 600;
    background: #fff3e0;
    padding: 6px 12px;
    border-radius: 6px;
    margin-top: 6px;
}

/* ===== 适合环境 - 独立框（金色边框） ===== */
.scene-wrapper {
    margin-bottom: 25px;
}
.scene-box {
    background: linear-gradient(135deg, #f8f6f3 0%, #f0ede8 100%);
    border-radius: 12px;
    padding: 18px 24px;
    border-left: 4px solid #d4a74a;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.scene-box .scene-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #0a0a0a;
    margin-bottom: 4px;
}
.scene-box .scene-header .icon {
    font-size: 22px;
}
.scene-box .scene-desc {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}
.scene-box .scene-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.scene-box .scene-tags .tag {
    font-size: 12px;
    color: #333;
    background: #fff;
    padding: 3px 12px;
    border-radius: 14px;
    border: 1px solid #e0e0e0;
}
.scene-box .scene-full-desc {
    font-size: 13px;
    color: #666;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
    line-height: 1.7;
}
.scene-box .scene-full-desc br {
    display: block;
    content: "";
    margin-top: 4px;
}

/* ===== 底部区域 - 独立外框（绿色边框） ===== */
.detail-bottom-wrapper {
    margin-bottom: 0;
}
.detail-bottom-box {
    background: linear-gradient(135deg, #faf8f5 0%, #f5f2ed 100%);
    border-radius: 12px;
    padding: 20px 24px;
    border-left: 4px solid #28a745;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.detail-bottom-box .bottom-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}
.detail-bottom-box h3 {
    font-size: 15px;
    margin-bottom: 10px;
    color: #0a0a0a;
}
.detail-bottom-box .owner-info {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
}
.detail-bottom-box .notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    color: #555;
    line-height: 2;
}
.detail-bottom-box .notice-list li::before {
    content: "• ";
    color: #28a745;
    font-weight: 700;
}
.detail-bottom-box .notice-list a {
    color: #d4a74a;
    text-decoration: none;
}
.detail-bottom-box .notice-list a:hover {
    text-decoration: underline;
}

/* ===== Lightbox 弹窗 ===== */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 40px;
    cursor: pointer;
}
.lightbox-overlay.active {
    display: flex;
}
.lightbox-overlay .lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    cursor: default;
}
.lightbox-overlay .lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.lightbox-overlay .close-btn {
    position: absolute;
    top: -50px;
    right: 0;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    font-weight: 300;
    transition: transform 0.3s;
    line-height: 1;
}
.lightbox-overlay .close-btn:hover {
    transform: rotate(90deg);
}
.lightbox-overlay .counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}
.lightbox-overlay .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 20px;
    user-select: none;
    transition: color 0.3s;
    font-weight: 300;
}
.lightbox-overlay .nav-btn:hover {
    color: #fff;
}
.lightbox-overlay .nav-btn.prev {
    left: -60px;
}
.lightbox-overlay .nav-btn.next {
    right: -60px;
}

/* ========== 支付页面 ========== */
.payment-method {
    background: #f9f9f9;
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}
.payment-method .qr-code {
    max-width: 150px;
    margin-top: 10px;
}
.payment-order-info {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.checkout-summary {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

/* ========== 特色展示 ========== */
.features {
    background: #fff;
    padding: 40px 0;
}
.features .container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}
.feature-item .icon { font-size: 36px; display: block; }
.feature-item h3 { font-size: 16px; margin: 8px 0; }
.feature-item p { font-size: 13px; color: var(--text-light); }

/* ========== 页脚 ========== */
.site-footer {
    background: var(--primary);
    color: #ccc;
    padding: 40px 0 20px;
    margin-top: 30px;
    flex-shrink: 0;
}
.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2.5fr;
    gap: 20px;
}
.footer-brand h3 {
    color: var(--gold);
    font-size: 20px;
    margin-bottom: 6px;
}
.footer-brand p {
    font-size: 14px;
    color: #999;
    margin: 2px 0;
}
.footer-brand .slogan {
    color: var(--gold-light);
    font-size: 14px;
}
.footer-links h4 {
    color: #fff;
    font-size: 15px;
    margin-bottom: 10px;
}
.footer-links a {
    display: block;
    color: #999;
    font-size: 14px;
    margin: 4px 0;
    transition: color 0.3s;
}
.footer-links a:hover {
    color: var(--gold);
}
.footer-contact h4 {
    color: #fff;
    font-size: 15px;
    margin-bottom: 10px;
}
.footer-contact p {
    font-size: 14px;
    color: #999;
    margin: 4px 0;
    line-height: 1.6;
    word-break: break-word;
}
.footer-contact p .icon {
    margin-right: 4px;
}
.footer-bottom {
    border-top: 1px solid #222;
    padding-top: 15px;
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #666;
}

/* ========== 页脚响应式 ========== */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 20px 30px;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
    .footer-contact {
        grid-column: 1 / -1;
    }
}
@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .footer-brand {
        grid-column: 1;
    }
    .footer-contact {
        grid-column: 1;
    }
}

/* ========== 粘性页脚布局 ========== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main {
    flex: 1 0 auto;
}
.site-footer {
    flex-shrink: 0;
}

/* ========== 全局响应式 ========== */
@media (max-width: 768px) {
    .detail-page {
        grid-template-columns: 1fr;
    }
    .site-header .container {
        flex-wrap: wrap;
        gap: 10px;
    }
    .main-nav {
        order: 3;
        width: 100%;
        text-align: center;
    }
    .search-section form {
        flex-direction: column;
    }
    .device-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .auth-card {
        padding: 32px 24px 28px;
    }
    .detail-main {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    .detail-bottom-box .bottom-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* ===== 移动端图片：主图+附图 ===== */
    .detail-images {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 10px;
    }
    .detail-images .main-image {
        grid-column: 1 / -1;
        height: 280px;
        border-radius: 8px;
    }
    .detail-images .sub-image {
        height: 120px;
        border-radius: 6px;
    }
    .detail-images img:not(.main-image):not(.sub-image) {
        height: 120px;
    }
    
    .price-card .price {
        font-size: 26px;
    }
    .lightbox-overlay .nav-btn {
        font-size: 30px;
        padding: 10px;
    }
    .lightbox-overlay .nav-btn.prev {
        left: -40px;
    }
    .lightbox-overlay .nav-btn.next {
        right: -40px;
    }
    .lightbox-overlay .close-btn {
        top: -45px;
        font-size: 32px;
    }
    .scene-box {
        padding: 14px 18px;
    }
    .detail-bottom-box {
        padding: 16px 18px;
    }
    .scene-box .scene-tags .tag {
        font-size: 11px;
        padding: 2px 10px;
    }
}

@media (max-width: 480px) {
    .device-grid {
        grid-template-columns: 1fr;
    }
    .detail-prices {
        grid-template-columns: 1fr;
    }
    .auth-card {
        padding: 28px 20px 24px;
        border-radius: 16px;
    }
    .auth-card .card-header .brand {
        font-size: 26px;
    }
    .auth-card .card-header h2 {
        font-size: 18px;
    }
    .auth-card .form-group input {
        font-size: 14px;
        padding: 10px 12px;
    }
    .btn-auth {
        font-size: 15px;
        padding: 11px;
    }
    
    /* ===== 手机端图片：主图+附图（更小尺寸） ===== */
    .detail-images {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 8px;
    }
    .detail-images .main-image {
        height: 200px;
        border-radius: 6px;
    }
    .detail-images .sub-image {
        height: 90px;
        border-radius: 4px;
    }
    .detail-images img:not(.main-image):not(.sub-image) {
        height: 90px;
    }
    
    .detail-main {
        padding: 15px;
    }
    .price-card .btn {
        padding: 8px 24px;
        font-size: 14px;
    }
    .lightbox-overlay {
        padding: 15px;
    }
    .lightbox-overlay .nav-btn {
        font-size: 24px;
        padding: 5px;
    }
    .lightbox-overlay .nav-btn.prev {
        left: -20px;
    }
    .lightbox-overlay .nav-btn.next {
        right: -20px;
    }
    .lightbox-overlay .close-btn {
        top: -35px;
        font-size: 28px;
        right: -5px;
    }
    .scene-box {
        padding: 12px 14px;
    }
    .detail-bottom-box {
        padding: 12px 14px;
    }
    .scene-box .scene-header {
        font-size: 14px;
    }
    .scene-box .scene-desc {
        font-size: 12px;
    }
    .scene-box .scene-tags .tag {
        font-size: 10px;
        padding: 2px 8px;
    }
    .scene-box .scene-full-desc {
        font-size: 12px;
    }
    .detail-bottom-box h3 {
        font-size: 14px;
    }
    .detail-bottom-box .owner-info {
        font-size: 13px;
    }
    .detail-bottom-box .notice-list {
        font-size: 13px;
    }
}

/* ============================================================
   分页导航（detail.php）- 修复版
   ============================================================ */

.detail-container .detail-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 18px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
}
.detail-container .detail-pagination .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #555;
    text-decoration: none;
    font-size: 13px;
    padding: 10px 28px;
    border-radius: 8px;
    transition: all 0.3s;
    background: #f8f9fa;
    min-width: 140px;
    text-align: center;
    line-height: 1.5;
    border: 1px solid #eee;
}
.detail-container .detail-pagination .nav-link:hover {
    background: #d4a74a;
    color: #fff;
    border-color: #d4a74a;
}
.detail-container .detail-pagination .nav-link.disabled {
    color: #ccc;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: #f0f0f0;
}
.detail-container .detail-pagination .nav-link.disabled:hover {
    background: #f5f5f5;
    color: #ccc;
    border-color: #f0f0f0;
}
.detail-container .detail-pagination .nav-link .title {
    font-weight: 600;
    font-size: 14px;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.detail-container .detail-pagination .nav-link .direction {
    font-size: 11px;
    color: #999;
}
.detail-container .detail-pagination .nav-link:hover .direction {
    color: rgba(255,255,255,0.8);
}
.detail-container .detail-pagination .nav-link.disabled .direction {
    color: #ddd;
}
.detail-container .detail-pagination .back-link {
    color: #d4a74a;
    text-decoration: none;
    font-size: 14px;
    padding: 10px 28px;
    border-radius: 8px;
    transition: all 0.3s;
    background: #f8f9fa;
    font-weight: 500;
    border: 1px solid #eee;
}
.detail-container .detail-pagination .back-link:hover {
    background: #d4a74a;
    color: #fff;
    border-color: #d4a74a;
}
.detail-container .detail-pagination .center-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ===== 分页导航响应式 ===== */
@media (max-width: 768px) {
    .detail-container .detail-pagination {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 16px;
        gap: 8px;
    }
    .detail-container .detail-pagination .nav-link {
        flex-direction: row;
        justify-content: center;
        min-width: unset;
        padding: 10px 16px;
        gap: 8px;
    }
    .detail-container .detail-pagination .nav-link .title {
        max-width: 150px;
    }
    .detail-container .detail-pagination .center-group {
        order: -1;
        justify-content: center;
    }
    .detail-container .detail-pagination .back-link {
        text-align: center;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .detail-container .detail-pagination {
        padding: 10px 12px;
        gap: 6px;
    }
    .detail-container .detail-pagination .nav-link {
        font-size: 12px;
        padding: 8px 12px;
    }
    .detail-container .detail-pagination .nav-link .title {
        max-width: 100px;
        font-size: 12px;
    }
    .detail-container .detail-pagination .back-link {
        font-size: 13px;
        padding: 8px 12px;
    }
}