@font-face {
  font-family: "WB Hauss";
  src: local("Segoe UI"), local("Roboto"), local("Arial");
}

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

:root {
  --purple: #a73afd;
  --purple-dark: #481173;
  --purple-pink: #cb11ab;
  --purple-soft: #f3e8ff;
  --red: #fa2b55;
  --text: #242424;
  --gray: #868695;
  --line: #e3e4ea;
  --bg: #fff;
  --bg-soft: #f6f6f9;
  --star: #ffb800;
  --radius: 12px;
  --radius-lg: 20px;
}

html { font-size: 16px; }

body {
  font-family: "WB Hauss", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; }
img { display: block; max-width: 100%; }

.wrap {
  width: min(1504px, 100%);
  margin: 0 auto;
  padding: 0 32px;
}

/* top bar */
.top-bar {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--gray);
}

.top-bar__wrap {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-bar__nav {
  display: flex;
  gap: 18px;
}

.top-bar__nav a:hover { color: var(--purple); }

.top-bar__right {
  display: flex;
  gap: 14px;
}

/* header */
.header {
  background: linear-gradient(90deg, var(--purple-pink) 0%, #9a41f2 42%, var(--purple-dark) 100%);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header__wrap {
  height: 60px;
  display: grid;
  grid-template-columns: 32px auto 1fr auto;
  align-items: center;
  gap: 14px;
}

.header__burger {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
}

.header__logo {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.6px;
  white-space: nowrap;
}

.header__search {
  position: relative;
  max-width: 760px;
  width: 100%;
  justify-self: center;
}

.header__search input {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 48px 0 16px;
  font-size: 16px;
  outline: none;
}

.header__search input::placeholder { color: var(--gray); }

.header__search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
}

.header__nav {
  display: flex;
  gap: 22px;
}

.header__nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #fff;
  font-size: 11px;
  min-width: 52px;
}

/* page */
.page { padding: 12px 0 56px; }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 16px;
}

.breadcrumbs a:hover { color: var(--purple); }
.breadcrumbs span:last-child { color: var(--text); }

/* product grid */
.product {
  display: grid;
  grid-template-columns: 516px 1fr;
  gap: 28px;
  align-items: start;
}

.product__gallery {
  display: flex;
  gap: 8px;
}

.product__thumbs {
  width: 56px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.product__thumb {
  width: 56px;
  height: 74px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--bg-soft);
}

.product__thumb.is-active { border-color: var(--purple); }

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

.product__preview {
  flex: 1;
  min-width: 0;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-soft);
  aspect-ratio: 3 / 4;
}

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

.product__similar {
  position: absolute;
  right: 14px;
  bottom: 14px;
  height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.94);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.product__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

/* info */
.product__info { padding-top: 2px; }

.product__brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
  margin-bottom: 8px;
}

.product__title {
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 10px;
}

.product__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 18px;
}

.product__meta strong {
  color: var(--text);
  font-weight: 600;
}

.product__meta a:hover { color: var(--purple); }

.product__meta a + a::before {
  content: "·";
  margin-right: 6px;
  color: var(--gray);
}

.product__colors {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}

.product__color {
  width: 48px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--bg-soft);
}

.product__color.is-active { border-color: var(--purple); }

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

.product__params {
  margin-bottom: 18px;
}

.product__params > div {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  padding: 5px 0;
  font-size: 14px;
}

.product__params dt { color: var(--gray); }
.product__params dd { color: var(--text); }

.product__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product__links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.product__links a:hover { color: var(--purple); }
.product__links svg { color: var(--gray); flex-shrink: 0; }

/* sidebar */
.product__sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product__toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
}

.product__toolbar button {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}

.product__toolbar button:hover { background: var(--bg-soft); }

.order-block {
  position: sticky;
  top: 92px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(16, 0, 61, .08);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-block__price-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.order-block__prices {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.order-block__price {
  font-size: 36px;
  font-weight: 700;
  color: var(--red);
  line-height: 1;
}

.order-block__old {
  font-size: 14px;
  color: var(--gray);
  text-decoration: line-through;
}

.order-block__tag {
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.order-block__btn {
  width: 100%;
  height: 50px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 500;
}

.order-block__btn--primary {
  background: var(--purple);
  color: #fff;
}

.order-block__btn--primary:hover { background: #9630ef; }

.order-block__btn--ghost {
  background: var(--purple-soft);
  color: var(--purple);
}

.order-block__btn--ghost:hover { background: #ead6ff; }

.order-block__delivery {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--gray);
  padding-top: 2px;
}

.order-block__delivery b { color: var(--text); font-weight: 500; }

.order-block__seller {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 12px;
}

.order-block__seller-rate { color: var(--gray); }

/* reviews */
.reviews {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.reviews__head {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
}

.reviews__tab {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray);
  padding-bottom: 8px;
  border-bottom: 2px solid transparent;
}

.reviews__tab span { font-weight: 400; }

.reviews__tab.is-active {
  color: var(--text);
  border-bottom-color: var(--purple);
}

.reviews__summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.reviews__score {
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
}

.reviews__stars { display: flex; gap: 2px; }

.reviews__label {
  background: linear-gradient(90deg, #ff9a00, #ff6b00);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

.reviews__photos {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.reviews__photos button {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
}

.reviews__photos button:hover { border-color: var(--purple); }

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

@media (max-width: 1280px) {
  .product { grid-template-columns: 460px 1fr; }
  .product__body { grid-template-columns: 1fr 280px; }
}

@media (max-width: 1024px) {
  .product { grid-template-columns: 1fr; }
  .product__body { grid-template-columns: 1fr; }
  .order-block { position: static; }
}

@media (max-width: 768px) {
  .wrap { padding: 0 16px; }
  .top-bar__nav { display: none; }
  .header__nav span { display: none; }
  .product__params > div { grid-template-columns: 1fr; gap: 2px; }
  .product__title { font-size: 22px; }
}
