:root {
  --bg0: #0b1220;
  --bg1: #121a2b;
  --ink: #f4f7ff;
  --muted: #9aa8c7;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #3ecfbf;
  --accent-2: #7aa2ff;
  --ok: #5ddea0;
  --bad: #ff8a9a;
  --tile: rgba(255, 255, 255, 0.04);
  --tile-hover: rgba(255, 255, 255, 0.08);
  --radius: 1.25rem;
  --font: "Be Vietnam Pro", "Noto Sans TC", "Noto Sans SC", sans-serif;
  --display: "Syne", "Be Vietnam Pro", "Noto Sans TC", "Noto Sans SC", sans-serif;
}

html[lang="en"] {
  --display: "Syne", "Be Vietnam Pro", sans-serif;
  --font: "Be Vietnam Pro", sans-serif;
}

html[lang="vi"] {
  --display: "Be Vietnam Pro", "Syne", "Noto Sans TC", "Noto Sans SC", sans-serif;
  --font: "Be Vietnam Pro", "Noto Sans TC", "Noto Sans SC", sans-serif;
}

html[lang="zh-TW"] {
  --display: "Noto Sans TC", "Be Vietnam Pro", "Syne", sans-serif;
  --font: "Noto Sans TC", "Be Vietnam Pro", sans-serif;
}

html[lang="zh-CN"] {
  --display: "Noto Sans SC", "Be Vietnam Pro", "Syne", sans-serif;
  --font: "Noto Sans SC", "Be Vietnam Pro", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.shop {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--font);
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(62, 207, 191, 0.22), transparent 55%),
    radial-gradient(700px 380px at 92% 0%, rgba(122, 162, 255, 0.2), transparent 50%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 40%, #0e1626);
  line-height: 1.45;
}
a { color: var(--accent); text-decoration: none; }

.shop-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(11, 18, 32, 0.72);
  border-bottom: 1px solid var(--line);
}
.shop-brand {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  color: var(--ink);
  justify-self: start;
}
.shop-brand-mark {
  font-family: "Syne", "Be Vietnam Pro", sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}
.shop-brand-sub {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}
.shop-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-self: center;
  font-family: var(--font);
}
.shop-nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1.25;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.shop-nav a.on,
.shop-nav a:hover {
  color: var(--ink);
  background: var(--tile-hover);
  border-color: var(--line);
}
.shop-langs {
  justify-self: end;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.shop-langs a {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}
.shop-langs a.on { color: var(--accent); }

.shop-main {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2.5rem;
  flex: 1;
}

.shop-hero {
  margin: 0.5rem 0 1.75rem;
  animation: rise 0.55s ease both;
}
.shop-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  max-width: 20ch;
}
.shop-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 36rem;
  font-size: 1.02rem;
}
.shop-hero-cta {
  display: inline-flex;
  margin-top: 1rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #061018;
  font-weight: 800;
  box-shadow: 0 12px 40px rgba(62, 207, 191, 0.25);
  transition: transform 0.2s ease;
}
.shop-hero-cta:hover { transform: translateY(-2px); color: #061018; }

.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 1.25rem;
  animation: rise 0.55s ease 0.08s both;
}
.shop-toolbar select,
.shop-toolbar button {
  font: inherit;
  color: var(--ink);
  background: var(--tile);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
}
.shop-toolbar button {
  background: var(--ink);
  color: var(--bg0);
  font-weight: 700;
  cursor: pointer;
}
.shop-hint {
  width: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.shop-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  animation: rise 0.55s ease 0.14s both;
}
.product {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--tile);
  border: 1px solid var(--line);
  color: var(--ink);
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s;
}
.product:hover {
  transform: translateY(-4px);
  background: var(--tile-hover);
  border-color: rgba(62, 207, 191, 0.35);
}
.product-media {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
  background: #1a2438;
}
.product-body {
  padding: 0.85rem 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}
.product-body h2 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.25;
}
.product-meta { color: var(--muted); font-size: 0.78rem; }
.product-price {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--accent);
  margin-top: 0.15rem;
}
.product-price small {
  display: block;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  margin-top: 0.15rem;
}
.pill {
  align-self: flex-start;
  margin-top: auto;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.pill.ok { background: rgba(93, 222, 160, 0.15); color: var(--ok); }
.pill.bad { background: rgba(255, 138, 154, 0.15); color: var(--bad); }

.item-hero {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 200px) 1fr;
  align-items: center;
  margin-bottom: 1.75rem;
  animation: rise 0.5s ease both;
}
@media (max-width: 640px) {
  .shop-top { grid-template-columns: 1fr auto; }
  .shop-nav {
    grid-column: 1 / -1;
    order: 3;
    justify-self: stretch;
    justify-content: center;
  }
  .shop-nav a {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    white-space: normal;
    font-size: 0.85rem;
    padding: 0.4rem 0.65rem;
  }
  .item-hero { grid-template-columns: 1fr; }
}
@media (max-width: 390px) {
  .shop-langs { gap: 0.3rem; }
  .shop-langs a { font-size: 0.72rem; }
  .shop-hero h1 { max-width: none; }
}
.item-hero img {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.item-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0 0 0.4rem;
}
.item-range {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent);
  margin: 0.5rem 0;
}
.section-title {
  font-family: var(--display);
  font-size: 1.2rem;
  margin: 0 0 0.85rem;
}

.shop-list { display: flex; flex-direction: column; gap: 0.75rem; }
.shop-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: var(--tile);
  border: 1px solid var(--line);
  animation: rise 0.45s ease both;
}
.shop-row-main h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.shop-row-main h3 a { color: var(--ink); }
.shop-row-main h3 a:hover { color: var(--accent); }
.shop-row-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
  text-align: right;
}
.shop-row-price small {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}
.contact-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(122, 162, 255, 0.12);
  border: 1px solid rgba(122, 162, 255, 0.28);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
}
.contact-chip em {
  font-style: normal;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.75rem;
}

.buy-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--tile);
  border: 1px solid var(--line);
  margin-bottom: 0.75rem;
}
.buy-card img {
  width: 72px;
  height: 72px;
  border-radius: 1rem;
  object-fit: cover;
}
.buy-card h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.empty {
  color: var(--muted);
  padding: 2rem 0;
  text-align: center;
}

.shop-foot {
  margin-top: auto;
  padding: 1.5rem 1.25rem 2rem;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}
.shop-foot-note {
  max-width: 1120px;
  margin: 0 auto 0.75rem;
  color: var(--muted);
  font-size: 0.86rem;
}
.shop-foot-meta {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.8rem;
}
.shop-foot-ops {
  color: var(--muted);
  opacity: 0.55;
  font-size: 0.78rem;
}
.shop-foot-ops:hover { opacity: 1; color: var(--accent); }

.blog-grid {
  display: grid;
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto;
}
.blog-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--tile);
  border: 1px solid var(--line);
}
.blog-card img {
  width: 96px;
  height: 96px;
  border-radius: 1rem;
  object-fit: cover;
}
.blog-card h2 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.blog-card h2 a { color: inherit; text-decoration: none; }
.blog-card h2 a:hover { color: var(--accent); }
.blog-summary { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.blog-read { font-size: 0.85rem; font-weight: 600; color: var(--accent); }

.blog-article {
  max-width: 720px;
  margin: 0 auto;
  overflow-wrap: anywhere;
}
.blog-cover {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.blog-article h1 { margin: 0 0 0.75rem; font-size: clamp(1.4rem, 4vw, 1.85rem); line-height: 1.2; }
.blog-lead { color: var(--muted); font-size: 1.05rem; line-height: 1.5; margin-bottom: 1.25rem; }
.blog-body {
  line-height: 1.65;
  font-size: 1rem;
}
.blog-body h2, .blog-body h3 { margin: 1.25rem 0 0.5rem; line-height: 1.3; }
.blog-body p { margin: 0 0 0.85rem; }
.blog-body ul, .blog-body ol { margin: 0 0 0.85rem 1.25rem; padding: 0; }
.blog-body img { max-width: 100%; height: auto; border-radius: 0.75rem; }
.blog-body a { color: var(--accent); word-break: break-word; }
.blog-body pre, .blog-body code {
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 0.35rem;
}
.blog-body pre { padding: 0.75rem; overflow-x: auto; max-width: 100%; }
.blog-body code { padding: 0.1rem 0.35rem; }

@media (max-width: 480px) {
  .blog-card { grid-template-columns: 1fr; }
  .blog-card img { width: 100%; height: 160px; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
