:root {
  --bg: #f6f6f8;
  --panel: #ffffff;
  --text: #1c1c22;
  --muted: #6d7078;
  --line: #e8e8ee;
  --brand: #ff0036;
  --brand-dark: #d4002c;
  --ink: #1a1a1f;
  --soft: #f4f4f7;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", Arial, sans-serif;
}

body.dark {
  --bg: #101014;
  --panel: #1a1a20;
  --text: #f2f2f6;
  --muted: #a3a6b0;
  --line: #2c2c35;
  --ink: #0b0b0e;
  --soft: #22222b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.topbar {
  background: var(--ink);
  color: #d8d8de;
  font-size: 13px;
}
.topbar__inner, .nav__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 40px;
}
.topbar__actions { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.topbar__tel { color: var(--brand); font-weight: 700; text-decoration: none; }
.topbar .plain-btn {
  background: transparent;
  color: #d8d8de;
  border: 1px solid #3a3a44;
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.nav__inner { min-height: 74px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
}
.brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(140deg, #ff3c5f, var(--brand));
}
.brand__text { display: grid; line-height: 1.15; }
.brand__text b { font-size: 19px; letter-spacing: .5px; }
.brand__text em { font-style: normal; font-size: 12px; color: var(--muted); letter-spacing: 2px; }

.search {
  flex: 1;
  display: grid;
  grid-template-columns: 150px 1fr;
  border: 2px solid var(--brand);
  border-radius: 999px;
  overflow: hidden;
  background: var(--panel);
}
.search select, .search input {
  border: 0;
  min-width: 0;
  background: transparent;
  color: var(--text);
  padding: 11px 16px;
  outline: none;
}
.search select { border-right: 1px solid var(--line); }

.nav__links { display: flex; gap: 8px; }
.icon-btn, .plain-btn, .primary, .ghost-btn {
  border: 0;
  border-radius: 8px;
  min-height: 40px;
  padding: 0 16px;
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}
.icon-btn {
  position: relative;
  width: 42px;
  padding: 0;
  background: var(--soft);
  color: var(--text);
}
#cartBadge {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  display: grid;
  place-items: center;
}
.plain-btn { background: var(--soft); color: var(--text); }
.primary { background: var(--brand); color: #fff; font-weight: 700; }
.primary:hover { background: var(--brand-dark); }
.ghost-btn { border: 1px solid var(--brand); color: var(--brand); font-weight: 700; background: transparent; }

.dev-contact { background: linear-gradient(90deg, var(--brand), #ff6a3d); color: #fff; }
.dev-contact__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 42px;
  font-size: 14px;
  font-weight: 700;
}
.dev-contact__label { letter-spacing: 2px; opacity: .85; }
.dev-contact__name { padding: 2px 10px; background: rgba(0,0,0,.18); border-radius: 999px; }
.dev-contact__link { color: #fff; text-decoration: none; }

.hero {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  padding: 24px 0 20px;
}
.category-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.category-title {
  background: var(--ink);
  color: #fff;
  padding: 15px;
  font-weight: 700;
  font-size: 15px;
}
.category-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 13px 16px;
  text-align: left;
  font-size: 14px;
  transition: background .15s, color .15s;
}
.category-item:hover, .category-item.active { background: var(--soft); color: var(--brand); font-weight: 700; }

.hero__stage {
  min-height: 380px;
  display: grid;
  grid-template-columns: 1fr 46%;
  align-items: center;
  gap: 24px;
  padding: 40px 44px;
  border-radius: 10px;
  background: linear-gradient(115deg, #fff1f3, #ffe6d9);
  overflow: hidden;
}
body.dark .hero__stage { background: linear-gradient(115deg, #2a161c, #24191a); }
.offer, .section-head span, .promo-grid span, .wide-promo span, .tour__copy span {
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
}
.hero__copy h1 {
  margin: 12px 0 14px;
  font-size: clamp(38px, 5.5vw, 64px);
  line-height: 1.05;
  color: var(--ink);
}
body.dark .hero__copy h1 { color: #fff; }
h2 { margin: 6px 0 8px; font-size: 26px; }
p { color: var(--muted); line-height: 1.7; }
.hero__copy p { max-width: 40ch; }
.hero__btns { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.hero__stage img { border-radius: 10px; max-height: 320px; width: 100%; object-fit: cover; }

.service-row, .promo-grid, .product-grid, .checkout-grid, .footer__grid, .gallery {
  display: grid;
  gap: 16px;
}
.service-row { grid-template-columns: repeat(4, 1fr); padding: 18px 0; }
.service-row div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}
.service-row strong { display: block; }
.service-row span { display: block; color: var(--muted); margin-top: 5px; font-size: 13px; }

.promo-grid { grid-template-columns: repeat(3, 1fr); }
.promo-grid article, .wide-promo {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  grid-template-columns: 1fr 42%;
  align-items: center;
  gap: 12px;
  padding: 20px;
  overflow: hidden;
}
.promo-grid img { height: 130px; width: 100%; object-fit: cover; border-radius: 8px; }

.products-section, .checkout-section { padding: 40px 0; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.product-grid { grid-template-columns: repeat(4, 1fr); }
.product-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  transition: box-shadow .18s, transform .18s;
}
.product-card:hover { box-shadow: 0 10px 26px rgba(0,0,0,.08); transform: translateY(-2px); }
.product-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--soft);
  border-radius: 8px;
  overflow: hidden;
}
.product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  padding: 3px 7px;
}
.product-card h3 { font-size: 15px; min-height: 44px; margin: 14px 0 6px; line-height: 1.4; }
.spec { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.price { color: var(--brand); font-size: 22px; font-weight: 800; margin: 6px 0 4px; }
.price small { font-size: 12px; font-weight: 500; }
.price-old { color: var(--muted); font-size: 12px; text-decoration: line-through; margin: 0 0 12px; }
.product-card .primary { margin-top: auto; width: 100%; }
.empty-hint { text-align: center; padding: 30px 0; }

.tour {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 26px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px;
}
.tour__video { width: 100%; border-radius: 10px; background: #000; }
.tour__list { margin: 14px 0 0; padding: 0; list-style: none; color: var(--muted); }
.tour__list li { padding: 6px 0 6px 20px; position: relative; }
.tour__list li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }

.gallery { grid-template-columns: repeat(4, 1fr); margin: 26px 0; }
.gallery img { height: 190px; width: 100%; object-fit: cover; border-radius: 10px; }

.wide-promo { grid-template-columns: 1fr 38%; }
.wide-promo img { max-height: 220px; width: 100%; object-fit: cover; border-radius: 8px; }
.wide-promo .primary { margin-top: 16px; justify-self: start; padding: 0 22px; }

.checkout-grid { grid-template-columns: 1fr 1fr; align-items: start; }
.address-card, .address-list {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
}
label { display: grid; gap: 7px; color: var(--muted); margin-bottom: 14px; font-size: 14px; }
input, textarea, select {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 12px;
}
textarea { min-height: 90px; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; }
.form-actions { display: flex; gap: 10px; }
.addr-row { border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-bottom: 12px; }
.addr-row strong { display: block; margin-bottom: 6px; }
.addr-row p { margin: 4px 0; font-size: 13px; }
.addr-row__actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.addr-row__actions button { min-height: 32px; padding: 0 12px; font-size: 13px; }
.tag { color: #fff; background: var(--brand); border-radius: 999px; padding: 2px 8px; font-size: 12px; }

.contact-card { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 18px; }
.contact-card h4 { margin: 0 0 10px; }
.contact-card p { margin: 6px 0; color: var(--text); font-size: 14px; }
.contact-card p strong { display: inline-block; width: 60px; color: var(--muted); font-weight: 500; }
.contact-card__tip { color: var(--muted) !important; font-size: 12px !important; margin-top: 12px !important; }

.drawer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  justify-content: end;
  z-index: 40;
}
.drawer.open { display: flex; }
.drawer__panel {
  width: min(430px, 100%);
  height: 100%;
  overflow: auto;
  background: var(--panel);
  padding: 22px;
}
.drawer__head, .cart-summary div, .cart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.drawer__head h2 { margin: 0; }
.cart-row { border-bottom: 1px solid var(--line); padding: 14px 0; align-items: flex-start; }
.cart-row img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--soft); }
.cart-row__body { flex: 1; }
.cart-row__body b { font-size: 14px; font-weight: 600; }
.cart-row__body .price { font-size: 16px; margin: 6px 0 0; }
.qty { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.qty button { width: 30px; height: 30px; border: 0; border-radius: 6px; background: var(--soft); color: var(--text); }
.link-btn { border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: underline; padding: 0; }
.cart-summary { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; display: grid; gap: 12px; }
.cart-summary strong { font-size: 20px; color: var(--brand); }
.cart-note { font-size: 12px; margin: 0; }

.float-wechat {
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 30;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  text-decoration: none;
  text-align: center;
  line-height: 1.3;
  box-shadow: 0 8px 20px rgba(255,0,54,.35);
}
.float-wechat b { display: block; font-size: 13px; }
.float-wechat span { font-size: 12px; opacity: .9; }

.footer {
  margin-top: 40px;
  background: var(--ink);
  color: #d5d5dc;
  padding: 48px 0 20px;
}
.footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
.footer__dev-card {
  border: 1px solid #2c2c35;
  border-radius: 10px;
  padding: 16px;
  background: rgba(255,255,255,.03);
}
.footer__dev-card p { color: #d5d5dc; margin: 0 0 8px; line-height: 1.8; }
.footer__dev-card p b { color: var(--brand); }
.footer__dev-card span { font-size: 12px; color: #7d7d88; }
.footer h3 { margin: 0 0 10px; font-size: 16px; color: #fff; }
.footer p { color: #9a9aa5; margin: 0; }
.footer a { color: var(--brand); text-decoration: none; }
.footer__bar {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid #2c2c35;
  font-size: 13px;
  color: #8b8b96;
}
.footer__dev { color: #6f6f7a; }

@media (max-width: 980px) {
  .hero, .hero__stage, .checkout-grid, .wide-promo, .tour { grid-template-columns: 1fr; }
  .category-panel { order: 2; }
  .product-grid, .gallery { grid-template-columns: repeat(2, 1fr); }
  .service-row, .promo-grid, .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .hide-sm { display: none; }
}

@media (max-width: 680px) {
  .topbar__inner { flex-wrap: wrap; padding: 8px 0; }
  .topbar__actions { margin-left: 0; }
  .nav__inner { flex-wrap: wrap; padding: 12px 0; }
  .search { order: 3; flex-basis: 100%; grid-template-columns: 110px 1fr; }
  .hero__stage { padding: 26px 20px; }
  .service-row, .promo-grid, .footer__grid { grid-template-columns: 1fr; }
  .promo-grid article { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .float-wechat { padding: 8px 14px; }
}
