:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --ink: #1a2332;
  --muted: #5c6b7a;
  --line: #e2e8f0;
  --brand: #0d6e6e;
  --brand-dark: #0a5555;
  --accent: #d97706;
  --accent-soft: #fff7ed;
  --danger: #c2410c;
  --ok: #047857;
  --shadow: 0 10px 30px rgba(15, 40, 60, 0.08);
  --radius: 14px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Trebuchet MS", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(13, 110, 110, 0.12), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, rgba(217, 119, 6, 0.1), transparent 55%),
    linear-gradient(180deg, #eef4f7 0%, var(--bg) 40%, #eef2f6 100%);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.topbar {
  background: linear-gradient(90deg, #0a4f4f, #0d6e6e 55%, #155e75);
  color: #e8f6f6;
  font-size: 13px;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  flex-wrap: wrap;
}
.topbar a { color: #cdeeee; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, #0d6e6e, #155e75);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(13, 110, 110, 0.28);
}
.brand-text strong {
  display: block;
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.02em;
}
.brand-text span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.search-box {
  flex: 1;
  display: flex;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}
.search-box input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 11px 16px;
  background: transparent;
}
.search-box button {
  border: 0;
  background: var(--brand);
  color: #fff;
  padding: 0 18px;
  cursor: pointer;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.auth-area {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.auth-user {
  font-size: 13px;
  color: var(--muted);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}
.icon-btn-accent {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.badge {
  position: absolute;
  top: -6px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  display: grid;
  place-items: center;
  padding: 0 4px;
}

.nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 12px;
}
.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
}
.nav a:hover, .nav a.active {
  background: rgba(13, 110, 110, 0.1);
  color: var(--brand-dark);
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: stretch;
  padding: 28px 0 10px;
}
.hero-copy {
  padding: 28px;
  border-radius: calc(var(--radius) + 4px);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.95), rgba(240,249,249,0.9)),
    linear-gradient(120deg, rgba(13,110,110,0.08), transparent);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: var(--shadow);
}
.hero-copy .eyebrow {
  display: inline-block;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}
.hero-copy h1 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}
.hero-copy p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 48ch;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-visual {
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  position: relative;
  min-height: 280px;
  background: #0f3d4c center/cover no-repeat;
  box-shadow: var(--shadow);
  color: #fff;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,30,40,0.15), rgba(8,30,40,0.78));
}
.hero-car { display: none; }
.hero-visual h2 { margin: 0 0 6px; position: relative; z-index: 1; }
.hero-visual p { margin: 0; opacity: 0.9; position: relative; z-index: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 18px rgba(13, 110, 110, 0.25);
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}
.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: 13px; }

.section { padding: 28px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 24px;
}
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.cat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.cat-card .ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  background: rgba(13, 110, 110, 0.1);
  color: var(--brand);
  font-weight: 700;
}
.cat-card h3 { margin: 0 0 4px; font-size: 16px; }
.cat-card p { margin: 0; color: var(--muted); font-size: 13px; }

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.product-cover {
  height: 180px;
  position: relative;
  background: #f1f5f9;
  overflow: hidden;
}
.product-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-cover .tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255,255,255,0.92);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--brand-dark);
  z-index: 1;
}
.product-cover .car-shape { display: none; }
.product-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-body h3 { margin: 0; font-size: 15px; line-height: 1.4; }
.product-meta { color: var(--muted); font-size: 12px; }
.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.price {
  color: var(--danger);
  font-size: 20px;
  font-weight: 700;
}
.price small {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  text-decoration: line-through;
  margin-left: 6px;
}
.product-actions { display: flex; gap: 8px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  color: var(--muted);
}
.chip.active, .chip:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: rgba(13, 110, 110, 0.08);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.detail-gallery {
  min-height: 320px;
  border-radius: var(--radius);
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
}
.detail-gallery img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  display: block;
}
.detail-gallery .car-shape { display: none; }
.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cart-item img {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border-radius: 8px;
  background: #f1f5f9;
}
.specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}
.spec {
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px 12px;
}
.spec span { display: block; color: var(--muted); font-size: 12px; }
.spec strong { font-size: 14px; }

.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.qty button {
  border: 0;
  background: #f8fafc;
  width: 32px;
  height: 32px;
  cursor: pointer;
}
.qty span { min-width: 28px; text-align: center; }
.cart-summary {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.total { font-size: 22px; color: var(--danger); font-weight: 700; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  background: #fff;
  outline: none;
}
.field:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13,110,110,0.12); }
textarea.field { min-height: 110px; resize: vertical; }

.notice {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: #9a3412;
  font-size: 14px;
  margin-bottom: 14px;
}
.success-box {
  text-align: center;
  padding: 40px 20px;
}
.success-box h2 { color: var(--ok); margin-bottom: 8px; }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.step b {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(13,110,110,0.12);
  color: var(--brand);
  margin-bottom: 8px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}
.info-list { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.8; }
.muted { color: var(--muted); }
.page-title {
  padding: 24px 0 8px;
}
.page-title h1 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 28px;
}
.page-title p { margin: 0; color: var(--muted); }

.site-footer {
  margin-top: 40px;
  background: #102a33;
  color: #d7e6ec;
  padding: 36px 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 18px;
}
.site-footer h4 { margin: 0 0 10px; color: #fff; }
.site-footer a { color: #b7ccd6; display: block; margin: 6px 0; }
.site-footer p { color: #9fb3bd; line-height: 1.7; font-size: 14px; }
.copyright {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
  color: #8ea3ad;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.copyright a {
  color: #9ec4d0;
  display: inline;
  margin: 0;
}
.copyright a:hover { color: #fff; text-decoration: underline; }

.shop-link-row { font-size: 12px; }
.shop-link-row a, .shop-name-line a { color: var(--brand); }
.shop-name-line {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
}
.shop-name-line a { font-weight: 600; }

.merchant-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  gap: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.merchant-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.merchant-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(145deg, #0d6e6e, #155e75);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}
.merchant-logo.large {
  width: 72px;
  height: 72px;
  font-size: 24px;
  border-radius: 18px;
}
.merchant-body { flex: 1; min-width: 0; }
.merchant-body h3 { margin: 0 0 6px; font-size: 16px; }
.merchant-meta { color: var(--muted); font-size: 13px; margin: 8px 0 12px; }
.merchant-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.shop-hero {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mini-tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(13, 110, 110, 0.1);
  color: var(--brand-dark);
}
.auth-panel {
  max-width: 460px;
  margin: 0 auto;
}
.auth-switch {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.auth-switch a { color: var(--brand); font-weight: 600; }
.fee-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 18px;
}
.fee-table th, .fee-table td {
  border: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}
.fee-table th { background: #f8fafc; width: 28%; color: var(--muted); font-weight: 600; }
.file-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #123;
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 99;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

.empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--muted);
}

@media (max-width: 960px) {
  .hero, .detail-layout, .about-grid, .footer-grid { grid-template-columns: 1fr; }
  .grid, .cats, .steps, .merchant-grid { grid-template-columns: repeat(2, 1fr); }
  .brand { min-width: auto; }
  .shop-hero { flex-direction: column; }
}
@media (max-width: 640px) {
  .header-row { flex-wrap: wrap; }
  .search-box { order: 3; width: 100%; }
  .grid, .cats, .steps, .form-grid, .specs, .merchant-grid { grid-template-columns: 1fr; }
  .nav { padding-bottom: 10px; }
  .auth-user { display: none; }
}
