:root {
  --ink: #14181f;
  --ink-soft: #5a6270;
  --paper: #faf8f4;
  --white: #ffffff;
  --line: #e6e0d4;
  --accent: #b08a3e;
  --accent-dark: #8d6c2a;
  --sale: #b3261e;
  --radius: 8px;
  --wrap: 1180px;
  --serif: Georgia, "Times New Roman", "Noto Serif TC", "PMingLiU", serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", "PingFang HK", "Microsoft JhengHei", "Noto Sans TC", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
h1, h2 { font-family: var(--serif); font-weight: 500; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
p { margin: 0 0 1em; }
a { color: inherit; }
img { display: block; max-width: 100%; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.page { padding-top: 40px; padding-bottom: 80px; min-height: 60vh; }
.page-title { font-size: clamp(1.7rem, 3.5vw, 2.3rem); margin-bottom: 28px; }

.eyebrow {
  margin: 0 0 10px; color: var(--accent);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
}
.empty { padding: 60px 0; text-align: center; color: var(--ink-soft); }
.empty a { color: var(--accent-dark); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 248, 244, 0.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; }
.brand-mark { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; letter-spacing: 0.08em; }
.brand-name { font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-soft); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; font-size: 0.95rem; color: var(--ink-soft); }
.nav a:hover { color: var(--ink); }
.cart-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink) !important; font-weight: 600; }
#cart-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--accent); color: var(--white); font-size: 0.72rem; line-height: 20px; text-align: center;
}
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 5px 0; background: var(--ink); }

/* Buttons */
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: 0.95rem; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { background: #c9c4b8; cursor: not-allowed; }
.btn-ghost { border-color: rgba(255, 255, 255, 0.45); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }

/* Hero */
.hero {
  color: var(--white);
  background:
    radial-gradient(circle at 82% 25%, rgba(176, 138, 62, 0.4), transparent 42%),
    linear-gradient(135deg, #14181f 0%, #2a2f3a 100%);
}
.hero-inner { padding-top: 110px; padding-bottom: 110px; }
.hero .lead { max-width: 52ch; margin: 22px 0 34px; font-size: 1.08rem; color: rgba(255, 255, 255, 0.78); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.promises { background: var(--white); border-bottom: 1px solid var(--line); }
.promises-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-top: 28px; padding-bottom: 28px; }
.promises-grid strong { display: block; font-family: var(--serif); font-size: 1.1rem; }
.promises-grid span { color: var(--ink-soft); font-size: 0.86rem; }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--white); border-block: 1px solid var(--line); }
.section-dark { background: var(--ink); color: var(--white); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.more { color: var(--accent-dark); font-size: 0.92rem; text-decoration: none; white-space: nowrap; }
.more:hover { text-decoration: underline; }
.two-col { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; align-items: start; }
.prose { color: var(--ink-soft); }

.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cat-tile { position: relative; overflow: hidden; border-radius: var(--radius); text-decoration: none; }
.cat-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 0.3s; }
.cat-tile:hover img { transform: scale(1.05); }
.cat-tile span {
  position: absolute; inset: auto 0 0 0; padding: 26px 12px 12px;
  background: linear-gradient(transparent, rgba(20, 24, 31, 0.75)); color: var(--white);
  font-weight: 600; text-align: center;
}

/* Product cards */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 20px; }
.product-grid-3 { grid-template-columns: repeat(3, 1fr); }
.product-card { display: block; text-decoration: none; }
.product-thumb { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.product-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 0.3s; }
.product-card:hover .product-thumb img { transform: scale(1.04); }
.product-card h3 { margin: 12px 0 4px; font-size: 0.95rem; font-weight: 500; line-height: 1.5; }
.price-row { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.price { font-weight: 700; color: var(--sale); }
.price-row s { color: var(--ink-soft); font-size: 0.85rem; }
.price-row-lg .price { font-size: 1.7rem; }

.badge {
  position: absolute; top: 10px; left: 10px; z-index: 1; padding: 2px 10px; border-radius: 4px;
  font-size: 0.72rem; font-weight: 700; color: var(--white);
}
.badge-hot { background: var(--sale); }
.badge-new { background: #1f7a5c; }
.badge-sold { background: #6b7280; }
.badge-inline { position: static; display: inline-block; margin-bottom: 10px; }

/* Shop */
.shop-layout { display: grid; grid-template-columns: 210px 1fr; gap: 40px; align-items: start; }
.shop-side { position: sticky; top: 92px; }
.shop-side h2 { font-size: 1.1rem; margin-bottom: 12px; }
.cat-list { display: grid; gap: 2px; }
.cat-list button {
  padding: 9px 12px; border: 0; border-radius: 6px; background: none;
  font: inherit; font-size: 0.95rem; color: var(--ink-soft); text-align: left; cursor: pointer;
}
.cat-list button:hover { background: var(--white); color: var(--ink); }
.cat-list button.active { background: var(--ink); color: var(--white); }
.shop-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; color: var(--ink-soft); font-size: 0.9rem; }
select, input, textarea {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--white); color: var(--ink); font: inherit; font-size: 0.92rem;
}
select:focus, input:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Product page */
.crumbs { color: var(--ink-soft); font-size: 0.88rem; margin-bottom: 20px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.gallery-main { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.gallery-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.gallery-thumbs button { width: 72px; padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; overflow: hidden; cursor: pointer; }
.gallery-thumbs button.active { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.product-info h1 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.sku { margin: 6px 0 14px; color: var(--ink-soft); font-size: 0.85rem; }
.specs { width: 100%; margin: 22px 0; border-collapse: collapse; font-size: 0.93rem; }
.specs th, .specs td { padding: 9px 0; border-bottom: 1px solid var(--line); text-align: left; }
.specs th { width: 34%; font-weight: 500; color: var(--ink-soft); }
.description { color: var(--ink-soft); }
.stock { font-size: 0.88rem; color: var(--ink-soft); }
.buy-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.buy-row input { width: 76px; text-align: center; }
.added { margin-top: 14px; color: #1f7a5c; font-size: 0.92rem; }
.related { margin-top: 72px; }
.related h2 { margin-bottom: 24px; font-size: 1.4rem; }

/* Cart */
.cart { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.cart > .empty { grid-column: 1 / -1; }
.cart-row {
  display: grid; grid-template-columns: 76px 1fr auto auto auto; gap: 16px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.cart-row:first-child { border-top: 1px solid var(--line); }
.cart-row img { width: 76px; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.cart-name a { display: block; text-decoration: none; font-size: 0.95rem; line-height: 1.5; }
.cart-name a:hover { text-decoration: underline; }
.cart-name span { color: var(--ink-soft); font-size: 0.88rem; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--white); }
.stepper button { width: 32px; height: 32px; border: 0; background: none; font-size: 1rem; cursor: pointer; }
.stepper button:disabled { color: #c9c4b8; cursor: not-allowed; }
.stepper span { min-width: 28px; text-align: center; font-size: 0.92rem; }
.cart-sub { min-width: 92px; text-align: right; }
.remove { border: 0; background: none; color: var(--ink-soft); cursor: pointer; padding: 6px; }
.remove:hover { color: var(--sale); }
.cart-summary { display: grid; gap: 16px; padding: 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin: 0; }
.cart-total strong { font-size: 1.5rem; }
.cart-summary label { display: grid; gap: 6px; font-size: 0.88rem; color: var(--ink-soft); }
.cart-summary textarea { resize: vertical; }
.hint { margin: 0; font-size: 0.82rem; color: var(--ink-soft); }

/* Contact */
.contact-lead { margin: 16px 0 24px; color: rgba(255, 255, 255, 0.75); }
.contact-list { margin: 0; }
.contact-list dt { font-size: 0.75rem; letter-spacing: 0.14em; color: rgba(255, 255, 255, 0.5); }
.contact-list dd { margin: 2px 0 18px; font-size: 1.02rem; }

/* Footer */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.65); border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 32px; padding-top: 48px; padding-bottom: 32px; }
.footer-grid h4 { margin-bottom: 10px; color: var(--white); font-size: 0.9rem; }
.footer-grid a, .footer-grid span { display: block; padding: 2px 0; text-decoration: none; }
.footer-grid a:hover { color: var(--white); }
.footer-brand { margin-bottom: 4px; font-family: var(--serif); font-size: 1.2rem; color: var(--white); }
.footer-bottom { padding-top: 18px; padding-bottom: 24px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.82rem; }

.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 30;
  padding: 11px 20px; border-radius: 999px; background: #25d366; color: #fff;
  font-size: 0.9rem; font-weight: 700; text-decoration: none; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}
.wa-float:hover { background: #1eb956; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 16px;
    padding: 22px 20px; background: var(--paper); border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .hero-inner { padding-top: 72px; padding-bottom: 72px; }
  .section { padding: 56px 0; }
  .two-col, .product-layout, .cart, .shop-layout { grid-template-columns: 1fr; gap: 28px; }
  .promises-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid, .product-grid-3 { grid-template-columns: repeat(2, 1fr); gap: 22px 14px; }
  .shop-side { position: static; }
  .cat-list { display: flex; flex-wrap: wrap; gap: 6px; }
  .cat-list button { border: 1px solid var(--line); background: var(--white); }
  .cart-row { grid-template-columns: 64px 1fr auto; }
  .cart-row img { width: 64px; }
  .cart-sub { grid-column: 2; text-align: left; min-width: 0; }
  .stepper { grid-column: 2; justify-self: start; }
  .remove { grid-column: 3; grid-row: 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
