:root {
  --sage: #6e7d73;
  --sage-light: #e8ece9;
  --sage-lighter: #f2f5f3;
  --sage-dark: #4a5a4e;
  --terracotta: #e0a385;
  --terracotta-light: #f5dcd0;
  --terracotta-dark: #c47a5a;
  --bg: #f7f8f8;
  --ink: #3a3a3a;
  --ink-light: #6b6b6b;
  --ink-lighter: #999;
  --white: #ffffff;
  --border: #e0e2e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.1);
  --radius: 10px;
  --radius-sm: 6px;
  --max-width: 1000px;
  --header-h: 72px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: "Noto Sans TC", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-family: "Noto Serif TC", "Noto Sans TC", serif;
  font-weight: 700;
  line-height: 1.3;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-logo img {
  height: 52px;
  width: auto;
}

.header-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.header-brand-cn {
  font-size: 1rem;
  font-weight: 700;
  color: var(--sage-dark);
}

.header-brand-en {
  font-size: 0.65rem;
  color: var(--ink-lighter);
  letter-spacing: 0.05em;
}

.header-nav {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.header-nav a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--ink-light);
  transition: all 0.2s;
  white-space: nowrap;
}

.header-nav a:hover,
.header-nav a.active {
  background: var(--sage-light);
  color: var(--sage-dark);
}

/* ===== Contact strip ===== */
.contact-strip {
  background: var(--sage-dark);
  color: var(--white);
  font-size: 0.78rem;
  padding: 6px 0;
  text-align: center;
}

.contact-strip a {
  color: inherit;
  transition: opacity 0.2s;
}

.contact-strip a:hover { opacity: 0.8; }
.contact-strip span { margin: 0 12px; opacity: 0.4; }

/* ===== Email subscription ===== */
.subscribe-section {
  background: var(--sage-lighter);
  padding: 36px 24px;
  text-align: center;
}

.subscribe-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--sage-dark);
  margin-bottom: 4px;
}

.subscribe-sub {
  font-size: 0.85rem;
  color: var(--ink-light);
  margin-bottom: 16px;
}

.subscribe-form {
  display: flex;
  gap: 8px;
  max-width: 400px;
  margin: 0 auto;
  justify-content: center;
}

.subscribe-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.subscribe-form input:focus {
  border-color: var(--terracotta);
}

.subscribe-form button {
  padding: 10px 20px;
  background: var(--terracotta);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.subscribe-form button:hover {
  background: var(--terracotta-dark);
}

@media (max-width: 480px) {
  .subscribe-form {
    flex-direction: column;
    align-items: center;
  }
  .subscribe-form input {
    width: 100%;
  }
}

/* ===== Main ===== */
.main-content { flex: 1; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--sage) 0%, var(--sage-dark) 100%);
  color: var(--white);
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(224,163,133,0.2) 0%, transparent 60%);
}

.hero * { position: relative; }

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.hero p {
  font-size: 1rem;
  max-width: 540px;
  margin: 0 auto 8px;
  opacity: 0.85;
  line-height: 1.7;
}

.hero .hero-en {
  font-size: 0.78rem;
  opacity: 0.55;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ===== Page sections ===== */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
}

.section-title {
  font-size: 1.4rem;
  margin-bottom: 32px;
  color: var(--sage-dark);
  text-align: center;
}

/* ===== Category cards (homepage) ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.category-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  transition: all 0.25s;
  cursor: pointer;
}

.category-card:hover {
  border-color: var(--terracotta);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.category-card h3 {
  font-size: 1.2rem;
  color: var(--sage-dark);
  margin-bottom: 4px;
}

.category-card .count {
  font-size: 0.85rem;
  color: var(--ink-lighter);
}

.category-card .icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--sage-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 1.3rem;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px 0;
  font-size: 0.8rem;
  color: var(--ink-lighter);
}

.breadcrumb a { color: var(--ink-lighter); }
.breadcrumb a:hover { color: var(--sage); }
.breadcrumb span { margin: 0 6px; }

/* ===== Category header ===== */
.category-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.category-header h1 {
  font-size: 1.5rem;
  color: var(--sage-dark);
}

.category-header .count {
  font-size: 0.85rem;
  color: var(--ink-lighter);
}

/* ===== Product grid ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s;
}

.product-card:hover {
  border-color: var(--terracotta);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.product-card .card-img {
  aspect-ratio: 3 / 4;
  background: var(--sage-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

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

.product-card .card-body {
  padding: 14px 16px 16px;
}

.product-card .card-model {
  font-size: 0.72rem;
  color: var(--ink-lighter);
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.product-card .card-name {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  min-height: calc(0.88rem * 1.4 * 2);
}

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

.product-card .card-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--terracotta-dark);
}

.product-card .card-colors {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.product-card .color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.product-card .color-more {
  font-size: 0.7rem;
  color: var(--ink-lighter);
  line-height: 14px;
}

/* ===== Product detail page ===== */
.product-detail {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.detail-gallery {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  align-self: start;
}

.detail-main-image {
  background: var(--sage-lighter);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.detail-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 6px;
  max-width: 100%;
}

.detail-thumbs .thumb {
  width: 64px;
  min-width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
  background: var(--sage-lighter);
}

.detail-thumbs .thumb:hover,
.detail-thumbs .thumb.active {
  border-color: var(--terracotta);
}

.detail-thumbs .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info h1 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.detail-info .sku {
  font-size: 0.78rem;
  color: var(--ink-lighter);
  margin-bottom: 12px;
}

.detail-info .price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-info .price-wholesale {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--terracotta-dark);
}

.detail-info .price-retail {
  font-size: 0.82rem;
  color: var(--ink-lighter);
  text-decoration: line-through;
}

.detail-colors {
  margin-bottom: 20px;
}

.detail-colors label,
.detail-sizes label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-light);
  margin-bottom: 8px;
}

.color-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.color-swatch:hover { border-color: var(--ink-lighter); }
.color-swatch.active { border-color: var(--terracotta); box-shadow: 0 0 0 3px var(--terracotta-light); }

.detail-sizes {
  margin-bottom: 24px;
}

.size-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.size-btn {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--ink-light);
}

.size-btn:hover { border-color: var(--sage); color: var(--sage-dark); }
.size-btn.active { background: var(--sage); color: var(--white); border-color: var(--sage); }

.detail-description {
  margin-bottom: 24px;
}

.detail-description h3 {
  font-size: 0.9rem;
  color: var(--sage-dark);
  margin-bottom: 10px;
}

.detail-description ul {
  padding-left: 18px;
}

.detail-description ul li {
  list-style: disc;
  font-size: 0.83rem;
  color: var(--ink-light);
  line-height: 1.7;
  margin-bottom: 3px;
}

.detail-details {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.detail-details summary {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sage-dark);
  cursor: pointer;
  padding: 8px 0;
}

.detail-details summary:hover { color: var(--terracotta); }

.detail-details .details-content {
  font-size: 0.83rem;
  color: var(--ink-light);
  line-height: 1.7;
  padding: 8px 0 4px;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-back {
  display: inline-block;
  margin-top: 24px;
  font-size: 0.82rem;
  color: var(--ink-lighter);
  transition: color 0.2s;
}

.detail-back:hover { color: var(--sage-dark); }

/* ===== Footer ===== */
.site-footer {
  background: var(--sage-dark);
  color: var(--white);
  padding: 32px 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.footer-col h4 {
  font-size: 0.85rem;
  margin-bottom: 8px;
  opacity: 0.7;
  letter-spacing: 0.05em;
}

.footer-col p, .footer-col a {
  font-size: 0.8rem;
  line-height: 1.6;
  opacity: 0.75;
}

.footer-col a:hover { opacity: 1; text-decoration: underline; }
.footer-col .zh { margin-bottom: 2px; }
.footer-col .en { font-size: 0.72rem; opacity: 0.55; }

.footer-bottom {
  max-width: var(--max-width);
  margin: 20px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
  text-align: center;
  font-size: 0.72rem;
  opacity: 0.4;
}

/* ===== Back to top ===== */
.back-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 50;
  border: none;
}

.back-top.visible { opacity: 0.8; }
.back-top.visible:hover { opacity: 1; }

/* ===== Contact modal ===== */
.contact-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.contact-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.contact-modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 32px 28px;
  max-width: 420px;
  width: calc(100% - 32px);
  position: relative;
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
}

.contact-modal h3 {
  font-size: 1.15rem;
  color: var(--sage-dark);
  margin-bottom: 20px;
  text-align: center;
}

.contact-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--ink-lighter);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.contact-close:hover { color: var(--ink); }

.contact-item {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.contact-label {
  font-weight: 600;
  color: var(--ink-light);
  min-width: 48px;
  flex-shrink: 0;
}

.contact-item a { color: var(--sage-dark); }
.contact-item a:hover { text-decoration: underline; }

.contact-address span:last-child {
  line-height: 1.6;
}

.nav-contact-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  background: var(--terracotta);
  color: var(--white);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  font-family: inherit;
}

.nav-contact-btn:hover {
  background: var(--terracotta-dark);
}

@media (max-width: 768px) {
  .contact-modal { padding: 28px 20px 24px; }
  .contact-item { font-size: 0.82rem; }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-detail { grid-template-columns: 1fr; gap: 24px; }
  .detail-gallery { position: static; }
}

@media (max-width: 768px) {
  .hero { padding: 48px 20px 40px; }
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: 0.88rem; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .section { padding: 32px 16px; }
  .header-nav { gap: 4px; }
  .header-nav a,
  .nav-contact-btn {
    font-size: 0.78rem;
    padding: 4px 9px;
  }
  .footer-inner { grid-template-columns: 1fr; }
  .product-detail { padding: 16px; }
  .detail-thumbs .thumb {
    width: 48px;
    min-width: 48px;
    height: 48px;
  }
  .contact-strip { font-size: 0.7rem; }
  .contact-strip span { margin: 0 6px; }
}

@media (max-width: 520px) {
  .product-grid { grid-template-columns: 1fr; }
  .header-inner {
    padding: 0 10px;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .header-logo { gap: 8px; }
  .header-logo img { height: 40px; }
  .header-brand-cn { font-size: 0.78rem; }
  .header-brand-en { display: none; }
  .header-nav {
    gap: 3px;
    flex-wrap: wrap;
    justify-content: center;
    margin-left: 0;
    padding-bottom: 6px;
  }
  .header-nav a,
  .nav-contact-btn {
    font-size: 0.7rem;
    padding: 3px 7px;
  }
}