/* ============================================================
   taofang.asia 前台样式（2026-10-26 骨架改版）
   墨绿 + 米白 + 琥珀；首页与分类页统一使用 tfy-* 结构类
   ============================================================ */
:root {
    --tfy-ink: #1F2A24;
    --tfy-deep: #2E4638;
    --tfy-moss: #5C7A5F;
    --tfy-cream: #F7F4EC;
    --tfy-card: #FFFDF8;
    --tfy-amber: #B06A2A;
    --tfy-line: #E3DAC8;
    --tfy-muted: #7B7466;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--tfy-cream); color: var(--tfy-ink); max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: 64px; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* 品牌刊头：字标 + 身份语 + 搜索 */
.tfy-mast { background: var(--tfy-deep); color: #F6F2E8; padding: 16px 16px 12px; }
.tfy-mast-main { display: flex; flex-direction: column; gap: 10px; }
.tfy-brand { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tfy-mark { font-size: 26px; font-weight: 800; letter-spacing: 3px; }
.tfy-tagline { font-size: 12px; color: #CFDACB; letter-spacing: 1px; }
.tfy-find { width: 100%; }
.tfy-find-input { width: 100%; border: none; border-radius: 2px; padding: 9px 12px; font-size: 13px; background: rgba(255, 255, 255, .93); color: #333; outline: none; }
.tfy-promise { display: flex; gap: 14px; overflow-x: auto; margin-top: 10px; font-size: 11px; color: #C9D4C6; white-space: nowrap; scrollbar-width: none; }
.tfy-promise::-webkit-scrollbar { display: none; }

/* 楼层锚点导航 */
.tfy-jump { display: flex; overflow-x: auto; background: #3A5646; color: #EFEADF; scrollbar-width: none; }
.tfy-jump::-webkit-scrollbar { display: none; }
.tfy-jump a { flex: none; padding: 10px 14px; font-size: 12.5px; border-right: 1px solid rgba(255, 255, 255, .08); white-space: nowrap; }
.tfy-jump-all { color: #F2C98B; }

/* 首屏身份区 */
.tfy-intro { padding: 20px 16px 8px; }
.tfy-eyebrow { font-size: 11px; letter-spacing: 2px; color: var(--tfy-amber); }
.tfy-claim { font-size: 22px; line-height: 1.35; font-weight: 800; letter-spacing: .5px; margin: 6px 0 8px; }
.tfy-intro-note { font-size: 13px; line-height: 1.8; color: var(--tfy-muted); }
.tfy-facts { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; margin-top: 14px; border-top: 1px solid var(--tfy-line); border-bottom: 1px solid var(--tfy-line); }
.tfy-facts li { padding: 10px 2px; text-align: center; border-right: 1px solid var(--tfy-line); }
.tfy-facts li:last-child { border-right: none; }
.tfy-facts b { display: block; font-size: 16px; color: var(--tfy-deep); }
.tfy-facts span { font-size: 10.5px; color: var(--tfy-muted); }

/* 楼层 */
.tfy-floor { margin: 20px 12px; background: var(--tfy-card); border: 1px solid var(--tfy-line); border-radius: 4px; overflow: hidden; }
.tfy-floor-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 12px 10px; border-bottom: 1px solid var(--tfy-line); }
.tfy-floor-no { font-size: 22px; font-weight: 800; font-style: italic; color: var(--tfy-amber); line-height: 1; }
.tfy-floor-copy { flex: 1; min-width: 0; }
.tfy-floor-title { font-size: 16px; font-weight: 800; letter-spacing: .5px; margin-bottom: 3px; }
.tfy-floor-note { font-size: 11.5px; color: var(--tfy-muted); line-height: 1.6; }
.tfy-floor-more { font-size: 11px; color: var(--tfy-amber); white-space: nowrap; padding-top: 4px; }
.tfy-floor-body { display: flex; flex-direction: column; gap: 12px; padding: 12px; }

/* 主推规格大卡 */
.tfy-lead { display: grid; grid-template-columns: 42% 1fr; background: var(--tfy-cream); border: 1px solid var(--tfy-line); border-radius: 3px; overflow: hidden; }
.tfy-lead-pic { display: block; background: #EFEBE0; }
.tfy-lead-pic img { width: 100%; height: 100%; min-height: 210px; object-fit: cover; }
.tfy-lead-body { padding: 12px; }
.tfy-lead-flag { display: inline-block; font-size: 10px; letter-spacing: 1px; color: #fff; background: var(--tfy-deep); padding: 2px 8px; border-radius: 2px; margin-bottom: 8px; }
.tfy-lead-name { font-size: 15px; font-weight: 700; line-height: 1.5; margin-bottom: 10px; }
.tfy-spec { margin: 0; }
.tfy-spec-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dotted var(--tfy-line); font-size: 12px; }
.tfy-spec-row:last-child { border-bottom: none; }
.tfy-spec-key { color: var(--tfy-muted); }
.tfy-spec-val { color: var(--tfy-ink); text-align: right; }
.tfy-lead-buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.tfy-lead-price { font-size: 20px; font-weight: 800; color: var(--tfy-amber); }
.tfy-go { background: var(--tfy-deep); color: #fff; font-size: 12.5px; padding: 9px 18px; border-radius: 2px; }

/* 紧凑卡 */
.tfy-minis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tfy-mini { display: block; background: #fff; border: 1px solid var(--tfy-line); }
.tfy-mini-pic { width: 100%; aspect-ratio: 1; object-fit: cover; background: #EFEBE0; }
.tfy-mini-body { padding: 8px; }
.tfy-mini-name { font-size: 11.5px; line-height: 1.45; height: 33px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tfy-mini-price { display: block; margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--tfy-amber); }

/* 楼层之间的服务带 */
.tfy-band { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 12px; padding: 12px 14px; background: var(--tfy-deep); color: #E9E4D6; font-size: 11.5px; letter-spacing: .5px; }

/* 分类页 */
.tfy-catnav { display: flex; overflow-x: auto; background: #F1EBDD; border-bottom: 1px solid var(--tfy-line); padding: 0 8px; scrollbar-width: none; }
.tfy-catnav::-webkit-scrollbar { display: none; }
.tfy-catnav a { flex: none; padding: 11px 12px; font-size: 13px; color: #5E5A4D; border-bottom: 2px solid transparent; white-space: nowrap; }
.tfy-catnav a.on { color: var(--tfy-deep); border-bottom-color: var(--tfy-deep); font-weight: 700; }
.tfy-listing { padding-bottom: 10px; }
.tfy-listing-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 16px 16px 2px; }
.tfy-listing-title { font-size: 20px; font-weight: 800; }
.tfy-listing-meta { font-size: 11.5px; color: var(--tfy-muted); }
.tfy-empty { padding: 40px 20px; text-align: center; color: var(--tfy-muted); font-size: 13px; }

/* 商品页顶部服务条 */
.tfy-topnote { background: #EFE8D9; color: #6B6350; font-size: 11.5px; text-align: center; padding: 6px 10px; letter-spacing: .3px; }

/* 绿色主按钮（登录/购买/保存） */
.btn-primary { display: block; width: 100%; background: var(--tfy-amber); color: #fff; border: none; border-radius: 24px; padding: 12px; font-size: 16px; text-align: center; cursor: pointer; }
.btn-buy { background: var(--tfy-deep); color: #fff; border: none; border-radius: 14px; padding: 6px 16px; font-size: 13px; }

/* 商品详情页：JS 驱动横向轮播（手指滑动 / 鼠标拖动 / 箭头 / 圆点） */
.swiper { position: relative; background: #000; overflow: hidden; }
.swiper-track { display: flex; transition: transform .3s ease; will-change: transform; cursor: grab; touch-action: pan-y; }
.swiper-track.dragging { transition: none; cursor: grabbing; }
.swiper .swiper-slide { flex: 0 0 100%; }
.swiper .swiper-slide img { width: 100%; aspect-ratio: 1; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.swiper .counter { position: absolute; right: 12px; bottom: 12px; background: rgba(0, 0, 0, .5); color: #fff; font-size: 12px; border-radius: 12px; padding: 2px 10px; pointer-events: none; }

/* 左右箭头 */
.swiper .arrow-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; line-height: 28px; text-align: center; background: rgba(0, 0, 0, .35); color: #fff; border-radius: 50%; font-size: 16px; cursor: pointer; }
.swiper .arrow-btn.prev { left: 8px; }
.swiper .arrow-btn.next { right: 8px; }

/* 底部圆点指示 */
.swiper .dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.swiper .dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .45); }
.swiper .dots i.on { background: #fff; width: 14px; border-radius: 3px; }
.pd-price-row { display: flex; gap: 6px; padding: 8px 12px 0; align-items: center; flex-wrap: wrap; }
.tag { background: #F1EBDD; color: var(--tfy-deep); border: 1px solid var(--tfy-deep); border-radius: 14px; font-size: 12px; padding: 3px 10px; }
.pd-price { font-size: 20px; font-weight: bold; }
.pd-title { font-size: 16px; font-weight: bold; padding: 6px 12px; line-height: 1.5; }
.pd-meta { display: flex; justify-content: space-between; color: #999; font-size: 12px; padding: 0 12px 10px; }
.card { background: #fff; border-radius: 10px; margin: 10px 12px; padding: 12px; }
.spec-row { display: flex; justify-content: space-between; align-items: center; }
.arrow { color: #ccc; }

/* 规格弹层 */
.spec-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: none; z-index: 99; }
.spec-panel { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; background: #fff; border-radius: 14px 14px 0 0; padding: 14px; display: none; z-index: 100; max-height: 70vh; overflow: auto; }
.spec-item { display: inline-block; border: 1px solid var(--tfy-deep); color: var(--tfy-deep); border-radius: 14px; padding: 5px 12px; font-size: 13px; margin: 4px 6px 4px 0; cursor: pointer; }
.spec-item.on { background: var(--tfy-deep); color: #fff; }
.num-ctrl { display: inline-flex; align-items: center; gap: 10px; }
.num-ctrl button { width: 28px; height: 28px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }

/* 底部操作栏（详情页） */
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; background: #fff; display: flex; align-items: center; padding: 8px 12px; gap: 8px; box-shadow: 0 -2px 8px rgba(0, 0, 0, .06); z-index: 90; }
.bottom-bar .op { text-align: center; font-size: 11px; color: #666; width: 44px; }
.bottom-bar .op .ico { font-size: 18px; }
.btn-cart { flex: 1; background: var(--tfy-moss); color: #fff; border: none; border-radius: 22px; padding: 11px; font-size: 15px; }
.btn-buy2 { flex: 1; background: var(--tfy-deep); color: #fff; border: none; border-radius: 22px; padding: 11px; font-size: 15px; }

/* 底部 TabBar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; background: #fff; display: flex; border-top: 1px solid #eee; z-index: 90; }
.tabbar a { flex: 1; text-align: center; padding: 8px 0 10px; font-size: 11px; color: #888; }
.tabbar a .ico { font-size: 20px; display: block; }
.tabbar a.active { color: var(--tfy-deep); }

/* 表单（登录/地址） */
.form-item { display: flex; align-items: center; gap: 8px; background: #fff; border-bottom: 1px solid #eee; padding: 14px 16px; }
.form-item input { flex: 1; border: none; outline: none; font-size: 15px; }

/* 订单/地址列表 */
.cell { background: #fff; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid #f0f0f0; }

/* 会员中心头部 */
.me-head { background: var(--tfy-deep); color: #fff; padding: 18px 16px 0; }
.me-stats { display: flex; text-align: center; padding: 14px 0; }
.me-stats div { flex: 1; }
.me-stats b { display: block; font-size: 18px; }
.me-stats span { font-size: 12px; color: #cfd8ea; }
.tfy-subhead { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 12px 8px; }
.tfy-subhead h4 { font-size: 16px; }

/* 订单状态宫格 */
.order-grid { display: flex; background: #fff; padding: 12px 0; margin-top: 10px; }
.order-grid a { flex: 1; text-align: center; font-size: 12px; color: #555; position: relative; }
.order-grid .ico { font-size: 22px; display: block; margin-bottom: 4px; }
.order-grid .badge { position: absolute; top: -6px; right: 18%; background: #e33; color: #fff; font-size: 10px; border-radius: 10px; padding: 0 5px; }

/* 页脚法务区 */
.foot-legal { background: #fff; border-top: 1px solid #eee; margin-top: 20px; padding: 16px 12px 10px; }
.foot-links { text-align: center; padding: 4px 8px 6px; font-size: 12px; color: #999; line-height: 1.9; }
.foot-links a { color: #999; }
.foot-line { text-align: center; padding: 2px 8px; font-size: 12px; color: #999; }

/* 后台管理 admin.css 复用部分样式 */
.admin-wrap { max-width: 100%; }
.admin-nav { background: #1f2d3d; color: #fff; }
.admin-nav a { color: #c6cbd4; display: block; padding: 12px 18px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.admin-nav a.active { background: var(--tfy-deep); color: #fff; }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { border-bottom: 1px solid #eee; padding: 10px; font-size: 13px; text-align: left; }
.table th { background: #f8f9fb; }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; border: 1px solid #ddd; background: #fff; cursor: pointer; }
.btn-del { color: #e33; border-color: #e33; }

@media (hover: hover) {
    .tfy-mini:hover, .tfy-lead:hover { border-color: #C8BDA6; }
    .tfy-go:hover { background: #22362B; }
}

@media (min-width: 768px) {
    body { max-width: none; margin: 0; padding-bottom: 40px; }
    .tfy-mast { padding: 20px 24px 14px; }
    .tfy-mast-main { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; max-width: 1200px; margin: 0 auto; }
    .tfy-mark { font-size: 30px; }
    .tfy-find { width: 340px; flex: none; }
    .tfy-promise { max-width: 1200px; margin: 12px auto 0; justify-content: flex-start; gap: 26px; }
    .tfy-jump { justify-content: center; }
    .tfy-jump a { padding: 11px 22px; font-size: 13px; }
    .tfy-intro { max-width: 1200px; margin: 0 auto; padding: 34px 4px 6px; }
    .tfy-claim { font-size: 32px; }
    .tfy-intro-note { max-width: 660px; font-size: 14px; }
    .tfy-facts { max-width: 660px; }
    .tfy-facts b { font-size: 22px; }
    .tfy-floor { max-width: 1200px; margin: 26px auto; border-radius: 6px; }
    .tfy-floor-head { padding: 18px 20px 14px; align-items: center; }
    .tfy-floor-no { font-size: 30px; }
    .tfy-floor-title { font-size: 20px; }
    .tfy-floor-body { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; padding: 18px; }
    .tfy-lead { display: block; align-self: start; }
    .tfy-lead-pic img { height: auto; min-height: 0; aspect-ratio: 4/3; }
    .tfy-lead-body { display: flex; flex-direction: column; padding: 18px; }
    .tfy-lead-name { font-size: 18px; }
    .tfy-spec-row { font-size: 13px; padding: 9px 0; }
    .tfy-lead-buy { margin-top: auto; }
    .tfy-lead-price { font-size: 26px; }
    .tfy-minis { grid-template-columns: 1fr 1fr; gap: 14px; align-content: start; }
    .tfy-mini-name { font-size: 12.5px; height: 36px; }
    .tfy-mini-price { font-size: 14px; }
    .tfy-band { max-width: 1200px; margin: 0 auto; padding: 14px 20px; font-size: 12.5px; justify-content: center; gap: 46px; }
    .tfy-catnav { justify-content: center; padding: 0; }
    .tfy-catnav a { padding: 13px 26px; font-size: 14px; }
    .tfy-listing-head { max-width: 1200px; margin: 0 auto; padding: 30px 4px 4px; }
    .tfy-listing-title { font-size: 26px; }
    .tfy-topnote { font-size: 12.5px; padding: 8px 12px; }
    .bottom-bar { max-width: 1280px; padding: 10px 20px; }
    .spec-panel { left: 50%; right: auto; transform: translateX(-50%); bottom: 84px; width: 520px; border-radius: 14px; }
    .spec-mask { background: rgba(0, 0, 0, .35); }
    .tabbar { display: none; }
    .swiper .swiper-slide img { aspect-ratio: 4/3; }
    .card { max-width: 1200px; margin: 14px auto; }
    .form-item, .cell, .me-stats, .order-grid, .me-head { max-width: 1200px; margin-left: auto; margin-right: auto; }
    .foot-links, .foot-line { font-size: 12.5px; }
}
