:root {
  --bg: #07131f;
  --panel: rgba(9, 25, 40, 0.84);
  --panel-strong: #0f2135;
  --text: #f4f8fd;
  --muted: #98abc2;
  --accent: #39d0ff;
  --accent-soft: rgba(57, 208, 255, 0.18);
  --highlight: #ffd166;
  --success: #6fe7b2;
  --danger: #ff9f9f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans TC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(57, 208, 255, 0.14), transparent 25%),
    radial-gradient(circle at top right, rgba(255, 209, 102, 0.12), transparent 22%),
    linear-gradient(135deg, #07131f 0%, #091a2b 45%, #050c16 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.85));
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
}

textarea {
  resize: vertical;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 90px;
}

.site-header,
.hero-card,
.section-block,
.cta-banner,
.site-footer,
.product-card,
.trust-grid article,
.faq-item,
.hero-panel,
.dialog-card,
.admin-shell,
.inventory-item {
  backdrop-filter: blur(22px);
  background: var(--panel);
  border: 1px solid rgba(130, 182, 255, 0.16);
  box-shadow: var(--shadow);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  position: sticky;
  top: 14px;
  z-index: 20;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255, 208, 102, 0.16), rgba(255, 209, 102, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.brand-logo-image,
.brand-logo-fallback svg {
  width: 60px;
  height: 60px;
  display: block;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  line-height: 1.15;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.language-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.language-chip.active {
  background: rgba(57, 208, 255, 0.14);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(57, 208, 255, 0.22);
}

.top-nav a,
.footer-links a {
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.top-nav a:hover,
.footer-links a:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.btn,
.ghost-btn,
.admin-tab {
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.floating-line:hover,
.icon-btn:hover,
.ghost-btn:hover,
.admin-tab:hover {
  transform: translateY(-2px);
}

.btn-primary,
.floating-line {
  background: linear-gradient(135deg, var(--accent) 0%, #52f2ff 100%);
  color: #032032;
  font-weight: 800;
  box-shadow: 0 16px 30px rgba(57, 208, 255, 0.22);
}

.line-button,
#header-line-link,
#hero-line-link,
#cta-line-link,
#footer-line-link,
#floating-line-link,
#dialog-line-link {
  background: linear-gradient(135deg, #39e66f 0%, #24cf57 100%);
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(36, 207, 87, 0.34);
  border: 1px solid rgba(145, 255, 176, 0.18);
  font-weight: 800;
}

.line-button::before,
#header-line-link::before,
#hero-line-link::before,
#cta-line-link::before,
#footer-line-link::before,
#floating-line-link::before,
#dialog-line-link::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background-color: currentColor;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20.4 11.9c0-4.3-3.8-7.9-8.4-7.9S3.6 7.6 3.6 11.9c0 3.8 3 7 7 7.6l-.5 2.9c-.1.3.3.6.6.4l3.4-2.4h.1c4.6 0 8.2-3.6 8.2-8.5Zm-10 2.2H8.6V9.7h1.8v4.4Zm2.5 0h-1.8V9.7h1.8v4.4Zm3.7 0h-3.1V9.7h1.8v2.8h1.3v1.6Z'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

a.line-button,
button.line-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding-inline: 22px;
  letter-spacing: 0.01em;
}

.line-button:hover,
#header-line-link:hover,
#hero-line-link:hover,
#cta-line-link:hover,
#footer-line-link:hover,
#floating-line-link:hover,
#dialog-line-link:hover {
  background: linear-gradient(135deg, #47ef7b 0%, #29db61 100%);
  box-shadow: 0 20px 38px rgba(41, 219, 97, 0.38);
}

.btn-secondary,
.ghost-btn,
.admin-tab {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.danger-btn {
  color: var(--danger);
  border-color: rgba(255, 159, 159, 0.25);
}

.hero-card {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 26px;
  padding: 34px;
  border-radius: var(--radius-xl);
  margin-top: 24px;
}

.hero-copy h2 {
  font-size: clamp(2.2rem, 4vw, 4rem);
  margin-bottom: 16px;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.8;
}

.hero-actions,
.product-actions,
.dialog-actions,
.cta-actions,
.admin-actions,
.inventory-item-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions {
  margin: 28px 0;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  list-style: none;
}

.hero-stats li {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-stats strong {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.hero-stats span,
.hero-hot-card p,
.trust-grid p,
.faq-answer,
.site-footer p,
.inventory-tip,
.inventory-item p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-panel {
  border-radius: var(--radius-lg);
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(57, 208, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--panel-strong);
}

.panel-title {
  font-weight: 700;
  margin-bottom: 16px;
}

.hero-hot-list,
.faq-list,
.inventory-list {
  display: grid;
  gap: 14px;
}

.hero-hot-card,
.faq-item,
.inventory-item {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-hot-card strong,
.product-card h3,
.faq-question,
.inventory-item h4 {
  display: block;
  font-size: 1.02rem;
  margin-bottom: 8px;
}

.product-card h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.45em;
}

.section-block,
.cta-banner,
.site-footer {
  padding: 28px;
  border-radius: var(--radius-xl);
  margin-top: 22px;
}

.section-heading {
  margin-bottom: 20px;
}

.split-heading,
.compact {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.search-wrap {
  display: grid;
  gap: 8px;
  min-width: min(100%, 320px);
}

.search-wrap span,
.admin-grid label {
  font-size: 0.92rem;
  color: var(--muted);
}

.trust-grid,
.product-grid,
.entity-grid {
  display: grid;
  gap: 18px;
}

.trust-grid,
.entity-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trust-grid article,
.entity-grid article,
.product-card {
  border-radius: var(--radius-lg);
  padding: 22px;
}

.category-pills {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.category-pill {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 999px;
  padding: 11px 16px;
  cursor: pointer;
}

.category-pill.active {
  background: var(--accent-soft);
  border-color: rgba(57, 208, 255, 0.42);
  color: var(--accent);
}

.product-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.product-card {
  display: grid;
  gap: 14px;
}

.product-card-clickable {
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.product-card-clickable:hover {
  transform: translateY(-4px);
  border-color: rgba(89, 235, 140, 0.32);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
}

.product-card-clickable:focus-visible {
  outline: 2px solid rgba(89, 235, 140, 0.72);
  outline-offset: 4px;
}

.product-cover {
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.2), rgba(57, 208, 255, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.product-cover img,
.detail-cover-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: linear-gradient(180deg, rgba(9, 18, 29, 0.96), rgba(15, 24, 39, 0.96));
}

.product-cover-fallback,
.detail-cover-fallback {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top right, rgba(255, 209, 102, 0.28), transparent 35%),
    linear-gradient(180deg, rgba(10, 30, 47, 0.98), rgba(7, 19, 31, 0.98));
}

.fallback-cover-inner {
  display: grid;
  gap: 14px;
  place-items: center;
  text-align: center;
  padding: 22px;
}

.fallback-cover-inner.large {
  min-height: 100%;
  align-content: center;
}

.fallback-initial {
  width: 86px;
  height: 86px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: #09131f;
  background: linear-gradient(135deg, #ffe29a, #f8be45);
  box-shadow: 0 18px 40px rgba(248, 190, 69, 0.25);
}

.fallback-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.product-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 209, 102, 0.16);
  color: var(--highlight);
}

.product-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.92rem;
}

.product-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.4em;
}

.price-tag {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--success);
}

.product-card p,
.dialog-description,
.seo-copy p,
.entity-grid p {
  color: var(--muted);
  line-height: 1.8;
}

.seo-copy {
  display: grid;
  gap: 14px;
}

.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background:
    radial-gradient(circle at left center, rgba(57, 208, 255, 0.16), transparent 40%),
    linear-gradient(135deg, rgba(255, 209, 102, 0.08), rgba(57, 208, 255, 0.08)),
    var(--panel);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.floating-line {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 25;
  border: 0;
  border-radius: 999px;
  padding: 15px 18px;
}

dialog {
  border: 0;
  padding: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(6px);
}

.product-dialog {
  width: min(1180px, calc(100% - 24px));
}

.admin-dialog {
  width: min(1080px, calc(100% - 24px));
}

.dialog-card,
.admin-shell {
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(17, 38, 59, 0.98), rgba(7, 19, 31, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.dialog-card {
  padding: 26px;
  max-height: min(92vh, 1100px);
  overflow: auto;
}

.admin-shell {
  padding: 26px;
  max-height: min(88vh, 980px);
  overflow: auto;
}

.dialog-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.dialog-body {
  padding: 22px 0;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.15fr);
  gap: 26px;
  align-items: start;
}

.detail-cover-wrap {
  border-radius: 26px;
  overflow: hidden;
  min-height: 380px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.detail-summary {
  display: grid;
  gap: 18px;
}

.detail-cta {
  display: flex;
  flex-wrap: wrap;
}

.detail-content {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.detail-section {
  padding: 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-section h3 {
  margin-bottom: 16px;
}

.detail-section ul,
.detail-section ol {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.8;
}

.detail-richtext {
  color: var(--muted);
  line-height: 1.9;
}

.detail-richtext p,
.detail-richtext ul,
.detail-richtext ol {
  margin: 0 0 16px;
}

.detail-accordion-list {
  display: grid;
  gap: 14px;
}

.detail-accordion {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.detail-accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 700;
}

.detail-accordion summary::-webkit-details-marker {
  display: none;
}

.detail-accordion p,
.detail-accordion ul {
  margin: 0;
  padding: 0 20px 20px 40px;
  color: var(--muted);
  line-height: 1.8;
}

.dialog-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.dialog-meta span {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.dialog-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.dialog-points ul,
.dialog-points ol {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.admin-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.admin-tab.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(57, 208, 255, 0.42);
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.stack-form {
  display: grid;
  gap: 16px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-grid label {
  display: grid;
  gap: 8px;
}

.full-width {
  grid-column: 1 / -1;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
}

.inventory-panel {
  margin-top: 28px;
}

.inventory-list {
  max-height: 320px;
  overflow: auto;
}

.inventory-item {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.hidden {
  display: none !important;
}

@media (max-width: 960px) {
  .site-header,
  .cta-banner,
  .site-footer,
  .split-heading,
  .compact {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-card,
  .trust-grid,
  .entity-grid,
  .dialog-points,
  .admin-grid,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .desktop-line-btn {
    width: 100%;
  }

  .language-switcher {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 14px;
  }

  .site-header,
  .hero-card,
  .section-block,
  .cta-banner,
  .site-footer,
  .dialog-card,
  .admin-shell {
    padding: 20px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .top-nav {
    display: none;
  }
}
