:root {
  --bg: #f5f7fb;
  --text: #1f2937;
  --primary: #0f3e8c;
  --secondary: #f0b90b;
  --danger: #b91c1c;
  --muted: #6b7280;
  --card: #ffffff;
  --line: #d9e0ee;
  --body-glow: #e6f0ff;
  --header-grad-1: #08275a;
  --header-grad-2: #114da8;
  --hero-grad-1: #0f3e8c;
  --hero-grad-2: #0a2b64;
  --hero-accent: rgba(167, 223, 255, 0.22);
  --hero-border: rgba(208, 241, 255, 0.28);
  --hero-dot: rgba(210, 240, 255, 0.34);
  --brand-grad-1: rgba(16, 76, 164, 0.97);
  --brand-grad-2: rgba(8, 47, 102, 0.97);
  --brand-accent: rgba(201, 236, 255, 0.3);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 15% 10%, var(--body-glow), transparent 30%), var(--bg);
  background-repeat: no-repeat;
  background-size: cover;
}

body.theme-fresh-green {
  --bg: #f2f8f4;
  --text: #1f2b24;
  --primary: #1e6b4d;
  --secondary: #f4b53f;
  --line: #d6e5dc;
  --body-glow: #d9f3e2;
  --header-grad-1: #1f5a40;
  --header-grad-2: #2f8c5f;
  --hero-grad-1: #2e805a;
  --hero-grad-2: #1f5a40;
  --hero-accent: rgba(185, 240, 215, 0.24);
  --hero-border: rgba(191, 238, 215, 0.34);
  --hero-dot: rgba(219, 248, 233, 0.35);
  --brand-grad-1: rgba(37, 125, 83, 0.97);
  --brand-grad-2: rgba(24, 88, 59, 0.97);
  --brand-accent: rgba(213, 246, 226, 0.28);
}

body.theme-warm-gold {
  --bg: #faf6ef;
  --text: #362d1e;
  --primary: #8f4d17;
  --secondary: #f4b53f;
  --line: #eadfcd;
  --body-glow: #ffe8c6;
  --header-grad-1: #8b4c17;
  --header-grad-2: #c67a1d;
  --hero-grad-1: #9c5b1f;
  --hero-grad-2: #6f3f14;
  --hero-accent: rgba(255, 220, 168, 0.25);
  --hero-border: rgba(255, 223, 175, 0.35);
  --hero-dot: rgba(255, 241, 214, 0.4);
  --brand-grad-1: rgba(177, 109, 31, 0.97);
  --brand-grad-2: rgba(117, 67, 20, 0.97);
  --brand-accent: rgba(255, 230, 186, 0.3);
}

body.theme-clean-slate {
  --bg: #f5f7fa;
  --text: #1f2630;
  --primary: #2f4258;
  --secondary: #87a0b8;
  --line: #dbe2ea;
  --body-glow: #e2e9f2;
  --header-grad-1: #2b3a4d;
  --header-grad-2: #455e78;
  --hero-grad-1: #32475d;
  --hero-grad-2: #253748;
  --hero-accent: rgba(189, 208, 230, 0.22);
  --hero-border: rgba(204, 218, 235, 0.3);
  --hero-dot: rgba(219, 229, 241, 0.35);
  --brand-grad-1: rgba(57, 82, 109, 0.97);
  --brand-grad-2: rgba(38, 57, 78, 0.97);
  --brand-accent: rgba(202, 217, 235, 0.28);
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.site-header,
.admin-header {
  background: linear-gradient(120deg, var(--header-grad-1), var(--header-grad-2));
  border-bottom: 4px solid var(--secondary);
  position: relative;
  z-index: 60;
  overflow: visible;
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  position: relative;
  overflow: visible;
}

.brand-logo {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-logo-mark {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  overflow: visible;
}

.lang-switch {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.lang-switch a {
  color: #dbeafe;
  text-decoration: none;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  line-height: 1;
}

.lang-switch a.active,
.lang-switch a:hover {
  color: #111111;
  background: #ffffff;
}

.admin-logout-inline {
  display: none;
}

.admin-logout-desktop {
  display: inline-flex;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  transform: none !important;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #ffffff;
  border-radius: 999px;
  margin: 5px 0;
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown .nav-link {
  color: #dbeafe;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-dropdown.active .nav-link,
.nav-dropdown:hover .nav-link {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: max-content;
  width: max-content;
  background: var(--bg);
  color: #111111;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  padding: 14px;
  border: 1px solid #cbd5e1;
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.3s;
  z-index: 120;
}

.dropdown-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition-delay: 0s;
}
.nav-dropdown.open .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition-delay: 0s;
}
.dropdown-panel:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition-delay: 0s;
}

.dropdown-title {
  font-weight: 700;
  color: #111111;
  margin-bottom: 10px;
}

.dropdown-grid {
  display: grid;
  gap: 10px;
}

.dropdown-item {
  position: relative;
}

.dropdown-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dropdown-expand {
  display: none;
  border: 1px solid #c9d7f0;
  background: #fff;
  color: #1e3a70;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}

.dropdown-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #111111;
  font-weight: 700;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 8px;
}

.dropdown-category:hover {
  background: #ffffff;
  color: #111111;
}

.dropdown-submenu {
  position: absolute;
  top: -6px;
  left: calc(100% + 8px);
  min-width: max-content;
  width: max-content;
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  padding: 10px;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.3s;
  max-height: 320px;
  overflow: auto;
  z-index: 130;
}

.dropdown-submenu::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 0;
  bottom: 0;
  width: 14px;
}

.dropdown-submenu.empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.dropdown-item:hover .dropdown-submenu {
  display: grid;
  gap: 6px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition-delay: 0s;
}
.nav-dropdown.open .dropdown-submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition-delay: 0s;
}
.dropdown-submenu:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition-delay: 0s;
}

.dropdown-product {
  text-decoration: none;
  color: #111111;
  padding: 6px 8px;
  border-radius: 8px;
}

.dropdown-product:hover {
  background: #ffffff;
  color: #111111;
}

.dropdown-panel a,
.dropdown-submenu a {
  color: #111111 !important;
}

.nav > a,
.nav > .nav-dropdown > .nav-link,
.admin-link {
  color: #dbeafe;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  position: relative;
  z-index: 10;
}

.nav > a.active,
.nav > a:hover,
.nav > .nav-dropdown > .nav-link:hover,
.admin-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(130deg, var(--hero-grad-1), var(--hero-grad-2)),
    radial-gradient(circle at 18% 24%, var(--hero-accent), transparent 40%);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 68px 0;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero::before {
  width: min(58vw, 760px);
  height: min(58vw, 760px);
  right: -16%;
  top: -34%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(198, 237, 255, 0.22), rgba(198, 237, 255, 0.05) 46%, transparent 67%);
  border: 1px solid var(--hero-border);
}

.hero::after {
  inset: 0;
  opacity: 0.35;
  background:
    radial-gradient(circle at 12px 12px, var(--hero-dot) 1.5px, transparent 1.5px) 0 0 / 30px 30px,
    linear-gradient(105deg, rgba(255, 255, 255, 0.09), transparent 45%);
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
}

.hero .tag {
  margin: 0;
  display: inline-block;
  background: rgba(240, 185, 11, 0.2);
  color: #ffe9a7;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 6px 12px;
}

.hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.hero-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 20px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.section {
  padding: 44px 0;
}

.section-muted {
  background: #eef3ff;
}

.section-sm {
  margin-top: 24px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}

.product-card {
  text-decoration: none;
  color: inherit;
}

.product-subtitle {
  margin: 6px 0 0;
}

.product-image {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: block;
  padding: 0;
  margin-bottom: 10px;
}

.product-image img {
  display: block;
}

.fit-image {
  position: absolute;
  inset: 8px;
  width: calc(100% - 16px) !important;
  height: calc(100% - 16px) !important;
  object-fit: contain !important;
  object-position: center !important;
  display: block !important;
}

.home-product-image-box {
  aspect-ratio: auto;
  height: 250px;
}

.product-image .img-placeholder {
  height: 100%;
  width: 100%;
  display: grid;
  place-items: center;
}

.detail-image {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(320px, 46vw, 560px);
  padding: 8px;
  margin-bottom: 10px;
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.img-placeholder {
  color: var(--muted);
  font-weight: 700;
}

.btn {
  text-decoration: none;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-block;
}

.btn-primary {
  background: var(--secondary);
  color: #2b2000;
}

.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 1px solid #bfd2ff;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.text-page {
  max-width: 900px;
}

.info-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.info-box {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 14px;
}

.detail-grid,
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.product-detail-page {
  background: #f4f6fb;
}

.detail-sheet {
  background: #ffffff;
  border: 1px solid #dbe4f1;
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  padding: 18px;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
  align-items: start;
}

.detail-gallery-card {
  padding: 10px;
  position: sticky;
  top: 86px;
  border-color: #e3eaf6;
  box-shadow: none;
}

.detail-summary-card {
  border-color: #e3eaf6;
  background: #ffffff;
  box-shadow: none;
}

.detail-category-pill {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border: 1px solid #bfd2ff;
  background: #edf4ff;
  color: #114da8;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 5px 10px;
}

.detail-main-title {
  margin: 10px 0 6px;
  line-height: 1.3;
}

.detail-main-subtitle {
  margin: 0;
  color: var(--primary);
  font-size: 1.05rem;
  font-weight: 700;
}

.detail-main-desc {
  margin: 12px 0 0;
  color: #334155;
  line-height: 1.75;
}

.detail-action-row {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-quick-grid {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.detail-quick-item {
  border: 1px solid #d9e4f5;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
}

.detail-quick-item strong {
  color: #0f3e8c;
  font-size: 0.92rem;
}

.detail-quick-item p {
  margin: 7px 0 0;
  color: #334155;
  line-height: 1.65;
}

.detail-spec-grid {
  margin-top: 4px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-spec-box {
  border-color: #d7e2f5;
  box-shadow: 0 8px 22px rgba(15, 62, 140, 0.06);
}

.detail-spec-box h3 {
  margin: 0 0 8px;
  color: #0f3e8c;
  font-size: 1.02rem;
}

.detail-spec-box p {
  margin: 0;
  color: #334155;
  line-height: 1.75;
  white-space: pre-line;
}

.detail-sheet-divider {
  height: 1px;
  margin: 20px 0 16px;
  background: linear-gradient(90deg, rgba(219, 228, 241, 0), #dbe4f1 16%, #dbe4f1 84%, rgba(219, 228, 241, 0));
}

.product-gallery {
  position: relative;
}

.detail-image img {
  transform-origin: center center;
  transition: transform 0.2s ease;
  cursor: zoom-in;
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.thumbs img {
  width: 84px;
  height: 84px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: block;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.thumb-btn {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 2px;
  background: transparent;
  cursor: pointer;
}

.thumb-btn.active {
  border-color: #2a5fbe;
  box-shadow: 0 0 0 2px #d6e6ff;
}

.zoom-controls {
  display: flex;
  gap: 8px;
}

.subtitle {
  color: var(--primary);
  font-weight: 700;
}

.spec-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.detail-stitch {
  line-height: 0;
}

.detail-stitch-wrap {
  margin-top: 14px;
  border: 1px solid #e5ebf5;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.detail-stitch img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  border: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  border: 1px solid #bfd2ff;
  color: #143b82;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
}

.form-grid {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px;
  font: inherit;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type="checkbox"] {
  width: auto;
}

.table-wrap {
  overflow: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 10px;
  text-align: left;
  white-space: nowrap;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.category-filter {
  margin-bottom: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.category-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

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

.stat {
  font-size: 2rem;
  font-weight: 800;
  margin: 8px 0 0;
}

.list {
  margin: 0;
  padding-left: 20px;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #e3ecff, #f8fbff);
}

.login-card {
  width: min(460px, 92%);
}

.error {
  color: #b91c1c;
  font-weight: 600;
}

.success {
  color: #166534;
  font-weight: 700;
}

.small {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  padding: 24px 0;
  text-align: center;
  color: var(--muted);
}

.footer-brand {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-logo-mark {
  width: 22px;
  height: 22px;
}

.brand-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(120deg, var(--brand-grad-1), var(--brand-grad-2)),
    radial-gradient(circle at 82% 18%, var(--brand-accent), transparent 34%);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  color: #fff;
}

.brand-hero::before,
.brand-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.brand-hero::before {
  inset: 0;
  background:
    radial-gradient(circle at 86% 12%, rgba(255, 255, 255, 0.22), transparent 26%),
    radial-gradient(circle at 72% 108%, rgba(145, 215, 255, 0.16), transparent 34%);
}

.brand-hero::after {
  width: min(52vw, 640px);
  height: min(52vw, 640px);
  left: -18%;
  bottom: -52%;
  border-radius: 52% 48% 60% 40%;
  border: 1px solid rgba(209, 238, 255, 0.26);
  background:
    linear-gradient(160deg, rgba(208, 239, 255, 0.18), rgba(208, 239, 255, 0.03));
}

.brand-hero .container {
  position: relative;
  z-index: 1;
}

.brand-kicker {
  margin: 0;
  letter-spacing: 1.2px;
  font-size: 0.86rem;
  color: #ffdfa1;
}

.brand-lead {
  max-width: 860px;
  line-height: 1.85;
}

.brand-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.brand-values .info-box {
  background: linear-gradient(180deg, #ffffff, #f7faff);
  border: 1px solid #d6e1f8;
  box-shadow: 0 12px 30px rgba(15, 62, 140, 0.08);
}

.brand-strip {
  margin-top: 18px;
  background: linear-gradient(90deg, #f8fbff, #edf4ff);
  border: 1px solid #d3dff6;
  border-radius: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px;
}

.strip-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.strip-item strong {
  color: #114da8;
  font-size: 1.1rem;
}

.strip-image {
  width: 100%;
  max-height: 140px;
  object-fit: contain;
  object-position: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.strip-item small {
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 860px) {
  .hero-grid,
  .detail-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .detail-sheet {
    padding: 12px;
    border-radius: 14px;
  }

  .detail-gallery-card {
    position: static;
    top: auto;
  }

  .detail-spec-grid {
    grid-template-columns: 1fr;
  }

  .detail-image {
    height: clamp(260px, 68vw, 420px);
  }

  .home-product-image-box {
    height: 220px;
  }

  .nav-wrap {
    align-items: center;
    padding: 10px 0;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    position: relative;
  }

  .nav {
    display: none;
    grid-template-columns: 1fr;
    gap: 8px;
    width: max-content;
    min-width: 220px;
    max-width: calc(100vw - 20px);
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 180;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background:
      linear-gradient(140deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06)),
      linear-gradient(120deg, var(--header-grad-1), var(--header-grad-2));
    box-shadow: 0 20px 38px rgba(2, 10, 28, 0.24);
  }

  .site-header.nav-open .nav,
  .admin-header.nav-open .nav {
    display: grid;
  }

  .brand-logo {
    flex: 0 0 auto;
    min-width: 0;
    max-width: calc(100% - 54px);
  }

  .nav-toggle {
    display: inline-block;
    margin-left: auto;
  }

  .nav > a,
  .nav > .nav-dropdown > .nav-link {
    width: auto;
    display: block;
    padding: 10px 12px;
    text-align: right;
    touch-action: manipulation;
    transform: none !important;
    color: #dbeafe;
  }

  .nav-dropdown {
    width: 100%;
    flex: none;
  }

  .nav-dropdown .nav-link {
    width: 100%;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
  }

  .dropdown-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin-top: 0;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.2);
    max-height: min(62vh, 520px);
    overflow: auto;
    overflow-x: hidden;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    transition: none;
  }

  .nav-dropdown.open .dropdown-panel {
    display: block;
  }

  .nav-dropdown:hover .dropdown-panel {
    display: none;
  }

  .nav-dropdown.open:hover .dropdown-panel {
    display: block;
  }

  .dropdown-panel::before {
    display: none;
  }

  .dropdown-grid {
    gap: 8px;
    text-align: right;
  }

  .dropdown-item {
    border: 1px solid #d8e1ef;
    border-radius: 10px;
    padding: 6px;
    background: #fff;
    min-width: 0;
  }

  .dropdown-title {
    text-align: right;
  }

  .dropdown-item-head {
    text-align: right;
  }

  .dropdown-submenu {
    position: static;
    top: auto;
    left: auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin-top: 6px;
    padding: 8px;
    border-radius: 10px;
    box-shadow: none;
    max-height: none;
    overflow: visible;
    display: none;
    gap: 6px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: none;
  }

  .dropdown-submenu::before {
    display: none;
  }

  .dropdown-item:hover .dropdown-submenu {
    display: none;
  }

  .dropdown-item.open .dropdown-submenu {
    display: grid;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  .dropdown-expand {
    display: inline-block;
  }

  .dropdown-item.open .dropdown-expand {
    background: #1f3f74;
    color: #ffffff;
    border-color: #1f3f74;
  }

  .dropdown-product {
    display: block;
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.45;
  }

  .dropdown-category {
    display: block;
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: right;
  }

  .dropdown-submenu,
  .dropdown-submenu.empty {
    text-align: right;
  }

  .admin-link {
    display: none;
  }

  .admin-header .admin-logout-desktop {
    display: none;
  }

  .admin-header .admin-logout-inline {
    display: block;
    width: 100%;
    margin-top: 4px;
  }

  .admin-header .admin-logout-inline .btn {
    width: 100%;
    justify-content: center;
  }

  .toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-strip {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lang-switch {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  body {
    background:
      radial-gradient(circle at 50% -8%, var(--body-glow), transparent 52%),
      var(--bg);
    background-repeat: no-repeat;
    background-size: cover;
  }

  .container {
    width: min(1120px, 95%);
  }

  .section {
    padding: 30px 0;
  }

  .hero {
    padding: 42px 0;
  }

  .hero::before {
    width: 92vw;
    height: 92vw;
    right: -34vw;
    top: -28vw;
  }

  .hero::after {
    background:
      radial-gradient(circle at 10px 10px, var(--hero-dot) 1.2px, transparent 1.2px) 0 0 / 22px 22px,
      linear-gradient(105deg, rgba(255, 255, 255, 0.09), transparent 45%);
  }

  .brand-hero::after {
    width: 72vw;
    height: 72vw;
    left: -24vw;
    bottom: -32vw;
  }

  .hero-actions {
    flex-wrap: wrap;
  }

  .nav {
    overflow: visible;
    flex-wrap: wrap;
    padding-bottom: 0;
    gap: 8px;
  }

  .nav a,
  .admin-link {
    white-space: nowrap;
  }

  .brand-logo-mark {
    width: 26px;
    height: 26px;
  }

  .brand-logo span {
    font-size: 1.05rem;
    line-height: 1.2;
  }

  .nav-toggle:active,
  .nav > a:active,
  .nav > .nav-dropdown > .nav-link:active {
    transform: none !important;
  }

  .table th,
  .table td {
    padding: 8px;
    font-size: 0.9rem;
  }

  .card {
    padding: 14px;
  }

  .thumbs img {
    width: 68px;
    height: 68px;
  }

  .home-product-image-box {
    height: 190px;
  }

  .category-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .product-subtitle {
    display: none;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-filter .btn {
    width: 100%;
    text-align: center;
  }

}

@media (max-width: 860px) {
  .site-header .nav {
    justify-items: end;
    text-align: right;
  }

  .site-header .nav > a,
  .site-header .nav > .nav-dropdown > .nav-link {
    text-align: right !important;
    justify-content: flex-end;
  }

  .site-header .nav-dropdown {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  .site-header .dropdown-panel,
  .site-header .dropdown-title,
  .site-header .dropdown-grid,
  .site-header .dropdown-item,
  .site-header .dropdown-item-head,
  .site-header .dropdown-category,
  .site-header .dropdown-submenu,
  .site-header .dropdown-product {
    text-align: right !important;
  }
}

/* mobile dropdown: category left align + product name wrapping */
@media (max-width: 860px) {
  .site-header .nav > a,
  .site-header .nav > .nav-dropdown > .nav-link {
    text-align: right !important;
  }

  .site-header .nav-dropdown .dropdown-panel {
    text-align: left !important;
  }

  .site-header .nav-dropdown .dropdown-title,
  .site-header .nav-dropdown .dropdown-grid,
  .site-header .nav-dropdown .dropdown-item,
  .site-header .nav-dropdown .dropdown-item-head,
  .site-header .nav-dropdown .dropdown-category,
  .site-header .nav-dropdown .dropdown-submenu,
  .site-header .nav-dropdown .dropdown-product,
  .site-header .nav-dropdown .dropdown-submenu.empty {
    text-align: left !important;
  }

  .site-header .nav-dropdown .dropdown-item-head {
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
  }

  .site-header .nav-dropdown .dropdown-category {
    display: block;
    min-width: 0;
    flex: 1 1 auto;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.35;
  }

  .site-header .nav-dropdown .dropdown-submenu {
    min-width: 0;
    width: 100%;
  }

  .site-header .nav-dropdown .dropdown-product {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.45;
  }
}

/* mobile: category-only dropdown (no plus/no product submenu) */
@media (max-width: 860px) {
  .site-header .nav-dropdown .dropdown-expand {
    display: none !important;
  }

  .site-header .nav-dropdown .dropdown-submenu,
  .site-header .nav-dropdown .dropdown-submenu.empty {
    display: none !important;
  }

  .site-header .nav-dropdown .dropdown-item {
    padding: 4px 0;
    border: 0;
    background: transparent;
  }

  .site-header .nav-dropdown .dropdown-item-head {
    justify-content: flex-start;
    align-items: center;
  }

  .site-header .nav-dropdown .dropdown-category {
    width: 100%;
    padding: 10px 8px;
  }
}


/* mobile: ensure enough page height for hamburger panel (no internal scroll) */
@media (max-width: 860px) {
  html,
  body {
    min-height: 130vh;
    min-height: 130dvh;
  }

  .site-header.nav-open ~ main,
  .admin-header.nav-open ~ main {
    min-height: 78vh;
    min-height: 78dvh;
  }

  .site-header.nav-open .nav,
  .admin-header.nav-open .nav {
    max-height: none !important;
    overflow: visible !important;
  }
}

/* mobile: frosted glass hamburger panel */
@media (max-width: 860px) {
  .site-header .nav,
  .admin-header .nav {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.1)),
      linear-gradient(120deg, var(--header-grad-1), var(--header-grad-2));
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(2, 10, 28, 0.26);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
  }
}

/* mobile: homepage hot product images fill height as much as possible */
@media (max-width: 860px) {
  .home-product-image-box {
    padding: 0;
  }

  .home-product-image-box .fit-image {
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
  }
}

/* mobile: reduce image box height to better match product image proportions */
@media (max-width: 860px) {
  .cards .product-image,
  .cards .home-product-image-box {
    height: clamp(145px, 38vw, 180px) !important;
    aspect-ratio: auto !important;
    padding: 0 !important;
  }

  .cards .product-image .fit-image,
  .cards .home-product-image-box .fit-image {
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
  }
}
