
:root {
  --red: #f51f2b;
  --yellow: #ffd61e;
  --blue: #00a6ff;
  --ink: #171717;
  --muted: #667085;
  --line: #e5e7eb;
  --soft: #fff8d8;
  --page: #f6f7fb;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--page);
}
a { color: inherit; text-decoration: none; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px clamp(14px, 3vw, 30px);
  background: var(--red);
  color: #fff;
  border-bottom: 4px solid var(--yellow);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 900;
  letter-spacing: 0;
}
.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--yellow);
  color: var(--red);
  border-radius: 8px;
  font-weight: 900;
}
.brand span:last-child {
  font-size: 12px;
  letter-spacing: 0;
}
.search-wrap { flex: 1; max-width: 780px; }
.search-wrap input {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 15px;
  outline: 2px solid transparent;
}
.search-wrap input:focus { outline-color: var(--blue); }
.shell { width: min(1180px, calc(100% - 28px)); margin: 22px auto 44px; }
.breadcrumb { display: flex; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}
h1 { margin: 0; font-size: clamp(24px, 4vw, 38px); line-height: 1.05; letter-spacing: 0; }
.subtext { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.count-pill {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.vehicle-grid, .product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.vehicle-card, .product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.06);
}
.vehicle-card { padding: 16px; display: grid; gap: 12px; }
.vehicle-code { color: var(--red); font-weight: 900; font-size: 15px; }
.vehicle-name { font-size: 22px; font-weight: 900; line-height: 1.15; }
.vehicle-meta { color: var(--muted); font-size: 13px; }
.open-button, .whatsapp-button, .copy-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 38px;
  border-radius: 8px;
  border: 0;
  padding: 0 12px;
  font-weight: 900;
  cursor: pointer;
}
.open-button { background: var(--blue); color: #fff; }
.product-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f2f4f7;
  border-bottom: 1px solid var(--line);
  cursor: zoom-in;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(10, 12, 18, 0.86);
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(100%, 980px);
  max-height: 88vh;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
}
.lightbox button {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}
.product-info { padding: 12px; display: grid; gap: 8px; }
.code-row { display: grid; gap: 6px; }
.product-code { font-size: 17px; font-weight: 900; color: var(--red); white-space: nowrap; }
.product-color { font-size: 14px; font-weight: 900; color: #344054; line-height: 1.25; }
.badge { font-size: 11px; font-weight: 900; color: #101828; background: var(--yellow); padding: 4px 7px; border-radius: 8px; }
.product-title { font-size: 15px; font-weight: 900; line-height: 1.25; }
.meta-line { color: #344054; font-size: 13px; line-height: 1.35; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 2px; }
.whatsapp-button { background: #16a34a; color: #fff; }
.copy-button { background: #111827; color: #fff; }
.group-summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 12px 0; }
.group-count { color: var(--muted); font-size: 12px; font-weight: 800; }
.group-list { display: grid; gap: 10px; padding: 12px; }
.group-row { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 7px; }
.group-row:first-child { border-top: 0; padding-top: 0; }
.group-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.group-code { color: var(--red); font-size: 16px; font-weight: 900; white-space: nowrap; }
.group-item { font-size: 14px; font-weight: 900; line-height: 1.25; }
.group-detail { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.row-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.empty { display: none; padding: 28px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: 8px; }
.hidden { display: none !important; }
@media (max-width: 680px) {
  .topbar { align-items: stretch; flex-direction: column; }
  .brand { justify-content: space-between; }
  .page-head { align-items: start; flex-direction: column; }
  .vehicle-grid, .product-grid { grid-template-columns: 1fr; }
  .shell { width: min(100% - 20px, 1180px); margin-top: 14px; }
}
