:root {
  --bg: #f6f9fc;
  --paper: #ffffff;
  --ink: #0b1a2c;
  --muted: #6e7a89;
  --line: #dbe4ee;
  --brand: #0f9d90;
  --brand-dark: #0d7b71;
  --accent: #ff7b2c;
  --hero-a: #091a2f;
  --hero-b: #0f2f4f;
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow: 0 16px 40px rgba(11, 26, 44, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 10%, #ecf4ff 0%, #f6f9fc 45%, #f3f7f9 100%);
}

h1,
h2,
h3,
.brand {
  font-family: "Outfit", "Noto Sans SC", sans-serif;
  letter-spacing: 0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 14px 4vw;
  backdrop-filter: blur(12px);
  background: rgba(246, 249, 252, 0.82);
  border-bottom: 1px solid rgba(219, 228, 238, 0.8);
  min-height: 60px;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.brand {
  flex-shrink: 0;
}

.menu {
  margin-left: auto;
}

.auth-btn {
  background: #fff;
  color: #274157;
  border: 1px solid var(--line);
}

.auth-btn.active {
  background: #e8f8f6;
  color: #0b5b54;
  border-color: #b8e5dd;
}

.brand {
  font-weight: 800;
  font-size: 1.1rem;
}

.menu {
  display: flex;
  flex: 1 1 420px;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.95rem;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: #274157;
  font-size: 0.9rem;
}

.language-switch select {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  outline: none;
  cursor: pointer;
}

.menu a {
  color: #3b4a5d;
}

.menu a:hover {
  color: var(--brand-dark);
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-menu-btn span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #1c3852;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 34;
  background: rgba(8, 19, 34, 0.44);
}

.mobile-menu-drawer {
  position: fixed;
  top: 0;
  left: -284px;
  width: min(280px, 86vw);
  height: 100dvh;
  background: #fff;
  border-right: 1px solid var(--line);
  box-shadow: 10px 0 28px rgba(12, 24, 43, 0.14);
  z-index: 35;
  transition: left 0.24s ease;
  display: grid;
  grid-template-rows: auto 1fr;
}

.mobile-menu-drawer.open {
  left: 0;
}

.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: #13334f;
}

.mobile-menu-head button {
  border: 0;
  background: transparent;
  font-size: 1.45rem;
  cursor: pointer;
  line-height: 1;
}

.mobile-menu-links {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 10px;
}

.mobile-menu-links a {
  padding: 12px 10px;
  border-radius: 8px;
  color: #2e4258;
  font-weight: 600;
}

.mobile-menu-links a:hover {
  background: #eef6ff;
  color: #0b3d55;
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: #e8f8f6;
  color: #0b5b54;
  font-weight: 700;
  cursor: pointer;
}

.cart-btn span {
  min-width: 24px;
  text-align: center;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--brand);
  color: #fff;
}

.intro-video {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
}

.landing-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.landing-video.active {
  opacity: 1;
}

.landing-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 10, 20, 0.65), rgba(5, 17, 33, 0.45));
}

.landing-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  color: #ecf6ff;
  max-width: 760px;
}

.landing-content h1 {
  margin: 0;
  font-size: clamp(2rem, 5.8vw, 4.2rem);
  line-height: 1.1;
}

.landing-content p {
  margin: 0 auto;
  max-width: 52ch;
  color: #ccdef0;
}

.landing-content .btn {
  margin-top: 6px;
}

.hero {
  margin: 26px 4vw 18px;
  border-radius: var(--radius-lg);
  padding: 46px;
  background: linear-gradient(130deg, var(--hero-a), var(--hero-b));
  color: #fff;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 32px;
  position: relative;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.hero-video.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(4, 12, 24, 0.68), rgba(10, 25, 43, 0.46));
  z-index: 1;
}

.hero-content,
.hero-stats {
  position: relative;
  z-index: 2;
}

.hero::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -120px;
  top: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 123, 44, 0.38), rgba(255, 123, 44, 0));
}

.eyebrow {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.13em;
  color: #8cc6ff;
}

.hero h1 {
  margin: 12px 0 14px;
  line-height: 1.14;
  font-size: clamp(1.85rem, 3.7vw, 3.1rem);
}

.hero p {
  color: #d2e6ff;
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.btn {
  border: 0;
  border-radius: 10px;
  font-weight: 700;
  padding: 11px 18px;
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(120deg, var(--accent), #ff995b);
  color: #22150c;
}

.btn.ghost {
  background: transparent;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-delete {
  background: #ff6b6b;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-delete:hover {
  background: #ff5252;
}

.hero-stats {
  align-self: end;
  display: grid;
  gap: 10px;
}

.hero-stats article {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 14px;
}

.hero-stats h3 {
  margin: 0;
  font-size: 1.3rem;
}

.hero-stats p {
  margin: 4px 0 0;
  color: #bfd6eb;
  font-size: 0.92rem;
}

.category-strip {
  margin: 20px 4vw;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.category-pill {
  border-radius: 999px;
  padding: 12px;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--line);
  font-weight: 600;
  color: #274157;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.category-pill:hover,
.category-pill.active {
  background: #0f2035;
  color: #fff;
  border-color: #0f2035;
  transform: translateY(-1px);
}

.products {
  margin: 34px 4vw;
}

.product-detail-main {
  margin: 26px 4vw;
}

.product-detail-wrap {
  min-height: 56vh;
  display: grid;
  align-items: start;
}

.product-detail-loading,
.product-detail-error {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: #4a5f75;
}

.product-detail-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(280px, 460px) 1fr;
  gap: 20px;
  box-shadow: 0 12px 30px rgba(16, 36, 66, 0.08);
}

.product-detail-media-block {
  display: grid;
  gap: 10px;
}

.product-detail-hero {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
  font-family: "Outfit", sans-serif;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 16px;
  overflow: hidden;
  flex-shrink: 0;
}

.product-detail-hero.has-image {
  padding: 0;
  background: #e9eef5 !important;
  align-items: center;
  justify-content: center;
}

.product-detail-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.product-detail-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #050a12;
  object-fit: contain;
}

.product-detail-gallery-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: #f1f5fa;
  border: 1px solid #dbe5f0;
  border-radius: 999px;
  padding: 6px 8px;
  width: fit-content;
  justify-self: center;
}

.detail-nav-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #0f355a;
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.detail-page {
  color: #25415f;
  font-size: 0.8rem;
  font-weight: 700;
  min-width: 52px;
  text-align: center;
}

.product-models-editor {
  display: grid;
  gap: 8px;
}

.product-model-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 170px minmax(220px, 1.4fr) auto;
  gap: 8px;
  align-items: center;
}

.product-model-row input {
  width: 100%;
}

@media (max-width: 720px) {
  .product-model-row {
    grid-template-columns: 1fr;
  }
}

.product-detail-content h1 {
  margin: 8px 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.product-detail-content {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.product-detail-desc {
  margin: 0;
  color: #5e6f83;
}

.product-detail-price {
  margin: 12px 0 0;
  font-size: 1.35rem;
  font-weight: 800;
}

.product-model-section {
  margin-top: 12px;
  border-top: 1px solid #edf2f7;
  padding-top: 10px;
}

.product-model-section h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.product-model-option-list {
  display: grid;
  gap: 8px;
}

.product-model-option {
  border: 1px solid #d9e2ec;
  border-radius: 10px;
  background: #f8fbff;
  color: #1d334b;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 700;
}

.product-model-option.active {
  border-color: #0f9d90;
  background: #e8f8f6;
  color: #0a5c56;
}

.product-detail-section {
  margin-top: 14px;
  border-top: 1px solid #edf2f7;
  padding-top: 10px;
}

.product-detail-section h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.product-detail-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #3f5165;
}

.product-detail-empty {
  margin: 0;
  color: #76879a;
}

.back-button {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(15, 157, 144, 0.1);
  color: var(--brand);
  font-size: 1.2rem;
  font-weight: bold;
  transition: all 0.2s ease;
  border: 1px solid rgba(15, 157, 144, 0.2);
}

.back-button:hover {
  background: rgba(15, 157, 144, 0.2);
  border-color: rgba(15, 157, 144, 0.4);
}

.back-button:active {
  transform: scale(0.95);
}

.product-detail-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
}

.product-buy-actions {
  margin-top: auto;
  border-top: 1px solid #edf2f7;
  padding-top: 14px;
  align-items: center;
  justify-content: space-between;
}

.product-buy-actions .product-detail-price {
  margin: 0;
}

.product-add-to-cart-btn {
  flex: 1;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 700;
}

.section-head p {
  margin: 0;
  color: var(--brand-dark);
  font-weight: 700;
}

.section-head h2 {
  margin: 8px 0 18px;
  font-size: 2rem;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.product-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: 0 10px 26px rgba(16, 36, 66, 0.08);
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 180px;
  align-items: center;
  gap: 14px;
}

.product-card.linkable {
  cursor: pointer;
}

.product-card.linkable:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(16, 36, 66, 0.12);
}

.product-thumb {
  position: relative;
  border-radius: 12px;
  min-height: 124px;
  height: 124px;
  padding: 16px;
  color: #fff;
  display: flex;
  align-items: flex-end;
  font-weight: 700;
  font-family: "Outfit", sans-serif;
  overflow: hidden;
}

.product-thumb-fallback {
  position: relative;
  z-index: 1;
}

.product-thumb.has-image {
  padding: 0;
  align-items: stretch;
  background: #e9eef5 !important;
}

.product-image {
  display: block;
  width: 100%;
  height: 124px;
  object-fit: cover;
  border-radius: 12px;
}

.product-media-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  gap: 4px;
  padding: 14px;
  color: #fff;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 10, 18, 0) 0%, rgba(4, 12, 24, 0.82) 72%, rgba(4, 12, 24, 0.94) 100%);
}

.product-thumb-overlay {
  padding: 12px;
}

.product-detail-overlay {
  padding: 18px;
}

.product-media-badge {
  width: fit-content;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.product-media-title {
  display: -webkit-box;
  overflow: hidden;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}

.product-media-subtitle {
  display: -webkit-box;
  overflow: hidden;
  line-clamp: 1;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  color: rgba(239, 247, 255, 0.9);
  font-size: 0.84rem;
  font-weight: 500;
}

.product-thumb-pager {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(6, 18, 34, 0.62);
  color: #fff;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 700;
}

.thumb-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(8, 18, 30, 0.58);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: grid;
  place-items: center;
}

.thumb-nav-btn.prev {
  left: 8px;
}

.thumb-nav-btn.next {
  right: 8px;
}

.product-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: 999px;
  background: #edf6ff;
  color: #1f527d;
  font-size: 0.8rem;
  font-weight: 700;
}

.product-meta h3 {
  margin: 0;
  font-size: 1.04rem;
}

.product-meta p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.product-side {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.product-quick-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.add-cart-btn {
  border: 1px solid #cde7e3;
  border-radius: 999px;
  padding: 8px 12px;
  background: #ecfaf8;
  color: #0b5b54;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.2s ease, border-color 0.2s ease;
}

.add-cart-btn:hover {
  background: #def5f1;
  border-color: #b7dfd8;
}

.add-cart-btn:active {
  transform: scale(0.96);
}

.price-original {
  font-size: 0.92rem;
  color: #7b8796;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.price-discount {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f2a44;
}

.buy-now-btn {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  min-width: 120px;
  background: #10395f;
  color: #f6fbff;
  font-weight: 700;
  cursor: pointer;
}

.buy-now-btn:hover {
  background: #0d3050;
}

.split-banner {
  margin: 34px 4vw 46px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.panel {
  border-radius: var(--radius-md);
  padding: 26px;
}

.panel-dark {
  background: #0f2945;
  color: #dbebff;
}

.panel-light {
  background: #fef6ef;
  color: #5e3517;
  border: 1px solid #ffd7bc;
}

.panel h3 {
  margin-top: 0;
}

.panel a {
  font-weight: 700;
}

.cart-drawer {
  position: fixed;
  right: -420px;
  top: 0;
  width: min(400px, 96vw);
  height: 100dvh;
  max-height: 100dvh;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -14px 0 36px rgba(11, 26, 44, 0.15);
  transition: right 0.28s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 40;
}

.cart-drawer.open {
  right: 0;
}

.cart-head,
.cart-foot {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.cart-foot {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
}

.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-head button {
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
}

.cart-items {
  flex: 1;
  overflow: auto;
  padding: 10px 14px;
  display: grid;
  align-content: start;
  grid-auto-rows: min-content;
  gap: 10px;
}

.cart-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 10px;
  min-height: 118px;
}

.cart-row h4 {
  margin: 0 0 4px;
  font-size: 0.96rem;
}

.cart-row p {
  margin: 0;
  color: var(--muted);
}

.cart-model {
  font-size: 0.78rem;
  color: #1f4d7a;
  font-weight: 700;
}

.cart-item-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.cart-thumb {
  width: 68px;
  height: 68px;
  border-radius: 10px;
  flex: 0 0 68px;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: "Outfit", sans-serif;
  overflow: hidden;
}

.cart-thumb.has-image {
  background: #e9eef5 !important;
}

.cart-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cart-item-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.cart-desc {
  font-size: 0.82rem;
  line-height: 1.35;
  color: #6e7a89;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-price {
  font-size: 0.86rem;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
}

.cart-qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  padding: 4px 6px;
  background: #f8fbff;
}

.cart-qty-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: #e8eef7;
  color: #1d334b;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.cart-qty-btn:hover {
  background: #d0dce9;
  color: #0f355a;
}

.cart-qty-btn:active {
  transform: scale(0.95);
}

.cart-qty-display {
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  color: #1d334b;
  font-size: 0.96rem;
}

.cart-remove-btn {
  border: 1px solid #f2c6c6;
  background: #fff6f6;
  color: #a63333;
  border-radius: 8px;
  padding: 5px 9px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}

.cart-remove-btn:hover {
  background: #ffe9e9;
}

.admin-body {
  background: linear-gradient(180deg, #f8fbff 0%, #eef4f9 100%);
}

.hidden {
  display: none !important;
}

.admin-auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.admin-auth-card {
  width: min(560px, 96vw);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 14px 32px rgba(16, 36, 66, 0.09);
}

.admin-auth-card h2 {
  margin: 0 0 10px;
}

.admin-auth-card h3 {
  margin: 8px 0;
}

.otp-block img {
  width: 200px;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.otp-uri {
  word-break: break-all;
  font-size: 0.82rem;
  color: #4f6072;
}

.admin-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: #0f2035;
  padding: 24px 16px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.admin-sidebar .brand {
  color: #fff;
  margin-bottom: 10px;
}

.admin-sidebar a {
  color: #adc4df;
  padding: 10px 12px;
  border-radius: 8px;
}

.admin-sidebar a.active,
.admin-sidebar a:hover {
  background: #163556;
  color: #fff;
}

.admin-main {
  padding: 26px;
}

.admin-notice {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #f0d2c7;
  border-radius: 10px;
  background: #fff5f1;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-header h1 {
  margin: 6px 0 0;
}

.admin-cards {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.admin-cards article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(20, 39, 67, 0.07);
}

.admin-cards p {
  margin: 0;
  color: #5e6f83;
}

.admin-cards h3 {
  margin: 8px 0;
}

.table-wrap {
  margin-top: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.table-wrap.compact {
  margin-top: 14px;
}

.admin-panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 14px;
}

.chart-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 16px;
}

.chart-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(20, 39, 67, 0.07);
}

.chart-metrics {
  display: inline-grid;
  gap: 4px;
  margin-bottom: 8px;
}

.chart-metrics strong {
  font-size: 1.8rem;
}

.chart-metrics span {
  color: #607286;
  font-size: 0.9rem;
}

.chart-svg,
.pie-svg {
  width: 100%;
  height: auto;
  display: block;
}

.pie-wrap {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  align-items: start;
  gap: 16px;
}

.pie-legend {
  display: grid;
  gap: 10px;
  max-height: 260px;
  overflow: auto;
  padding-right: 6px;
}

.pie-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fbfd;
}

.pie-legend-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pie-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 12px;
}

.panel-head {
  margin-bottom: 10px;
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
}

.panel-head p {
  margin: 6px 0 0;
  color: #607286;
  font-size: 0.92rem;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.grid-form label {
  display: grid;
  gap: 5px;
  font-size: 0.9rem;
}

.grid-form label[style*="flex-direction"] {
  display: flex;
}

.grid-form input,
.grid-form select,
.grid-form textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font: inherit;
}

.grid-form input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}

.hero-config-form {
  gap: 14px;
}

.hero-config-top {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, #f7fbff 0%, #eef7ff 100%);
}

.hero-config-top label {
  gap: 6px;
}

.hero-cards-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-config-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
  display: grid;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(22, 45, 78, 0.06);
}

.hero-config-card header {
  margin-bottom: 2px;
}

.hero-config-card h3 {
  margin: 0;
  font-size: 1rem;
  color: #0f2a44;
}

.hero-config-card p {
  margin: 4px 0 0;
  font-size: 0.84rem;
  color: #607286;
}

.hero-config-card label {
  display: grid;
  gap: 5px;
  font-size: 0.88rem;
}

.hero-config-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-form input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.upload-form {
  margin-top: 8px;
}

.small-muted {
  margin: 10px 0 0;
  font-size: 0.88rem;
  color: #607286;
}

.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.table-head input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  width: min(320px, 56vw);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
}

th {
  font-size: 0.9rem;
  color: #58697e;
  background: #f8fbff;
}

.status {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 700;
}

.status.on {
  background: #e6f7f3;
  color: #0d6f5d;
}

.status.off {
  background: #fff2e9;
  color: #ab5a1f;
}

td button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  margin-right: 6px;
  cursor: pointer;
}

dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  width: min(440px, 92vw);
}

dialog::backdrop {
  background: rgba(12, 24, 40, 0.52);
}

#productForm {
  display: grid;
  gap: 12px;
  padding: 18px;
}

#authForm,
#trackingForm,
#excelImportForm {
  display: grid;
  gap: 12px;
  padding: 18px;
}

#modelSelectForm {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.model-options {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
}

.model-option-row {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}

.model-option-main {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.model-option-main strong {
  color: #0b1a2c;
}

.model-option-main em {
  font-style: normal;
  color: #0f9d90;
  font-weight: 700;
}

#productForm label {
  display: grid;
  gap: 5px;
  font-size: 0.9rem;
}

#productForm textarea,
#productDetailForm textarea {
  resize: vertical;
  min-height: 120px;
}

#authForm label,
#trackingForm label,
#excelImportForm label {
  display: grid;
  gap: 5px;
  font-size: 0.9rem;
}

#productForm input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

#authForm input,
#trackingForm input,
#excelImportForm select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.dialog-tip {
  min-height: 18px;
  color: #c14529;
  font-size: 0.86rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.orders-main {
  margin: 24px 4vw;
}

.orders-grid {
  display: grid;
  gap: 12px;
}

.order-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 14px;
}

.order-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.order-card h3 {
  margin: 0;
  font-size: 1.02rem;
}

.order-card p {
  margin: 8px 0;
  color: #4f6072;
}

.order-actions {
  margin-top: 8px;
}

.order-actions .btn {
  padding: 8px 14px;
}

.order-items {
  border-top: 1px dashed var(--line);
  margin-top: 10px;
  padding-top: 10px;
  display: grid;
  gap: 6px;
}

.order-items div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.order-model-cell,
.order-link-cell {
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
}

.order-model-cell {
  max-width: 360px;
}

.order-link-cell {
  max-width: 280px;
}

.order-model-line {
  display: block;
  line-height: 1.35;
  margin-bottom: 4px;
}

.order-model-line:last-child {
  margin-bottom: 0;
}

.order-link-text {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: top;
}

.payment-main {
  margin: min(18vh, 120px) auto 0;
  max-width: 680px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 14px 32px rgba(16, 36, 66, 0.09);
}

.reveal {
  animation: rise 0.65s ease both;
}

.delay-1 {
  animation-delay: 0.14s;
}

.delay-2 {
  animation-delay: 0.24s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-detail-card {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .category-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .admin-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .top-nav {
    align-items: center;
    justify-content: space-between;
  }

  .menu {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
    order: 2;
  }

  .brand {
    order: 1;
  }

  .top-actions {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .language-switch {
    flex: 1 1 180px;
    justify-content: space-between;
  }

  .hero,
  .admin-main {
    padding: 16px;
  }

  .intro-video {
    min-height: 100svh;
    padding: 16px;
  }

  .landing-content .btn {
    width: 100%;
    text-align: center;
  }

  .hero {
    margin: 14px;
  }

  .products,
  .split-banner,
  .category-strip,
  .product-detail-main {
    margin-left: 14px;
    margin-right: 14px;
  }

  .product-grid,
  .split-banner,
  .admin-cards,
  .grid-form {
    grid-template-columns: 1fr;
  }

  .product-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .product-thumb,
  .product-image {
    height: 170px;
  }

  .product-media-title {
    font-size: 1.08rem;
  }

  .product-side {
    justify-items: start;
  }

  .buy-now-btn {
    width: 100%;
  }

  .hero-cards-grid {
    grid-template-columns: 1fr;
  }

  .hero-config-actions {
    justify-content: stretch;
  }

  .hero-config-actions .btn {
    width: 100%;
  }

  .category-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .pie-wrap {
    grid-template-columns: 1fr;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    grid-auto-flow: column;
    overflow-x: auto;
    align-items: center;
    gap: 4px;
    padding: 12px;
  }

  .admin-sidebar .brand {
    display: none;
  }

  .table-wrap {
    overflow-x: auto;
  }

  .cart-item-actions {
    width: auto;
    justify-items: end;
    align-content: space-between;
  }
}

/* 购物车动画 */
.cart-particle {
  position: fixed;
  pointer-events: none;
  font-weight: bold;
  color: var(--accent);
  font-size: 18px;
  z-index: 9999;
  opacity: 1;
}

.cart-particle.animate {
  animation: float-up 0.6s ease-out forwards;
}

@keyframes float-up {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-80px) scale(0.5);
  }
}

.cart-btn.bounce {
  animation: bounce-cart 0.6s ease-out;
}

@keyframes bounce-cart {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

/* 地址对话框样式 */
#addressForm {
  display: grid;
  gap: 12px;
  padding: 18px;
}

#addressForm label {
  display: grid;
  gap: 5px;
  font-size: 0.9rem;
}

#addressForm select,
#addressForm input,
#addressForm textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font-family: inherit;
  font-size: inherit;
}

#addressForm textarea {
  resize: vertical;
  min-height: 80px;
}

/* 后台页面导航 */
.admin-nav-link {
  display: inline-block;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.admin-page {
  animation: fade-in 0.3s ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#shippingTableBody button {
  padding: 6px 10px;
  font-size: 0.85rem;
}

.edit-shipping-btn {
  background: #0f9d90;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.edit-shipping-btn:hover {
  background: #0b7a72;
}

/* ─── Floating CS Button ─────────────────────────────────── */
.cs-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: linear-gradient(135deg, #0f9d90, #0b7a72);
  color: #fff;
  border-radius: 40px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(15,157,144,0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cs-float:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(15,157,144,0.55);
}
.cs-float svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .cs-float span { display: none; }
  .cs-float { padding: 14px; border-radius: 50%; }
}

/* ─── Support Page – Contact Grid ───────────────────────── */
.support-header {
  padding: 80px 24px 40px;
  text-align: center;
}
.support-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: #0b1a2c;
  margin-bottom: 12px;
}
.support-header p {
  color: #607286;
  font-size: 1.05rem;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto 60px;
  padding: 0 24px;
}
.contact-card {
  background: #fff;
  border: 1px solid #e4ebf3;
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}
.contact-card:hover {
  box-shadow: 0 8px 28px rgba(15,157,144,0.18);
  transform: translateY(-4px);
}
.contact-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-logo img,
.contact-logo svg {
  width: 44px !important;
  height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  object-fit: contain;
  display: block;
}
@media (max-width: 640px) {
  .contact-logo {
    width: 56px;
    height: 56px;
  }
  .contact-logo img,
  .contact-logo svg {
    width: 38px !important;
    height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
  }
}

.admin-contact-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.admin-contact-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #dbe7f5;
  background: #f4f8fd;
  flex-shrink: 0;
}
.admin-contact-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7b8ca3;
  font-size: 14px;
  font-weight: 600;
}
.contact-logo-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e4ebf3;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}
.contact-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0b1a2c;
  margin-bottom: 6px;
}
.contact-url {
  font-size: 0.85rem;
  color: #0f9d90;
  word-break: break-all;
}

/* ─── Drivers Page ───────────────────────────────────────── */
.drivers-header {
  padding: 80px 24px 40px;
  text-align: center;
}
.drivers-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: #0b1a2c;
  margin-bottom: 12px;
}
.drivers-header p {
  color: #607286;
  font-size: 1.05rem;
}
.driver-list {
  max-width: 800px;
  margin: 0 auto 60px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.driver-card {
  background: #fff;
  border: 1px solid #e4ebf3;
  border-radius: 12px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.driver-meta { flex: 1; }
.driver-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0b1a2c;
  margin-bottom: 4px;
}
.driver-desc {
  font-size: 0.9rem;
  color: #607286;
}
.driver-version {
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: #0f9d90;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.driver-dl-btn {
  display: inline-block;
  padding: 9px 20px;
  background: linear-gradient(135deg, #0f9d90, #0b7a72);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.driver-dl-btn:hover { opacity: 0.85; }
@media (max-width: 540px) {
  .driver-card { flex-wrap: wrap; }
  .driver-dl-btn { width: 100%; text-align: center; }
}

/* Product Image Modal */
.product-image-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  animation: fadeIn 0.2s ease;
}

.product-image-modal-container {
  position: relative;
  z-index: 1001;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: zoomIn 0.2s ease;
}

.product-image-modal-img {
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.product-image-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  z-index: 1002;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2rem;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.product-image-modal-close:hover {
  transform: scale(1.2);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .product-image-modal-close {
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
  }
}
