:root {
  color-scheme: light dark;
  --bg: #f1f4f2;
  --surface: #e5ebe7;
  --surface-soft: #f7f9f7;
  --ink: #202624;
  --muted: #59635f;
  --line: #c2ccc7;
  --accent: #b94325;
  --accent-soft: #f2d4c9;
  --accent-ink: #fff9f5;
  --focus: #176b58;
  --shadow: 0 24px 54px rgba(59, 75, 67, 0.13);
  --radius: 22px;
  --control-radius: 999px;
  --max: 1380px;
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-synthesis: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151a18;
    --surface: #222a26;
    --surface-soft: #1b211e;
    --ink: #f0f4f1;
    --muted: #b7c2bc;
    --line: #4b5852;
    --accent: #f0805f;
    --accent-soft: #4b2a22;
    --accent-ink: #24100a;
    --focus: #7ee0c1;
    --shadow: 0 25px 56px rgba(4, 7, 5, 0.32);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--accent) var(--surface);
  scrollbar-width: thin;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

img {
  display: block;
  height: auto;
  max-width: 100%;
  background: var(--surface);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 12;
  padding: 10px 16px;
  border-radius: var(--control-radius);
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  width: min(calc(100% - 40px), var(--max));
  min-height: 76px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}

.wordmark {
  flex: 0 0 auto;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 900;
  letter-spacing: -0.018em;
  text-decoration: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.8vw, 42px);
  white-space: nowrap;
}

.main-nav a {
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
}

.main-nav a:not(.nav-contact):hover {
  color: var(--accent);
}

.nav-contact {
  padding: 9px 18px;
  border-radius: var(--control-radius);
  background: var(--ink);
  color: var(--bg);
}

.nav-contact:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

.hero,
.discover,
.product-section,
.scene-strip,
.contact-panel,
.detail-main {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
}

.hero {
  display: grid;
  min-height: calc(100dvh - 76px);
  grid-template-columns: minmax(0, 0.78fr) minmax(560px, 1.22fr);
  align-items: center;
  gap: clamp(42px, 7vw, 104px);
  padding: 44px 0 72px;
}

.hero__copy {
  max-width: 610px;
  padding-left: clamp(0px, 3vw, 48px);
}

.hero h1 {
  max-width: 7em;
  margin-bottom: 24px;
  font-size: clamp(3.5rem, 6.6vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero__summary {
  max-width: 28em;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.17rem);
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: var(--control-radius);
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1), background-color 160ms ease-out, color 160ms ease-out;
}

.button:active {
  transform: scale(0.98);
}

.button--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.button--primary:hover {
  background: color-mix(in srgb, var(--accent) 86%, var(--ink));
  transform: translateY(-2px);
}

.button--ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.button--ghost:hover {
  background: var(--surface);
}

.button--light {
  background: var(--ink);
  color: var(--bg);
}

.button--light:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.hero-stage {
  display: grid;
  height: min(660px, calc(100dvh - 140px));
  min-height: 520px;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 14px;
}

.hero-stage img,
.hero-stage__note {
  border-radius: var(--radius);
}

.hero-stage__main {
  width: 100%;
  height: 100%;
  grid-column: 1 / 6;
  grid-row: 1 / 8;
  object-fit: cover;
}

.hero-stage__small {
  width: 100%;
  height: 100%;
  grid-column: 6 / 9;
  grid-row: 1 / 4;
  object-fit: cover;
}

.hero-stage__note {
  display: flex;
  grid-column: 6 / 9;
  grid-row: 4 / 8;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(22px, 3vw, 36px);
  background: var(--accent);
  color: var(--accent-ink);
}

.hero-stage__note strong {
  margin-bottom: 10px;
  font-size: clamp(1.6rem, 2.5vw, 2.6rem);
  letter-spacing: -0.04em;
}

.hero-stage__note span {
  max-width: 13em;
  font-size: 0.9rem;
}

.discover {
  padding: 96px 0 54px;
}

.discover__heading h2,
.product-section h2,
.scene-strip h2,
.contact-panel h2,
.spec-section h2,
.related-section h2 {
  margin-bottom: 12px;
  font-size: clamp(2.2rem, 4.2vw, 4rem);
  font-weight: 900;
}

.discover__heading p,
.product-section__top > div > p,
.scene-strip__copy p,
.contact-panel p {
  max-width: 50ch;
  margin-bottom: 0;
  color: var(--muted);
}

.category-carousel {
  display: flex;
  gap: 10px;
  margin-top: 30px;
  padding: 4px 4px 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.category-button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface-soft);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 750;
  scroll-snap-align: start;
}

.category-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.category-button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.product-section {
  padding: 62px 0 120px;
}

.product-section__top {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  align-items: end;
  gap: 38px;
  margin-bottom: 42px;
}

.search-field {
  display: grid;
  gap: 8px;
}

.search-field label {
  font-size: 0.84rem;
  font-weight: 800;
}

.search-field input {
  width: 100%;
  min-height: 50px;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface-soft);
  color: var(--ink);
}

.search-field input::placeholder {
  color: var(--muted);
}

.search-field input:focus {
  border-color: var(--focus);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 42px 18px;
}

.product-card {
  min-width: 0;
  grid-column: span 3;
}

.product-card:nth-child(1),
.product-card:nth-child(8),
.product-card:nth-child(13) {
  grid-column: span 6;
}

.product-card__image {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
}

.product-card__image img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1), filter 420ms ease-out;
}

.product-card:nth-child(1) .product-card__image img,
.product-card:nth-child(8) .product-card__image img,
.product-card:nth-child(13) .product-card__image img {
  aspect-ratio: 2 / 1;
}

.product-card:hover .product-card__image img {
  filter: saturate(1.06);
  transform: scale(1.025);
}

.product-card__body {
  padding: 16px 6px 0;
}

.product-card__body > p {
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 0.77rem;
  font-weight: 800;
}

.product-card h3 {
  margin-bottom: 16px;
  font-size: clamp(1.08rem, 1.5vw, 1.35rem);
}

.product-card h3 a {
  text-decoration: none;
}

.product-card h3 a:hover {
  color: var(--accent);
}

.product-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 0.79rem;
  font-variant-numeric: tabular-nums;
}

.product-card__meta a {
  color: var(--ink);
  font-weight: 800;
}

.empty-state,
.detail-error {
  padding: 70px 30px;
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.empty-state h3,
.detail-error h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.empty-state p,
.detail-error p {
  color: var(--muted);
}

.scene-strip {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) 1.15fr;
  align-items: end;
  gap: 70px;
  padding: 90px clamp(28px, 6vw, 90px);
  border-radius: var(--radius);
  background: var(--surface);
}

.scene-strip__copy h2 {
  max-width: 10em;
}

.scene-strip__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.scene-strip__list span {
  display: flex;
  min-height: 92px;
  align-items: end;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  font-size: 1.02rem;
  font-weight: 850;
}

.scene-strip__list span:nth-child(2) {
  background: var(--accent-soft);
  color: color-mix(in srgb, var(--ink) 82%, var(--accent));
}

.contact-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  margin-block: 24px 118px;
  padding: 70px clamp(28px, 6vw, 90px);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
}

.contact-panel h2 {
  max-width: 11em;
}

.contact-panel p {
  color: var(--accent-ink);
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 38px 0 46px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}

.site-footer strong {
  font-size: 1rem;
}

.site-footer a {
  color: var(--accent);
  font-weight: 850;
}

.noscript-message {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
}

/* Product detail */
.detail-main {
  padding: 28px 0 118px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.82rem;
}

.breadcrumb a {
  color: var(--ink);
}

.detail-product {
  display: grid;
  min-height: calc(100dvh - 144px);
  grid-template-columns: minmax(0, 1.12fr) minmax(390px, 0.88fr);
  align-items: center;
  gap: clamp(46px, 8vw, 116px);
  padding-bottom: 76px;
}

.detail-product__media img {
  width: 100%;
  max-height: 720px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
}

.detail-product__category {
  margin: -8px 0 18px;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 850;
}

.detail-product__info h1 {
  max-width: 8em;
  margin-bottom: 22px;
  font-size: clamp(3rem, 5.5vw, 5.6rem);
  font-weight: 900;
}

.detail-product__summary {
  max-width: 38ch;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 1.1rem;
}

.detail-product__price {
  display: flex;
  align-items: baseline;
  gap: 11px;
  margin-bottom: 26px;
  color: var(--ink);
  font-size: 2.1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.detail-product__price span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
}

.feature-list li {
  padding: 8px 13px;
  border-radius: var(--control-radius);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 750;
}

.spec-section {
  padding: 100px 0;
  border-top: 1px solid var(--line);
}

.spec-section__heading {
  max-width: 760px;
  margin-bottom: 38px;
}

.spec-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 0.9fr;
  gap: 16px;
}

.spec-card {
  min-height: 260px;
  padding: 30px;
  border-radius: var(--radius);
  background: var(--surface);
}

.spec-card:first-child {
  background: var(--accent-soft);
}

.spec-card h3 {
  margin-bottom: 28px;
  font-size: 1.3rem;
}

.spec-card ul {
  margin: 0;
  padding-left: 1.15em;
  color: var(--muted);
}

.spec-card li + li {
  margin-top: 11px;
}

.related-section {
  padding-top: 96px;
  border-top: 1px solid var(--line);
}

.related-section__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.related-section__heading a {
  color: var(--accent);
  font-weight: 850;
}

.related-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 18px;
}

.related-card a {
  display: block;
  text-decoration: none;
}

.related-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: 15px;
  border-radius: var(--radius);
  object-fit: cover;
}

.related-card span {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 850;
}

.related-card h3 {
  margin: 7px 0;
  font-size: 1.1rem;
}

.related-card p {
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.detail-error {
  margin: 90px auto;
}

.detail-error > p:first-child {
  color: var(--accent);
  font-weight: 850;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-stage__main,
  .hero-stage__small,
  .hero-stage__note {
    animation: stage-enter 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-stage__small {
    animation-delay: 90ms;
  }

  .hero-stage__note {
    animation-delay: 160ms;
  }

  @keyframes stage-enter {
    from {
      clip-path: inset(0 0 100% 0 round var(--radius));
      filter: blur(5px);
    }
    to {
      clip-path: inset(0 0 0 0 round var(--radius));
      filter: blur(0);
    }
  }
}

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: minmax(0, 0.82fr) minmax(480px, 1.18fr);
    gap: 42px;
  }

  .product-card {
    grid-column: span 4;
  }

  .product-card:nth-child(1),
  .product-card:nth-child(8),
  .product-card:nth-child(13) {
    grid-column: span 8;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
  }

}

@media (max-width: 820px) {
  .site-header,
  .hero,
  .discover,
  .product-section,
  .scene-strip,
  .contact-panel,
  .detail-main,
  .site-footer {
    width: min(calc(100% - 32px), var(--max));
  }

  .site-header {
    min-height: 68px;
  }

  .main-nav a:not(.nav-contact) {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 44px;
    padding: 58px 0 80px;
  }

  .hero__copy {
    padding-left: 0;
  }

  .hero h1 {
    max-width: 5em;
    font-size: clamp(3.15rem, 14vw, 5.2rem);
  }

  .hero-stage {
    height: 580px;
    min-height: 0;
  }

  .product-section__top {
    grid-template-columns: 1fr;
  }

  .product-card,
  .product-card:nth-child(1),
  .product-card:nth-child(8),
  .product-card:nth-child(13) {
    grid-column: span 6;
  }

  .product-card:nth-child(1) .product-card__image img,
  .product-card:nth-child(8) .product-card__image img,
  .product-card:nth-child(13) .product-card__image img {
    aspect-ratio: 4 / 5;
  }

  .scene-strip {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 60px 28px;
  }

  .contact-panel {
    align-items: flex-start;
    flex-direction: column;
    padding: 58px 28px;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .detail-product {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 38px;
    padding: 18px 0 72px;
  }

  .detail-product__info h1 {
    font-size: clamp(2.8rem, 12vw, 5rem);
  }

  .spec-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .spec-card {
    min-height: 0;
  }
}

@media (max-width: 540px) {
  .wordmark {
    font-size: 0.9rem;
  }

  .nav-contact {
    padding: 8px 13px;
    font-size: 0.8rem;
  }

  .hero-stage {
    height: 520px;
    grid-template-columns: 1.2fr 0.8fr;
    grid-template-rows: 1.1fr 0.9fr;
    gap: 10px;
  }

  .hero-stage__main {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
  }

  .hero-stage__small {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
  }

  .hero-stage__note {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    padding: 18px;
  }

  .hero-stage__note strong {
    font-size: 1.3rem;
  }

  .hero-stage__note span {
    font-size: 0.74rem;
  }

  .product-card,
  .product-card:nth-child(1),
  .product-card:nth-child(8),
  .product-card:nth-child(13) {
    grid-column: 1 / -1;
  }

  .scene-strip__list {
    grid-template-columns: 1fr;
  }

  .contact-panel .button,
  .detail-product__info .button {
    width: 100%;
  }

  .related-section__heading {
    align-items: start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-stage__main,
  .hero-stage__small,
  .hero-stage__note {
    animation: none;
  }

  .button,
  .product-card__image img {
    transition: none;
  }
}
