/* PetShug 原型 v2 — 移動優先 · 參考小程序風格 · 溫暖橙 */
:root {
  --primary: #FF6E3C;
  --primary-dark: #F2582A;
  --primary-soft: #FFE8DD;
  --amber: #FFB13C;
  --green: #3FBF7F;
  --green-soft: #E4F6EC;
  --ink: #3D2E24;
  --muted: #9C8C80;
  --bg: #FFF7F0;
  --card: #FFFFFF;
  --line: #F4E7DB;
  --sky1: #C9E6FF; --sky2: #EAF6FF;
  --shadow: 0 4px 18px rgba(160, 100, 60, .10);
  --radius: 18px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 15px; }
body {
  background: #F1E4D6;
  color: var(--ink);
  font-family: "PingFang TC", "Microsoft JhengHei", "Nunito", "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* 手機畫布（PC 上居中呈現手機版式） */
.phone {
  max-width: 430px; margin: 0 auto; min-height: 100vh;
  background: var(--bg); position: relative;
  box-shadow: 0 0 40px rgba(120, 80, 40, .12);
  padding-bottom: 88px; /* 給底部 tabbar 留空 */
}

/* ===== 頂欄 ===== */
.appbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 247, 240, .94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.appbar .logo { font-weight: 800; font-size: 1.08rem; color: var(--primary); display: flex; align-items: center; gap: 6px; }
.appbar .spacer { flex: 1; }
.icon-btn {
  position: relative; width: 38px; height: 38px; border-radius: 999px;
  border: none; background: #fff; box-shadow: var(--shadow);
  display: grid; place-items: center; font-size: 1.05rem; cursor: pointer;
}
.dot-red { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 999px; background: #FF3B2E; border: 1.5px solid #fff; }

/* ===== 輪播頭圖 ===== */
.carousel {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 100%; scroll-snap-align: center; min-height: 300px;
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 22px 20px 20px; color: #fff; overflow: hidden;
}
.slide.sky { background: linear-gradient(180deg, var(--sky2) 0%, var(--sky1) 60%, #FFD9C4 100%); color: var(--ink); }
.slide.orange { background: linear-gradient(160deg, #FFB13C, #FF6E3C); }
.slide.green { background: linear-gradient(160deg, #8FC0A9, #5E9B7E); }
.slide .clouds { position: absolute; top: 14px; left: 0; right: 0; text-align: center; font-size: 2.2rem; letter-spacing: 26px; opacity: .8; }
.slide .pets { position: absolute; top: 44px; left: 0; right: 0; text-align: center; font-size: 4.6rem; letter-spacing: 14px; }
.slide h1 { font-size: 1.9rem; line-height: 1.25; margin-bottom: 8px; position: relative; }
.slide h1 em { font-style: normal; color: var(--primary); }
.slide.sky h1 em { color: #FF5A2E; }
.slide p.sub { font-size: .95rem; opacity: .92; margin-bottom: 14px; position: relative; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; position: relative; }
.pill { background: rgba(255,255,255,.85); color: var(--ink); border-radius: 999px; padding: 5px 13px; font-size: .78rem; font-weight: 700; }
.pill.solid { background: var(--primary); color: #fff; }
.badge-corner {
  position: absolute; top: 18px; right: 18px; background: #FF4D2E; color: #fff;
  font-weight: 800; font-size: .8rem; border-radius: 14px 14px 14px 4px; padding: 8px 12px; line-height: 1.2; text-align: center;
}
.dots { display: flex; justify-content: center; gap: 6px; padding: 12px 0 2px; }
.dots span { width: 7px; height: 7px; border-radius: 999px; background: #EAD9C9; }
.dots span.on { background: var(--primary); width: 18px; }

/* ===== 區塊標題 ===== */
.section { padding: 18px 16px 6px; }
.sec-title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sec-title h2 { font-size: 1.18rem; font-weight: 800; }
.tag { font-size: .68rem; font-weight: 800; border-radius: 6px; padding: 2px 7px; color: #fff; }
.tag-new { background: var(--green); }
.tag-hot { background: #FF4D2E; }
.sec-title .more { margin-left: auto; color: var(--muted); font-size: .82rem; }

/* ===== 商品卡 ===== */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); cursor: pointer; transition: .15s;
}
.card:active { transform: scale(.98); }
.card .thumb {
  height: 150px; display: grid; place-items: center; font-size: 3.4rem; position: relative;
}
.card .thumb.tall { height: 190px; font-size: 4rem; }
.card .thumb.short { height: 120px; }
.card .body { padding: 10px 12px 13px; }
.card h3 { font-size: .95rem; font-weight: 700; margin-bottom: 2px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.chip-p { background: var(--primary-soft); color: var(--primary-dark); font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 2px 9px; }
.price-row { display: flex; align-items: baseline; gap: 8px; }
.price { color: #FF4D2E; font-weight: 800; font-size: 1.12rem; }
.price small { font-size: .75rem; }
.sold { color: var(--muted); font-size: .75rem; }
.corner-tag { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.92); border-radius: 999px; font-size: .72rem; font-weight: 800; padding: 4px 10px; color: var(--primary-dark); }

/* ===== 瀑布流 ===== */
.masonry { columns: 2; column-gap: 12px; padding: 0 16px; }
.m-item { break-inside: avoid; margin-bottom: 12px; }
.m-item .thumb { height: auto; padding: 26px 0; }

/* ===== 抽屜（底部彈出） ===== */
.overlay {
  position: fixed; inset: 0; background: rgba(50, 30, 15, .45); z-index: 90;
  opacity: 0; pointer-events: none; transition: .2s;
}
.overlay.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; z-index: 95; left: 50%; transform: translate(-50%, 105%);
  bottom: 0; width: 100%; max-width: 430px;
  background: #fff; border-radius: 24px 24px 0 0; padding: 14px 20px 26px;
  transition: transform .25s ease; max-height: 82vh; overflow-y: auto;
}
.sheet.show { transform: translate(-50%, 0); }
.sheet .grab { width: 42px; height: 5px; border-radius: 999px; background: #EAD9C9; margin: 0 auto 14px; }
.sheet .s-thumb { height: 180px; border-radius: var(--radius); display: grid; place-items: center; font-size: 4rem; margin-bottom: 14px; }
.sheet h3 { font-size: 1.15rem; margin-bottom: 4px; }
.sheet .desc { color: var(--muted); font-size: .88rem; margin-bottom: 12px; }
.req-box { background: #FFF6EC; border-radius: 14px; padding: 12px 14px; font-size: .85rem; margin: 12px 0; }
.req-box b { color: var(--primary-dark); }
.sheet-actions { display: flex; gap: 10px; margin-top: 14px; }

/* ===== 按鈕 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; cursor: pointer; border-radius: 999px;
  padding: 12px 24px; font-size: .95rem; font-weight: 800; transition: .15s;
}
.btn-primary { background: linear-gradient(135deg, #FF8A50, var(--primary)); color: #fff; box-shadow: 0 6px 16px rgba(255, 110, 60, .35); }
.btn-primary:active { transform: scale(.97); }
.btn-soft { background: var(--primary-soft); color: var(--primary-dark); }
.btn-ghost { background: #fff; color: var(--primary-dark); border: 1.5px solid var(--primary); }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 8px 18px; font-size: .85rem; }

/* ===== 底部 Tab 欄 ===== */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; z-index: 60;
  background: rgba(255,255,255,.97); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: flex; padding: 6px 4px calc(10px + env(safe-area-inset-bottom));
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: .68rem; font-weight: 700; color: var(--muted); cursor: pointer;
}
.tab-item .ic { font-size: 1.35rem; filter: grayscale(1) opacity(.55); }
.tab-item.on { color: var(--primary); }
.tab-item.on .ic { filter: none; }
.tab-item.cta .ic {
  filter: none; width: 52px; height: 52px; border-radius: 999px; background: linear-gradient(135deg, #FF8A50, var(--primary));
  display: grid; place-items: center; font-size: 1.5rem; color: #fff; margin-top: -22px;
  box-shadow: 0 8px 18px rgba(255, 110, 60, .45); border: 4px solid #fff;
}
.tab-item.cta { color: var(--primary-dark); }

/* ===== 趣玩頁 ===== */
.fun-head {
  background: linear-gradient(180deg, #FF8A50, #FF6E3C 70%, var(--bg) 100%);
  padding: 18px 16px 34px; color: #fff; text-align: center; font-weight: 800; font-size: 1.2rem;
}
.profile-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  margin: -26px 16px 14px; padding: 16px; display: flex; align-items: center; gap: 14px;
}
.avatar-add {
  width: 62px; height: 62px; border-radius: 999px; border: 2px dashed #D8C4B2;
  display: grid; place-items: center; font-size: 1.6rem; color: #B99F8A; flex-shrink: 0;
}
.profile-card b { font-size: 1.02rem; }
.profile-card p { font-size: .8rem; color: var(--muted); }
.strip {
  margin: 0 16px 14px; background: #FFF0E4; border-radius: 14px;
  padding: 10px 14px; font-size: .82rem; font-weight: 700; color: var(--primary-dark);
  display: flex; align-items: center; gap: 8px;
}
.meme-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 16px 14px; padding: 14px; }
.meme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.meme-cell {
  position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 1;
  background: linear-gradient(150deg, #FFE3CF, #FFD2B8);
  display: grid; place-items: center; font-size: 2.1rem;
}
.meme-cell span {
  position: absolute; bottom: 0; left: 0; right: 0; text-align: center;
  background: rgba(0,0,0,.45); color: #fff; font-size: .68rem; font-weight: 800; padding: 3px 2px;
}
.card-foot { display: flex; align-items: center; justify-content: space-between; }
.card-foot b { font-size: .98rem; }
.card-foot p { font-size: .78rem; color: var(--muted); }
.hscroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.v-card {
  flex: 0 0 128px; border-radius: 14px; overflow: hidden; background: var(--bg-soft, #FDF1E3);
  border: 1px solid var(--line);
}
.v-card .vt { height: 96px; display: grid; place-items: center; font-size: 2.4rem; background: linear-gradient(150deg, #E4F1EA, #D3E9DD); }
.v-card .vb { padding: 8px 10px 10px; }
.v-card b { font-size: .8rem; display: block; }
.v-card span { font-size: .68rem; color: var(--muted); }

/* ===== 定制頁 ===== */
.stepper { display: flex; align-items: center; padding: 16px 24px 6px; }
.stepper .st { flex: 1; text-align: center; position: relative; }
.stepper .st::before, .stepper .st::after {
  content: ""; position: absolute; top: 15px; height: 3px; background: var(--line); width: 50%;
}
.stepper .st::before { left: 0; } .stepper .st::after { right: 0; }
.stepper .st:first-child::before, .stepper .st:last-child::after { display: none; }
.stepper .dot {
  width: 32px; height: 32px; border-radius: 999px; background: #fff; border: 3px solid var(--line);
  display: grid; place-items: center; margin: 0 auto 4px; font-weight: 800; position: relative; z-index: 1;
  color: var(--muted); font-size: .85rem;
}
.stepper .st.on .dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.stepper .st.done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.stepper .label { font-size: .72rem; font-weight: 700; color: var(--muted); }
.stepper .st.on .label { color: var(--primary-dark); }
.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 16px 16px; padding: 18px 16px; }
.panel h3 { font-size: 1.02rem; margin-bottom: 12px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { padding: 7px 15px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .82rem; font-weight: 700; cursor: pointer; }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pick { border: 2px solid var(--line); border-radius: 14px; padding: 12px 8px; text-align: center; cursor: pointer; background: #fff; }
.pick.on { border-color: var(--primary); background: var(--primary-soft); }
.pick .ic { font-size: 1.9rem; display: block; }
.pick b { font-size: .76rem; display: block; margin-top: 4px; }
.pick span { font-size: .72rem; color: #FF4D2E; font-weight: 800; }
.upload-zone {
  border: 2.5px dashed var(--primary); background: var(--primary-soft);
  border-radius: var(--radius); padding: 34px 16px; text-align: center; cursor: pointer;
}
.upload-zone .ic { font-size: 2.6rem; }
.upload-zone p { color: var(--primary-dark); font-weight: 800; margin-top: 6px; font-size: .95rem; }
.upload-zone small { color: var(--muted); font-size: .78rem; }
.check-list { list-style: none; margin-top: 12px; font-size: .85rem; }
.check-list li { padding: 5px 0; display: flex; gap: 8px; }
.preview-art {
  background: linear-gradient(150deg, #FFE3CF, #FFD2B8); border-radius: var(--radius);
  height: 220px; display: grid; place-items: center; font-size: 4.4rem; margin-bottom: 14px;
}
.notice { background: var(--green-soft); border-radius: 12px; padding: 10px 14px; font-size: .8rem; color: #3E7D5F; margin-top: 12px; }

/* ===== 我的頁 ===== */
.me-head { background: linear-gradient(160deg, #FF8A50, #FF6E3C); padding: 24px 18px 40px; color: #fff; display: flex; align-items: center; gap: 14px; }
.me-head .ava { width: 60px; height: 60px; border-radius: 999px; background: rgba(255,255,255,.9); display: grid; place-items: center; font-size: 1.9rem; }
.me-head b { font-size: 1.1rem; display: block; }
.me-head p { font-size: .78rem; opacity: .9; }
.order-strip {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  margin: -26px 16px 14px; padding: 16px 8px 12px;
}
.order-strip .os-title { display: flex; justify-content: space-between; padding: 0 10px; font-weight: 800; font-size: .92rem; margin-bottom: 10px; }
.order-strip .os-title span { color: var(--muted); font-size: .78rem; font-weight: 700; }
.os-grid { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.os-grid .cell { position: relative; font-size: .72rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.os-grid .cell .ic { font-size: 1.5rem; display: block; margin-bottom: 3px; }
.os-grid .cell .n {
  position: absolute; top: -6px; right: 14px; background: #FF4D2E; color: #fff;
  font-size: .62rem; border-radius: 999px; padding: 1px 6px; font-weight: 800;
}
.menu-list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 16px 14px; overflow: hidden; }
.menu-list a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; font-size: .92rem; font-weight: 600; border-bottom: 1px solid #FBF3EA; }
.menu-list a:last-child { border-bottom: none; }
.menu-list a .arr { margin-left: auto; color: #D8C4B2; }
.status { display: inline-block; font-size: .68rem; font-weight: 800; border-radius: 999px; padding: 3px 10px; }
.s-pay { background: #FDEBD3; color: #B07B1E; }
.s-make { background: #E3EDFB; color: #3F6BB0; }
.s-ship { background: var(--primary-soft); color: var(--primary-dark); }
.s-done { background: var(--green-soft); color: #3E7D5F; }
.order-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 16px 12px; padding: 14px 16px; }
.order-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.order-top .no { font-size: .74rem; color: var(--muted); font-weight: 700; }
.order-line { display: flex; align-items: center; gap: 12px; }
.order-line .thumb-s { width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center; font-size: 1.5rem; background: var(--bg-soft, #FDF1E3); flex-shrink: 0; }
.order-line .info { flex: 1; }
.order-line .info b { font-size: .88rem; }
.order-line .info p { font-size: .74rem; color: var(--muted); }

/* ===== 表單 / 客服 ===== */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: .84rem; margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px;
  font-size: .9rem; font-family: inherit; background: #FDFBF8; color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); }
.contact-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 16px 14px; padding: 18px 16px; }
.contact-card h3 { font-size: .98rem; margin-bottom: 6px; }
.contact-card p { color: var(--muted); font-size: .84rem; }

@media (min-width: 431px) {
  body { padding: 24px 0; }
  .phone { border-radius: 36px; overflow: hidden; min-height: auto; }
  .tabbar { border-radius: 0 0 36px 36px; max-width: 430px; }
}

/* ===== 應用版新增 ===== */
.mini-select {
  border: none; background: #fff; border-radius: 999px; box-shadow: var(--shadow);
  font-size: .72rem; font-weight: 800; padding: 7px 6px; color: var(--ink); max-width: 74px;
  font-family: inherit; cursor: pointer;
}
.meta { color: var(--muted); font-size: .78rem; }
#pm-toast {
  position: fixed; bottom: 110px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: rgba(50, 35, 25, .92); color: #fff; font-size: .86rem; font-weight: 700;
  padding: 10px 22px; border-radius: 999px; z-index: 200; opacity: 0; pointer-events: none;
  transition: .25s; max-width: 320px; text-align: center;
}
#pm-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.sheet { z-index: 150; }
.sheet .meta { margin-bottom: 12px; }
.sheet input { border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px; width: 100%; font-size: .9rem; margin-bottom: 12px; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; font-size: .9rem; }
.empty .big { font-size: 2.6rem; display: block; margin-bottom: 8px; }
.come-soon { position: absolute; inset: 0; background: rgba(255,255,255,.55); display: grid; place-items: center; font-weight: 800; color: var(--primary-dark); font-size: .85rem; border-radius: 12px; }
.preview-shot { width: 100%; border-radius: 14px; object-fit: cover; max-height: 220px; }
