:root,
[data-theme="a"] {
  --bg: #f3f0e8;
  --bg-elevated: #fbfaf6;
  --ink: #2c3329;
  --muted: #5e6759;
  --line: #d9d4c6;
  --accent: #6b7f62;
  --accent-ink: #f7f8f4;
  --hero-panel: #e4e6d9;
  --radius: 18px;
  --header-h: 72px;
  --font-body: "Noto Sans SC", "Noto Sans TC", "Noto Sans Thai", "Noto Sans Devanagari", "Noto Sans", "PingFang SC", sans-serif;
  --font-display: "Manrope", "Noto Sans SC", "Noto Sans TC", sans-serif;
  --shadow: none;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
.brand-name,
.footer-brand {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, white);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lang-switch {
  position: relative;
  display: inline-flex;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 11em;
  height: 36px;
  padding: 0 28px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background-color: var(--bg-elevated);
  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='%235e6759' d='M1.2 1.2 6 6l4.8-4.8'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.lang-select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-name {
  font-size: 22px;
}

.brand-slogan {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 52vw;
}

.site-nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
}

.site-nav a:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 5px auto;
  background: var(--ink);
}

.hero {
  padding: 48px 0 24px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4.2vw, 52px);
}

.lead {
  margin: 0 0 24px;
  color: var(--muted);
  max-width: 38em;
}

.hero-visual {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--hero-panel);
  aspect-ratio: 4 / 5;
}

.hero-visual img,
.product-media img,
.gallery-main img,
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
}

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

.section {
  padding: 48px 0 64px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 28px;
}

.section-head h2,
.about-inner h2 {
  margin: 0;
  font-size: 28px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product-grid-related {
  grid-template-columns: repeat(3, 1fr);
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 100%;
}

.product-card:hover .product-media img {
  transform: scale(1.03);
}

.product-media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--hero-panel);
}

.product-media img {
  transition: transform 0.35s ease;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.product-media .tag {
  position: absolute;
  top: 12px;
  left: 12px;
}

.product-body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-body h3 {
  margin: 0;
  font-size: 18px;
}

.product-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  flex: 1;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price-row strong {
  font-size: 18px;
}

.price-row s {
  color: var(--muted);
  font-size: 13px;
}

.price-row-lg strong {
  font-size: 28px;
}

.section-about {
  padding-top: 0;
}

.about-inner {
  max-width: 720px;
}

.about-inner p {
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}

.footer-brand {
  margin: 0 0 8px;
  font-size: 20px;
}

.footer-copy,
.footer-contact p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14px;
}

.back-link {
  display: inline-block;
  margin: 24px 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 40px;
  align-items: start;
  padding-bottom: 24px;
}

.gallery-main {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--hero-panel);
  aspect-ratio: 1;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.thumb {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--hero-panel);
  aspect-ratio: 1;
  cursor: pointer;
}

.thumb.is-active {
  border-color: var(--accent);
}

.detail-info .tag {
  margin-bottom: 12px;
}

.points {
  margin: 0 0 20px;
  padding: 0 0 0 18px;
}

.points li {
  margin-bottom: 8px;
}

.desc {
  color: var(--muted);
  margin: 0 0 24px;
}

.detail-cta-bar .cta-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1023px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-inner,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767px) {
  .container {
    width: min(1120px, calc(100% - 28px));
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .header-tools {
    margin-left: 0;
  }

  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 16px;
  }

  .site-nav a {
    padding: 10px 0;
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .hero {
    padding-top: 28px;
  }

  .hero-inner,
  .detail-layout,
  .footer-grid,
  .section-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero-visual {
    order: -1;
    aspect-ratio: 5 / 4;
  }

  .product-grid,
  .product-grid-related {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .product-body {
    padding: 12px;
  }

  .product-body h3 {
    font-size: 16px;
  }

  .product-body p {
    display: none;
  }

  body.is-detail {
    padding-bottom: 92px;
  }

  .detail-cta-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--bg-elevated);
    border-top: 1px solid var(--line);
  }

  .detail-cta-bar .btn {
    flex: 0 0 auto;
  }

  .detail-cta-bar .cta-note {
    margin: 0;
    flex: 1;
  }
}
