/* ==========================================================================
   TrendHaus 前台样式
   主题色由 index.php 通过 :root CSS 变量注入（后台「站点设置」可改）
   ========================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }
img { max-width: 100%; height: auto; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Open Sans", sans-serif;
    background-color: var(--bg);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px 15px;
    color: var(--text);
}

.page-container { max-width: 480px; width: 100%; background-color: transparent; padding: 10px 0 30px; }

/* ===== 模块：品牌头像区 ===== */
.avatar-section { text-align: center; margin-bottom: 6px; }
.avatar-image {
    width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}
.avatar-image:hover { transform: scale(1.05); }
.brand-name { font-family: 'Lobster', cursive; font-size: 30px; color: var(--primary); margin-top: 8px; letter-spacing: 1px; }
.brand-tagline { font-size: 14px; color: #5d755d; font-weight: 400; margin-top: 2px; opacity: 0.85; letter-spacing: 0.3px; }

/* ===== 模块：信任评分条 ===== */
.trust-bar {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin: 12px 0 0; font-size: 14px; color: var(--sub); background: var(--card);
    padding: 10px 16px; border-radius: 30px; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    cursor: pointer; transition: background 0.2s, box-shadow 0.2s; user-select: none; position: relative;
}
.trust-bar:hover { background: #f8f6f2; box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.trust-bar .stars { color: #f5b342; font-size: 18px; letter-spacing: 2px; }
.trust-bar .rating { font-weight: 700; margin-right: 2px; }
.trust-bar .count { color: #7a8a78; }
.trust-bar .arrow-indicator { font-size: 14px; color: #a0a0a0; margin-left: 4px; transition: transform 0.3s ease; }
.trust-bar .arrow-indicator.open { transform: rotate(180deg); }

/* ===== 模块：客户评价 ===== */
.reviews-dropdown {
    display: none; background: var(--card); border-radius: 16px; padding: 12px 14px;
    margin-top: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.08); max-height: 400px; overflow-y: auto;
}
.reviews-dropdown.open { display: block; }
.reviews-dropdown-title { font-weight: 700; font-size: 15px; color: var(--text); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid #f0ede8; }
.review-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f5f3ef; }
.review-item:last-child { border-bottom: none; }
.review-avatar {
    width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.review-content { flex: 1; }
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1px; }
.review-name { font-weight: 600; font-size: 13px; color: var(--text); }
.review-date { font-size: 10px; color: #9a9a9a; }
.review-stars { color: #f5b342; font-size: 12px; letter-spacing: 1px; margin: 1px 0 3px; }
.review-text { font-size: 12.5px; line-height: 1.6; color: var(--sub); }

/* ===== 模块：信任徽章 ===== */
.trust-badges {
    display: flex; justify-content: space-around; margin: 14px 0 20px; padding: 12px 10px;
    background: var(--card); border-radius: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.badge-item { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--sub); font-weight: 500; text-align: center; }
.badge-item .icon { font-size: 24px; line-height: 1; }
.badge-item .icon img { height: 24px; width: auto; display: block; }

/* ===== 模块：WhatsApp 主按钮 ===== */
.whatsapp-button-wrapper { padding: 0 4px; margin-bottom: 22px; }
.btn-whatsapp {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    background: var(--wa-bg);
    border: none; border-radius: 50px; padding: 16px 20px; text-decoration: none; color: #ffffff;
    font-weight: 700; font-size: 17px; text-transform: uppercase; letter-spacing: 0.8px;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.35); cursor: pointer; position: relative; overflow: hidden;
}
.btn-whatsapp:hover { transform: translateY(-3px); box-shadow: 0 12px 35px rgba(37, 211, 102, 0.5); }
.btn-whatsapp .thumb-icon {
    width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.btn-whatsapp .thumb-icon svg { width: 22px; height: 22px; fill: #ffffff; }
.btn-whatsapp::after {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
    animation: pulse 2.5s infinite;
}
@keyframes pulse { 0% { transform: scale(0.8); opacity: 0.5; } 100% { transform: scale(1.4); opacity: 0; } }

/* ===== CTA 双按钮布局 ===== */
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-row.dual .btn-whatsapp,
.cta-row.dual .btn-buy-now { flex: 1 1 calc(50% - 6px); min-width: 0; }

.btn-buy-now {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--buy-bg);
    border: none; border-radius: 50px; padding: 16px 18px; text-decoration: none; color: #ffffff;
    font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: 0.6px;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 22px rgba(255, 46, 92, 0.32); cursor: pointer; overflow: hidden;
}
.btn-buy-now:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(255, 46, 92, 0.45); }

/* ==========================================================================
   滚动吸底 CTA 条
   当原始 CTA 按钮滚出当前视口时，复制出来的按钮条从底部滑入固定居中
   ========================================================================== */
.cta-sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: transparent;
    border-top: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(110%);
    transition: transform 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.32s ease;
}
body.cta-sticky-visible .cta-sticky-bar {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.cta-sticky-inner {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}
.cta-sticky-inner .cta-row { gap: 10px; }
.cta-sticky-inner .btn-whatsapp,
.cta-sticky-inner .btn-buy-now {
    flex: 1 1 auto;
    min-width: 0;
    padding: 14px 16px;
    font-size: 15px;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.28);
}
.cta-sticky-inner .btn-buy-now {
    box-shadow: 0 4px 16px rgba(255, 46, 92, 0.24);
}

/* ===== 模块：附加按钮 ===== */
.extra-links { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; padding: 0 4px; }
.btn-link {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 18px; border-radius: 50px; text-decoration: none; font-weight: 600; font-size: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-link:hover { transform: translateY(-2px); }
.btn-link.primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,0.12); }
.btn-link.outline { background: var(--card); color: var(--text); border: 1px solid #e8e2da; }
.btn-link.dark { background: #143211; color: #fff; }

/* ===== 模块：支付方式 ===== */
.payment-icons { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 6px 0 20px; padding: 6px 0; flex-wrap: wrap; }
.payment-icons .label { font-size: 13px; color: #6a7a68; font-weight: 500; margin-right: 6px; }
.payment-icons .pi { font-size: 20px; line-height: 1; }
.payment-icons img { height: 24px; width: auto; opacity: 0.7; transition: opacity 0.2s; }
.payment-icons img:hover { opacity: 1; }

/* ===== 模块：常见问题 ===== */
.collapse-block { margin-bottom: 12px; border-radius: 12px; background-color: var(--card); box-shadow: 0 2px 10px rgba(0,0,0,0.04); overflow: hidden; transition: box-shadow 0.2s ease; }
.collapse-block:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.07); }
.collapse-header {
    display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; user-select: none;
    font-weight: 600; font-size: 15px; color: var(--text); background-color: var(--card); transition: background-color 0.2s ease;
}
.collapse-header:hover { background-color: #f8f6f2; }
.collapse-header .indicator {
    display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px;
    border-radius: 50%; background-color: #f0ede8; color: #5d755d; font-size: 16px; font-weight: 300;
    flex-shrink: 0; transition: transform 0.3s ease, background-color 0.2s ease;
}
.collapse-header.active .indicator { transform: rotate(45deg); background-color: #e8e0d6; }
.collapse-body { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.25,0.46,0.45,0.94), padding 0.3s ease; padding: 0 18px; background-color: var(--card); }
.collapse-body.open { max-height: 900px; padding: 0 18px 20px; }
.collapse-body p { font-size: 14px; line-height: 1.7; color: var(--sub); margin-bottom: 6px; }
.collapse-body p:last-child { margin-bottom: 0; }

/* ===== 模块：语言切换 ===== */
.lang-switch { display: flex; justify-content: center; margin-top: 18px; }
.lang-switch select {
    border: 1px solid #e6e0d8; background: var(--card); color: var(--sub); border-radius: 20px;
    padding: 6px 14px; font-size: 13px; outline: none; cursor: pointer;
}

/* ===== 模块：页脚 ===== */
.footer { text-align: center; margin-top: 30px; padding-top: 18px; border-top: 1px solid #ece7e0; font-size: 13px; color: #a09b94; }
.footer a { color: #5d755d; text-decoration: none; font-weight: 500; transition: color 0.2s ease; }
.footer a:hover { color: #3d553d; text-decoration: underline; }
.footer svg { display: inline-block; vertical-align: middle; margin: 0 3px; fill: #a09b94; width: 14px; height: 14px; }

/* ==========================================================================
   响应式自适应
   ========================================================================== */

/* 桌面/平板：容器略放宽，利用横向空间（落地页本身是居中窄栏，不宜过宽） */
@media (min-width: 768px) {
    .page-container { max-width: 500px; }
}

/* 手机：≤480px —— 紧凑内边距 + 适度缩小字号，避免横向溢出 */
@media (max-width: 480px) {
    body { padding: 14px 10px; }
    .page-container { padding: 8px 0 24px; }
    .avatar-image { width: 72px; height: 72px; }
    .brand-name { font-size: 27px; }
    .trust-bar { font-size: 13px; padding: 9px 12px; }
    .trust-bar .stars { font-size: 16px; }
    .btn-whatsapp { font-size: 16px; padding: 15px 18px; gap: 10px; }
    .btn-buy-now { font-size: 14px; padding: 15px 14px; }
    .btn-link { font-size: 14px; padding: 13px 16px; }
    .whatsapp-button-wrapper { padding: 0 2px; }
    .extra-links { padding: 0 2px; }
    .trust-badges { padding: 10px 6px; gap: 4px; }
    .badge-item { font-size: 11px; }
    .badge-item .icon { font-size: 22px; }
    .collapse-header { font-size: 14px; padding: 14px 14px; }
    .review-text { font-size: 12px; line-height: 1.55; }
    .payment-icons { gap: 8px; }
}

/* 小手机：≤360px —— 进一步压缩 */
@media (max-width: 360px) {
    body { padding: 12px 8px; }
    .avatar-image { width: 64px; height: 64px; }
    .brand-name { font-size: 24px; }
    .btn-whatsapp { font-size: 15px; padding: 14px 14px; }
    .trust-badges { flex-wrap: wrap; gap: 10px 6px; }
    .badge-item { font-size: 10.5px; }
    .collapse-header { padding: 12px 12px; }
}
