/* Salut — статический каталог. Стиль унаследован от старого сайта: фиолетовая ночь,
   белая колонка, боковое меню, сетка карточек. Без фреймворков. */

:root {
  --purple: #724d8b;
  --purple-dark: #5b3d70;
  --purple-soft: #f7f3fa;
  --ink: #212529;
  --muted: #6c757d;
  --line: #e9e6ee;
  --bg: #ffffff;
  --radius: 6px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: #2a1740 url("/assets/img/background.webp") center top / cover no-repeat fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(20, 0, 35, 0.18);
  pointer-events: none;
  z-index: -1;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--purple);
}

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

p {
  margin: 0 0 1rem;
}

h1,
h2,
h3 {
  line-height: 1.28;
  font-weight: 700;
  color: var(--ink);
}

h1 {
  font-size: 2rem;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.5rem;
  margin: 2rem 0 0.8rem;
}

:focus-visible {
  outline: 3px solid rgba(114, 77, 139, 0.55);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 100;
  padding: 8px 14px;
  background: #fff;
  color: var(--purple);
  border-radius: 0 0 6px 6px;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* ---------- Каркас ---------- */

.page {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  max-width: 1180px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 14px 70px rgba(15, 0, 30, 0.5);
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  padding: 32px 20px 24px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--purple);
  font-size: 19px;
  font-weight: 600;
  text-decoration: none;
}

.brand img {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 8px;
}

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

.nav {
  display: flex;
  flex-direction: column;
  margin-top: 36px;
}

.nav a {
  padding: 9px 12px;
  border-radius: 4px;
  color: #4b4b4b;
  font-size: 15px;
  line-height: 1.4;
  text-decoration: none;
}

.nav a:hover {
  background: var(--purple-soft);
  color: var(--purple);
}

.nav a.active {
  background: var(--purple);
  color: #fff;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--purple);
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -6px;
}

.nav-toggle__bars::after {
  top: 6px;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  padding: 22px 40px 0;
  font-size: 15px;
  font-weight: 600;
}

.topbar a {
  color: var(--purple);
  text-decoration: none;
}

.topbar a:hover {
  text-decoration: underline;
}

.content {
  flex: 1;
  min-width: 0;
  padding: 18px 40px 48px;
}

.footer {
  padding: 20px 40px 28px;
  border-top: 1px solid var(--line);
  color: #555;
  font-size: 13.5px;
  line-height: 1.7;
}

.footer p {
  margin: 0 0 6px;
}

.footer__copy {
  margin-top: 12px;
  color: #8a8a8a;
}

/* ---------- Хлебные крошки ---------- */

.breadcrumbs {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.breadcrumbs a {
  color: var(--purple);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs__sep {
  margin: 0 6px;
  color: #b9b3c2;
}

/* ---------- Главная ---------- */

.home h1 {
  max-width: 780px;
  font-size: 2.05rem;
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 36px;
  align-items: start;
}

.home-intro__media {
  display: grid;
  gap: 18px;
}

.home-intro__image {
  display: block;
  border-radius: var(--radius);
  background: #fff;
}

.home-intro__image img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.home-intro__image:hover img {
  transform: scale(1.02);
}

.home-highlight {
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--purple);
  color: #fff;
  font-size: 15px;
}

.home-phones {
  margin: 26px 0 30px;
  text-align: center;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.7;
}

.home-phones a {
  color: var(--purple);
  text-decoration: none;
}

.home-phones a:hover {
  text-decoration: underline;
}

.cat-tiles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 560px;
  margin: 0 auto 34px;
}

.cat-tile {
  display: block;
  padding: 9px 16px;
  border-radius: 4px;
  background: #f1f1f1;
  color: var(--purple);
  font-size: 15px;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s ease;
}

.cat-tile:hover {
  background: #e7e0ef;
  color: var(--purple-dark);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 640px;
  margin: 0 auto;
}

.video-card {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  background: #120a1c;
}

.video-card video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Категория ---------- */

.intro {
  max-width: 740px;
  color: #333;
}

.intro p:last-child {
  margin-bottom: 0;
}

.count {
  margin: 20px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 28px 22px;
}

.card {
  min-width: 0;
}

.card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: #fff;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.card:hover .card__media img {
  transform: scale(1.03);
}

.card__title {
  margin: 10px 0 4px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.card__title a {
  color: var(--ink);
  text-decoration: none;
}

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

.card__price {
  font-size: 1.05rem;
  color: var(--ink);
}

/* ---------- Товар ---------- */

.product {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 34px;
  align-items: start;
  margin-bottom: 32px;
}

.gallery__main {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: #fff;
  cursor: zoom-in;
}

.gallery__main img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.gallery__thumb {
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.gallery__thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

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

.product__info h1 {
  margin-bottom: 0.4rem;
  font-size: 1.8rem;
}

.product__price {
  margin: 6px 0 14px;
  color: var(--purple);
  font-size: 1.7rem;
  font-weight: 700;
}

.product__short {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: #333;
  font-size: 15px;
}

.product__short p:last-child {
  margin-bottom: 0;
}

.product__sku {
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.button {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 5px;
  background: var(--purple);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: var(--purple-dark);
  color: #fff;
}

.product-description {
  margin: 12px 0 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.related {
  margin-top: 40px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.related h2 {
  font-size: 1.35rem;
}

.product-grid--related {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.related__more {
  margin-top: 18px;
  font-size: 14px;
}

/* ---------- Лайтбокс ---------- */

.lightbox {
  max-width: min(96vw, 1100px);
  max-height: 94vh;
  padding: 0;
  border: 0;
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(10, 0, 20, 0.9);
}

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  margin: auto;
}

.lightbox__close {
  position: fixed;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #222;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- 404 ---------- */

.not-found {
  max-width: 620px;
}

.not-found__links {
  margin-top: 24px;
  padding-left: 20px;
}

/* ---------- Мобильный ---------- */

@media (max-width: 960px) {
  body {
    background-attachment: scroll;
  }

  .page {
    display: block;
    max-width: none;
    box-shadow: none;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: auto;
    padding: 10px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: #fff;
  }

  .brand img {
    width: 44px;
    height: 44px;
  }

  .brand span {
    font-size: 17px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    margin: 0;
    padding: 8px 12px 14px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
  }

  .nav.is-open {
    display: flex;
  }

  .topbar {
    display: none;
  }

  .content {
    padding: 18px 16px 36px;
  }

  .footer {
    padding: 18px 16px 24px;
  }

  .home-intro {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .home-intro__media {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .home h1 {
    font-size: 1.55rem;
  }

  .home-phones {
    font-size: 1.2rem;
  }

  .product {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .product__info h1 {
    font-size: 1.5rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 14px;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
