/* =========================================================
   猫福旅游 · 用户端 H5
   ========================================================= */
:root {
    --brand: #14b8a6;
    --brand-deep: #0d9488;
    --brand-soft: #e6f7f5;
    --coral: #ff7a45;
    --coral-soft: #fff0e8;
    --ink: #10262e;
    --ink-2: #5c7580;
    --ink-3: #97aab3;
    --line: #eaf1f3;
    --bg: #f5f8f9;
    --card: #ffffff;
    --radius: 16px;
    --shadow: 0 6px 20px rgba(16, 38, 46, .07);
    --shadow-lg: 0 14px 40px rgba(16, 38, 46, .14);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0;
    padding: 0;
    background: #e9eef0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; border: 0; }
a { color: inherit; text-decoration: none; }
input, select, textarea, button { font-family: inherit; }

.app {
    max-width: 640px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    padding-bottom: 84px;
    overflow-x: hidden;
}

/* ---------------- 顶部导航 ---------------- */
.navbar {
    position: sticky; top: 0; z-index: 40;
    height: 52px; display: flex; align-items: center; gap: 10px;
    padding: 0 16px; background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.navbar .back {
    width: 30px; height: 30px; border-radius: 50%; border: none;
    background: #f1f6f7; color: var(--ink); font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; flex: 0 0 30px;
}
.navbar .title { font-size: 16px; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navbar .right { font-size: 13px; color: var(--brand-deep); cursor: pointer; }

/* 首页头图区 */
.hero {
    position: relative;
    padding: 18px 16px 26px;
    background: linear-gradient(150deg, #0d9488 0%, #14b8a6 45%, #4fd1c5 100%);
    color: #fff;
    border-radius: 0 0 26px 26px;
    overflow: hidden;
}
.hero::after {
    content: ''; position: absolute; right: -40px; top: -50px;
    width: 180px; height: 180px; border-radius: 50%;
    background: rgba(255, 255, 255, .12);
}
.hero::before {
    content: ''; position: absolute; right: 60px; bottom: -70px;
    width: 140px; height: 140px; border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}
.hero h1 { margin: 0 0 6px; font-size: 21px; letter-spacing: .5px; position: relative; }
.hero p { margin: 0 0 16px; font-size: 13px; opacity: .88; position: relative; }

.search-box {
    position: relative; display: flex; align-items: center; gap: 8px;
    background: #fff; border-radius: 24px; padding: 6px 6px 6px 16px;
    box-shadow: 0 8px 24px rgba(6, 66, 60, .22);
}
.search-box input {
    flex: 1; border: none; outline: none; font-size: 14px; height: 36px; color: var(--ink); background: transparent;
}
.search-box input::placeholder { color: var(--ink-3); }
.search-box button {
    border: none; background: linear-gradient(135deg, var(--coral), #ff9d6b);
    color: #fff; font-size: 14px; padding: 9px 18px; border-radius: 20px; cursor: pointer;
}

/* ---------------- 通用区块 ---------------- */
.section { padding: 20px 16px 4px; }
.section-head { display: flex; align-items: center; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: .3px; }
.section-head .bar {
    width: 4px; height: 16px; border-radius: 3px; margin-right: 9px;
    background: linear-gradient(180deg, var(--brand), #5eead4);
}
.section-head .spacer { flex: 1; }
.section-head .more { font-size: 13px; color: var(--ink-3); }

/* 轮播 */
.swiper {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 0 16px 4px; -webkit-overflow-scrolling: touch;
}
.swiper::-webkit-scrollbar { display: none; }
.slide {
    flex: 0 0 calc(100% - 32px); scroll-snap-align: center;
    border-radius: var(--radius); overflow: hidden; position: relative;
    height: 172px; background: linear-gradient(135deg, #14b8a6, #4fd1c5);
    box-shadow: var(--shadow);
}
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide .mask {
    position: absolute; inset: auto 0 0 0; padding: 26px 16px 14px;
    background: linear-gradient(transparent, rgba(4, 30, 28, .78));
    color: #fff;
}
.slide .mask b { font-size: 16px; display: block; }
.slide .mask span { font-size: 12px; opacity: .85; }

/* 目的地宫格 */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.dest {
    text-align: center; border-radius: 14px; overflow: hidden;
    background: #fff; box-shadow: var(--shadow); cursor: pointer;
}
.dest .pic {
    height: 62px; background: linear-gradient(135deg, #d7f0ec, #b6e6de);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; overflow: hidden;
}
.dest .pic img { width: 100%; height: 100%; object-fit: cover; }
.dest .name { font-size: 12px; padding: 7px 2px; font-weight: 500; }

/* 线路卡片 */
.line-list { display: flex; flex-direction: column; gap: 14px; padding: 0 16px; }
.line-card {
    display: flex; gap: 12px; background: #fff; border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow); cursor: pointer;
}
.line-card .pic { flex: 0 0 118px; height: 118px; background: linear-gradient(135deg, #cdeee9, #9ddcd3); }
.line-card .pic img { width: 100%; height: 100%; object-fit: cover; }
.line-card .info { flex: 1; padding: 12px 12px 12px 0; display: flex; flex-direction: column; min-width: 0; }
.line-card .info h3 {
    margin: 0 0 5px; font-size: 15px; font-weight: 600; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.line-card .info .sub {
    font-size: 12px; color: var(--ink-3); margin-bottom: 6px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.line-card .tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: auto; }
.line-card .foot { display: flex; align-items: flex-end; margin-top: 8px; }
.line-card .price { color: var(--coral); font-weight: 700; font-size: 17px; }
.line-card .price small { font-size: 11px; font-weight: 400; }
.line-card .price em { font-style: normal; font-size: 11px; color: var(--ink-3); text-decoration: line-through; margin-left: 5px; font-weight: 400; }

.tag {
    display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 6px;
    background: var(--brand-soft); color: var(--brand-deep);
}
.tag.coral { background: var(--coral-soft); color: #d9581f; }
.tag.gray { background: #f1f5f6; color: var(--ink-2); }
.tag.solid { background: var(--brand); color: #fff; }

/* 大图卡（横向滚动推荐） */
.card-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 6px; }
.card-scroll::-webkit-scrollbar { display: none; }
.card-scroll .card {
    flex: 0 0 216px; background: #fff; border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow); cursor: pointer;
}
.card-scroll .card .pic { height: 132px; background: linear-gradient(135deg, #cdeee9, #9ddcd3); }
.card-scroll .card .pic img { width: 100%; height: 100%; object-fit: cover; }
.card-scroll .card .body { padding: 11px 12px 13px; }
.card-scroll .card h3 {
    margin: 0 0 5px; font-size: 14px; font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-scroll .card .meta { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; }
.card-scroll .card .meta .p { margin-left: auto; color: var(--coral); font-weight: 700; font-size: 15px; }

/* ---------------- 筛选 ---------------- */
.filter-wrap { padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 52px; z-index: 30; }
.filter-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.filter-row::-webkit-scrollbar { display: none; }
.chip {
    flex: 0 0 auto; font-size: 13px; padding: 7px 14px; border-radius: 18px;
    background: #f2f6f7; color: var(--ink-2); border: 1px solid transparent; cursor: pointer;
    white-space: nowrap;
}
.chip.on { background: var(--brand-soft); color: var(--brand-deep); border-color: var(--brand); font-weight: 600; }

/* ---------------- 详情页 ---------------- */
.detail-cover { position: relative; height: 230px; background: linear-gradient(135deg, #14b8a6, #4fd1c5); }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-cover .shade { position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(4, 30, 28, .7)); }
.detail-cover .cap { position: absolute; left: 16px; right: 16px; bottom: 16px; color: #fff; }
.detail-cover .cap h1 { margin: 0 0 6px; font-size: 20px; line-height: 1.35; }
.detail-cover .cap .meta { font-size: 12.5px; opacity: .9; display: flex; gap: 12px; }

.detail-body { margin-top: -18px; border-radius: 22px 22px 0 0; background: var(--bg); position: relative; padding-top: 18px; }
.price-bar {
    margin: 0 16px 14px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 15px 16px; display: flex; align-items: center; gap: 12px;
}
.price-bar .big { color: var(--coral); font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.price-bar .big small { font-size: 12px; font-weight: 400; }
.price-bar .old { font-size: 12px; color: var(--ink-3); text-decoration: line-through; }
.price-bar .stat { margin-left: auto; text-align: right; font-size: 12px; color: var(--ink-3); line-height: 1.7; }

.panel {
    margin: 0 16px 14px; background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 16px;
}
.panel h3 { margin: 0 0 12px; font-size: 15.5px; font-weight: 700; display: flex; align-items: center; }
.panel h3::before { content: ''; width: 4px; height: 14px; border-radius: 3px; background: var(--brand); margin-right: 8px; }
.panel .rich { font-size: 14px; line-height: 1.85; color: #2c454e; word-break: break-word; }
.panel .rich img { border-radius: 10px; margin: 10px 0; }
.panel .rich p { margin: 0 0 10px; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; font-size: 13.5px; }
.info-grid .k { color: var(--ink-3); font-size: 12.5px; }
.info-grid .v { font-weight: 500; }

/* 行程时间轴 */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(180deg, var(--brand), #d9f2ee); }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
    content: ''; position: absolute; left: -26px; top: 4px; width: 20px; height: 20px;
    border-radius: 50%; background: #fff; border: 4px solid var(--brand);
}
.tl-item .d { font-size: 12px; color: var(--brand-deep); font-weight: 700; margin-bottom: 3px; }
.tl-item h4 { margin: 0 0 5px; font-size: 14.5px; }
.tl-item p { margin: 0 0 8px; font-size: 13px; line-height: 1.75; color: var(--ink-2); }
.tl-item .ext { display: flex; flex-wrap: wrap; gap: 6px; }

.thumb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.thumb-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 9px; }

/* ---------------- 底部 Tab ---------------- */
.tabbar {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: 0; width: 100%; max-width: 640px; z-index: 50;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--line);
    display: flex; padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}
.tabbar a {
    flex: 1; text-align: center; font-size: 11px; color: var(--ink-3);
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0;
}
.tabbar a .ico { font-size: 19px; line-height: 1; filter: grayscale(1); opacity: .55; }
.tabbar a.on { color: var(--brand-deep); font-weight: 600; }
.tabbar a.on .ico { filter: none; opacity: 1; }

/* 底部操作条（详情页） */
.action-bar {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: 0; width: 100%; max-width: 640px; z-index: 50;
    background: #fff; border-top: 1px solid var(--line);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    display: flex; gap: 10px; align-items: center;
    box-shadow: 0 -6px 20px rgba(16, 38, 46, .06);
}
.action-bar .tel {
    flex: 0 0 auto; display: flex; flex-direction: column; align-items: center;
    font-size: 11px; color: var(--ink-2); gap: 2px; padding: 0 6px;
}
.action-bar .tel .ico { font-size: 18px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    border: none; border-radius: 24px; font-size: 15px; font-weight: 600;
    padding: 12px 20px; cursor: pointer; transition: .15s;
}
.btn-primary { flex: 1; background: linear-gradient(135deg, var(--coral), #ff9d6b); color: #fff; box-shadow: 0 6px 16px rgba(255, 122, 69, .3); }
.btn-primary:active { transform: scale(.98); }
.btn-brand { background: linear-gradient(135deg, var(--brand), #4fd1c5); color: #fff; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; }

/* ---------------- 弹层 ---------------- */
.sheet-mask {
    position: fixed; inset: 0; background: rgba(6, 33, 38, .45); z-index: 80;
    display: flex; align-items: flex-end; justify-content: center;
    animation: fade .16s ease-out;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.sheet {
    width: 100%; max-width: 640px; background: #fff; border-radius: 20px 20px 0 0;
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
    animation: up .22s cubic-bezier(.2, .8, .3, 1); max-height: 88vh; overflow-y: auto;
}
@keyframes up { from { transform: translateY(24px) } to { transform: none } }
.sheet h3 { margin: 0 0 4px; font-size: 17px; }
.sheet .sub { font-size: 12.5px; color: var(--ink-3); margin-bottom: 16px; }
.sheet .close { position: absolute; }

.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
    width: 100%; border: 1px solid var(--line); border-radius: 12px;
    padding: 12px 14px; font-size: 14.5px; outline: none; background: #fafdfd; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); background: #fff; }
.field textarea { resize: none; min-height: 76px; }
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }

/* 轻提示 */
.toast-box { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: rgba(16, 38, 46, .92); color: #fff; font-size: 13.5px; padding: 10px 18px; border-radius: 10px; max-width: 320px; animation: fade .16s; }
.toast.ok { background: rgba(13, 148, 136, .95); }
.toast.err { background: rgba(200, 60, 60, .95); }

/* 空状态 / 加载 */
.empty { text-align: center; color: var(--ink-3); font-size: 13.5px; padding: 54px 20px; }
.empty .ico { font-size: 34px; margin-bottom: 10px; opacity: .5; }
.loading { text-align: center; color: var(--ink-3); font-size: 13px; padding: 34px 0; }
.skeleton { background: linear-gradient(90deg, #eef4f5 25%, #e2ebed 37%, #eef4f5 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: 12px; }
@keyframes shimmer { from { background-position: 100% 50% } to { background-position: 0 50% } }

/* 面包屑 */
.crumb { padding: 12px 16px 0; font-size: 12.5px; color: var(--ink-3); display: flex; gap: 6px; flex-wrap: wrap; }
.crumb a { color: var(--brand-deep); }

/* 加载更多 */
.load-more { text-align: center; padding: 16px; font-size: 13px; color: var(--ink-3); }

/* 页脚 */
.footer { padding: 26px 16px 30px; text-align: center; color: var(--ink-3); font-size: 12px; line-height: 1.9; }
