:root {
  --bg: #fff;
  --text: #222;
  --muted: #5f656c;
  --line: #e6e6e6;
  --red: #e10600;
  --red-dark: #c10500;
  --ink: #111;
  --green: #1b7a34;
  --soft: #f6f6f6;
  --font: "Manrope", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  font-size: 16px;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.top {
  background: var(--ink);
  color: #fff;
}

.top__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  min-height: 92px;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.brand__mark {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(145deg, #f7f7f7, #d9dde2);
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
}

.brand__mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 4px;
  background:
    radial-gradient(circle at 30% 30%, #fff 0 18%, transparent 19%),
    radial-gradient(circle at 68% 38%, #333 0 11%, transparent 12%),
    radial-gradient(circle at 42% 72%, #e0a21a 0 9%, transparent 10%),
    #eceff1;
}

.brand__name {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.top__contacts {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 18px;
}

.top__phone {
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.top__phone:hover {
  color: #ffd0d0;
}

.mess {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
}

.mess svg {
  width: 20px;
  height: 20px;
}

.mess--vb svg {
  width: 18px;
  height: 18px;
}

.mess--tg {
  background: #2aabee;
}
.mess--wa {
  background: #25d366;
}

.mess--vb {
  background: #7360f2;
}

.mess:hover {
  filter: brightness(1.08);
}

.top__area {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  font-size: 0.95rem;
}

.top__area svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.btn-head,
.mobile-bar button,
.mobile-bar a {
  appearance: none;
  border: 0;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  border-radius: 4px;
  cursor: pointer;
}

.btn-head {
  height: 44px;
  padding: 0 16px;
}

.btn-head:hover,
.mobile-bar button:hover {
  background: var(--red-dark);
}

.product {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 48px;
  align-items: start;
  padding: 36px 0 28px;
}

.gallery__frame {
  background: var(--soft);
  border: 1px solid var(--line);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery__frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery__note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.buy h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 1.9rem);
  line-height: 1.25;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.stock {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 8px;
  color: var(--green);
  font-weight: 800;
}

.stock__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.price {
  margin: 0;
  color: var(--red);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.price__value {
  font-size: 2.15rem;
}

.price__cur,
.price__unit {
  font-size: 1.15rem;
}

.price__unit {
  color: #9a100c;
  font-weight: 700;
}

.price__tier {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
}

.excerpt {
  margin: 16px 0 0;
  color: #5a6168;
  font-size: 0.92rem;
  line-height: 1.5;
}

.buy__specs-title,
.about h2,
.about h3,
.about__card h3 {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.buy__specs-title {
  margin: 22px 0 10px;
  font-size: 1.15rem;
}

.specs {
  list-style: none;
  margin: 0;
  padding: 0;
}

.specs li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 0;
}

.specs__dots {
  flex: 1;
  border-bottom: 1px dotted #c8c8c8;
  transform: translateY(-3px);
}

.vars {
  margin-top: 8px;
}

.var,
.qty {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

.var label,
.var__label,
.qty label {
  font-weight: 700;
}

.var--type {
  align-items: start;
}

.var--type .var__label {
  padding-top: 14px;
}

.type-picks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.type-pick {
  position: relative;
  display: block;
  cursor: pointer;
}

.type-pick input {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.type-pick__card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  padding: 8px 12px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.type-pick__card strong {
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.type-pick__card small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.type-pick:hover .type-pick__card {
  border-color: #111;
}

.type-pick input:checked + .type-pick__card,
.type-pick.is-on .type-pick__card {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 6px 16px rgba(17, 17, 17, 0.18);
}

.type-pick input:checked + .type-pick__card small,
.type-pick.is-on .type-pick__card small {
  color: rgba(255, 255, 255, 0.72);
}

.type-pick input:focus-visible + .type-pick__card {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

select,
.qty__ctrl {
  width: 100%;
  height: 48px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  background-color: #fff;
}

select {
  padding: 0 40px 0 14px;
  font-weight: 700;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23111' d='M1 1.2 6 6.8 11 1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

select:hover,
.qty__ctrl:hover {
  border-color: #111;
}

.qty__ctrl {
  display: inline-flex;
  width: fit-content;
  overflow: hidden;
}

.qty__ctrl button {
  width: 46px;
  border: 0;
  background: var(--soft);
  font-size: 1.3rem;
  cursor: pointer;
}

.qty__ctrl button:hover {
  background: #ececec;
}

.qty__ctrl input {
  width: 76px;
  border: 0;
  border-inline: 1px solid #d0d0d0;
  text-align: center;
  font-weight: 800;
  appearance: textfield;
}

.qty__ctrl input::-webkit-outer-spin-button,
.qty__ctrl input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-weight: 700;
}

.total strong {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.hint,
.buy__phone,
.gallery__note,
.modal__help,
.modal__lead {
  color: var(--muted);
}

.hint,
.buy__phone {
  margin: 8px 0 0;
  font-size: 0.92rem;
}

.buy__phone a,
.modal__help a,
.foot a {
  font-weight: 800;
}

.btn-buy {
  width: 100%;
  height: 54px;
  margin-top: 16px;
  border: 0;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.btn-buy:hover {
  background: var(--red);
}

.btn-buy:disabled {
  opacity: 0.6;
  cursor: progress;
}

.about {
  padding: 18px 0 72px;
}

.about h2 {
  margin: 0 0 22px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 1.8rem;
}

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.7fr);
  gap: 36px;
  align-items: start;
}

.about__copy p,
.about__copy li {
  color: #333;
}

.about__copy h3,
.about__card h3 {
  margin: 26px 0 10px;
  font-size: 1.15rem;
}

.about__card h3 {
  margin-top: 0;
}

.about__copy ul {
  margin: 0;
  padding-left: 1.15rem;
}

.about__copy li + li {
  margin-top: 6px;
}

.about__card {
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 18px 18px 8px;
}

.specs--card li {
  font-size: 0.95rem;
}

.foot {
  background: #161616;
  color: rgba(255, 255, 255, 0.86);
  padding: 28px 0 36px;
}

.foot__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
}

.foot p {
  margin: 0;
}

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

.foot a {
  color: #fff;
}

.mobile-bar {
  display: none;
}

.modal {
  width: min(480px, calc(100% - 24px));
  border: 0;
  padding: 0;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.modal__form {
  position: relative;
  padding: 28px 24px 22px;
}

.modal__form h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
}

.modal__lead {
  margin: 0 0 14px;
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.modal__form label {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  font-weight: 700;
  font-size: 0.92rem;
}

.modal__form input,
.modal__form textarea {
  width: 100%;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  padding: 12px 12px;
  font-weight: 600;
}

.modal__form textarea {
  resize: vertical;
}

.hp {
  position: absolute;
  left: -9999px;
}

.order-preview {
  background: var(--soft);
  border-radius: 8px;
  padding: 12px 14px;
}

.order-preview p {
  margin: 0;
}

.order-preview__title {
  font-weight: 800;
  line-height: 1.35;
}

.order-preview__meta,
.order-preview__sum {
  margin-top: 8px;
  color: #444;
  font-size: 0.92rem;
}

.order-preview__sum strong {
  color: var(--ink);
}

.modal__help {
  margin: 12px 0 0;
  font-size: 0.92rem;
}

.modal__status {
  min-height: 1.3em;
  margin: 10px 0 0;
  font-weight: 700;
}

.modal__status.ok {
  color: var(--green);
}

.modal__status.err {
  color: var(--red);
}

@media (max-width: 900px) {
  .top__contacts {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .product,
  .about__grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .product {
    padding-top: 22px;
  }

  .var,
  .qty {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .mobile-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--line);
  }

  .mobile-bar a,
  .mobile-bar button {
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-bar a {
    background: #fff;
    color: var(--ink);
    border: 1px solid #d0d0d0;
  }

  .foot {
    padding-bottom: 96px;
  }
}
