/* Glysa (Victor Bartis) — licensed font supplied by 16gen; do not reuse elsewhere. */
@font-face {
  font-family: "Glysa";
  src: url("/assets/fonts/glysa.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --serif: "Glysa", "Noto Serif SC", Georgia, serif;
  --ink: #242424;
  --muted: #6b6b6b;
  --line: #eeeeee;
  --bg: #ffffff;
  --soft: #f4f4f4;
  --accent: #1229ea;
  --gutter: clamp(16px, 4vw, 64px);
  --max: 1200px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2 { font-weight: 400; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(36px, 6vw, 64px); }
h2 { font-size: clamp(28px, 4.5vw, 48px); }

.zh { font-family: "Noto Serif SC", serif; font-weight: 700; }
.big { font-size: clamp(22px, 3vw, 30px); line-height: 1.35; font-weight: 400; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(6px);
}
.site-logo img { width: 32px; height: 32px; }
.site-header nav a { font-size: 15px; font-weight: 400; }
.site-header nav { display: flex; gap: 24px; }
.cart-count { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; vertical-align: 1px; }
.cart-count[hidden] { display: none; }

main > section, .product, .text-page { padding: 0 var(--gutter); max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
main > section + section { margin-top: clamp(80px, 12vw, 160px); }

/* Buttons */
.buy, .button {
  display: inline-block;
  padding: 9px 22px;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.3;
  background: transparent;
  transition: background .15s, color .15s;
  font-family: inherit;
  cursor: pointer;
}
.buy--added, .buy--added:hover { background: var(--accent); color: #fff; }
.buy:hover, .button:hover { background: var(--accent); color: #fff; text-decoration: none; }
.buy--soldout { border-color: var(--muted); color: var(--muted); cursor: not-allowed; }
.buy--soldout:hover { background: transparent; color: var(--muted); }
.button { border-color: var(--ink); background: var(--ink); color: #fff; padding: 12px 48px; }
.button:hover { background: rgba(0, 0, 0, .8); border-color: rgba(0, 0, 0, .8); }

/* Home */
.page-home main > .hero { max-width: none; padding: 0; position: relative; }
.hero-img { width: 100%; max-height: 92vh; object-fit: cover; }
.hero-text {
  position: absolute; left: var(--gutter); top: clamp(16px, 4vw, 48px);
  margin: 0; max-width: 480px;
  font-size: clamp(20px, 3vw, 32px); line-height: 1.3; font-weight: 400;
}

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.circle-text { width: clamp(90px, 14vw, 150px); }
.holder-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 3vw, 48px); margin-top: 32px; }
.holder-card { display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: clamp(18px, 2.4vw, 28px); font-weight: 400; }
.holder-card img { width: 100%; max-width: 320px; }

.incense-list { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--line); }
.incense-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: start; }
.incense-name { font-size: clamp(32px, 6vw, 64px); line-height: 1.1; font-weight: 400; }
.incense-detail { display: grid; grid-template-columns: 56px 1fr; column-gap: 16px; font-size: 14px; color: var(--muted); }
.incense-detail .zh { margin: 0; color: var(--ink); font-size: 18px; }
.incense-detail p:last-child { grid-column: 2; margin: 4px 0 0; }
.incense-icon { width: 48px; height: 56px; object-fit: contain; grid-row: span 2; }
.go-shop { text-align: center; margin: 64px 0 0; font-size: clamp(32px, 6vw, 64px); font-weight: 400; }

.newsletter { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.newsletter .big { margin: 0; }

.instagram h2 { margin-bottom: .2em; }

.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 80px); align-items: center; }
.about-logo { width: 110px; margin-bottom: 16px; }
.about-img { width: 100%; max-width: 360px; justify-self: center; }
.say-hi { margin-top: 32px; font-weight: 400; }

/* Shop */
.page-head { padding-top: clamp(32px, 6vw, 80px) !important; }
.page-head p { font-size: 18px; margin: 0; }
.page-shop main > .shop-grid { margin-top: 48px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 56px clamp(16px, 3vw, 40px); }
.card-img { display: block; background: var(--soft); aspect-ratio: 4 / 5; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card-img:hover img { transform: scale(1.03); }
.card-body { padding-top: 16px; }
.card-body h2 { font-size: 22px; margin: 0; }
.card-body h2 .zh { font-size: 15px; margin-left: 6px; }
.price { margin: 4px 0 12px; font-weight: 400; }
.specs-short { list-style: none; padding: 0; margin: 0 0 16px; font-size: 13px; color: var(--muted); }

/* Product detail (modelled on the original incenseholder_blue page) */
.page-product .product {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(24px, 6vw, 88px); align-items: start;
  padding-top: clamp(16px, 4vw, 56px);
}
.product-media { min-width: 0; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; }
.slide img { width: 100%; height: 100%; object-fit: contain; }
.slide-dots { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.slide-dots a { width: 7px; height: 7px; border-radius: 50%; background: #d4d4d4; }
.slide-dots a:hover { background: var(--ink); }
.product-info { position: relative; z-index: 1; padding-top: 8px; }
.product-info h1, .related-name { font-family: var(--serif); font-weight: 400; }
.product-info h1 { font-size: clamp(30px, 3.6vw, 40px); margin: 0 0 12px; }
.product-price { color: var(--accent); font-size: 17px; font-weight: 400; margin: 0 0 20px; letter-spacing: .02em; }
.product-desc { font-size: 13px; max-width: 460px; }
.product-desc p { margin: 0 0 10px; }
.product-info .buy { margin: 16px 0 48px; min-width: 150px; text-align: center; font-size: 17px; }
.specs { margin: 0; max-width: 520px; }
.spec { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 6px 0; font-size: 12px; }
.spec dt { font-weight: 400; }
.spec dd { margin: 0; }
.spec dd p { margin: 0 0 6px; }
.product-zh {
  position: absolute; right: calc(-1 * var(--gutter)); top: 30%; z-index: 0; margin: 0;
  font-family: "Noto Serif SC", serif; font-weight: 300; line-height: 1;
  font-size: clamp(120px, 16vw, 200px); color: transparent;
  -webkit-text-stroke: 1px #e2e2e2; pointer-events: none; user-select: none;
  writing-mode: vertical-rl;
}
.related { margin-top: clamp(64px, 10vw, 120px); }
.related h2 { font-size: 17px; font-weight: 400; margin-bottom: 0; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 3vw, 24px); margin-top: 20px; }
.related-card { display: flex; flex-direction: column; }
.related-card:hover { text-decoration: none; }
.related-card img { aspect-ratio: 7 / 10; object-fit: cover; width: 100%; background: var(--soft); transition: opacity .2s; }
.related-card:hover img { opacity: .85; }
.related-name { font-size: clamp(14px, 1.8vw, 18px); margin-top: 14px; }
.related-price { font-size: 11px; color: #9a9a9a; letter-spacing: .04em; margin-top: 2px; }

/* Cart */
.page-cart main > .cart { margin-top: 32px; }
.cart-empty { font-size: 18px; }
.cart-empty a { text-decoration: underline; text-underline-offset: 3px; }
.cart-items { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); max-width: 760px; }
.cart-item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-img img { width: 72px; height: 90px; object-fit: cover; background: var(--soft); }
.cart-name { display: block; font-family: var(--serif); font-size: 18px; }
.cart-price { font-size: 13px; color: var(--muted); }
.cart-qty { display: flex; align-items: center; gap: 4px; }
.cart-qty span { min-width: 28px; text-align: center; font-weight: 400; }
.cart-qty button, .cart-remove { font: inherit; background: none; border: 1px solid var(--line); color: var(--ink); cursor: pointer; }
.cart-qty button { width: 32px; height: 32px; font-size: 16px; }
.cart-qty button:hover { border-color: var(--ink); }
.cart-remove { border: 0; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: 4px; }
.cart-summary { max-width: 760px; margin-top: 24px; }
.cart-summary dl { margin: 0 0 16px; max-width: 360px; margin-left: auto; }
.cart-summary dl div { display: flex; justify-content: space-between; padding: 4px 0; }
.cart-summary dd { margin: 0; }
.cart-total { border-top: 1px solid var(--ink); margin-top: 6px; padding-top: 10px !important; font-weight: 600; }
.cart-note { font-size: 13px; color: var(--muted); text-align: right; }
.cart-summary .button { display: block; margin-left: auto; font-family: inherit; font-size: 16px; cursor: pointer; }
.cart-summary .button:disabled { opacity: .6; cursor: wait; }
.cart-error { color: #c0172e; text-align: right; }

/* Text pages */
.text-page { padding-top: clamp(32px, 6vw, 80px) !important; }
.text-body { max-width: 680px; font-size: 15px; overflow-wrap: anywhere; }
.text-body h2 { font-size: 18px; font-weight: 600; margin: 2em 0 .5em; }

/* Footer */
.site-footer {
  display: grid; grid-template-columns: auto auto auto 1fr; gap: 16px clamp(24px, 6vw, 80px); align-items: start;
  margin-top: clamp(80px, 12vw, 160px);
  padding: 56px var(--gutter);
  background: #000;
  color: #fff;
  font-size: 14px;
}
.footer-mark { width: 40px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.copyright { justify-self: end; align-self: end; margin: 0; color: #9a9a9a; font-size: 12px; }
.footer-mark { filter: invert(1); }

@media (max-width: 760px) {
  .incense-row, .about, .page-product .product { grid-template-columns: 1fr; }
  .incense-row { gap: 8px; }
  .product-zh { display: none; }
  .slide { aspect-ratio: 1; }
  .spec { grid-template-columns: 110px 1fr; }
  .site-footer { grid-template-columns: auto 1fr; }
  .footer-mark { grid-row: span 2; }
  .copyright { grid-column: 1 / -1; justify-self: start; }
  .hero-text { position: static; padding: 16px var(--gutter) 0; }
  .cart-item { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .cart-img img { width: 64px; height: 80px; }
  .cart-remove { grid-column: 2; justify-self: start; padding: 0; }
  .cart-summary .button { width: 100%; }
}

.newsletter-img { width: 100%; max-width: 420px; align-self: flex-end; }
.text-aside { width: 180px; margin-top: 48px; }

main { overflow-x: clip; }
