/* 🎨 终极进化：高端商务黑灰系调色盘 */
:root {
    --primary-color: #242526;    /* 高端曜石黑 */
    --accent-color: #5c5c5e;     /* 商务冷灰 */
    --dark-color: #1a1a1a;       
    --bg-light: #f5f5f7;         
    --gray-muted: #8e8e93;       
}

body {
    background-color: var(--bg-light);
    color: var(--dark-color);
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    margin: 0; padding: 0;
    -webkit-tap-highlight-color: transparent;
}

/* 彻底清除链接、按钮点击时的外侧黑框、虚线或阴影 */
a, a:hover, a:active, a:focus,
button, button:hover, button:active, button:focus,
.pattern-link, .pattern-link:hover, .pattern-link:active, .pattern-link:focus {
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important; /* 顺手去掉下划线 */
}

/* 移动端高亮阻断（防止部分手机浏览器点击时出现闪烁的大底色块） */
* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
}

.header-bar {
    background-color: #1a1a1a; padding: 12px 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 100;
}
.header-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; }
.brand-logo { font-size: 20px; font-weight: 700; color: #ffffff; text-decoration: none; letter-spacing: 1px; }
.brand-logo:hover { text-decoration: none; color: #ffffff; }
.user-center-btn { background-color: #ffffff; color: #1a1a1a; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; text-decoration: none; }
.user-center-btn:hover, .user-center-btn:focus { color: #ffffff; background-color: var(--accent-color); text-decoration: none; }

.hero-banner { background: linear-gradient(135deg, #2c2c2e 0%, #111111 100%); color: #ffffff; padding: 45px 20px; text-align: center; }
.hero-banner h1 { font-size: 26px; font-weight: 600; margin-bottom: 8px; letter-spacing: 2px; }
.hero-banner p { color: rgba(255,255,255,0.65); font-size: 13px; margin-bottom: 20px; }

.search-wrapper { max-width: 550px; margin: 0 auto; position: relative; }
.search-wrapper .form-control { height: 44px; border-radius: 22px; border: 1px solid #3a3a3c; padding-left: 20px; padding-right: 50px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); background-color: #ffffff; color: #000; }
.search-wrapper .search-btn { position: absolute; right: 5px; top: 4px; background-color: var(--accent-color); border: none; width: 36px; height: 36px; border-radius: 18px; color: #ffffff; transition: background 0.2s; }
.search-wrapper .search-btn:hover { background-color: #000000; }

.cate-section { max-width: 1200px; margin: 20px auto; padding: 0 10px; }
.cate-grid { display: flex; overflow-x: auto; white-space: nowrap; padding: 10px 0; }
.cate-grid::-webkit-scrollbar { display: none; }
.cate-item { display: inline-block; text-align: center; margin-right: 25px; text-decoration: none; color: var(--dark-color); }
.cate-item:hover { text-decoration: none; color: var(--dark-color); }
.cate-icon { width: 55px; height: 55px; background-color: #ffffff; border-radius: 18px; display: flex; align-items: center; justify-content: center; margin: 0 auto 8px auto; font-size: 22px; color: var(--primary-color); box-shadow: 0 4px 12px rgba(0,0,0,0.03); border: 1px solid #e5e5ea; }
.cate-item span { font-size: 13px; font-weight: 600; color: #48484a; }

.main-container { max-width: 1200px; margin: 0 auto; padding: 0 15px 60px 15px; }
.section-title { font-size: 18px; font-weight: 700; margin: 25px 0 15px 0; display: flex; align-items: center; letter-spacing: 0.5px; }
.section-title::before { content: ''; display: inline-block; width: 4px; height: 18px; background-color: var(--primary-color); margin-right: 8px; border-radius: 2px; }

.pattern-grid { margin-right: -8px; margin-left: -8px; }
.pattern-card-col { padding-right: 8px; padding-left: 8px; margin-bottom: 16px; }
.pattern-link { text-decoration: none !important; display: block; color: inherit; }
.pattern-card { background-color: #ffffff; border-radius: 12px; overflow: hidden; box-shadow: 0 3px 12px rgba(0,0,0,0.02); border: 1px solid #e5e5ea; transition: all 0.3s; }
.pattern-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); border-color: #d1d1d6; }
.image-wrapper { width: 100%; padding-top: 100%; position: relative; background-color: #f2f2f7; }
.image-wrapper img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.card-info { padding: 12px; }
.card-title { font-size: 13px; font-weight: 600; line-height: 1.4; height: 36px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 10px; color: var(--dark-color); }

/* 搜索高亮专用的硬核黄色霓虹底色 */
.search-highlight { background-color: #ffeb3b; color: #000000; padding: 0 2px; border-radius: 2px; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }

.card-meta { display: flex; justify-content: space-between; align-items: center; }
.level-badge { font-size: 11px; padding: 2px 8px; border-radius: 4px; font-weight: 600; }
.level-1 { background-color: #f2f2f7; color: #5c5c5e; border: 1px solid #e5e5ea; }
.level-2 { background-color: #e5e5ea; color: #2c2c2e; }
.level-3 { background-color: #1a1a1a; color: #ffffff; }
.view-btn { font-size: 12px; color: var(--accent-color); font-weight: 700; }

.custom-footer { background-color: #ffffff; border-top: 1px solid #e5e5ea; padding: 25px 15px; text-align: center; color: var(--gray-muted); font-size: 12px; }

/* 详情页专属样式区域 */
.detail-nav { background-color: #1a1a1a; padding: 12px 15px; border-bottom: 1px solid #2c2c2e; display: flex; align-items: center; position: sticky; top:0; z-index:90; }
.detail-nav .back-link { font-size: 16px; color: #ffffff; width: 40px; }
.detail-nav .nav-title { flex: 1; text-align: center; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 10px; color: #ffffff; }
.detail-nav .home-link { font-size: 16px; color: #ffffff; width: 40px; text-align: right; }

/* 🌟 核心优化点：让主图无缝100%延展，高度自由随比例计算 🌟 */
.detail-main-img { width: 100%; background-color: #ffffff; text-align: center; border-bottom: 1px solid #e5e5ea; }
.detail-main-img img { width: 100%; height: auto; display: block; }

.detail-meta-box { background-color: #ffffff; padding: 18px 15px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.01); }
.price-row { margin-bottom: 10px; display: flex; align-items: baseline; }
.price-symbol { color: #e74c3c; font-size: 16px; font-weight: 700; }
.price-text { color: #e74c3c; font-size: 26px; font-weight: 700; margin-right: 10px; }
.level-tag { font-size: 11px; padding: 2px 8px; border-radius: 4px; font-weight: 600; background-color: #e5e5ea; color: #1a1a1a; position: relative; top: -3px; }
.detail-title { font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--dark-color); margin-top: 5px; }

.detail-spec-box { background-color: #ffffff; padding: 15px; margin-bottom: 12px; }
.spec-label { font-size: 13px; font-weight: 700; margin-bottom: 12px; color: #555; }
.size-tags-container { display: flex; flex-wrap: wrap; gap: 10px; }
.size-tag { background-color: #f2f2f7; color: #444; padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: all 0.2s; text-align: center; min-width: 70px; }
.size-tag.active { background-color: #1a1a1a; color: #ffffff; border-color: #1a1a1a; font-weight: 600; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

.detail-content-box { background-color: #ffffff; padding: 15px; }
.content-title { font-size: 14px; font-weight: 700; padding-bottom: 10px; margin-bottom: 15px; border-bottom: 2px solid var(--primary-color); display: inline-block; }
.rich-text-area img { max-width: 100% !important; height: auto !important; display: block; margin: 8px auto; }

.bottom-action-bar { position: fixed; bottom: 0; left: 0; right: 0; height: 60px; background-color: #ffffff; border-top: 1px solid #e5e5ea; display: flex; align-items: center; padding: 0 10px 0 15px; z-index: 80; }
.bar-icon-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; color: #666; font-size: 12px; text-decoration: none; width: 45px; margin-right: 12px; cursor: pointer; }
.bar-icon-btn i { font-size: 18px; margin-bottom: 2px; }
.bar-icon-btn:hover { text-decoration: none; color: var(--primary-color); }
.action-btn-service { flex: 1; background-color: #1a1a1a; color: #ffffff; border: none; height: 44px; border-radius: 22px; font-size: 15px; font-weight: 600; letter-spacing: 1px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

.custom-popup-mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0,0,0,0.6); z-index: 998; display: none; opacity: 0; transition: opacity 0.3s ease; }

.custom-popup-window { position: fixed; bottom: -100%; left: 0; right: 0; background-color: #ffffff; border-top-left-radius: 16px; border-top-right-radius: 16px; padding: 20px 15px; z-index: 999; transition: bottom 0.3s ease; box-shadow: 0 -5px 25px rgba(0,0,0,0.15); }
.popup-header { display: flex; margin-bottom: 20px; position: relative; padding-bottom: 15px; border-bottom: 1px solid #f2f2f7; }
.popup-avatar { width: 90px; height: 90px; border-radius: 8px; border: 1px solid #e5e5ea; overflow: hidden; background-color: #f5f5f7; margin-top: -35px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.popup-avatar img { width: 100%; height: 100%; object-fit: cover; }
.popup-goods-info { flex: 1; padding-left: 15px; }
.popup-price-row { color: #e74c3c; font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.popup-selected-spec { color: #888; font-size: 12px; }
.popup-close-icon { position: absolute; right: 0; top: -5px; font-size: 20px; color: #aaa; cursor: pointer; padding: 5px; }
.popup-body { max-height: 200px; overflow-y: auto; margin-bottom: 20px; }
.popup-footer-btn { background-color: #1a1a1a; color: #ffffff; border: none; width: 100%; height: 46px; border-radius: 23px; font-size: 15px; font-weight: 600; text-align: center; line-height: 46px; cursor: pointer; letter-spacing: 1px; }

.qrcode-popup-window {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9);
    background-color: #ffffff; border-radius: 16px; padding: 25px 20px;
    z-index: 1000; display: none; opacity: 0; transition: all 0.3s ease;
    width: 290px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.qrcode-popup-window.show { display: block; opacity: 1; transform: translate(-50%, -50%) scale(1); }
.qrcode-img-box { width: 180px; height: 180px; margin: 0 auto 15px; border: 1px solid #e5e5ea; padding: 8px; border-radius: 8px; background: #fff; }
.qrcode-img-box img { width: 100%; height: 100%; object-fit: contain; }
.qrcode-title { font-size: 18px; font-weight: 700; color: var(--dark-color); margin-bottom: 5px; letter-spacing: 1px; }
.qrcode-desc { font-size: 13px; color: var(--gray-muted); margin-bottom: 22px; }
.qrcode-close-btn { background-color: #1a1a1a; color: #ffffff; border: none; padding: 10px 0; border-radius: 25px; font-size: 15px; font-weight: 600; cursor: pointer; width: 100%; transition: background 0.2s; }
.qrcode-close-btn:hover { background-color: #3a3a3c; }