/* ===================== 基础样式 ===================== */
:root {
    --color-primary: #1B5E20;        /* 主品牌深绿 */
    --color-accent: #4CAF50;         /* 强调绿色 */
    --color-placeholder: #9FA6B2;    /* 占位/次要文字灰 */
    --color-bg: #F1F6F1;             /* 页面背景 */
    --color-white: #ffffff;
    --color-field-bg: #F7FAF7;       /* 输入框背景 */
    --radius-card: 20px;
    --radius-field: 14px;
    --shadow-card: 0 8px 30px rgba(27, 94, 32, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    font-family: "HarmonyOS Sans", "PingFang SC", "Microsoft YaHei",
    "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--color-bg);
    color: var(--color-primary);
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

/* 图标统一基础样式（所有 icon 前缀类共用） */
[class^="icon-"],
[class*=" icon-"] {
    display: inline-block;
    object-fit: contain;
}

/* ===================== 页面容器 ===================== */
.page {
    width: 100%;
    /* max-width: 420px; */
    margin: 0 auto;
    background: var(--color-bg);
    height: 100vh;          /* 占满视口，用于分隔固定头部与滚动区 */
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;       /* 防止整页滚动，滚动交给内部滚动区 */
}

/* 顶部以下的可滚动内容区域 */
.scroll-area {
    flex: 1;                /* 占据剩余高度 */
    overflow-y: auto;       /* 内容超出时垂直滚动 */
    -webkit-overflow-scrolling: touch;  /* iOS 惯性滚动 */
}

/* ===================== 顶部导航 ===================== */
.header {
    flex: none;             /* 固定在顶部，不参与滚动 */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--color-white);
}

.header__brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-logo {
    width: 44px;
    height: auto;
}

.header__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.2px;
}

.header__home {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
}

/* 汉堡菜单按钮 */
.menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 28px;
    height: 28px;
    padding: 4px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.menu-btn__line {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--color-primary);
    transition: transform 0.25s ease, opacity 0.2s ease;
}

/* 打开状态下汉堡变为关闭（X） */
.menu-btn.is-open .menu-btn__line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.menu-btn.is-open .menu-btn__line:nth-child(2) {
    opacity: 0;
}
.menu-btn.is-open .menu-btn__line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ===================== 全页遮罩菜单 ===================== */
.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--color-white);
    /* 默认隐藏，通过 is-open 展开 */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 32px 20px;
}

/* 遮罩右上角关闭按钮（X） */
.menu-close {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.menu-close__line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--color-primary);
}

.menu-close__line:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.menu-close__line:nth-child(2) { transform: translate(-50%, -50%) rotate(-45deg); }

.menu-nav__item {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
}

/* 仅 Home 为可点击跳转入口 */
.menu-nav__item--link {
    cursor: pointer;
}

/* 非跳转项不可点击 */
.menu-nav__item:not(.menu-nav__item--link):not(.menu-nav__cta) {
    cursor: default;
}

.menu-nav__cta {
    width: 100%;
    max-width: 340px;
    margin-top: 8px;
    padding: 14px;
    border: none;
    cursor: pointer;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: var(--color-white);
    background: linear-gradient(90deg, #4CAF50 0%, #388E3C 100%);
    box-shadow: 0 8px 18px rgba(56, 142, 60, 0.28);
}

/* ===================== Hero 头图 ===================== */
.hero {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 24px;
    /* 叠加渐变遮罩，保证白色文字可读性 */
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.35) 100%);
}

.hero__subtitle {
    color: var(--color-white);
    font-size: 11px;
    font-weight: 400;
    margin-bottom: 8px;
    opacity: 0.95;
}

.hero__title {
    color: var(--color-white);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

/* ===================== 主体卡片 ===================== */
.card {
    position: relative;
    margin: -28px 16px 24px;
    background: var(--color-white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 24px 20px 20px;
}

/* 卡片头部：图标 + 标题 + 副标题 */
.card__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.card__head-icon {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--color-field-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* .icon-cart {
  width: 26px;
  height: 26px;
} */

.card__head-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-primary);
    line-height: 1.2;
}

.card__head-desc {
    font-size: 11px;
    font-weight: 500;
    color: var(--color-accent);
    margin-top: 4px;
}

/* 叶子分隔线 */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0 22px;
}

.divider__icon {
    /* width: 26px; */
    height: auto;
}

/* ===================== 表单字段 ===================== */
.field {
    margin-bottom: 20px;
}

.field__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.field__control {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--color-field-bg);
    border: 1px solid #EAF0EA;
    border-radius: var(--radius-field);
    padding: 0 14px;
    height: 50px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field__control:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.12);
}

/* 字段左侧图标 */
.field__icon {
    flex: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-card,
.icon-qrcode,
.icon-money,
.icon-phone {
    width: 30px;
    height: 30px;
}

/* 只读展示型字段的文本 */
.field__value {
    flex: 1;
    font-size: 14px;
    font-weight: 400;
    color: var(--color-primary);
}

/* 原生下拉选择框：清除默认样式，融入卡片输入框风格（兼容移动端） */
.field__select {
    flex: 1;
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    font-family: inherit;
    color: var(--color-primary);
    cursor: pointer;
    /* 去除浏览器默认下拉箭头，使用右侧自定义箭头图标 */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* 未选择时（占位项）显示为灰色 */
.field__select:invalid {
    color: var(--color-placeholder);
}

/* 可输入字段 */
.field__input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    font-family: inherit;
    color: var(--color-primary);
}

.field__input::placeholder {
    color: var(--color-placeholder);
}

/* 右侧进入箭头 */
.icon-arrow {
    flex: none;
    width: 16px;
    height: 16px;
}

/* 可点击选择型字段 */
.field__control--select {
    cursor: pointer;
}

/* ===================== 提交按钮 ===================== */
.btn-pay {
    display: block;
    width: 100%;
    border: none;
    cursor: pointer;
    margin-top: 26px;
    padding: 16px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-white);
    font-family: inherit;
    background: linear-gradient(90deg, #4CAF50 0%, #388E3C 100%);
    box-shadow: 0 8px 18px rgba(56, 142, 60, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-pay:hover { box-shadow: 0 10px 22px rgba(56, 142, 60, 0.36); }
.btn-pay:active { transform: translateY(1px); }

/* ===================== 安全提示条 ===================== */
.secure {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 12px 14px;
    background: var(--color-field-bg);
    border-radius: var(--radius-field);
}

.icon-safe {
    flex: none;
    width: 30px;
    height: 30px;
}

.secure__text { flex: 1; }

.secure__title {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
}

.secure__desc {
    font-size: 9px;
    font-weight: 500;
    color: var(--color-placeholder);
    margin-top: 3px;
    line-height: 1.3;
}

.secure__badges {
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-pci { height: 16px; width: auto; }
.icon-ssl { height: 18px; width: auto; }

/* ===================== 响应式适配 ===================== */
@media (max-width: 360px) {
    .card { margin-left: 12px; margin-right: 12px; padding: 20px 16px; }
    .hero__title { font-size: 16px; }
    .card__head-title { font-size: 18px; }
}

@media (min-width: 421px) {
    .page {
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.06);
    }
}
