/* 寄售帳篷頁（tents.html）。共用的頁首、頁尾、按鈕在 styles.css。 */

.tents-page #main { outline: none; }
.tents-page .site-footer { margin-top: clamp(88px, 10vw, 140px); }
.tents-page.has-tent-bar .footer-inner { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.nav-wide a.is-current { text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1px; }
.nav-mobile a.is-current { text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1px; }
.tents-page button, .tents-page select { font: inherit; color: inherit; }
.tents-page :focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }

.demo-note { margin: 0; padding: 9px 20px; background: var(--card); font-size: 12.5px; line-height: 1.6; letter-spacing: 0.06em; text-align: center; }

/* ---------- Shared bits ---------- */
.tl-crumbs { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; letter-spacing: 0.1em; color: var(--muted); }
.tl-crumbs a { color: var(--muted); text-decoration: none; }
.tl-crumbs a:hover { color: var(--rust); }
.tl-crumbs [aria-current] { color: var(--ink); }
.tl-h1 { margin: clamp(28px, 4vw, 48px) 0 0; outline: none; font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 4.6vw, 64px); line-height: 1.3; letter-spacing: 0.03em; }
.tl-loading { padding-top: clamp(36px, 5vw, 72px); }
.tl-loading-msg { margin-top: 24px; color: var(--muted); }
.tl-h2-small { margin: 0; font-size: 14px; font-weight: 500; letter-spacing: 0.16em; }
.tl-sync { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: 0.06em; color: var(--muted); }
.tl-sync .dot { background: var(--open); }
.tl-demo { flex: none; white-space: nowrap; font-family: var(--sans); font-size: 11px; letter-spacing: 0.1em; padding: 0 5px; border: 1px solid rgba(29, 28, 26, 0.28); color: var(--muted); }

/* ---------- List view ---------- */
.tl-list { padding-top: clamp(36px, 5vw, 72px); }
.tl-intro { margin-top: clamp(28px, 4vw, 48px); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 64px; }
.tl-intro .tl-h1 { margin: 0; }
.tl-intro-side { flex: 0 1 460px; display: flex; flex-direction: column; gap: 14px; padding-bottom: 6px; }
.tl-intro-side .body-16 { text-wrap: pretty; }

.tl-tabs { margin-top: clamp(36px, 4.5vw, 56px); display: flex; gap: 4px 28px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; border-bottom: 1px solid rgba(29, 28, 26, 0.14); }
.tl-tabs::-webkit-scrollbar { display: none; }
.tl-tab { flex: none; display: flex; align-items: baseline; gap: 8px; padding: 14px 0 13px; margin-bottom: -1px; background: none; border: 0; border-bottom: 2px solid transparent; font-family: Jost, "Noto Sans TC", sans-serif; font-size: 15px; letter-spacing: 0.06em; color: var(--muted) !important; cursor: pointer; }
.tl-tab:hover, .tl-tab[aria-pressed="true"] { color: var(--ink) !important; }
.tl-tab[aria-pressed="true"] { border-bottom-color: var(--ink); }
.tl-tab-count { font-size: 12.5px; color: var(--muted); }

.tl-tools { padding-top: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.tl-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-toggle { height: 36px; padding: 0 14px; border: 1px solid rgba(29, 28, 26, 0.3); background: transparent; color: var(--ink) !important; font-size: 13.5px; letter-spacing: 0.08em; white-space: nowrap; cursor: pointer; }
.tl-toggle:hover { border-color: var(--ink); }
.tl-toggle[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper) !important; }
.tl-tools-right { display: flex; align-items: center; gap: 20px; }
.tl-count { margin: 0; font-size: 14px; letter-spacing: 0.08em; white-space: nowrap; }
.tl-count span { font-family: var(--latin); font-size: 19px; letter-spacing: 0.02em; }
.tl-sort { display: flex; align-items: center; gap: 10px; font-size: 13.5px; letter-spacing: 0.06em; color: var(--muted); white-space: nowrap; }
.tl-sort select { height: 40px; padding: 0 10px; border: 1px solid rgba(29, 28, 26, 0.3); border-radius: 0; background: var(--paper); color: var(--ink) !important; font-size: 14px; letter-spacing: 0.04em; cursor: pointer; }

.tl-grid { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 272px), 1fr)); gap: 52px 24px; }
.tl-grid.is-related { margin-top: 28px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 44px 24px; }
.tl-grid > li { min-width: 0; }
.tl-card { display: flex; flex-direction: column; gap: 14px; color: var(--ink); text-decoration: none; }
.is-related .tl-card { gap: 12px; }
.tl-card:hover { color: var(--rust); }
.tl-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.tl-media img { width: 100%; height: 100%; object-fit: cover; }
.tl-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12.5px; letter-spacing: 0.16em; }
.tl-badge-presale { position: absolute; right: 10px; top: 10px; padding: 3px 8px; background: var(--rust); color: var(--paper); font-size: 12px; letter-spacing: 0.1em; white-space: nowrap; }
.tl-badge-hold { position: absolute; left: 10px; top: 10px; padding: 3px 8px; background: var(--ink); color: var(--paper); font-size: 12px; letter-spacing: 0.1em; white-space: nowrap; }
.tl-badge-video { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px; background: var(--paper); color: var(--ink); font-size: 12px; letter-spacing: 0.1em; white-space: nowrap; }
.tl-tri { width: 0; height: 0; border-left: 7px solid var(--ink); border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; }
.tl-names { display: flex; flex-direction: column; gap: 5px; }
.is-related .tl-names { gap: 4px; }
.tl-brand { font-family: Jost, "Noto Sans TC", sans-serif; font-size: 11.5px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.tl-name { font-size: 16.5px; line-height: 1.5; letter-spacing: 0.04em; }
.is-related .tl-name { font-size: 15.5px; }
.tl-sub { font-size: 13px; letter-spacing: 0.06em; color: var(--muted); }
.tl-mini { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid rgba(29, 28, 26, 0.14); border-bottom: 1px solid rgba(29, 28, 26, 0.14); }
.tl-mini > div { padding: 10px 0 11px; display: flex; flex-direction: column; gap: 3px; }
.tl-mini dt { font-size: 12px; letter-spacing: 0.1em; color: var(--muted); }
.tl-mini dd { margin: 0; font-size: 14.5px; letter-spacing: 0.05em; color: var(--ink); }
.tl-mini dd.is-warn { color: var(--rust); }
.tl-mini dd.is-mute { color: var(--muted); }
.tl-price { display: flex; align-items: center; gap: 8px; font-family: Jost, "Noto Sans TC", sans-serif; font-size: 17px; letter-spacing: 0.02em; color: var(--ink); }
.is-related .tl-price { margin-top: 2px; font-size: 16px; }

.tl-empty { padding: 24px 0 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.tl-empty-title { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 24px; letter-spacing: 0.05em; }
.tl-empty-text { margin: 0; font-size: 15.5px; line-height: 1.9; letter-spacing: 0.05em; color: var(--muted); }
.tl-row { display: flex; flex-wrap: wrap; gap: 12px; }
.tl-btn-outline { height: 48px; padding: 0 22px; border: 1px solid var(--ink); background: transparent; font-size: 14.5px; letter-spacing: 0.1em; cursor: pointer; }
.tl-btn-outline:hover { background: var(--ink); color: var(--paper) !important; }
.tl-btn-solid-sm { display: inline-flex; align-items: center; height: 48px; padding: 0 22px; background: var(--ink); color: var(--paper); text-decoration: none; font-size: 14.5px; letter-spacing: 0.1em; }
.tl-btn-solid-sm:hover { background: var(--rust); color: var(--paper); }

.tl-sold { margin-top: clamp(72px, 9vw, 120px); padding-top: 24px; border-top: 1px solid rgba(29, 28, 26, 0.18); display: flex; flex-wrap: wrap; gap: 20px 48px; }
.tl-sold-head { flex: 1 1 240px; display: flex; flex-direction: column; gap: 10px; }
.tl-sold-head p { margin: 0; font-size: 14px; line-height: 1.9; letter-spacing: 0.05em; color: var(--muted); }
.tl-sold ul { flex: 999 1 520px; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 0 32px; }
.tl-sold li { border-top: 1px solid rgba(29, 28, 26, 0.14); }
.tl-sold a { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px 0; color: var(--ink); text-decoration: none; }
.tl-sold a:hover { color: var(--rust); }
.tl-sold-thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #cfcbc2; }
.tl-sold-thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); opacity: 0.8; }
.tl-sold-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tl-sold-text span:first-child { font-size: 15px; line-height: 1.5; letter-spacing: 0.04em; }
.tl-sold-text span:last-child { font-size: 12.5px; letter-spacing: 0.08em; color: var(--muted); }

.tl-consign { margin-top: clamp(88px, 11vw, 150px); }
.tl-consign-card { background: var(--card); display: flex; flex-wrap: wrap; align-items: stretch; }
.tl-consign-img { flex: 1 1 360px; min-height: 280px; position: relative; overflow: hidden; background: #1d2433; }
.tl-consign-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 55%; }
.tl-consign-body { flex: 1 1 420px; padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; gap: 22px; }
.tl-consign-body h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 2.8vw, 38px); line-height: 1.45; letter-spacing: 0.04em; font-feature-settings: "palt" 1; }
.tl-consign-body p { margin: 0; max-width: 520px; font-size: 16px; line-height: 1.95; letter-spacing: 0.05em; text-wrap: pretty; }
.tl-consign-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.tl-consign-ctas .btn-solid { letter-spacing: 0.1em; }

/* ---------- Detail view ---------- */
.td-page { padding-top: clamp(24px, 3.5vw, 44px); }
.td-row { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px clamp(40px, 5vw, 80px); }
.td-left { flex: 1.4 1 520px; min-width: 0; display: flex; flex-direction: column; gap: clamp(48px, 6vw, 72px); }
.td-gallery { display: flex; flex-direction: column; gap: 10px; }
.td-main { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.td-main img { width: 100%; height: 100%; object-fit: cover; }
.td-slot { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.td-slot-label { font-family: var(--serif); font-weight: 500; font-size: clamp(18px, 2vw, 24px); letter-spacing: 0.12em; }
.td-slot-sub { font-size: 12.5px; letter-spacing: 0.14em; }
.td-badge { position: absolute; left: 16px; top: 16px; padding: 5px 10px; background: var(--paper); color: var(--ink); font-size: 13px; letter-spacing: 0.1em; white-space: nowrap; }
.td-pos { position: absolute; right: 14px; bottom: 12px; font-family: var(--latin); font-size: 13px; letter-spacing: 0.08em; }
.td-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.td-thumb { position: relative; aspect-ratio: 4 / 3; padding: 0; border: 0; overflow: hidden; cursor: pointer; opacity: 0.7; transition: opacity 0.2s ease; }
.td-thumb:hover, .td-thumb[aria-pressed="true"] { opacity: 1; }
.td-thumb[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink); }
.td-thumb img { width: 100%; height: 100%; object-fit: cover; }
.td-thumb-label { position: absolute; inset: 0; display: grid; place-items: center; padding: 4px; font-size: 11.5px; line-height: 1.4; letter-spacing: 0.06em; text-align: center; }

.td-video { display: flex; flex-direction: column; gap: 16px; }
.td-video-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; padding-top: 20px; border-top: 1px solid rgba(29, 28, 26, 0.18); }
.td-video-head a { font-size: 13.5px; letter-spacing: 0.06em; color: var(--ink); text-underline-offset: 4px; }
.td-video-head a:hover { color: var(--rust); }
.td-player { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink); }
.td-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.td-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: var(--ink); cursor: pointer; display: block; }
.td-play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.82; }
.td-play-btn { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; background: rgba(243, 240, 232, 0.94); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5); display: grid; place-items: center; }
.td-play-btn span { width: 0; height: 0; margin-left: 5px; border-left: 18px solid var(--ink); border-top: 11px solid transparent; border-bottom: 11px solid transparent; }

.td-right { flex: 1 1 340px; min-width: 0; position: sticky; top: 88px; display: flex; flex-direction: column; gap: 22px; }
.td-brand { margin: 0 0 10px; font-family: Jost, "Noto Sans TC", sans-serif; font-size: 12.5px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.td-h1 { margin: 0; outline: none; font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 3vw, 42px); line-height: 1.35; letter-spacing: 0.03em; }
.td-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-size: 13.5px; letter-spacing: 0.06em; }
.td-kind { flex: none; white-space: nowrap; padding: 3px 9px; border: 1px solid var(--rust); color: var(--rust); }
.td-state { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.td-state .muted { color: var(--muted); }
.td-price { margin: 0; display: flex; align-items: center; gap: 12px; font-family: Jost, "Noto Sans TC", sans-serif; font-size: 28px; letter-spacing: 0.02em; }
.td-price .tl-demo { font-size: 12px; padding: 1px 7px; border-color: rgba(29, 28, 26, 0.3); }
.td-presale-note { padding: 18px 20px; border-left: 3px solid var(--rust); background: var(--card); font-size: 15px; line-height: 1.9; letter-spacing: 0.05em; }
.td-sold-note { padding: 18px 20px; background: var(--card); font-size: 15px; line-height: 1.9; letter-spacing: 0.05em; }
.td-facts { margin: 0; border-top: 1px solid rgba(29, 28, 26, 0.14); }
.td-facts > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(29, 28, 26, 0.1); }
.td-facts dt { padding-top: 1px; font-size: 14px; letter-spacing: 0.08em; color: var(--muted); }
.td-facts dd { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.td-fact-v { display: flex; align-items: center; gap: 10px; font-size: 15.5px; letter-spacing: 0.05em; color: var(--ink); }
.td-fact-v.is-warn { color: var(--rust); }
.td-fact-v.is-mute { color: var(--muted); }
.td-swatch { width: 14px; height: 14px; flex: none; box-shadow: inset 0 0 0 1px rgba(29, 28, 26, 0.22); }
.td-items { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.td-items li { display: flex; gap: 10px; font-size: 14.5px; line-height: 1.75; letter-spacing: 0.04em; }
.td-items li::before { content: "–"; flex: none; color: var(--muted); }
.td-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.td-cta-main { flex: 1 1 220px; display: flex; align-items: center; justify-content: center; height: 52px; background: var(--ink); border: 1px solid var(--ink); color: var(--paper); text-decoration: none; font-size: 15px; font-weight: 500; letter-spacing: 0.12em; }
.td-cta-main:hover { background: var(--rust); border-color: var(--rust); color: var(--paper); }
.td-cta-sub { flex: 1 1 160px; display: flex; align-items: center; justify-content: center; height: 52px; border: 1px solid var(--ink); color: var(--ink); text-decoration: none; font-size: 15px; letter-spacing: 0.1em; }
.td-cta-sub:hover { background: var(--ink); color: var(--paper); }
.td-store { display: flex; flex-direction: column; gap: 10px; padding: 18px 0; border-top: 1px solid rgba(29, 28, 26, 0.14); border-bottom: 1px solid rgba(29, 28, 26, 0.14); font-size: 14px; letter-spacing: 0.05em; }
.td-store p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.td-store .muted { color: var(--muted); }
.td-sku { font-family: var(--latin); font-size: 15px; letter-spacing: 0.08em; color: var(--ink); }
.td-copy { padding: 0; background: none; border: 0; font-size: 13px; letter-spacing: 0.06em; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.td-note { margin: 0; font-size: 12.5px; line-height: 1.85; letter-spacing: 0.04em; color: var(--muted); }

.td-related { margin-top: clamp(88px, 10vw, 140px); }
.td-related-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; padding-top: 24px; border-top: 1px solid rgba(29, 28, 26, 0.18); }
.td-related-head a { font-size: 14px; letter-spacing: 0.08em; text-underline-offset: 6px; text-decoration-thickness: 1px; }

.td-missing { padding-top: clamp(56px, 8vw, 112px); display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.td-missing h1 { margin: 0; outline: none; font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.4; letter-spacing: 0.04em; }
.td-missing p { max-width: 520px; color: var(--muted); }

.tent-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(243, 240, 232, 0.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid rgba(29, 28, 26, 0.12); }
.tent-bar .td-cta-main { flex: 1; height: 50px; letter-spacing: 0.1em; }
.tent-bar .td-cta-sub { flex: none; height: 50px; padding: 0 18px; white-space: nowrap; }

/* 窄螢幕：詳情頁 CTA 移到底部固定列 */
@media (max-width: 759.98px) {
  .td-ctas { display: none; }
  .td-right { position: static; }
}
@media (min-width: 760px) {
  .tent-bar { display: none !important; }
  .tents-page.has-tent-bar .footer-inner { padding-bottom: 32px; }
}

/* 清單／詳情載入前先佔一個畫面高，頁尾才不會先出現在畫面裡再被推走（版面跳動） */
#tents-app > .tl-loading { min-height: 100vh; }
