@import url('https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600&family=Noto+Sans+TC:wght@300;400;500;700&display=swap');

:root {
  --bg: #F7F7F7;
  --surface: #FFFFFF;
  --surface-2: #EFEFED;
  --ink: #313131;
  --ink-soft: #8A8A86;
  --rust: #313131;
  --rust-dark: #000000;
  --celadon: #8A8A86;
  --line: #E5E5E3;
  --white-clay: #FFFFFF;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Jost', 'Noto Sans TC', -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  font-size: 14px;
}
a { color: inherit; }
a:hover { color: var(--ink-soft); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 32px; }

h1, h2, h3 {
  font-family: 'Jost', 'Noto Sans TC', sans-serif;
  font-weight: 400;
  letter-spacing: 0.2px;
  margin: 0 0 18px;
}
h1 { font-size: 18px; line-height: 1.3; font-weight: 400; letter-spacing: 1.5px; }
h2 { font-size: 15px; font-weight: 500; }
h3 { font-size: 14px; margin-bottom: 6px; font-weight: 500; }

/* top bar used on every inner page */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 26px 32px;
  background: rgba(247, 247, 247, 0.92);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(6px);
}
.topbar .brand {
  font-family: 'Jost', 'Noto Sans TC', sans-serif; font-weight: 500; font-size: 17px;
  text-decoration: none; letter-spacing: 1.5px;
  display: flex; align-items: center; line-height: 0;
}
.topbar .brand img { height: 30px; width: auto; display: block; }
.topbar .back {
  font-size: 13px; text-decoration: none; border: 1px solid var(--ink);
  padding: 7px 18px; border-radius: 20px; transition: background .15s ease, color .15s ease;
  letter-spacing: 0.3px;
}
.topbar .back:hover { background: var(--ink); color: var(--bg); }
.top-nav { display: flex; gap: 36px; }
.top-nav a {
  text-decoration: none; font-size: 14px; letter-spacing: 0.5px;
  color: var(--ink); padding-bottom: 2px; border-bottom: 1px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
.top-nav a:hover { border-bottom-color: var(--ink); color: var(--ink); }

.menu-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 6px;
  flex-direction: column; gap: 5px; align-items: flex-end;
}
.menu-toggle span { display: block; width: 22px; height: 1.5px; background: var(--ink); }

@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; }
  .menu-toggle { display: flex; }
  .top-nav {
    display: none; width: 100%;
    flex-direction: column; gap: 0;
    order: 3;
    margin-top: 18px; padding-top: 4px;
    border-top: 1px solid var(--line);
  }
  .top-nav.open { display: flex; }
  .top-nav a {
    padding: 14px 0; border-bottom: 1px solid var(--line);
  }
}

.topbar-icons { display: flex; align-items: center; gap: 22px; }
.icon-link {
  display: flex; align-items: center; position: relative;
  text-decoration: none; color: var(--ink); line-height: 0;
  transition: opacity .15s ease;
}
.icon-link:hover { color: var(--ink); opacity: 0.6; }
.icon-link svg { display: block; width: 20px; height: 20px; }

.search-box {
  display: none;
  position: absolute;
  top: 100%;
  right: 32px;
  margin-top: 10px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 14px;
  align-items: center;
  gap: 8px;
  z-index: 50;
}
.search-box.open { display: flex; }
.search-box input {
  border: none; outline: none; font-size: 14px; width: 200px;
  font-family: inherit; color: var(--ink); background: transparent;
}
.search-box button {
  background: none; border: none; cursor: pointer; padding: 0; color: var(--ink);
  display: flex; align-items: center; line-height: 0;
}
.search-box button svg { width: 16px; height: 16px; display: block; }
@media (max-width: 700px) {
  .search-box { right: 16px; left: 16px; }
  .search-box input { width: 100%; }
}

.site-footer {
  text-align: center;
  padding: 48px 32px 36px;
  margin-top: 40px;
  border-top: 1px solid var(--line);
}
.site-footer .footer-links {
  font-size: 13px;
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}
.site-footer .footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0 4px;
}
.site-footer .footer-links a:hover { opacity: 0.6; }
.site-footer .footer-copyright {
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.3px;
}

.section { padding: 64px 32px; }
p.placeholder { color: var(--ink-soft); font-size: 14px; }

/* placeholder image box */
.img-placeholder {
  background: var(--surface-2);
  border: 1px dashed #cfcfcb;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-size: 13px;
  border-radius: 2px;
}

/* main menu cards */
.menu-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
  max-width: 960px; margin: 52px auto; padding: 0 32px;
}
.menu-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: 2px;
  padding: 48px 20px; text-align: center;
  font-family: 'Jost', 'Noto Sans TC', sans-serif; font-weight: 400; font-size: 15px;
  letter-spacing: 1px;
  transition: border-color .18s ease, color .18s ease;
}
.menu-card:hover {
  border-color: var(--ink); color: var(--ink);
}
@media (max-width: 700px) { .menu-grid { grid-template-columns: 1fr; } }

/* product listing: image left, info right */
.product-grid { display: flex; flex-direction: column; gap: 44px; }
.product-card {
  display: flex; gap: 32px; align-items: flex-start;
  background: transparent; border: none; border-radius: 0; padding: 0;
  transition: opacity .18s ease;
}
.product-card:hover { opacity: 0.85; }
.product-card .thumb {
  width: 260px; flex-shrink: 0;
  aspect-ratio: 1/1; background: var(--surface-2); border-radius: 2px;
  display: flex; align-items: center; justify-content: center; color: var(--ink-soft); font-size: 13px;
  overflow: hidden;
}
.product-card .info { flex: 1; min-width: 0; }
.product-card h3 { margin: 0 0 6px; font-size: 15px; font-weight: 500; letter-spacing: 0.3px; }
.product-card .price { font-family: 'Jost', 'Noto Sans TC', sans-serif; font-weight: 400; font-size: 14px; margin: 0 0 14px; color: var(--ink-soft); }
.product-card .desc { font-size: 13px; color: var(--ink); margin: 0 0 16px; line-height: 1.8; }
.spec-line { margin: 0 0 4px; font-size: 12px; color: var(--ink-soft); }
.photo-row { display: flex; gap: 6px; margin-bottom: 14px; }
.photo-mini {
  flex: 1; aspect-ratio: 1/1; background: var(--surface-2); border: 1px dashed #cfcfcb;
  border-radius: 2px; display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #b5b5b1; overflow: hidden;
}
@media (max-width: 700px) {
  .product-card { flex-direction: column; }
  .product-card .thumb { width: 100%; }
}

/* photo-only grids: artwork gallery + shop listing */
.artwork-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
}
.artwork-item {
  aspect-ratio: 1/1; background: var(--surface-2); overflow: hidden;
  cursor: pointer; border: none; padding: 0; display: block; position: relative;
  text-decoration: none; color: inherit;
}
.artwork-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .18s ease; }
.artwork-item:hover img { opacity: 0.8; }
.shop-price {
  position: absolute; left: 12px; bottom: 12px;
  font-family: 'Jost', 'Noto Sans TC', sans-serif; font-size: 13px;
  background: rgba(247,247,247,0.9); padding: 4px 10px; border-radius: 2px;
  color: var(--ink);
}
.shop-price.sold { color: var(--ink-soft); }
.artwork-name {
  position: absolute; left: 12px; bottom: 12px;
  font-family: 'Jost', 'Noto Sans TC', sans-serif; font-size: 13px;
  background: rgba(247,247,247,0.9); padding: 4px 10px; border-radius: 2px;
  color: var(--ink); max-width: calc(100% - 24px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 700px) { .artwork-grid { grid-template-columns: repeat(2, 1fr); } }

/* lightbox / detail overlay */
.lightbox {
  display: none; position: fixed; inset: 0; background: rgba(247,247,247,0.97);
  z-index: 100; overflow-y: auto;
}
.lightbox.show { display: block; }
.lightbox-inner { max-width: 720px; margin: 0 auto; padding: 80px 32px 60px; }
.lightbox-close {
  position: fixed; top: 24px; right: 32px; background: none; border: none;
  font-size: 28px; font-weight: 300; cursor: pointer; color: var(--ink); line-height: 1;
  font-family: 'Jost', sans-serif;
}
.lightbox-photo { width: 100%; aspect-ratio: 1/1; background: var(--surface-2); overflow: hidden; margin-bottom: 10px; position: relative; }
.lightbox-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lightbox-inner .carousel-dots { margin-bottom: 24px; }
.lightbox-inner h3 { font-size: 15px; margin: 0 0 6px; }
.lightbox-inner .desc { font-size: 13px; line-height: 1.8; margin: 0 0 12px; }
.lightbox-inner .spec-line { font-size: 12px; color: var(--ink-soft); }

/* individual product page */
.product-detail { display: flex; gap: 48px; align-items: flex-start; }
.product-carousel { width: 380px; flex-shrink: 0; }
.carousel-main {
  aspect-ratio: 1/1; background: var(--surface-2); overflow: hidden; margin-bottom: 10px; position: relative;
}
.carousel-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.85); border: none; width: 32px; height: 32px;
  border-radius: 50%; cursor: pointer; font-size: 16px; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.carousel-nav.prev { left: 10px; }
.carousel-nav.next { right: 10px; }
.carousel-dots { display: flex; gap: 6px; justify-content: center; }
.carousel-dots span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--line); cursor: pointer;
}
.carousel-dots span.active { background: var(--ink); }
.product-detail .info { flex: 1; }
.product-detail h1 { font-size: 18px; margin: 0 0 8px; letter-spacing: 0.5px; }
.product-detail .price { font-family: 'Jost', 'Noto Sans TC', sans-serif; font-size: 15px; color: var(--ink-soft); margin: 0 0 18px; }
.product-detail .desc { font-size: 13px; line-height: 1.8; margin: 0 0 16px; }
@media (max-width: 700px) {
  .product-detail { flex-direction: column; }
  .product-carousel { width: 100%; }
}

/* about page */
.about-detail { display: flex; gap: 48px; align-items: flex-start; }
.about-photo { width: 380px; flex-shrink: 0; }
.about-photo img { width: 100%; height: auto; display: block; }
.about-text { flex: 1; padding-top: 4px; }
.about-text p {
  font-size: 14px; line-height: 2; margin: 0 0 20px; letter-spacing: 0.3px;
}
.about-label { font-weight: 700; }

/* legal / info pages (privacy, terms, faq) */
.legal-content { max-width: 640px; }
.legal-title { font-weight: 700; font-size: 14px; margin: 0 0 28px; }
.legal-content h2 { font-size: 14px; font-weight: 700; margin: 28px 0 10px; }
.legal-content h2:first-of-type { margin-top: 0; }
.legal-content p { font-size: 14px; line-height: 2; margin: 0 0 14px; letter-spacing: 0.3px; }
.legal-content ul { margin: 0 0 14px; padding-left: 20px; }
.legal-content li { font-size: 14px; line-height: 2; }
.legal-content .updated { color: var(--ink-soft); margin-top: 32px; }
@media (max-width: 700px) {
  .about-detail { flex-direction: column; }
  .about-photo { width: 100%; }
}

/* faq list */
.faq-item { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq-item h3 { margin: 0 0 6px; font-size: 15px; }

/* cart */
.cart-badge {
  position: absolute; top: -7px; right: -9px;
  background: var(--ink); color: #FFFFFF; border-radius: 999px;
  font-size: 10px; line-height: 1; padding: 3px 5px; min-width: 8px; text-align: center;
}
.btn-add-cart {
  margin-top: 12px; width: 100%; padding: 12px; border-radius: 24px;
  border: none; background: var(--surface-2); color: var(--ink); cursor: pointer;
  font-size: 13px; font-weight: 500; font-family: inherit; letter-spacing: 0.5px;
  transition: background .15s ease;
}
.btn-add-cart:hover { background: #E2E2DE; }

.cart-row {
  display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.cart-row input[type="number"] {
  width: 60px; padding: 7px; border: 1px solid var(--line); border-radius: 2px; font-family: inherit;
}
.cart-remove { background: none; border: none; color: var(--ink-soft); cursor: pointer; font-size: 12px; font-family: inherit; text-decoration: underline; }
.cart-total-row {
  display: flex; justify-content: space-between; align-items: baseline; padding: 24px 0;
  font-family: 'Jost', 'Noto Sans TC', sans-serif; font-size: 17px; font-weight: 500;
}
.checkout-btn {
  display: block; width: 100%; padding: 16px; text-align: center;
  background: var(--surface-2); color: var(--ink); border: none; border-radius: 24px;
  font-size: 14px; font-weight: 500; font-family: inherit; cursor: pointer;
  letter-spacing: 0.5px;
  transition: background .15s ease;
}
.checkout-btn:hover { background: #E2E2DE; }

/* add-to-cart popup */
.cart-popup {
  display: none;
  position: fixed; top: 90px; right: 24px; z-index: 300;
  width: 320px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.14);
  padding: 18px;
}
.cart-popup.show { display: block; animation: cartPopupIn .18s ease; }
@keyframes cartPopupIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.cart-popup-header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; font-weight: 500; margin-bottom: 14px;
}
.cart-popup-header .ok { display: flex; align-items: center; gap: 6px; }
.cart-popup-close {
  background: none; border: none; cursor: pointer; font-size: 18px; line-height: 1;
  color: var(--ink-soft); padding: 0;
}
.cart-popup-item { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cart-popup-item img {
  width: 56px; height: 56px; object-fit: cover; border-radius: 4px; background: var(--surface-2);
}
.cart-popup-item span { font-size: 14px; }
.cart-popup-checkout {
  display: block; width: 100%; padding: 12px; text-align: center; text-decoration: none;
  background: var(--surface-2); color: var(--ink); border: none; border-radius: 24px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.5px; cursor: pointer;
  transition: background .15s ease;
}
.cart-popup-checkout:hover { background: #E2E2DE; }

/* live chat widget */
.chat-panel {
  display: none; flex-direction: column;
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  width: 320px; max-width: calc(100vw - 32px);
  height: 420px; max-height: calc(100vh - 48px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.14); overflow: hidden;
}
.chat-panel.show { display: flex; }
.chat-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  font-size: 14px; font-weight: 500; letter-spacing: 0.3px;
}
.chat-header button {
  background: none; border: none; font-size: 22px; font-weight: 300;
  cursor: pointer; color: var(--ink); line-height: 1; font-family: 'Jost', sans-serif;
}
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 80%; padding: 9px 13px; border-radius: 14px; font-size: 13px; line-height: 1.5; }
.chat-msg.from-customer { align-self: flex-end; background: var(--ink); color: #FFFFFF; border-bottom-right-radius: 4px; }
.chat-msg.from-admin { align-self: flex-start; background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-input-row { display: flex; border-top: 1px solid var(--line); }
.chat-input-row input {
  flex: 1; border: none; padding: 12px 14px; font-size: 13px; font-family: inherit; outline: none;
  background: transparent;
}
.chat-input-row button {
  border: none; background: var(--surface-2); color: var(--ink); padding: 0 18px; margin: 8px;
  border-radius: 20px; cursor: pointer; font-size: 13px; transition: background .15s ease;
}
.chat-input-row button:hover { background: #E2E2DE; }
