:root {
  color-scheme: light;
  --page: #ffffff;
  --soft: #faf9f7;
  --surface: #ffffff;
  --ink: #141414;
  --muted: #77736d;
  --line: #dedbd5;
  --line-dark: #bcb7ae;
  --gold: #a78852;
  --gold-soft: #f4eee3;
  --success: #426a55;
  --danger: #9a4141;
  --shadow-soft: 0 12px 34px rgba(20, 20, 20, 0.08);
  --radius: 8px;
  --font-ui: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Segoe UI", "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Songti TC", "Noto Serif TC", STSong, serif;
  --font-brand: Georgia, "Times New Roman", serif;
  font-family: var(--font-ui);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--page);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

.product-sku,
.product-price,
.inquiry-bar-total,
.detail-price,
.inquiry-item-title,
.inquiry-item-price,
.inquiry-summary strong {
  font-family: var(--font-ui);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.site-header {
  padding: 24px 18px 32px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.header-inner,
.catalog-main {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.header-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 60px;
}

.brand {
  margin: 0;
  font-family: var(--font-brand);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.34em;
}

.language-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #aaa59d;
  font-size: 0.73rem;
  letter-spacing: 0.08em;
}

.language-switch button {
  padding: 5px 1px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.language-switch button.active {
  border-bottom-color: var(--ink);
  color: var(--ink);
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--gold);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.site-header h1 {
  max-width: 720px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.45rem, 10vw, 5.2rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.header-copy {
  max-width: 600px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

.catalog-main {
  padding: 22px 12px 125px;
}

.service-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.service-note p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.6;
}

.service-note-icon {
  display: grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--font-brand);
  font-size: 0.68rem;
}

.catalog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 44px 2px 18px;
}

.catalog-heading h2,
.section-title-row h3 {
  margin: 0;
}

.catalog-heading h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 400;
}

.product-count {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.75rem;
}

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

.product-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.product-card.sold-out {
  opacity: 0.68;
}

.product-image-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #f4f3f0;
  cursor: zoom-in;
}

.product-image-button::after {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 3px;
  background: rgba(20, 20, 20, 0.67);
  color: #fff;
  content: attr(data-detail-label);
  font-size: 0.61rem;
  letter-spacing: 0.03em;
  backdrop-filter: blur(8px);
}

.product-image-button img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 260ms ease;
}

.product-image-button:active img {
  transform: scale(0.99);
}

.sold-out-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  padding: 5px 7px;
  border-radius: 2px;
  background: rgba(20, 20, 20, 0.82);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.product-content {
  padding: 12px 10px 11px;
}

.product-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.product-meta-row > div {
  min-width: 0;
}

.product-sku {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.product-color {
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.69rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-price {
  margin: 0;
  color: var(--gold);
  font-size: 0.96rem;
  white-space: nowrap;
}

.card-options {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.card-option-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.64rem;
}

.size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.size-chip {
  min-width: 32px;
  min-height: 30px;
  padding: 5px 7px;
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  font-size: 0.68rem;
  cursor: pointer;
}

.size-chip.active {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: #5f4823;
}

.size-chip.pending {
  min-width: 100%;
  border-style: dashed;
  color: var(--muted);
}

.card-quantity-row,
.quantity-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.card-quantity-row > span {
  color: var(--muted);
  font-size: 0.64rem;
}

.quantity-stepper {
  display: inline-grid;
  grid-template-columns: 29px 32px 29px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
}

.quantity-stepper button {
  width: 29px;
  height: 29px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.quantity-stepper span {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 11px;
}

.card-actions .add-button {
  grid-column: 1 / -1;
}

.button,
.small-button {
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.small-button {
  min-height: 34px;
  padding: 7px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  font-size: 0.64rem;
}

.small-button.add-button {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.44;
}

.button {
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 3px;
}

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

.button-secondary {
  border-color: var(--line-dark);
  background: #fff;
  color: var(--ink);
}

.inquiry-bar {
  position: fixed;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  left: 10px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 10px 14px;
  border: 1px solid #000;
  border-radius: 4px;
  background: rgba(20, 20, 20, 0.97);
  color: #fff;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.inquiry-bar > span:first-child,
.inquiry-bar-action {
  font-size: 0.72rem;
}

.inquiry-bar-total {
  color: #d7c08f;
  font-size: 0.98rem;
  text-align: center;
}

.layer {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.channel-layer {
  z-index: 70;
}

.layer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 14, 14, 0.52);
  backdrop-filter: blur(4px);
}

.panel-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: 58px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  text-align: center;
  backdrop-filter: blur(12px);
}

.panel-header h2,
.panel-header p {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 500;
}

.icon-button,
.text-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  font-size: 1.65rem;
  font-weight: 300;
}

.text-button {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 600;
}

.product-panel,
.inquiry-panel,
.channel-panel {
  position: absolute;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.product-panel {
  inset: 0;
  overflow-y: auto;
}

.product-panel-body {
  width: min(1100px, 100%);
  margin: 0 auto;
}

.gallery-area {
  background: #f5f4f1;
}

.gallery-stage {
  position: relative;
  display: grid;
  min-height: min(120vw, 650px);
  overflow: hidden;
  place-items: center;
}

.gallery-image-button {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.gallery-image-button img {
  display: block;
  width: 100%;
  height: min(120vw, 650px);
  object-fit: contain;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.52);
  color: #fff;
  font-size: 1.65rem;
  transform: translateY(-50%);
  cursor: pointer;
  place-items: center;
}

.gallery-arrow-left {
  left: 10px;
}

.gallery-arrow-right {
  right: 10px;
}

.gallery-counter {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 8px;
  border-radius: 2px;
  background: rgba(20, 20, 20, 0.64);
  color: #fff;
  font-size: 0.68rem;
}

.gallery-thumbnails {
  display: flex;
  gap: 8px;
  padding: 10px 12px 13px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  scroll-snap-type: x proximity;
}

.thumbnail-button {
  flex: 0 0 62px;
  width: 62px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 2px;
  background: #fff;
  scroll-snap-align: start;
  cursor: pointer;
}

.thumbnail-button.active {
  border-color: var(--gold);
}

.thumbnail-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-information {
  padding: 28px 18px 84px;
}

.detail-sku {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.detail-information h2 {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.8rem;
  font-weight: 500;
}

.detail-price {
  margin: 13px 0 0;
  color: var(--gold);
  font-size: 1.4rem;
}

.stock-label {
  display: inline-block;
  margin: 12px 0 0;
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
  color: var(--success);
  font-size: 0.68rem;
  font-weight: 600;
}

.stock-label.unavailable {
  color: var(--danger);
}

.option-block {
  margin-top: 26px;
}

.option-heading,
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.option-heading {
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-weight: 600;
}

.option-hint,
.section-title-row span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 400;
}

.detail-information .size-chip {
  min-width: 48px;
  min-height: 39px;
  font-size: 0.78rem;
}

.quantity-block > span {
  font-size: 0.82rem;
  font-weight: 600;
}

.quantity-block .quantity-stepper {
  grid-template-columns: 42px 48px 42px;
}

.quantity-block .quantity-stepper button,
.quantity-block .quantity-stepper span {
  width: auto;
  height: 42px;
  line-height: 42px;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
  margin-top: 28px;
}

.size-chart {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.size-chart h3,
.customer-fields h3 {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 500;
}

.size-chart-button {
  width: 100%;
  margin-top: 12px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  cursor: zoom-in;
}

.size-chart-button img {
  display: block;
  width: 100%;
  height: auto;
}

.inquiry-panel {
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  max-height: 92vh;
  flex-direction: column;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
}

.inquiry-panel-body {
  padding: 12px 12px 24px;
  overflow-y: auto;
}

.inquiry-items {
  display: grid;
  gap: 9px;
}

.inquiry-item {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.inquiry-item img {
  width: 68px;
  height: 78px;
  border-radius: 2px;
  object-fit: cover;
}

.inquiry-item-title {
  margin: 1px 0 5px;
  font-size: 0.8rem;
}

.inquiry-item-color {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.68rem;
}

.inquiry-item select {
  max-width: 100%;
  min-height: 32px;
  padding: 5px 24px 5px 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  font-size: 0.68rem;
}

.inquiry-item-side {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.remove-item {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: #f2f1ef;
  color: var(--muted);
  cursor: pointer;
}

.inquiry-item-price {
  color: var(--gold);
  font-size: 0.78rem;
}

.inquiry-item .quantity-stepper {
  grid-template-columns: 27px 27px 27px;
}

.inquiry-item .quantity-stepper button {
  width: 27px;
  height: 27px;
}

.empty-state {
  padding: 46px 20px;
  text-align: center;
}

.empty-state p {
  margin: 0 0 16px;
  color: var(--muted);
}

.customer-fields {
  margin-top: 22px;
  padding: 18px 13px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.privacy-copy {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.55;
}

.customer-fields label {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: #4f4b46;
  font-size: 0.72rem;
  font-weight: 600;
}

.customer-fields input,
.customer-fields textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 400;
  resize: vertical;
}

.inquiry-footer {
  padding: 13px 14px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
}

.inquiry-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.inquiry-summary span {
  color: var(--muted);
  font-size: 0.72rem;
}

.inquiry-summary strong {
  color: var(--gold);
  font-size: 1.15rem;
}

.inquiry-footer .button {
  width: 100%;
}

.inquiry-footer > p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.45;
  text-align: center;
}

.channel-panel {
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
}

.channel-panel-body {
  padding: 18px 14px calc(22px + env(safe-area-inset-bottom));
}

.channel-panel-body > p:first-child {
  margin: 0 2px 16px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.channel-options {
  display: grid;
  gap: 9px;
}

.channel-option {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.channel-option:hover {
  border-color: var(--line-dark);
  background: var(--soft);
}

.channel-icon {
  display: grid;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  place-items: center;
}

.channel-line .channel-icon {
  background: #06c755;
}

.channel-whatsapp .channel-icon {
  background: #25d366;
}

.channel-option strong,
.channel-option small {
  display: block;
}

.channel-option strong {
  font-size: 0.82rem;
}

.channel-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 400;
}

.channel-arrow {
  color: var(--line-dark);
}

.channel-fallback {
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.5;
}

.zoom-layer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  padding: 54px 12px 20px;
  overflow: auto;
  background: rgba(10, 10, 10, 0.96);
  cursor: zoom-out;
  place-items: center;
}

.zoom-layer img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 76px);
  object-fit: contain;
}

.zoom-close {
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 1;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.36);
  color: #fff;
  font-size: 1.65rem;
  cursor: pointer;
}

.toast {
  position: fixed;
  bottom: calc(84px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 110;
  max-width: calc(100vw - 36px);
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  background: rgba(20, 20, 20, 0.94);
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.4;
  text-align: center;
  transform: translateX(-50%);
}

body.layer-open {
  position: fixed;
  right: 0;
  left: 0;
  overflow: hidden;
}

@media (min-width: 680px) {
  .site-header {
    padding: 34px 34px 48px;
  }

  .header-topline {
    margin-bottom: 90px;
  }

  .catalog-main {
    padding: 30px 28px 130px;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 16px;
  }

  .product-content {
    padding: 14px;
  }

  .inquiry-bar {
    right: 24px;
    left: auto;
    width: min(430px, calc(100vw - 48px));
  }

  .inquiry-panel {
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(470px, 100%);
    max-height: none;
    border-radius: 0;
  }

  .channel-panel {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 50%;
    width: min(460px, calc(100% - 36px));
    border-radius: 6px;
    transform: translate(-50%, -50%);
  }
}

@media (min-width: 900px) {
  .product-panel-body {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
    min-height: calc(100vh - 58px);
  }

  .gallery-area {
    border-right: 1px solid var(--line);
  }

  .gallery-stage,
  .gallery-image-button img {
    height: calc(100vh - 150px);
    min-height: 620px;
  }

  .detail-information {
    padding: 58px 40px 80px;
  }
}

@media (min-width: 1120px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 34px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
