:root {
  --bg: #ffffff;
  --fg: #111827;
  --muted: #6b7280;
  --primary: #111827;
  --accent: #ef4444;
  --border: #e5e7eb;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.brand { display:flex; align-items:center; }
.brand-box { position:relative; display:inline-block; }
.brand-logo { width:64px; height:64px; object-fit:cover; border-radius:12px; border:1px solid var(--border); background:#f3f4f6; display:block; }
.brand-name { font-weight:700; letter-spacing:.02em; font-size:16px; color: var(--fg); line-height:1; margin:0; padding:0; text-align:center; }

/* Position variants */
.brand--top-over .brand { justify-content:center; }
.brand--top-over .brand-name { position:absolute; top:0; left:0; right:0; z-index:2; pointer-events:none; }
.brand--top-over .brand-box { margin:0 auto; }

.brand--bottom-over .brand { justify-content:center; }
.brand--bottom-over .brand-name { position:absolute; bottom:0; left:0; right:0; z-index:2; pointer-events:none; }
.brand--bottom-over .brand-box { margin:0 auto; }

.brand--right .brand-box { position:static; display:flex; align-items:center; gap:8px; }
.brand--right .brand-name { position:static; text-align:left; }

.brand--left .brand-box { position:static; display:flex; align-items:center; gap:8px; flex-direction: row-reverse; }
.brand--left .brand-name { position:static; text-align:right; }
.nav a { text-decoration: none; color: var(--fg); margin-left: 16px; }
/* top category menu (inspired by minimal clothing stores) */
.menu { display:flex; gap:20px; align-items:center; }
.menu a { color:#111; text-decoration:none; font-weight:600; letter-spacing:.02em; padding:6px 0; border-bottom:2px solid transparent; }
.menu a:hover { border-color:#111; }
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; padding: 72px 0; }
.hero.bg {
  background-image: url('/assets/head_bg.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
}
.hero.bg .title { color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.35); }
.hero.bg .subtitle { color: rgba(255,255,255,.9); text-shadow: 0 1px 4px rgba(0,0,0,.3); }
.hero .actions .btn { border-color: #fff; }
.hero .title { font-size: 40px; line-height: 1.1; font-weight: 800; }
.hero .subtitle { color: var(--muted); margin-top: 8px; }
.btn { display: inline-block; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--fg); color: #fff; background: var(--fg); text-decoration: none; }
.btn.secondary { color: var(--fg); background: transparent; border-color: var(--border); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 20px; }
.card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; }
.card .img { width: 100%; height: 280px; object-fit: cover; background: #f3f4f6; }
.card .body { padding: 12px; }
.card .name { font-weight: 600; }
.card .price { color: var(--muted); margin-top: 4px; }
/* category tiles */
.catgrid { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap:16px; margin:24px 0; }
.cattile { position:relative; border-radius:12px; overflow:hidden; background:#fafafa; border:1px solid var(--border); }
.cattile img { width:100%; height:180px; object-fit:cover; display:block; }
.cattile .label { position:absolute; left:12px; bottom:10px; background:#ffffff; padding:6px 10px; border-radius:999px; font-weight:600; color:#A67C52; }
.footer { margin-top: 48px; border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); }
.section { padding: 32px 0; }
.actions { display: flex; gap: 8px; align-items: center; }
.stack { display: grid; gap: 12px; }
.thumb { width: 100%; height: 360px; object-fit: cover; border: 1px solid var(--border); border-radius: 12px; background:#f3f4f6; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gallery .mini { width: 100%; height: 80px; object-fit: cover; border:1px solid var(--border); border-radius: 8px; }

/* Hide try-on preview until an image src is set */
#tryon_img:not([src]), #tryon_img[src=""] { display: none; }

/* Responsive */
@media (max-width: 768px){
  .container { max-width: 100%; padding: 0 12px; }
  .nav-inner { height: 96px; }
  .menu { gap: 14px; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .menu a { font-size: 14px; }
  .hero { grid-template-columns: 1fr; gap: 12px; padding: 40px 0; }
  .hero .title { font-size: 28px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 12px; }
  .card .img { height: 200px; }
  .thumb { height: 280px; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery .mini { height: 64px; }
  .catgrid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cattile img { height: 140px; }
  .actions { flex-wrap: wrap; }
}
