/* ============================================================
   МОТОДВИГАТЕЛИ — светлый индустриальный каталог
   ============================================================ */

:root {
  --paper: #f4f3ef;
  --card: #ffffff;
  --ink: #191b1f;
  --steel: #5f6572;
  --line: #dcdad3;
  --line-dark: #b9b6ac;
  --accent: #d9330f;
  --accent-dark: #b02508;
  --ok: #1c7c3f;
  --ok-bg: #e6f3ea;
  --display: "Oswald", "Arial Narrow", sans-serif;
  --body: "Golos Text", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  /* лёгкая «миллиметровка» на фоне */
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 36px 36px;
  background-attachment: fixed;
}

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }

/* ---------- ШАПКА ---------- */

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  flex: none;
}
.logo-mark svg { width: 24px; height: 24px; }
.logo-mark::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 5px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 6px, var(--ink) 6px 12px);
}

.logo .dot { color: var(--accent); }

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

.h-phone {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 16px;
  padding: 8px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.h-phone:hover { background: var(--ink); color: #fff; }

.h-tg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 9.5px 14px;
  background: #2a9ed6;
  color: #fff;
  border-radius: 8px;
  transition: filter .15s;
  white-space: nowrap;
}
.h-tg:hover { filter: brightness(1.08); }
.h-tg svg { width: 16px; height: 16px; }

/* ---------- СКВОЗНАЯ ПОЛОСА ДОСТАВКИ ---------- */

.delivery-strip {
  background: var(--ink);
  color: #ecebe7;
  position: relative;
  overflow: hidden;
}
.delivery-strip::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 10px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 8px, transparent 8px 16px);
}
.delivery-strip .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 28px;
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 13.5px;
}
.delivery-strip b { color: #fff; font-weight: 600; }
.d-item { display: inline-flex; align-items: center; gap: 8px; }
.d-item svg { width: 15px; height: 15px; flex: none; color: var(--accent); }
.d-item .warn { color: #f0b429; }

/* ---------- ГЕРОЙ-ЗАГОЛОВОК ---------- */

.page-head { padding: 40px 0 8px; }

.page-head .kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.page-head h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(30px, 4.5vw, 46px);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: .01em;
}

.page-head .sub {
  margin-top: 10px;
  color: var(--steel);
  max-width: 640px;
}

/* ---------- СЕТКА КАРТОЧЕК ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 28px 0 56px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
  animation: rise .45s both;
}
.card:nth-child(4n+2) { animation-delay: .05s; }
.card:nth-child(4n+3) { animation-delay: .1s; }
.card:nth-child(4n+4) { animation-delay: .15s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -14px rgba(25, 27, 31, .25);
  border-color: var(--line-dark);
}

.card .num {
  position: absolute;
  top: 8px;
  left: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--line-dark);
  z-index: 2;
}

.card-photo {
  height: 185px;
  background: #fff;
  display: grid;
  grid-template-rows: 100%;
  grid-template-columns: 100%;
  place-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .25s ease;
}
.card:hover .card-photo img { transform: scale(1.05); }

.card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-title {
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--steel);
}
.card-title b {
  color: var(--ink);
  font-weight: 700;
}
.card-title .lead {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .02em;
  margin-right: 4px;
}

.card-foot {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.price {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.02em;
}
.price small { font-weight: 500; font-size: 11px; color: var(--steel); display: block; letter-spacing: 0; }

.stock {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ok);
  background: var(--ok-bg);
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
}
.stock.low { color: #9a6700; background: #fdf3d7; }

/* ---------- СТРАНИЦА ТОВАРА ---------- */

.crumbs {
  padding: 22px 0 0;
  font-size: 13px;
  color: var(--steel);
}
.crumbs a { color: var(--accent); font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }

.product {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: 36px;
  padding: 24px 0 48px;
  align-items: start;
}

/* галерея */
.gallery {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  position: sticky;
  top: 84px;
}

.g-main {
  position: relative;
  background: #fff;
  border-radius: 10px;
  height: 430px;
  display: grid;
  grid-template-rows: 100%;
  grid-template-columns: 100%;
  place-items: center;
  overflow: hidden;
}
.g-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: fadein .25s;
}
@keyframes fadein { from { opacity: 0; } }

.g-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  user-select: none;
}
.g-arrow:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.g-arrow.prev { left: 10px; }
.g-arrow.next { right: 10px; }
.g-arrow svg { width: 18px; height: 18px; }

.g-count {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-family: var(--mono);
  font-size: 12px;
  background: rgba(25,27,31,.75);
  color: #fff;
  padding: 2px 9px;
  border-radius: 20px;
}

.g-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.g-thumbs button {
  flex: none;
  width: 68px;
  height: 68px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  cursor: pointer;
  transition: border-color .15s;
}
.g-thumbs button.active { border-color: var(--accent); }
.g-thumbs img { width: 100%; height: 100%; object-fit: contain; }

/* информация */
.p-info .sku {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--steel);
  margin-bottom: 8px;
}
.p-info .sku b { color: var(--accent); font-weight: 600; }

.p-info h1 {
  font-size: 21px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--steel);
}
.p-info h1 b { color: var(--ink); font-weight: 700; }
.p-info h1 .lead {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 34px;
  text-transform: uppercase;
  letter-spacing: .015em;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 4px;
}

.p-price-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 6px;
}
.p-price {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -.02em;
}
.p-price-note { font-size: 12px; color: var(--steel); }

.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.specs span {
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  padding: 4px 12px;
  background: var(--card);
}

.p-desc { color: var(--steel); margin: 6px 0 20px; max-width: 52ch; }

.cta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: 10px;
  cursor: pointer;
  border: none;
  transition: filter .15s, background .15s;
}
.btn svg { width: 18px; height: 18px; }
.btn-call { background: var(--accent); color: #fff; }
.btn-call:hover { background: var(--accent-dark); }
.btn-tg { background: #2a9ed6; color: #fff; }
.btn-tg:hover { filter: brightness(1.08); }

.p-delivery {
  margin-top: 24px;
  border: 1px dashed var(--line-dark);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--steel);
  background: rgba(255,255,255,.6);
}
.p-delivery b { color: var(--ink); }

/* ---------- ЕЩЁ ДВИГАТЕЛИ ---------- */
.more-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: .02em;
  padding-bottom: 4px;
}
.more-grid { padding-top: 14px; padding-bottom: 60px; }
.more-grid .card .num { display: none; }

/* ---------- ПОДВАЛ ---------- */
.site-footer {
  background: var(--ink);
  color: #b9bcc4;
  font-size: 13.5px;
  margin-top: 20px;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 30px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.site-footer .f-brand { font-family: var(--display); font-size: 18px; color: #fff; text-transform: uppercase; letter-spacing: .04em; }
.site-footer a { color: #fff; font-weight: 600; }
.site-footer a:hover { color: var(--accent); }
.site-footer .f-right { margin-left: auto; }

/* ---------- АДАПТИВ ---------- */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .product { grid-template-columns: 1fr; }
  .gallery { position: static; }
}
@media (max-width: 780px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .logo { font-size: 19px; }
  .h-tg span { display: none; }
  .h-tg { padding: 10px; }
  .g-main { height: 320px; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
  .h-phone { font-size: 14px; padding: 7px 10px; }
  .card-photo { height: 210px; }
}
