/*
 * 外卖抽屉 · 页面样式
 * 尺寸按小程序 750rpx 设计稿换算：1rpx ≈ 0.5px
 */

/* ═══════════ 首页顶部 ═══════════ */
.home-top {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 16px 38px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8e53 100%);
    color: #fff;
}

.home-top__brand {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.home-top__logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex: none;
    object-fit: cover;
    background: #ffd84d;
    border: 2px solid rgba(255, 255, 255, .9);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .18);
}

.home-top__hello {
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 登录入口 */
.home-user {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    color: #fff;
}

.home-user--guest {
    height: 28px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

.home-user__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, .8);
}

.home-user__name {
    max-width: 72px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 12px;
}

/* 首页轮播（对齐小程序 swiper：280rpx ≈ 150px，圆角 24rpx） */
.home-swiper {
    position: relative;
    z-index: 2;
    margin: -24px 12px 0;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(255, 107, 53, .2);
}

.home-swiper__track {
    display: flex;
    transition: transform .4s ease;
    will-change: transform;
}

.home-swiper__item {
    position: relative;
    flex: 0 0 100%;
    display: block;
    overflow: hidden;
    min-height: 150px;
    color: #fff;
}

.home-swiper__item--blue {
    background: linear-gradient(135deg, #3ba4ff 0%, #1a7fe8 60%, #0f6fd7 100%);
}

.home-swiper__item--orange {
    background: linear-gradient(135deg, #ffb347 0%, #ff7a18 100%);
}

.home-swiper__item--pink {
    background: linear-gradient(135deg, #ff9ab5 0%, #f4507d 100%);
}

.home-swiper__item--green {
    background: linear-gradient(135deg, #5fd39a 0%, #16a05d 100%);
}

.home-swiper__item--dark {
    background: linear-gradient(135deg, #4a4a63 0%, #1f1f33 100%);
}

.home-swiper__img {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.home-swiper__copy {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-height: 150px;
    padding: 18px;
}

.home-swiper__copy--overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .15) 60%, rgba(0, 0, 0, 0) 100%);
}

.home-swiper__copy strong {
    font-size: 21px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: .4px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}

.home-swiper__copy span {
    font-size: 12.5px;
    opacity: .92;
}

.home-swiper__btn {
    align-self: flex-start;
    margin-top: 2px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #ffd84d;
    color: #7a3b00;
    font-size: 12.5px;
    font-style: normal;
    font-weight: 700;
}

.home-swiper__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    display: flex;
    justify-content: center;
    gap: 5px;
    pointer-events: none;
}

.home-swiper__dot {
    width: 6px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .5);
    pointer-events: auto;
    transition: width .25s, background .25s;
}

.home-swiper__dot.is-active {
    width: 14px;
    background: #fff;
}

/* ═══════════ 首页内容 ═══════════ */
.home-main {
    padding: 12px 12px 20px;
}

.home-card {
    margin-bottom: 12px;
    padding: 14px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
}

.home-search__input {
    display: block;
    width: 100%;
    min-height: 92px;
    max-height: 180px;
    padding: 12px;
    border: 1px solid #ececec;
    border-radius: 12px;
    background: #fafafa;
    color: #1a1a2e;
    font-size: 14px;
    line-height: 1.6;
    outline: none;
    resize: vertical;
}

.home-search__input::placeholder {
    color: #b8b8c0;
}

.home-search__input:focus {
    border-color: #ff6b35;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, .08);
}

.home-search__actions {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 12px;
}

.home-search__paste {
    flex: .6;
    height: 34px;
    background: #f5f5f5;
    color: #666;
    font-size: 13px;
}

.home-search__submit {
    flex: 1.7;
    height: 34px;
    border: 1.5px solid #ff6b35;
    background: #fff;
    color: #ff6b35;
    font-size: 13px;
    font-weight: 600;
}

.home-search__submit[disabled] {
    opacity: .6;
}

.home-search__switch {
    display: grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f5f5f5;
}

.home-search__switch i {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    color: #07c160;
    font-size: 12px;
    font-style: normal;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.home-search__records {
    margin-top: 12px;
}

.home-record {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 7px 10px;
    margin-top: 8px;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    background: #fff;
}

.home-record img {
    width: 16px;
    height: 16px;
    flex: none;
}

.home-record__text {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-record__badge {
    display: grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ff6b35;
    color: #fff;
    font-size: 10px;
    font-style: normal;
    line-height: 1;
}

.home-record__arrow {
    color: #ccc;
    font-size: 18px;
    line-height: 1;
}

/* 晒单（首页文章列表） */
.home-feed__head {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    color: #666;
    font-size: 13px;
    font-weight: 700;
}

.home-feed__head img {
    width: 16px;
    height: 16px;
}

.home-feed__more {
    margin-left: auto;
    color: #ff6b35;
    font-size: 12px;
    font-weight: 600;
}

.home-feed {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.home-feed__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    background: #f7f7f8;
}

.home-feed__thumb {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    background: #fff;
}

.home-feed__thumb--ph {
    display: grid;
    place-items: center;
    font-size: 22px;
}

.home-feed__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.home-feed__body strong {
    overflow: hidden;
    color: #333;
    font-size: 14px;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.home-feed__body span {
    display: -webkit-box;
    overflow: hidden;
    color: #9a9ab0;
    font-size: 12px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.home-feed__arrow {
    flex: none;
    color: #ccc;
    font-size: 18px;
}

.home-feed__empty {
    padding: 16px 12px;
    border-radius: 10px;
    background: #f7f7f8;
    color: #9a9ab0;
    font-size: 12.5px;
    text-align: center;
}

/* ═══════════ 查券结果 ═══════════ */
.home-result {
    margin-bottom: 12px;
}

.result-card {
    margin-bottom: 12px;
    padding: 14px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
}

.result-shop {
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-shop__img,
.result-shop__ph {
    width: 52px;
    height: 52px;
    flex: none;
    border-radius: 10px;
    object-fit: cover;
    background: #f5f5f5;
}

.result-shop__ph {
    display: grid;
    place-items: center;
    font-size: 22px;
}

.result-shop__name {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.4;
}

.result-shop__sub {
    margin-top: 3px;
    color: #9a9ab0;
    font-size: 12px;
}

.result-amount {
    display: flex;
    align-items: baseline;
    gap: 3px;
    margin-top: 12px;
    color: #ff4d2e;
}

.result-amount b {
    font-size: 32px;
    line-height: 1;
}

.result-amount small {
    font-size: 13px;
    font-weight: 600;
}

.result-amount em {
    margin-left: 6px;
    color: #999;
    font-size: 12px;
    font-style: normal;
}

.result-tip {
    margin-top: 3px;
    color: #999;
    font-size: 12px;
}

.result-list {
    margin-top: 10px;
    border-top: 1px solid #f2f2f2;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 0;
    border-bottom: 1px solid #f2f2f2;
}

.result-item:last-child {
    border-bottom: 0;
}

.result-item__body {
    flex: 1;
    min-width: 0;
}

.result-item__title {
    color: #333;
    font-size: 13px;
    font-weight: 500;
}

.result-item__desc {
    margin-top: 1px;
    color: #999;
    font-size: 12px;
}

.result-item__amount {
    flex: none;
    padding: 3px 8px;
    border-radius: 999px;
    background: #fff0ea;
    color: #ff5722;
    font-size: 12px;
}

.result-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    margin-top: 12px;
    border-radius: 10px;
    background: linear-gradient(90deg, #ff6b35, #ff8c00);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}

.result-hint {
    margin: 8px 0 0;
    color: #b0b0b8;
    font-size: 11.5px;
    text-align: center;
}

/* ═══════════ 抽屉 ═══════════ */
.drawer-head {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8e53 100%);
    color: #fff;
}

.drawer-head__inner {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.drawer-head__logo {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    flex: none;
}

.drawer-head__title {
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
}

.drawer-body {
    padding: 12px;
}

.drawer-panel {
    padding: 10px 12px 12px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
}

.drawer-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 10px;
    background: #f5f6f8;
}

.drawer-tab {
    flex: 1;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #6b6b7b;
    font-size: 12.5px;
    white-space: nowrap;
    cursor: pointer;
}

.drawer-tab.is-active {
    background: #fff;
    color: #ff6b35;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
}

.drawer-list {
    margin-top: 8px;
}

.drawer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 2px;
    border-bottom: 1px solid #f5f5f5;
}

.drawer-item:last-child {
    border-bottom: 0;
}

.drawer-item__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 9px;
    font-size: 21px;
}

.drawer-item__title {
    flex: 1;
    min-width: 0;
    color: #333;
    font-size: 13.5px;
    line-height: 1.45;
}

.drawer-item__arrow {
    flex: none;
    color: #ccc;
    font-size: 18px;
}

/* ═══════════ 子页头 ═══════════ */
.sub-head {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8e53 100%);
    color: #fff;
}

.sub-head__back {
    position: absolute;
    left: 10px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #fff;
    font-size: 28px;
    line-height: 1;
}

.sub-head__title {
    font-size: 17px;
    font-weight: 700;
}

/* ═══════════ 神券 ═══════════ */
.hub-body {
    padding-bottom: 20px;
}

.hub-hero {
    padding: 20px 16px 16px;
    background: linear-gradient(180deg, #ff6b35 0%, #ff8e53 100%);
    color: #fff;
}

.hub-hero h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.3;
    color: #fff;
}

.hub-hero p {
    margin: 6px 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, .92);
}

.hub-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px;
    background: linear-gradient(180deg, #ff8e53 0%, #f0f2f5 80%);
    scrollbar-width: none;
}

.hub-tabs::-webkit-scrollbar,
.hub-scroll::-webkit-scrollbar {
    display: none;
}

.hub-tab {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 7px 14px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.hub-tab.is-active {
    background: #fff;
    color: #ff6b35;
}

.hub-panel[hidden] {
    display: none;
}

.hub-scroll {
    overflow-x: auto;
    padding: 2px 12px 10px;
    scrollbar-width: none;
}

.hub-track {
    display: flex;
    gap: 10px;
    width: max-content;
}

.hub-card {
    display: flex;
    flex-direction: column;
    width: 152px;
    min-height: 178px;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(255, 107, 53, .12);
}

.hub-card__top {
    flex: 1;
    padding: 14px 12px 10px;
    text-align: center;
}

.hub-card__brand {
    color: #999;
    font-size: 12px;
}

.hub-card__amount {
    margin-top: 8px;
    color: #ff4d2e;
    font-size: 25px;
    font-weight: 800;
    line-height: 1.15;
    word-break: break-word;
}

.hub-card__sub {
    margin-top: 6px;
    color: #aaa;
    font-size: 11px;
    line-height: 1.5;
}

.hub-card__btn {
    height: 36px;
    border: 0;
    background: #ff6b35;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* ═══════════ 通用页面 ═══════════ */
.page-pad {
    padding: 12px 12px 24px;
}

.wmd-card {
    padding: 14px;
    margin-bottom: 12px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
}

.wmd-card__title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 700;
}

.wmd-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.wmd-link {
    border: 0;
    background: transparent;
    color: #ff6b35;
    font-size: 12px;
    cursor: pointer;
}

/* 记录 */
.record-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.record-item:last-child {
    border-bottom: 0;
}

.record-item__body {
    flex: 1;
    min-width: 0;
}

.record-item__name {
    color: #333;
    font-size: 13.5px;
    font-weight: 600;
}

.record-item__time {
    margin-top: 2px;
    color: #aaa;
    font-size: 11.5px;
}

.record-item__btn {
    flex: none;
    padding: 5px 10px;
    border: 1px solid #ff6b35;
    border-radius: 999px;
    color: #ff6b35;
    font-size: 11.5px;
}

/* 我的 */
.me-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff7f2, #fff);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
}

.me-card__logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex: none;
}

.me-card__info strong {
    display: block;
    font-size: 16px;
}

.me-card__info span {
    display: block;
    margin-top: 3px;
    color: #9a9ab0;
    font-size: 12px;
}

.me-login {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: linear-gradient(90deg, #ff6b35, #ff8c00);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}

.me-login--out {
    background: #fff;
    border: 1px solid #eee;
    color: #666;
}

.me-menu {
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
}

.me-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #f5f5f5;
    color: #333;
    font-size: 14px;
}

.me-menu a:last-child {
    border-bottom: 0;
}

.me-menu em {
    color: #ccc;
    font-size: 18px;
    font-style: normal;
}

/* ═══════════ 文章 ═══════════ */
.article__title {
    margin: 0 0 10px;
    color: #1a1a2e;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.45;
}

.article__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: #9a9ab0;
    font-size: 12px;
}

.article__chip {
    padding: 3px 9px;
    border-radius: 999px;
    background: #fff1e8;
    color: #ff6b35;
    font-size: 11.5px;
    font-weight: 600;
}

.article__cover {
    margin-bottom: 14px;
}

.article__cover img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.article__body {
    color: #333;
    font-size: 15px;
    line-height: 1.75;
    word-break: break-word;
}

.article__body p {
    margin: 0 0 14px;
}

.article__body h2,
.article__body h3 {
    margin: 20px 0 10px;
    color: #1a1a2e;
    font-size: 17px;
    line-height: 1.4;
}

.article__body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.article__body a {
    color: #ff6b35;
    text-decoration: underline;
}

.article__body ul,
.article__body ol {
    margin: 0 0 14px;
    padding-left: 20px;
}

.article-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-nav__item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
}

.article-nav__item span {
    color: #9a9ab0;
    font-size: 11.5px;
}

.article-nav__item strong {
    overflow: hidden;
    color: #333;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 文章列表页 */
.archive-desc {
    margin-bottom: 12px;
    color: #7a7a88;
    font-size: 13px;
    line-height: 1.6;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.article-list__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
}

.article-list__thumb {
    flex: none;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    background: #f7f7f8;
}

.article-list__thumb--ph {
    display: grid;
    place-items: center;
    font-size: 24px;
}

.article-list__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.article-list__body strong {
    overflow: hidden;
    color: #333;
    font-size: 14.5px;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.article-list__body span {
    display: -webkit-box;
    overflow: hidden;
    color: #9a9ab0;
    font-size: 12px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.article-list__body em {
    color: #b8b8c0;
    font-size: 11.5px;
    font-style: normal;
}

.article-list__arrow {
    flex: none;
    color: #ccc;
    font-size: 18px;
}

.article-pager .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
}

.article-pager .page-numbers {
    display: grid;
    place-items: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 8px;
    background: #fff;
    color: #666;
    font-size: 13px;
}

.article-pager .page-numbers.current {
    background: #ff6b35;
    color: #fff;
}

@media (min-width: 600px) {
    .home-top,
    .drawer-head,
    .sub-head {
        border-radius: 0;
    }
}

/* fxx-coupon 插件轻提示 */
.fxx-toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--wmd-tabbar) + 18px);
    z-index: 998;
    max-width: 80vw;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .82);
    color: #fff;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 8px);
    transition: opacity .2s ease, transform .2s ease;
}

.fxx-toast.is-show {
    opacity: 1;
    transform: translate(-50%, 0);
}
