/* ============================================================
   Meige Machinery · auxiliary products demo storefront
   Visual direction: warm paper base + deep emerald accent,
   product photos on soft tinted "stages", clean retail layout.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg: #f4f4f0;
  --surface: #ffffff;
  --ink: #16171b;
  --ink-2: #4a4b52;
  --muted: #8a8b93;
  --line: #e8e8e2;
  --accent: #0e7a5b;
  --accent-strong: #0a634b;
  --accent-soft: #e4f1ec;
  --danger: #c94a4a;
  --danger-soft: #f9e9e7;
  --amber: #b06a12;
  --amber-soft: #f7ecd8;
  --star: #f2a33c;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow-1: 0 1px 2px rgba(22, 23, 27, 0.04), 0 4px 12px rgba(22, 23, 27, 0.05);
  --shadow-2: 0 2px 4px rgba(22, 23, 27, 0.06), 0 12px 28px rgba(22, 23, 27, 0.1);
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Helvetica Neue", sans-serif;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.3; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title { font-size: 22px; font-weight: 800; letter-spacing: 0.01em; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-link { font-size: 13.5px; font-weight: 600; white-space: nowrap; }

/* ---------- announcement ---------- */
.announce {
  background: var(--ink);
  color: #f0f0ec;
  font-size: 13px;
  text-align: center;
  padding: 8px 16px;
}
.announce strong { color: #7fd8b8; font-weight: 700; }

/* ---------- header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  flex-shrink: 0;
  line-height: 0;
}
.brand:hover { text-decoration: none; }

.brand-logo {
  height: 38px;
  width: auto;
  display: block;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  display: grid;
  place-items: center;
  color: #fff;
}

.brand-name { font-size: 18px; font-weight: 900; letter-spacing: 0.02em; }
.brand-tag { display: block; font-size: 10px; color: var(--muted); letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; }

/* ---------- main navigation (site-style menu) ---------- */
.nav { margin-left: auto; }

.nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0;
}

.nav .menu-item {
  position: relative;
  list-style: none;
}

.nav .menu > .menu-item > a {
  display: block;
  padding: 24px 14px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color 0.25s ease;
}
.nav .menu > .menu-item:hover > a,
.nav .menu > .menu-item > a.active { color: var(--accent); }

.nav .sub-menu {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 14px 34px rgba(22, 23, 27, 0.12);
  visibility: hidden;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 60;
}

.nav .menu-item:hover > .sub-menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.nav .sub-menu .menu-item { position: relative; }

.nav .sub-menu a {
  display: block;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.nav .sub-menu a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.nav .sub-menu a.active { background: var(--accent-soft); color: var(--accent); }

/* second-level dropdown opens to the right */
.nav .sub-menu .sub-menu {
  top: -7px;
  left: 100%;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(22, 23, 27, 0.14);
}
.nav .sub-menu .has-children > a::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -4px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  opacity: 0.55;
}
.nav .sub-menu .has-children > a { padding-right: 28px; position: relative; }

.header-actions { margin-left: 0; display: flex; align-items: center; gap: 10px; }

.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  transition: background 0.2s, color 0.2s;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }

.badge-dot {
  position: absolute;
  top: 3px;
  right: 1px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
  border: 2px solid var(--surface);
}
.badge-dot.pop { animation: pop 0.35s ease; }

@keyframes pop {
  0% { transform: scale(0.5); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px 0 14px;
  border-radius: 21px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.2s, transform 0.15s;
}
.cart-btn:hover { background: var(--accent-strong); text-decoration: none; }
.cart-btn:active { transform: scale(0.97); }

/* mobile menu */
.menu-toggle { display: none; }

/* ---------- main ---------- */
.main { min-height: 60vh; }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(60% 90% at 85% 10%, rgba(14, 122, 91, 0.08), transparent 60%),
    linear-gradient(180deg, #fbfbf7, var(--bg));
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 64px 20px 72px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 12px 0 16px;
}

.hero h1 em { font-style: normal; color: var(--accent); }

.hero p.lead { font-size: 16.5px; color: var(--ink-2); margin: 0 0 26px; max-width: 46ch; }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
}
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); text-decoration: none; }

.btn-ghost { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.btn-block { width: 100%; }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; border-radius: 10px; }
.btn-lg { height: 52px; font-size: 16px; border-radius: 13px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.hero-media {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-2);
  aspect-ratio: 4 / 3;
  background: #eef1f4;
}

.hero-media img { width: 100%; height: 100%; object-fit: cover; }

.float-card {
  position: absolute;
  left: 18px;
  bottom: 18px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: var(--shadow-2);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.float-card .fc-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.float-card b { display: block; font-size: 14px; }

/* trust bar */
.trustbar {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.trustbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.trust-item { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--ink-2); }
.trust-item svg { color: var(--accent); flex-shrink: 0; }
.trust-item b { color: var(--ink); font-weight: 700; display: block; font-size: 14px; }

/* ---------- sections ---------- */
.section { padding: 52px 0; }

/* product grid (shared) */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }

.stage {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--stage, #eee);
  display: block;
}
.stage img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .stage img { transform: scale(1.05); }

.badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.badge { font-size: 11.5px; font-weight: 700; line-height: 1; padding: 5px 8px; border-radius: 6px; color: #fff; letter-spacing: 0.02em; }
.badge.sale { background: var(--danger); }
.badge.new { background: var(--accent); }
.badge.best { background: var(--amber); }

.wish {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  color: var(--muted);
  box-shadow: var(--shadow-1);
  transition: color 0.2s, transform 0.15s;
}
.wish:hover { transform: scale(1.08); color: var(--danger); }
.wish.on { color: var(--danger); }
.wish.on svg { fill: currentColor; }

.buybar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px;
  background: linear-gradient(to top, rgba(22, 23, 27, 0.32), transparent);
}
.buybar .add-btn {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transform: translateY(130%);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease, background 0.2s;
}
.card:hover .buybar .add-btn { transform: translateY(0); opacity: 1; }
.add-btn:hover { background: var(--accent-strong); }
@media (hover: none) {
  .buybar .add-btn { transform: translateY(0); opacity: 1; }
}

.info { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
  color: var(--ink);
}
.name:hover { text-decoration: none; color: var(--accent); }

.tagline { margin: 0; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.stars { display: inline-flex; gap: 1px; color: var(--star); flex-shrink: 0; }
.meta .score { color: var(--ink-2); font-weight: 600; }

.price-row { margin-top: auto; display: flex; align-items: baseline; gap: 8px; }
.price { color: var(--accent); font-size: 20px; font-weight: 800; line-height: 1; }
.price .orig { font-size: 13px; color: var(--muted); font-weight: 400; text-decoration: line-through; }

/* ---------- category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.cat-tile {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: block;
  color: #fff;
}
.cat-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.cat-tile:hover img { transform: scale(1.06); }
.cat-tile .cat-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 17, 20, 0.72), rgba(15, 17, 20, 0.06) 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}
.cat-tile b { font-size: 17px; font-weight: 800; }
.cat-tile span { font-size: 12.5px; opacity: 0.85; }

/* ---------- shop page ---------- */
.shop-head { padding: 28px 0 0; }
.page-title { font-size: 26px; font-weight: 900; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 6px; }

.filterbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 20px 0; flex-wrap: wrap; }

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

.chip {
  height: 36px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: all 0.2s;
  white-space: nowrap;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }

.filter-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.result-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.result-count b { color: var(--accent); font-weight: 700; }

.sort { position: relative; }
.sort select {
  appearance: none;
  -webkit-appearance: none;
  height: 36px;
  padding: 0 34px 0 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.sort select:hover { border-color: var(--accent); color: var(--accent); }
.sort svg { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }

.empty { grid-column: 1 / -1; text-align: center; padding: 64px 20px; color: var(--muted); }
.empty svg { color: #c9c9c3; margin-bottom: 14px; }
.empty h3 { margin: 0 0 6px; font-size: 17px; color: var(--ink-2); }
.empty p { margin: 0 0 18px; font-size: 13.5px; }
.empty .btn { margin: 0 auto; }

/* ---------- detail ---------- */
.detail { padding: 30px 0 64px; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: start;
}

.detail-media {
  position: sticky;
  top: 90px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--stage, #eee);
  box-shadow: var(--shadow-1);
}
.detail-media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

.detail-cat { text-transform: uppercase; }

.detail h1 { font-size: 28px; font-weight: 900; letter-spacing: -0.01em; margin: 8px 0 6px; }

.detail-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.detail-meta .stars { color: var(--star); }
.detail-meta a { font-weight: 600; }

.price-line { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.price-line .now { color: var(--accent); font-size: 32px; font-weight: 900; }
.price-line .was { color: var(--muted); text-decoration: line-through; font-size: 17px; }
.price-line .save {
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
}

.detail-desc { font-size: 15px; color: var(--ink-2); margin: 0 0 20px; max-width: 56ch; }

.specs {
  list-style: none;
  margin: 0 0 24px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
}
.specs li { font-size: 13.5px; color: var(--ink-2); display: flex; gap: 8px; align-items: baseline; }
.specs li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; align-self: center; }

.buy-row { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.qty button { width: 42px; height: 46px; display: grid; place-items: center; color: var(--ink-2); transition: background 0.15s; }
.qty button:hover { background: #f2f2ee; }
.qty span { min-width: 44px; text-align: center; font-size: 15px; font-weight: 700; }

.pay-note {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.pay-note svg { color: var(--accent); flex-shrink: 0; }

.pay-badges { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pay-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  padding: 5px 9px;
}

.related { margin-top: 56px; }

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: start;
}

.contact-cards { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }

.contact-card {
  display: flex;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  align-items: flex-start;
}
.contact-card .cc-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.contact-card b { font-size: 14px; display: block; margin-bottom: 2px; }
.contact-card span { font-size: 13.5px; color: var(--ink-2); word-break: break-all; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-1);
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }

.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.field label em { color: var(--danger); font-style: normal; }

.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfbf8;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  padding: 11px 13px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 122, 91, 0.12);
}
.field .err { font-size: 12px; color: var(--danger); margin-top: 5px; display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field.invalid .err { display: block; }

.form-note { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }

/* quote mode */
.price-inquiry {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 800;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 4px 10px;
}

.quote-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13.5px;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
}
.quote-banner b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-clear { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); flex-shrink: 0; }
.quote-clear:hover { background: rgba(14, 122, 91, 0.12); }

/* real payment (hosted redirect) */
.pay-method-note {
  display: block;
  background: #fbfbf8;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}
.pay-method-note b { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 4px; }
.pay-method-note span { font-size: 13.5px; color: var(--muted); line-height: 1.6; }

.pay-error {
  margin-top: 14px;
  background: #fdecea;
  border: 1px solid #f5c6c0;
  color: #a4332a;
  font-size: 13px;
  line-height: 1.6;
  border-radius: 10px;
  padding: 10px 14px;
}

.oc-paid { color: var(--accent); }
.oc-pending { color: #b7791f; }

.form-success {
  display: none;
  text-align: center;
  padding: 36px 10px;
}
.form-success.show { display: block; }
.form-success svg { color: var(--accent); margin-bottom: 12px; }
.form-success h3 { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.form-success p { color: var(--ink-2); font-size: 14px; margin: 0; }

/* ---------- checkout ---------- */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}
.panel h3 { font-size: 16px; font-weight: 800; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.panel h3 .step {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.pay-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }

.pay-tab {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  transition: all 0.2s;
  background: #fbfbf8;
}
.pay-tab .pt-icon {
  width: 34px;
  height: 24px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #fff;
}
.pay-tab .pt-icon.visa { background: #1a1f71; }
.pay-tab .pt-icon.mc { background: linear-gradient(100deg, #eb001b 48%, #f79e1b 52%); }
.pay-tab .pt-icon.amex { background: #006fcf; }
.pay-tab .pt-icon.paypal { background: #003087; }
.pay-tab .pt-icon.alipay { background: #1677ff; }
.pay-tab.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.card-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card-form .full { grid-column: 1 / -1; }

.pay-note-panel {
  font-size: 13px;
  color: var(--muted);
  background: #fbfbf8;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 16px;
}

.summary-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.summary-item:last-of-type { border-bottom: none; }
.summary-item .thumb { width: 56px; height: 56px; border-radius: 9px; overflow: hidden; flex-shrink: 0; background: #eee; }
.summary-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.summary-item .s-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.summary-item .s-price { font-size: 13.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }

.totals { margin-top: 8px; font-size: 14px; }
.totals .t-row { display: flex; justify-content: space-between; padding: 5px 0; color: var(--ink-2); }
.totals .t-row.grand { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-size: 16px; font-weight: 800; color: var(--ink); }
.totals .t-row.grand .val { color: var(--accent); font-size: 22px; }
.totals .free { color: var(--accent); font-weight: 700; }

/* success */
.success-wrap { text-align: center; max-width: 560px; margin: 0 auto; padding: 60px 0 30px; }
.success-wrap .sc-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
}
.success-wrap h1 { font-size: 26px; font-weight: 900; margin-bottom: 10px; }
.success-wrap p { color: var(--ink-2); margin: 0 0 8px; }
.order-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 22px 0;
  text-align: left;
  font-size: 14px;
}
.order-card .oc-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.order-card .oc-row:last-child { border-bottom: none; }
.order-card .oc-row span:first-child { color: var(--muted); }
.order-card .oc-row b { font-weight: 700; }

/* ---------- drawer ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 23, 27, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
  z-index: 90;
}
.overlay.show { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 92vw;
  background: var(--surface);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  box-shadow: -12px 0 32px rgba(22, 23, 27, 0.14);
}
.drawer.show { transform: translateX(0); }

.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 17px; font-weight: 800; }
.drawer-head h2 span { color: var(--accent); }
.drawer-close { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: background 0.2s, color 0.2s; }
.drawer-close:hover { background: #f2f2ee; color: var(--ink); }

.drawer-body { flex: 1; overflow-y: auto; padding: 8px 20px; }

.cart-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item .thumb { width: 76px; height: 76px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: #eee; }
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cart-item .t-name { font-size: 14px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item .t-sub { font-size: 12px; color: var(--muted); }
.cart-item .t-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.cart-item .t-price { color: var(--accent); font-weight: 800; font-size: 15px; }
.cart-item .t-remove { width: 28px; height: 28px; display: grid; place-items: center; color: var(--muted); border-radius: 6px; transition: color 0.2s, background 0.2s; }
.cart-item .t-remove:hover { color: var(--danger); background: var(--danger-soft); }

.cart-empty { text-align: center; padding: 72px 20px; color: var(--muted); }
.cart-empty svg { color: #c9c9c3; margin: 0 auto 14px; }
.cart-empty h3 { margin: 0 0 6px; font-size: 16px; color: var(--ink-2); }
.cart-empty p { margin: 0 0 18px; font-size: 13px; }
.cart-empty .btn { margin: 0 auto; }

.drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); }
.drawer-foot .total-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; font-size: 14px; color: var(--ink-2); }
.drawer-foot .total { color: var(--accent); font-size: 22px; font-weight: 800; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 24px);
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  padding: 12px 18px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
  z-index: 200;
  max-width: 86vw;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast svg { color: #7fd8b8; flex-shrink: 0; }
.toast .t-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 40px 0 26px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}

.footer h4 { font-size: 14px; font-weight: 800; margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer ul li { margin-bottom: 8px; }
.footer ul a { color: var(--ink-2); font-size: 13.5px; }
.footer ul a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 12.5px;
  color: var(--muted);
}

.demo-note {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 8px;
  padding: 5px 12px;
  font-weight: 600;
  font-size: 12px;
}

/* Indicative (sample) price tag — shown next to example prices */
.tag-ind {
  display: inline-block;
  background: #FFF4E0;
  color: #A86A0C;
  border: 1px solid #F0D9AC;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Sample-price notice box */
.ind-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: #FFF8EC;
  border: 1px solid #F0DDBB;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: #8A5A10;
  margin-top: 12px;
  line-height: 1.55;
}
.ind-note svg { flex-shrink: 0; margin-top: 2px; }

/* Ops-facing payment status line (checkout order summary) */
.pay-status-note {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}
.pay-status-note b { color: var(--ink-2); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .grid, .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; padding: 44px 20px 52px; }
  .hero-media { max-width: 560px; }
  .contact-grid, .checkout-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 14px 20px;
    margin: 0;
    gap: 2px;
    display: none;
    overflow-y: auto;
    box-shadow: var(--shadow-2);
  }
  .nav.open { display: flex; }
  .nav .menu { flex-direction: column; align-items: stretch; gap: 2px; width: 100%; }
  .nav .menu > .menu-item > a {
    padding: 11px 10px;
    font-size: 14px;
    white-space: normal;
    border-radius: 8px;
  }
  .nav .menu > .menu-item > a:active { background: var(--accent-soft); }

  /* sub-menus become inline blocks on touch */
  .nav .sub-menu,
  .nav .sub-menu .sub-menu {
    position: static;
    visibility: visible;
    opacity: 1;
    transform: none;
    min-width: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0 0 2px 16px;
  }
  .nav .sub-menu a { padding: 9px 10px; white-space: normal; font-size: 13px; }
  .nav .sub-menu .has-children > a::after { display: none; }
  .nav .sub-menu .has-children > a { padding-right: 10px; }

  .menu-toggle { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--ink-2); }
  .menu-toggle:hover { background: var(--accent-soft); color: var(--accent); }

  .header-inner { gap: 12px; }
  .brand-logo { height: 32px; }
  .brand-tag { display: none; }
  .cart-btn .cart-label { display: none; }
  .cart-btn { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 12px; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .info { padding: 12px; gap: 6px; }
  .name { font-size: 14px; min-height: 2.7em; }
  .price { font-size: 18px; }
  .buybar .add-btn { transform: translateY(0); opacity: 1; }

  .section { padding: 40px 0; }
  .trustbar-inner { grid-template-columns: 1fr; gap: 10px; }
  .detail-grid { grid-template-columns: 1fr; gap: 24px; }
  .detail-media { position: static; }
  .detail h1 { font-size: 23px; }
  .price-line .now { font-size: 26px; }
  .specs { grid-template-columns: 1fr; }
  .buy-row { flex-wrap: wrap; }
  .buy-row .btn { flex: 1 1 auto; }

  .form-grid { grid-template-columns: 1fr; }
  .pay-tabs { grid-template-columns: 1fr; }
  .card-form { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .main { padding: 0; }
  .page-title { font-size: 22px; }
  .filterbar { gap: 10px; }
  .chips { width: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; }
  .filter-right { width: 100%; justify-content: space-between; }
  .drawer { width: 100%; max-width: 100%; }
  .badge { font-size: 10.5px; padding: 4px 7px; }
  .wish { width: 32px; height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
