/* =======================================================
   全站全局变量
   ======================================================= */
:root {
    --main-color: #187fc4;       
    --main-dark: #0f5a8f;        
    --footer-bg: #187fc4;        
    --header-height: 75px;       
    --text-color: #333;          
    --bg-color: #f9f9f9;         
}

/* ===== 基础重置 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    margin: 0 !important;
    padding: 0 !important;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif; 
    background-color: var(--bg-color); 
    color: var(--text-color); 
}
a { text-decoration: none; color: inherit; }
.container-1200 { width: 1200px; max-width: 100%; margin: 0 auto; }

/* 自定义弹性布局，专治旧浏览器对齐错乱 */
.flex-between {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100%;
}

/* ===== 顶部悬浮头部 ===== */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--main-color);
    width: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-top {
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 1px;
    white-space: nowrap; /* 强制Logo不换行 */
}

.main-nav {
    display: flex;
    gap: 25px;
    white-space: nowrap; /* 强制导航不换行 */
}

.main-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    padding: 10px 0;
    position: relative;
    transition: color 0.3s;
}

.main-nav .nav-link:hover, 
.main-nav .nav-link.active {
    color: #ffffff;
}

/* 底部下划线特效 */
.main-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #ffffff;
    transition: all 0.3s;
    transform: translateX(-50%);
}
.main-nav .nav-link:hover::after, 
.main-nav .nav-link.active::after {
    width: 100%;
}

/* ===== 搜索区域（半透明毛玻璃） ===== */
.header-bottom {
    background-color: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.search-container {
    width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.search-wrapper {
    display: flex;
    border: 1px solid var(--main-color);
    border-radius: 2px;
    overflow: hidden;
    height: 42px;
    background-color: #fff;
}

.search-tab {
    background-color: var(--main-color);
    color: white;
    padding: 0 20px;
    line-height: 40px;
    font-size: 14px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0 15px;
    font-size: 14px;
}

.search-btn {
    background-color: var(--main-color);
    color: white;
    border: none;
    padding: 0 30px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}
.search-btn:hover {
    background-color: var(--main-dark);
}

.search-tags {
    margin-top: 10px;
    font-size: 13px;
    color: #666;
    padding-left: 15px;
}

.search-tags a {
    color: #666;
    margin-right: 15px;
    transition: color 0.3s;
}
.search-tags a:hover {
    color: var(--main-color);
}

/* ===== 左侧悬浮菜单 ===== */
.left-float-menu {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.float-item {
    position: relative;
    width: 70px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}
.float-item:hover {
    background-color: var(--main-color);
}
.float-item:hover .float-link {
    color: white;
}
.float-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 5px;
    color: #555;
    font-size: 12px;
}
.float-link i {
    font-size: 22px;
    margin-bottom: 5px;
}

.popup-qr {
    position: absolute;
    left: 80px;
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    background-color: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    width: 150px;
    text-align: center;
}
.popup-qr img { width: 100%; border-radius: 4px; }
.popup-qr p { margin: 5px 0 0 0; font-size: 12px; color: #666; }
.float-item:hover .popup-qr {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

.popup-map {
    position: absolute;
    left: 80px;
    top: 50%;
    transform: translateY(-50%) scale(0.95);
    background-color: #fff;
    padding: 6px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.18);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    width: 600px;
    max-width: calc(100vw - 110px);
    z-index: 1200;
}
.popup-map iframe, .popup-map img {
    display: block;
    width: 100%;
    height: 420px;
    border: 0;
    border-radius: 4px;
}
.float-item:hover .popup-map {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

/* ===== 主体内容与 Banner ===== */
.main-content { padding-top: 20px; }
.banner-area {
    width: 1200px;
    height: 370px;
    background: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
    margin: 25px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    color: #5a7b9e;
    font-size: 22px;
}
.banner-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.banner-area:hover img {
    transform: scale(1.02);
}

.banner-slider {
    position: relative;
    width: 100%;
    height: 100%;
}
.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}
.banner-slide.active {
    opacity: 1;
    pointer-events: auto;
}
.banner-slide a {
    display: block;
    width: 100%;
    height: 100%;
}
.banner-dots {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}
.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: all 0.3s;
}
.banner-dot.active {
    background: #187fc4;
    transform: scale(1.2);
}

/* ===== 楼层标题 ===== */
.floor-title {
    text-align: center;
    margin: 60px 0 40px 0;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-color);
}
.floor-title span {
    color: var(--main-color);
    font-size: 18px;
    font-weight: normal;
    margin-left: 10px;
}
.floor-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--main-color);
    margin: 15px auto 0 auto;
    border-radius: 2px;
}

/* ===== 商品卡片 ===== */
.product-card { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.product-card:hover { transform: translateY(-6px); box-shadow: 0 8px 25px rgba(0,0,0,0.12) !important; }
.product-card:hover img { transform: scale(1.06); }
.product-card a[style*="e8ecf0"]:hover,
.card-btn:hover { background: #187fc4 !important; color: #fff !important; }

/* --- 卡片结构（class 驱动，便于响应式缩放） --- */
.product-card {
    position: relative;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 12px rgba(0, 102, 255, 0.15);
}
.pc-link { display: block; text-decoration: none; color: inherit; }
.pc-img-wrap { width: 100%; height: 280px; overflow: hidden; }
.pc-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.pc-body { padding: 10px 14px 14px; background: rgba(0, 102, 255, 0.06); }
.pc-title-link { text-decoration: none; color: #222; }
.pc-title {
    font-size: 13px; font-weight: 500; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; margin-bottom: 10px; text-align: center;
}
.pc-actions { display: block; }
.pc-actions > a {
    display: inline-block;
    width: calc(50% - 5px);
    box-sizing: border-box;
    vertical-align: top;
}
.pc-actions > a + a { margin-left: 10px; }
.pc-btn {
    display: inline-block; width: calc(50% - 5px); box-sizing: border-box;
    font-size: 13px; color: #444; background: #e8ecf0; text-align: center;
    padding: 7px 0; border-radius: 20px; text-decoration: none;
    transition: all 0.2s; white-space: nowrap;
}
.pc-btn i { font-size: 13px; }
.pc-btn:hover { background: #187fc4; color: #fff; }

/* --- 角标 --- */
.p-badge { position: absolute; z-index: 10; pointer-events: none; }
.p-badge-corner {
    top: 6px; left: -22px; padding: 1px 28px; font-size: 12px;
    font-weight: bold; line-height: 1.6; letter-spacing: 1px;
    color: #fff; transform: rotate(-45deg); background: #999;
}
.p-badge-corner::after { content: attr(data-badge); }
.product-card .p-badge-corner[data-badge="爆款"] { background: #e60012; }
.product-card .p-badge-corner[data-badge="新品"] { background: #ff4d4f; }
.product-card .p-badge-corner[data-badge="停产"] { background: #999; }

.p-badge-price {
    top: 0; left: 0; width: 290px; max-width: 100%; height: 45px;
    display: flex; border-radius: 0 6px 6px 0; overflow: hidden;
}
.p-badge-new {
    width: 65px; height: 45px; flex-shrink: 0;
    background: rgba(219,10,47,0.85);
    display: flex; align-items: center; justify-content: center;
}
.p-badge-new span { color: #fff; font-size: 18px; font-weight: bold; }
.p-badge-line { width: 1px; height: 45px; flex-shrink: 0; background: rgba(255,255,255,0.85); }
.p-badge-price-val {
    flex: 1; height: 45px; background: rgba(24,127,196,0.85);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.p-badge-price-val span { color: #fff; font-size: 18px; white-space: nowrap; }

/* ===== 底部区域 ===== */
.footer-area {
    background-color: var(--footer-bg);
    color: #ffffff;
    padding: 40px 0;
    margin-top: 60px;
    font-size: 13px;
}
.footer-qrcode {
    width: 110px;
    height: 110px;
    background-color: white;
    padding: 5px;
    border-radius: 6px;
}
.footer-info {
    text-align: right;
    line-height: 2.2;
}
.footer-info a {
    color: #ffffff;
    margin: 0 8px;
    transition: color 0.3s;
}
.footer-info a:hover {
    color: #ffd700;
}

/* 加载提示美化 */
.loading-box {
    text-align: center;
    padding: 30px 0;
    display: none;
}