
:root {
  --primary: #1e3a5f;
  --primary-dark: #142a44;
  --primary-light: #4a6d94;
  --accent: #c9a961;
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --bg-dark: #0f1e33;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --radius: 4px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 4px 12px rgba(15,30,51,.08);
  --max-w: 1280px;
  --sp-4: 16px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-24: 96px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC",
               "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0.01em;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
button { font: inherit; cursor: pointer; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--sp-6); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: var(--sp-8);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 600; font-size: 18px; letter-spacing: 0.02em;
  color: var(--primary);
}
.brand img { height: 40px; width: auto; }
.brand .name { line-height: 1.1; }
.brand .name small { display: block; font-size: 11px; color: var(--text-muted);
                     font-weight: 400; letter-spacing: 0.1em; }

.nav-primary { display: flex; align-items: center; gap: var(--sp-6); }
.nav-primary a {
  font-size: 14px; font-weight: 500; color: var(--text);
  padding: 8px 4px; position: relative; letter-spacing: 0.05em;
}
.nav-primary a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--primary); transform: scaleX(0);
  transform-origin: left; transition: transform .2s ease;
}
.nav-primary a:hover::after, .nav-primary a.active::after { transform: scaleX(1); }
.nav-primary a.contact-btn {
  background: var(--primary); color: white; border-radius: var(--radius);
  padding: 10px 18px;
}
.nav-primary a.contact-btn::after { display: none; }
.nav-primary a.contact-btn:hover { background: var(--primary-dark); color: white; }

.menu-toggle { display: none; background: none; border: 0; padding: 8px;
               width: 40px; height: 40px; }
.menu-toggle svg { width: 24px; height: 24px; stroke: var(--text); }

@media (max-width: 900px) {
  .nav-primary {
    position: fixed; top: 72px; left: 0; right: 0; background: white;
    flex-direction: column; align-items: stretch; padding: var(--sp-4) 0;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%); transition: transform .25s ease; gap: 0;
  }
  .nav-primary.open { transform: translateY(0); }
  .nav-primary a { padding: 14px var(--sp-6); border-bottom: 1px solid var(--border); }
  .nav-primary a::after { display: none; }
  .nav-primary a.contact-btn { margin: var(--sp-4); text-align: center; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

/* Hero carousel — editorial layout with watermark + framed product photo */
.hero-carousel {
  position: relative; width: 100%;
  height: clamp(500px, 60vw, 640px);
  overflow: hidden;
}
.hero-carousel .slides { position: absolute; inset: 0; }
.hero-carousel .slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1s ease;
}
.hero-carousel .slide.active { opacity: 1; z-index: 1; }
.hero-carousel .slide-bg { position: absolute; inset: 0; }
.hero-carousel .slide-content {
  position: relative; z-index: 2;
  max-width: 1280px; margin: 0 auto;
  padding: 0 var(--sp-8);
  height: 100%;
  display: grid; grid-template-columns: 1.2fr 1fr;
  align-items: center; gap: var(--sp-8);
}
.hero-carousel .text-side {
  position: relative;
  padding-left: var(--sp-4);
}
.hero-carousel .watermark {
  position: absolute;
  top: -70px; left: -80px;
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: clamp(200px, 22vw, 340px);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.03em;
  color: var(--wm-color, rgba(255,255,255,.5));
  z-index: 0; pointer-events: none;
  user-select: none;
  font-style: italic;
}
.hero-carousel .text-stack { position: relative; z-index: 2; }
.hero-carousel .eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-size: 12px; letter-spacing: 0.4em; font-weight: 600;
  color: var(--accent-color, var(--accent));
  margin-bottom: 24px;
  text-transform: uppercase;
}
.hero-carousel .eyebrow::before {
  content: ""; width: 40px; height: 1px; background: currentColor;
}
.hero-carousel .season-title {
  font-family: "Noto Serif TC", "PingFang TC", "Songti TC", serif;
  font-size: clamp(48px, 5.5vw, 76px);
  font-weight: 300; line-height: 1;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin: 0 0 12px;
}
.hero-carousel .season-collection {
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: 500; letter-spacing: 0.5em;
  color: var(--accent-color, var(--accent));
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid rgba(15,30,51,.12);
  max-width: 420px;
}
.hero-carousel .season-subtitle {
  font-size: clamp(16px, 1.3vw, 20px);
  font-weight: 500; color: var(--primary);
  margin: 0 0 8px; letter-spacing: 0.02em;
}
.hero-carousel .season-desc {
  color: var(--text-muted);
  font-size: 14px; line-height: 1.8;
  max-width: 440px;
  margin: 0 0 var(--sp-6);
}
.hero-carousel .cta { display: inline-flex; gap: 12px; }

.hero-carousel .photo-side {
  position: relative; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-8) 0;
}
.hero-carousel .photo-frame {
  position: relative;
  height: 100%; max-height: 500px;
  aspect-ratio: 3 / 4;
  background: white;
  border-radius: 2px;
  box-shadow: 0 40px 80px -20px rgba(15,30,51,.25),
              0 12px 30px -8px rgba(15,30,51,.1);
  overflow: hidden;
  transform: translateY(-10px);
}
.hero-carousel .photo-frame img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block;
}
.hero-carousel .photo-frame::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
  pointer-events: none;
}
.hero-carousel .photo-caption {
  position: absolute;
  bottom: -20px; right: 20px;
  padding: 12px 20px;
  background: var(--primary);
  color: white;
  font-size: 11px; font-weight: 600; letter-spacing: 0.3em;
  z-index: 3;
  writing-mode: horizontal-tb;
}

@media (max-width: 900px) {
  .hero-carousel { height: auto; min-height: 640px; padding: 40px 0; }
  .hero-carousel .slide-content {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: var(--sp-8);
  }
  .hero-carousel .text-side { padding-left: 0; text-align: center; }
  .hero-carousel .eyebrow { justify-content: center; }
  .hero-carousel .eyebrow::before { display: none; }
  .hero-carousel .watermark {
    font-size: 180px; top: -30px; left: 50%;
    transform: translateX(-50%);
  }
  .hero-carousel .season-collection,
  .hero-carousel .season-desc { margin-left: auto; margin-right: auto; }
  .hero-carousel .photo-side { padding: 0; }
  .hero-carousel .photo-frame { max-height: 380px; }
  .hero-carousel .cta { justify-content: center; }
}

.hero-carousel .dots {
  position: absolute; left: 0; right: 0; bottom: 24px;
  display: flex; justify-content: center; gap: 8px; z-index: 3;
}
.hero-carousel .dot {
  width: 36px; height: 3px; background: rgba(15,30,51,.2);
  border: 0; padding: 0; cursor: pointer; transition: background .2s;
}
.hero-carousel .dot.active { background: var(--primary); }
.hero-carousel .arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 999px;
  background: rgba(255,255,255,.9);
  border: 1px solid var(--border); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  z-index: 3; cursor: pointer; transition: all .2s;
}
.hero-carousel .arrow:hover { background: var(--primary); color: white; border-color: var(--primary); }
.hero-carousel .arrow.prev { left: 20px; }
.hero-carousel .arrow.next { right: 20px; }
.hero-carousel .arrow svg { width: 18px; height: 18px; }

@media (max-width: 900px) {
  .hero-carousel { aspect-ratio: auto; min-height: 480px; }
  .hero-carousel .slide { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .hero-carousel .text-panel { padding: var(--sp-8); }
  .hero-carousel .arrow { width: 36px; height: 36px; }
}

/* Feature strip */
.features {
  padding: var(--sp-16) 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.features .grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
}
.feature {
  padding: var(--sp-6) 0;
  border-left: 3px solid var(--accent);
  padding-left: var(--sp-6);
}
.feature .sub {
  font-size: 11px; font-weight: 600; letter-spacing: 0.3em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 6px;
}
.feature h3 {
  font-size: 20px; font-weight: 600; color: var(--primary);
  margin: 0 0 8px; letter-spacing: 0.02em;
}
.feature p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.7; }
@media (max-width: 900px) {
  .features .grid { grid-template-columns: 1fr; }
}
.btn {
  display: inline-block; padding: 12px 28px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; letter-spacing: 0.1em;
  transition: all .2s ease; border: 1px solid transparent;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; }
.btn-outline { border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }

/* Section */
.section { padding: var(--sp-16) 0; }
.section-header { margin-bottom: var(--sp-12); text-align: center; }
.section-header .eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.3em;
  color: var(--accent); text-transform: uppercase;
}
.section-header h2 {
  font-size: clamp(24px, 3.5vw, 36px); font-weight: 600;
  color: var(--primary); margin: 8px 0 12px; letter-spacing: 0.02em;
}
.section-header p { color: var(--text-muted); max-width: 640px; margin: 0 auto; }

/* Category grid on home */
.categories { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
              gap: var(--sp-6); }
.category-card {
  display: block; padding: var(--sp-8) var(--sp-6);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); transition: all .2s ease;
  text-align: center;
}
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow);
                       border-color: var(--primary-light); }
.category-card .num {
  font-size: 12px; font-weight: 600; letter-spacing: 0.2em;
  color: var(--accent);
}
.category-card h3 {
  font-size: 20px; font-weight: 600; color: var(--primary);
  margin: 8px 0 4px;
}
.category-card .meta { color: var(--text-muted); font-size: 14px; }

/* Product grid */
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp-6);
}
.product-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--bg); transition: all .2s ease;
}
.product-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow); }
.product-card .thumb {
  aspect-ratio: 3/4; overflow: hidden; background: var(--bg-alt);
  cursor: zoom-in;
}
.product-card .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.product-card:hover .thumb img { transform: scale(1.03); }
.product-card .info { padding: var(--sp-4); font-size: 13px; }
.product-card .info .code {
  font-family: "SF Mono", "Consolas", monospace;
  font-size: 12px; color: var(--accent); font-weight: 600;
  letter-spacing: 0.05em; margin-bottom: 6px;
}
.product-card .info .func {
  font-size: 15px; font-weight: 500; color: var(--text);
  margin-bottom: 8px; line-height: 1.4;
}
.product-card .info dl {
  margin: 0; display: grid; grid-template-columns: 60px 1fr;
  gap: 4px 8px; color: var(--text-muted); font-size: 12px;
}
.product-card .info dt { font-weight: 500; }
.product-card .info dd { margin: 0; }
.product-card .info .price { color: var(--primary); font-weight: 600; }

/* Category sub-nav on catalog pages */
.subnav {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: var(--sp-6) 0; margin-bottom: var(--sp-8);
  border-bottom: 1px solid var(--border);
}
.subnav a {
  padding: 8px 16px; font-size: 13px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-muted);
  transition: all .15s ease;
}
.subnav a:hover { border-color: var(--primary); color: var(--primary); }
.subnav a.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Content pages (QA, contact) */
.prose { max-width: 780px; margin: 0 auto; }
.prose h2 { color: var(--primary); font-size: 24px; margin-top: var(--sp-12); }
.prose h3 { color: var(--primary); font-size: 18px; margin-top: var(--sp-8); }
.prose ol, .prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }

.step {
  display: grid; grid-template-columns: 48px 1fr; gap: var(--sp-6);
  padding: var(--sp-6) 0; border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: 0; }
.step .num {
  width: 40px; height: 40px; border-radius: 999px;
  background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}
.step h3 { margin: 6px 0 8px; color: var(--primary); font-size: 18px; }
.step .body { color: var(--text); white-space: pre-line; }

.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-6); margin-top: var(--sp-8);
}
.contact-card {
  padding: var(--sp-6);
  border: 1px solid var(--border); border-radius: var(--radius);
  text-align: center;
}
.contact-card .label {
  font-size: 12px; letter-spacing: 0.2em;
  color: var(--accent); text-transform: uppercase;
}
.contact-card .value { font-size: 20px; color: var(--primary); font-weight: 600; margin-top: 8px; }

/* Footer — light, 2-column: about + hours/copyright */
.site-footer {
  background: #f5f6f8; color: #4a4a4a;
  padding: var(--sp-12) 0 var(--sp-8);
  margin-top: var(--sp-16);
  border-top: 1px solid var(--border);
  font-size: 14px; line-height: 1.9;
}
.site-footer .row {
  display: grid; grid-template-columns: 1fr auto;
  gap: var(--sp-8) var(--sp-16); align-items: flex-start;
}
.site-footer .about img {
  height: 44px; width: auto; filter: grayscale(1) opacity(.6);
  margin-bottom: var(--sp-4);
}
.site-footer .about p { margin: 0 0 4px; color: #4a4a4a; }
.site-footer .about .desc { margin-bottom: 10px; }
.site-footer .about .contact-line { margin-top: 6px; color: #555; }
.site-footer .about .contact-line span { color: #cfcfcf; margin: 0 8px; }
.site-footer a { color: #4a4a4a; }
.site-footer a:hover { color: var(--primary); text-decoration: underline; }

.site-footer .side { text-align: right; color: #a83232; font-size: 13px; }
.site-footer .side .hours { margin-bottom: 6px; }
.site-footer .side .copyright { }

@media (max-width: 800px) {
  .site-footer .row { grid-template-columns: 1fr; }
  .site-footer .side { text-align: left; margin-top: var(--sp-4); }
  .site-footer .about .contact-line span { display: inline; }
}

/* Lightbox (native <dialog>) */
dialog.lightbox {
  border: 0; padding: 0; background: transparent;
  max-width: 92vw; max-height: 92vh; margin: auto;
}
dialog.lightbox::backdrop { background: rgba(15,30,51,.85); }
dialog.lightbox img { max-width: 92vw; max-height: 92vh; object-fit: contain;
                      border-radius: var(--radius); }
dialog.lightbox .close {
  position: fixed; top: 20px; right: 24px; background: transparent;
  border: 0; color: white; font-size: 32px; line-height: 1;
}
