/* 泰冠通官網預覽 — 網頁版市集結構（參考淘寶／旋轉拍賣網站資訊架構，非 App）。顏色為黑／啡／金。 */
:root {
  color-scheme: dark;
  --bg: #241c18;
  --bg-deep: #1a1411;
  --panel: #332720;
  --card: #3c2e25;
  --gold: #d1a66a;
  --gold-2: #e5b875;
  --text: #fff4e5;
  --muted: #c1ad96;
  --line: #584333;
  --button-ink: #20170e;
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --max: 1280px;
  --sidebar-w: 220px;
  --promo-w: 228px;
  --stage-h: 360px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg-deep); }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  min-width: 0;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .16em; }
p, h1, h2, h3, h4 { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.skip {
  position: absolute; left: .6rem; top: .6rem; z-index: 80;
  background: var(--bg); color: var(--gold); padding: .4rem .7rem;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* Status strip */
.status-strip {
  background: #3a2a20;
  border-bottom: 1px solid var(--line);
  color: #e2c39b;
  font-size: 12px;
  line-height: 1.5;
  padding: 8px 16px;
  text-align: center;
}
.status-strip strong { color: #ffe2b6; font-weight: 700; }

/* Website header: logo | dominant search | cart + login; slim links underneath */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(26, 20, 17, .97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-main { padding: 10px 0 8px; }
.header-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none; min-width: 0;
}
.brand:hover { text-decoration: none; }
.brand img { width: 48px; height: 48px; object-fit: contain; flex: none; }
.brand-name {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: .18em;
  color: #efd5aa;
  font-weight: 700;
  line-height: 1.1;
}
.brand-en {
  display: block;
  font-family: var(--font);
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--gold);
  margin-top: 3px;
}
.header-search {
  display: flex;
  min-width: 0;
  width: 100%;
  border: 2px solid #c49a62;
  border-radius: 8px;
  background: #2b211c;
  overflow: hidden;
}
.header-search input {
  flex: 1; min-width: 0; border: 0; background: transparent;
  padding: 10px 16px; min-height: 46px; color: var(--text); font-size: 16px;
}
.header-search input::placeholder { color: var(--muted); }
.header-search button {
  flex: none;
  padding: 0 26px;
  background: linear-gradient(110deg, #d6b178, #ad7f46);
  color: var(--button-ink);
  font-weight: 700;
  font-size: 16px;
  min-height: 46px;
  letter-spacing: .06em;
}
.header-tools {
  display: flex; align-items: center; gap: 4px 10px; flex: none;
}
.tool-link, .icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--text); text-decoration: none;
  min-height: 40px;
  padding: 0 8px;
  border-radius: 8px;
  position: relative;
  font-size: 14px;
  white-space: nowrap;
}
.tool-link:hover, .icon-btn:hover { text-decoration: none; color: var(--gold); }
.icon-btn { width: 40px; padding: 0; }
.icon-btn svg, .menu-toggle svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.cart-count {
  position: absolute; top: 2px; right: 0;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--gold); color: var(--button-ink);
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  display: none;
}
.cart-count.is-on { display: block; }
.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; color: var(--gold);
}

/* Slim text links under the search — website menu, not a tab bar */
.header-sub {
  border-top: 1px solid var(--line);
  background: #16110e;
}
.header-sub-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: auto;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.desktop-nav {
  display: none;
  align-items: center;
  gap: 4px 28px;
}
.desktop-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
  padding: 10px 0;
}
.desktop-nav a:hover,
.desktop-nav a[aria-current="page"] { color: var(--gold); }

.site-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
  padding: 8px 16px 16px;
}
.site-menu.is-open { display: block; }
.site-menu a {
  display: block;
  color: var(--text);
  text-decoration: none;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}
.site-menu a[aria-current="page"] { color: var(--gold); }

/* Compact sticky bar on scroll: logo + search + cart + login */
.site-header.is-compact .header-main { padding: 6px 0; }
.site-header.is-compact .brand img { width: 36px; height: 36px; }
.site-header.is-compact .brand-name { font-size: 20px; letter-spacing: .12em; }
.site-header.is-compact .brand-en { display: none; }
.site-header.is-compact .header-search input,
.site-header.is-compact .header-search button { min-height: 40px; }
.site-header.is-compact .header-sub { display: none; }

/* Layout */
.wrap { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }
.page-main { padding: 20px 0 48px; }

/* Multi-panel marketplace stage (Taobao-style billboard, not a full-bleed App hero) */
.marketplace-stage {
  width: min(var(--max), calc(100% - 2rem));
  margin: 16px auto 28px;
  display: grid;
  gap: 12px;
  align-items: stretch;
  position: relative;
}
.cat-drawer-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 14px;
  min-height: 44px;
  font-weight: 700;
  font-size: 14px;
}
.cat-drawer-toggle span { color: var(--gold); font-weight: 500; }

.cat-sidebar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: visible;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  z-index: 4;
}
.cat-sidebar-head {
  padding: 11px 14px;
  font-weight: 700;
  color: var(--gold);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  letter-spacing: .06em;
}
.cat-sidebar-list { list-style: none; margin: 0; padding: 4px 0; flex: 1; }
.cat-sidebar-list > li { position: static; }
.cat-row-line { display: flex; align-items: stretch; }
.cat-expand {
  display: none;
  flex: none;
  width: 44px;
  color: var(--muted);
  font-size: 18px;
  align-items: center;
  justify-content: center;
  border-left: 1px solid #58433355;
}
.cat-expand[aria-expanded="true"] { color: var(--gold); }
.cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 14px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.35;
  border-bottom: 1px solid #58433355;
}
.cat-sidebar-list > li:last-child .cat-row { border-bottom: 0; }
.cat-row:hover,
.cat-row:focus-visible,
.cat-sidebar-list > li.is-open > .cat-row,
.cat-sidebar-list > li:hover > .cat-row {
  text-decoration: none;
  color: var(--gold);
  background: #2b211c;
}
.cat-row .chev { color: var(--muted); font-size: 16px; line-height: 1; }
.cat-flyout {
  display: none;
  position: absolute;
  left: calc(100% - 2px);
  top: 0;
  bottom: 0;
  min-width: 260px;
  width: max-content;
  max-width: 420px;
  background: #1e1713;
  border: 1px solid var(--line);
  box-shadow: 8px 8px 28px #0008;
  z-index: 30;
  padding: 12px 8px;
}
.cat-sidebar-list > li:hover > .cat-flyout,
.cat-sidebar-list > li:focus-within > .cat-flyout,
.cat-sidebar-list > li.is-open > .cat-flyout { display: block; }
.cat-flyout-title {
  font-size: 12px;
  color: var(--gold);
  padding: 4px 12px 8px;
  letter-spacing: .04em;
}
.cat-flyout-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
}
.cat-flyout a {
  display: block;
  width: 50%;
  min-width: 8em;
  flex: 1 1 46%;
  padding: 7px 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  border-radius: 4px;
}
.cat-flyout a:hover { background: #332720; color: var(--gold); text-decoration: none; }

/* Center campaign carousel */
.store-carousel {
  position: relative;
  overflow: hidden;
  z-index: 1;
  background: #211914;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 240px;
}
.hero-viewport {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  align-items: stretch;
  height: 100%;
}
.hero-viewport::-webkit-scrollbar { display: none; }
.hero-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  isolation: isolate;
  min-height: 240px;
  display: flex;
  align-items: center;
  padding: 28px 48px 48px 28px;
  background:
    radial-gradient(ellipse at 85% 40%, #8f6541, transparent 58%),
    linear-gradient(120deg, #211914, #563726);
}
.hero-merit { background: radial-gradient(ellipse at 90% 10%, #a27c3e66, transparent 62%), linear-gradient(120deg, #211914, #4a3324); }
.hero-recycle { background: radial-gradient(ellipse at 90% 10%, #8a684455, transparent 62%), linear-gradient(120deg, #211914, #3d2a22); }
.hero-temple { background: radial-gradient(ellipse at 90% 10%, #a7553455, transparent 62%), linear-gradient(120deg, #211914, #4a2a22); }
.hero-slide .hero-inner {
  position: relative;
  z-index: 1;
  max-width: 28em;
}
.hero-kicker {
  font-size: 11px; letter-spacing: .18em; color: var(--gold); margin-bottom: 8px;
}
.hero-slide h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.8vw, 2.15rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 10px;
}
.hero-slide p {
  color: #e0c5a0;
  font-size: 15px;
  margin: 0 0 20px;
  max-width: 28em;
}
.hero-symbol {
  position: absolute; right: 8%; top: 50%; transform: translateY(-50%);
  font-size: 140px; line-height: 1; color: #d7a96c; opacity: .12;
  pointer-events: none; z-index: 0;
}
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 36px; height: 48px; min-width: 36px;
  background: #1a1411cc;
  color: var(--gold);
  border-radius: 4px;
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
}
.hero-arrow[data-action="hero-prev"] { left: 8px; }
.hero-arrow[data-action="hero-next"] { right: 8px; }
.hero-arrow:hover { background: #1a1411; }
.hero-controls {
  position: absolute; left: 0; right: 0; bottom: 10px;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  z-index: 2;
}
.hero-pause, .hero-dot {
  background: transparent; color: var(--gold);
  height: 36px; min-width: 28px; border-radius: 8px;
}
.hero-dots { display: flex; align-items: center; }
.hero-dot { min-width: 24px; display: flex; align-items: center; justify-content: center; }
.hero-dot span { width: 8px; height: 8px; border-radius: 50%; background: #c6a37c66; display: block; }
.hero-dot[aria-pressed="true"] span { width: 22px; border-radius: 10px; background: #e5bc7b; }
.hero-pause { font-size: 13px; min-width: 36px; opacity: .85; }
@media (prefers-reduced-motion: reduce) { .hero-viewport { scroll-behavior: auto; } }

/* Right-hand compact service tiles (Taobao side promos, not a second full-width section) */
.side-promos {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.side-promo {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  color: inherit;
  text-decoration: none;
  min-height: 0;
}
.side-promo:hover { text-decoration: none; border-color: var(--gold); }
.side-promo .kicker { color: var(--gold); font-size: 11px; letter-spacing: .06em; margin-bottom: 4px; }
.side-promo h3 { font-family: var(--serif); font-size: 17px; margin-bottom: 4px; color: #efd5aa; }
.side-promo p { color: var(--muted); font-size: 12px; line-height: 1.45; }

.primary, .btn-gold {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(110deg, #d6b178, #ad7f46);
  color: var(--button-ink); font-weight: 700;
  padding: 11px 20px; border-radius: 8px; min-height: 44px;
  text-decoration: none;
}
.primary:hover, .btn-gold:hover { text-decoration: none; }
.secondary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  background: #493628; border: 1px solid #83613e; color: #f0d4ac;
  padding: 10px 16px; border-radius: 8px; min-height: 44px;
  text-decoration: none;
}
.secondary:hover, .btn-ghost:hover { text-decoration: none; }
.link { color: var(--gold); background: none; padding: 8px 0; font-size: 14px; }
.btn-gold.is-disabled, .btn-gold:disabled, .primary.is-disabled { opacity: .55; cursor: not-allowed; }

/* Carousell-style illustrated category entry row */
.find-row { margin: 0 0 32px; }
.find-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.find-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  text-align: center;
}
.find-item:hover { text-decoration: none; border-color: var(--gold); }
.find-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #2b211c;
  border: 1px solid var(--line);
  color: var(--gold);
}
.find-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.find-item span.label { font-size: 13px; color: var(--text); line-height: 1.35; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin: 8px 0 14px;
}
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  padding-left: 12px;
  border-left: 3px solid var(--gold);
}
.page-title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 16px;
}
.split { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 14px; }
.subtle { color: var(--muted); font-size: 14px; }

/* Product grid — dense marketplace cards, square photos */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.card {
  display: flex; flex-direction: column;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  color: inherit; text-decoration: none;
}
.card:hover { text-decoration: none; border-color: #8a6844; }
.card-photo, .product-photo, .picture-placeholder {
  width: 100%; aspect-ratio: 1 / 1; height: auto;
  object-fit: cover; object-position: center top;
  background: #2b211c; display: block;
}
.picture-placeholder { display: grid; place-items: center; color: var(--muted); aspect-ratio: 1 / 1; }
.card-info { padding: 9px 10px 11px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.meta { font-size: 12px; color: var(--muted); }
.card h3 {
  font-size: 13px; font-weight: 600; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.8em;
}
.price { color: var(--gold-2); font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: auto; }
.status {
  display: inline-block; font-size: 11px;
  border: 1px solid #8a6d49; border-radius: 16px;
  padding: 1px 8px; color: #eacb9f;
}
.badge-charity { margin-left: 4px; }

/* Shop listings toolbar (Carousell-style filters + count) */
.shop-heading {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 8px 16px; margin: 0 0 14px;
}
.shop-heading h1 {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  margin: 0;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}
.filter-row label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.filter-row select {
  width: auto;
  min-width: 9.5em;
  background: #382b23;
  border: 1px solid #75573e;
  color: var(--text);
  border-radius: 999px;
  padding: 8px 28px 8px 14px;
  min-height: 40px;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%23c1ad96' stroke-width='1.6' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.search {
  display: flex; gap: 8px; margin-bottom: 14px;
}
.search input {
  flex: 1; min-width: 0; border-radius: 8px; background: #2b211c;
  border: 1px solid #75573e; padding: 11px 16px; min-height: 44px;
}
.search input::placeholder { color: #b6a28c; }
.filters { display: grid; gap: 12px; margin: 0 0 8px; }
label { display: block; margin: 0 0 6px; font-size: 13px; color: var(--muted); }
select, textarea, .form-grid input {
  width: 100%; background: #382b23; border: 1px solid #75573e; color: var(--text);
  border-radius: 8px; padding: 10px 12px; min-height: 44px;
}

.pagination {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  margin: 24px 0 8px;
}
.pagination a, .pagination button, .pagination span {
  min-width: 40px; min-height: 40px; padding: 0 10px;
  border: 1px solid #83613e; border-radius: 8px; background: #493628; color: #f0d4ac;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  font-size: 14px;
}
.pagination a:hover { text-decoration: none; color: var(--gold); }
.pagination [aria-current="page"] {
  background: linear-gradient(110deg, #d6b178, #ad7f46);
  border-color: transparent; color: var(--button-ink); font-weight: 700;
}
.pagination .is-disabled { opacity: .4; pointer-events: none; }
.empty { text-align: center; color: var(--muted); padding: 3rem 1rem; }

/* Detail / cart / forms */
.crumb { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.crumb a { color: var(--muted); }
.detail { display: grid; gap: 20px; }
.gallery-main {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; min-height: 280px; display: grid; place-items: center;
}
.gallery-main img { width: 100%; max-height: 520px; object-fit: contain; background: #2b211c; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; }
.thumbs button {
  flex: none; width: 64px; height: 86px; padding: 0;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel);
}
.thumbs button.is-on { border-color: var(--gold); }
.thumbs img { width: 64px; height: 86px; object-fit: cover; }
.detail-info h1 { font-family: var(--serif); font-size: clamp(1.4rem, 2.5vw, 1.9rem); margin: 8px 0 10px; }
.detail-price { font-size: 28px; margin: 4px 0 10px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.note, .record, .panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; margin: 0 0 14px; color: var(--muted); font-size: 14px;
}
.description { white-space: pre-wrap; color: var(--muted); overflow-wrap: anywhere; }
.pid { color: var(--muted); font-size: 12px; margin-top: 14px; word-break: break-all; }
.incomplete-tag {
  display: inline-block; border: 1px solid #8d6b45; color: var(--gold);
  border-radius: 999px; padding: 3px 10px; font-size: 12px; margin-bottom: 8px;
}
.cart-line { display: grid; grid-template-columns: 80px 1fr auto; gap: 14px; align-items: center; }
.cart-line img { width: 80px; height: 110px; object-fit: cover; border-radius: 8px; background: #2b211c; }
.cart-line h2 { font-size: 16px; color: var(--text); }
.cart-sum { font-size: 24px; color: var(--gold-2); font-weight: 700; }
.form-grid { display: grid; gap: 8px; margin: 12px 0; }
.form-grid label { color: var(--muted); }

.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
  padding: 36px 0 28px;
  color: var(--muted);
  font-size: 13px;
}
.footer-grid {
  width: min(var(--max), calc(100% - 2rem));
  margin: auto;
  display: grid;
  gap: 24px;
}
.site-footer h2, .site-footer h3 {
  font-family: var(--serif); color: #efd5aa; margin-bottom: 8px;
}
.site-footer h2 { font-size: 20px; letter-spacing: .12em; }
.site-footer h3 { font-size: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 6px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--gold); }
.footer-note { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; }

#toast {
  display: none; position: fixed; left: 50%; bottom: 1.4rem;
  transform: translateX(-50%); z-index: 70;
  background: var(--panel); color: var(--text); border: 1px solid var(--gold);
  padding: 10px 16px; border-radius: 10px; font-size: 14px;
  box-shadow: 0 8px 30px #0008; max-width: calc(100% - 2rem);
}

/* Mobile / tablet: still a website, not an App shell */
@media (max-width: 1099px) {
  .header-inner {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "brand tools"
      "search search";
  }
  .brand { grid-area: brand; }
  .header-search { grid-area: search; }
  .header-tools { grid-area: tools; justify-self: end; }
  .brand img { width: 40px; height: 40px; }
  .brand-name { font-size: 20px; letter-spacing: .12em; }
  .header-sub { display: none; }
  .header-search input, .header-search button { min-height: 44px; }

  .cat-drawer-toggle { display: flex; }
  .cat-expand { display: flex; }
  .cat-row .chev { display: none; }
  .cat-row { border-bottom: 0; }
  .cat-row-line { border-bottom: 1px solid #58433355; }

  .cat-sidebar {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 52px;
    z-index: 25;
    max-height: min(70vh, 520px);
    overflow: auto;
    box-shadow: 0 12px 32px #0008;
  }
  .cat-sidebar.is-open { display: flex; }
  .cat-flyout {
    position: static;
    display: none;
    min-width: 0;
    width: auto;
    max-width: none;
    box-shadow: none;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: #2b211c;
    padding: 4px 8px 10px 22px;
  }
  .cat-sidebar-list > li.is-open > .cat-flyout { display: block; }
  .cat-sidebar-list > li:hover > .cat-flyout { display: none; }
  .cat-sidebar-list > li.is-open:hover > .cat-flyout,
  .cat-sidebar-list > li.is-open > .cat-flyout { display: block; }
  .cat-flyout a { width: 50%; }

  .side-promos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .side-promo { padding: 12px 10px; }
  .side-promo h3 { font-size: 14px; }
  .side-promo p { display: none; }
  .hero-slide { padding: 28px 44px 52px 20px; min-height: 220px; }
  .hero-slide h2 { font-size: 1.55rem; }
}

@media (min-width: 600px) {
  .find-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
}
@media (min-width: 900px) {
  .grid, .grid-shop { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .grid-home { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filters { grid-template-columns: 1fr 1fr; }
  .detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
  .gallery-main img { height: 480px; max-height: none; }
}
@media (min-width: 1100px) {
  .desktop-nav { display: flex; }
  .menu-toggle, .site-menu, .cat-drawer-toggle { display: none !important; }
  .marketplace-stage {
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--promo-w);
    height: var(--stage-h);
    margin-top: 18px;
  }
  .cat-sidebar, .store-carousel, .side-promos { height: 100%; }
  .store-carousel { min-height: 0; }
  .hero-viewport, .hero-slide { height: 100%; min-height: 0; }
  .grid-home { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .grid-shop { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .grid-home { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

.hero-slide[style*="--hero-poster"] {
  background-image: linear-gradient(120deg, rgba(33,25,20,.78), rgba(33,25,20,.42)), var(--hero-poster);
  background-size: cover;
  background-position: center;
}

/* Homepage 跑廟 slide: video covers the billboard; poster remains as fallback underneath. */
.hero-video {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  background: #100c0a;
  container-type: size;
  pointer-events: none;
}
.hero-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 0;
  width: max(100cqw, calc(100cqh * 16 / 9));
  height: max(100cqh, calc(100cqw * 9 / 16));
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.hero-temple::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(18,13,10,.78) 0%, rgba(18,13,10,.38) 46%, rgba(18,13,10,.18) 100%);
}
.hero-temple .hero-inner { z-index: 2; }
.hero-temple .hero-symbol { display: none; }
.video-feature { margin: 0 0 8px; }
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #140f0c;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-feature h2 {
  font-family: "Noto Serif TC", serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 14px 0 4px;
  line-height: 1.45;
}
.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.video-card {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: inherit;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
}
.video-card:hover, .video-card.is-current {
  border-color: #8a6844;
  text-decoration: none;
}
.video-card.is-current { box-shadow: inset 0 0 0 1px #d1a66a; }
.video-thumb { display: block; background: #140f0c; }
.video-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.video-card-body { padding: 10px 10px 10px 0; display: flex; flex-direction: column; gap: 6px; }
.video-card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (min-width: 700px) {
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video-card { grid-template-columns: 1fr; }
  .video-card-body { padding: 10px 12px 14px; }
}
@media (min-width: 1100px) {
  .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
