/* ============================================================
   Мастерская Гиджрати — публичный сайт (тёмная тема)
   Основной шрифт всего текста — Merriweather.
   ============================================================ */

@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/merriweather-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/merriweather-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/merriweather-700-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/merriweather-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0e0d0c;
  --surface: #161412;
  --surface-2: #1d1a17;
  --text: #e7e3dc;
  --muted: #9b948a;
  --blue: #4aa2c7;
  --light-blue: #5db3dd;
  --red: #e2795e;
  --line: #2a2622;
  --sans: 'Merriweather', Georgia, serif;
  --main: 'Merriweather', Georgia, serif;
  --content: 1185px;
  --photo-ratio: 4 / 5;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, figure { margin: 0; }

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

.container {
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 15px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 300;
  background: var(--surface);
  color: var(--text);
  padding: 10px 16px;
  border: 1px solid var(--line);
}
.skip-link:focus { top: 10px; }

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

/* ---------- Шапка ---------- */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  color: #fff;
}
.site-header__inner {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 16px;
}
.brand {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 20px;
  line-height: 1;
  color: #fff;
  padding: 16px 12px;
  white-space: nowrap;
}
.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 26px;
  padding-right: 135px;
}
.nav__link {
  font-weight: 400;
  font-size: 16px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.87);
  padding: 18px 0;
  white-space: nowrap;
  transition: color 0.2s;
}
.nav__link:hover { color: #fff; }
.nav__link.is-active { color: var(--light-blue); font-weight: 400; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  margin-left: auto;
  padding: 0 8px;
  background: transparent;
  border: 0;
}
.burger span { display: block; width: 100%; height: 1.5px; background: #fff; }

/* ---------- Мобильное меню ---------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  color: var(--text);
  padding: 20px;
  overflow-y: auto;
}
.menu[hidden] { display: none; }
.menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.menu__brand { font-weight: 400; font-size: 20px; color: var(--text); }
.menu__close {
  background: none;
  border: 0;
  font-size: 2rem;
  line-height: 1;
  padding: 2px 8px;
  color: var(--text);
}
.menu__nav { display: flex; flex-direction: column; }
.menu__nav a {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 20px;
  color: var(--text);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.menu__nav a.is-active { color: var(--light-blue); }
body.menu-open { overflow: hidden; }

/* ---------- Обложка ---------- */

.hero {
  height: 340px;
  overflow: hidden;
  background: #0a0908;
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ---------- Горизонтальное меню разделов ---------- */

.section-nav {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.section-nav__inner {
  display: flex;
  justify-content: center;
  gap: 44px;
}
.section-nav__link {
  position: relative;
  padding: 18px 2px 16px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}
.section-nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--light-blue);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.section-nav__link:hover { color: var(--text); }
.section-nav__link.is-active { color: var(--text); font-weight: 700; }
.section-nav__link.is-active::after { transform: scaleX(1); }

/* ---------- Каталог ---------- */

.catalog { padding: 24px 0 80px; }
.catalog-head { text-align: center; padding: 22px 15px 28px; }
.catalog-lead {
  max-width: 780px;
  margin: 0 auto;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}
.catalog-lead p { margin: 0 0 10px; }
.catalog-lead p:last-child { margin-bottom: 0; }
.catalog__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 30px;
  row-gap: 48px;
}
.catalog__empty {
  padding: 40px 0 80px;
  text-align: center;
  font-size: 14.6667px;
  color: var(--muted);
}

.card {
  min-width: 0;
  text-align: center;
  padding-bottom: 14px;
}
.carousel { position: relative; }
.carousel__track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide {
  flex: 0 0 100%;
  min-width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.carousel__slide img {
  width: 100%;
  aspect-ratio: var(--photo-ratio);
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}
.carousel__slide--empty {
  aspect-ratio: var(--photo-ratio);
  background: #1a1714;
}
.carousel__dots {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.carousel__dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}
.carousel__dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4a443c;
  transition: background 0.2s;
}
.carousel__dot.is-active::before { background: var(--light-blue); }

.card__title {
  margin: 15px 0 0;
  font-family: var(--main);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.4;
  color: var(--c-title, #f1ede6);
}
.card__sku {
  margin: 5px 0 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--c-sku, var(--muted));
}
.card__sku + .card__price { margin-top: 14px; }
.card__price {
  margin: 28px 0 0;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 25.3333px;
  line-height: 1.4;
  color: var(--c-price, var(--red));
}

/* ---------- Баннер раздела (широкая карусель) ---------- */

.banner-carousel {
  position: relative;
  width: 600px;
  max-width: 100%;
  height: 200px;
  margin: 0 auto 24px;
  overflow: hidden;
  background: #0a0908;
}
.banner-carousel--bottom {
  width: 800px;
  margin: 24px auto 0;
}
.banner-carousel .carousel__slide img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.banner-carousel .carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
}
.banner-carousel .carousel__dot::before { background: rgba(255, 255, 255, 0.5); }
.banner-carousel .carousel__dot.is-active::before { background: var(--light-blue); }

/* ---------- Карточка товара отдельно ---------- */

.product-single { padding: 24px 0 80px; }
.product-single .card { max-width: 365px; margin: 0 auto; }

/* ---------- Карусель на странице ---------- */

.gallery-carousel { margin: 28px 0 0; max-width: 900px; }
.gallery-carousel--left { max-width: 365px; margin-left: 0; }
.gallery-carousel .carousel__slide img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.gallery-carousel .carousel__dots { height: 36px; }

/* ---------- Текстовые страницы ---------- */

.page-content { padding: 28px 0 80px; }
.page-title {
  margin: 0 0 24px;
  font-family: var(--main);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.4;
  color: #f1ede6;
}
.prose {
  max-width: 760px;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
}
.prose p { margin-bottom: 1em; }
.prose p:last-child { margin-bottom: 0; }
.prose h2 {
  margin: 1.6em 0 0.6em;
  font-family: var(--main);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.4;
  color: #f1ede6;
}
.prose h3 {
  margin: 1.4em 0 0.5em;
  font-family: var(--main);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.4;
  color: #f1ede6;
}
.prose blockquote {
  margin: 1.4em 0;
  padding-left: 18px;
  border-left: 3px solid var(--blue);
  color: var(--muted);
}
.prose ul { margin: 0 0 1em; padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose a { color: var(--blue); text-decoration: underline; }

.about-page { display: flex; flex-direction: column; }
.about-page__col { display: contents; }
.about-page__media { max-width: 365px; order: 0; }
.about-page__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about-page .prose { order: 1; }
.about-page .gallery-carousel { margin-top: 28px; order: 2; }

@media (min-width: 1025px) {
  .about-page {
    display: grid;
    grid-template-columns: 365px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
  }
  .about-page__col { display: flex; flex-direction: column; grid-column: 1; }
  .about-page .prose { grid-column: 2; order: 0; }
  .about-page .gallery-carousel { margin-top: 28px; order: 0; }
}

.contacts-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 365px;
  gap: 30px;
  align-items: start;
  margin-bottom: 36px;
}
.contacts-list p { margin: 0 0 14px; font-size: 14.6667px; }
.contacts-list span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.contacts-list a { color: var(--blue); }

/* ---------- Кнопки геолокации ---------- */

.geo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 4px 6px 0;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-size: 14.6667px;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.geo-btn:hover { border-color: var(--blue); background: var(--surface-2); }

/* ---------- Форма ---------- */

.request { padding: 0 0 80px; }
.request__inner { max-width: 760px; }
.request__title {
  margin: 0 0 12px;
  font-family: var(--main);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.4;
  color: #f1ede6;
}
.request__lead { max-width: 560px; margin-bottom: 22px; font-size: 14.6667px; color: var(--muted); }
.request__form { display: grid; gap: 16px; max-width: 560px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; color: var(--muted); }
.field input,
.field textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #35302a;
  border-radius: 2px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input::placeholder,
.field textarea::placeholder { color: #6c655b; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px rgba(90, 162, 199, 0.2); }
.field--honey { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}
.consent input { width: 15px; height: 15px; margin-top: 2px; flex-shrink: 0; }
.consent a { color: var(--blue); text-decoration: underline; }
.btn {
  justify-self: start;
  padding: 10px 22px;
  border: 1px solid #2f7da3;
  border-radius: 2px;
  background: #2f7da3;
  color: #fff;
  font-size: 14px;
  line-height: 1.2;
  transition: background 0.2s, border-color 0.2s;
}
.btn:hover { background: #256a8b; border-color: #256a8b; }

/* ---------- Служебные страницы ---------- */

.message-page { padding: 32px 0 80px; }
.message-page p { max-width: 620px; margin-bottom: 14px; font-size: 14.6667px; color: var(--text); }
.message-page__code {
  font-family: var(--main);
  font-size: 40px;
  line-height: 1;
  color: var(--blue);
  margin-bottom: 16px;
}
.text-link { color: var(--blue); text-decoration: underline; }

/* ---------- Адаптив ---------- */

@media (max-width: 1100px) {
  .nav { display: none; }
  .burger { display: flex; }
}

@media (max-width: 1024px) {
  .container { padding: 0 19px; }
  .catalog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 30px; }
  .contacts-page { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .hero { height: 250px; }
  .section-nav__inner { gap: 24px; }
  .section-nav__link { font-size: 13px; letter-spacing: 0.12em; padding: 15px 2px 13px; }
  .catalog { padding: 24px 0 60px; }
  .catalog__grid { grid-template-columns: 1fr; row-gap: 48px; }
  .card { padding-bottom: 6px; }
  .card__title { font-size: 22.6667px; }
  .card__sku { font-size: 14px; }
  .card__price { font-size: 20px; }
  .banner-carousel { margin-bottom: 16px; }
  .catalog-lead { font-size: 16px; }
  .page-content { padding: 24px 0 60px; }  .page-title { font-size: 22px; }
  .about-page__media { max-width: none; }
  .gallery-carousel--left { max-width: none; }
  .nav { padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .carousel__track { scroll-behavior: auto; }
  * { transition-duration: 0.001ms !important; }
}
