/* ============================================================
   ELAANYCH — Minimalist Black & White
   ============================================================ */

/* ──────────────────────────────
   RESET & BASE
────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

html {
  font-family: 'Inter', sans-serif;
}

body {
  font-family: 'Inter', sans-serif;
  font-optical-sizing: auto;
  background: #fff;
  color: #000;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Форм-элементы по умолчанию игнорируют font-family — принудительно наследуем */
input, button, select, textarea, optgroup, option {
  font-family: inherit;
  font-size: inherit;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
button { cursor: pointer; }

/* ──────────────────────────────
   VARIABLES
────────────────────────────── */
:root {
  --black:  #000;
  --white:  #fff;
  --gray:   #7c7c7c;
  --light:  #efefef;
  --border: 1px solid #000;
  --nav-h:  62px;
  --pad:    40px;
}

/* ──────────────────────────────
   PLACEHOLDER
   Замените <div class="ph"> на <img src="...">
────────────────────────────── */
.ph {
  width: 100%;
  height: 100%;
  background: var(--light);
  display: flex;
  align-items: flex-end;
}
.ph::after {
  content: attr(data-label);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  color: #bbb;
  padding: 16px 20px;
}
.ph--dark            { background: #1c1c1c; }
.ph--dark::after     { color: #444; }

/* ──────────────────────────────
   SECTION LABEL
────────────────────────────── */
.section-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 4px;
  color: var(--gray);
}

/* ──────────────────────────────
   NAVIGATION
────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--white);
  border-bottom: var(--border);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--pad);
  transition: background 0.4s ease, border-color 0.4s ease;
}

/* Прозрачный режим (только главная, до скролла) */
.nav--transparent {
  background: transparent;
  border-bottom-color: transparent;
}
.nav--transparent .nav__brand,
.nav--transparent .nav__link {
  color: var(--white);
}
.nav--transparent .nav__link::after {
  background: var(--white);
}

.nav__brand {
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 5px;
  color: var(--black);
  transition: color 0.4s ease;
  user-select: none;
}

.nav__links {
  display: flex;
  gap: 36px;
  justify-content: center;
}

.nav__logo {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.nav__logo-img {
  height: 20px;
  width: auto;
  display: block;
  transition: opacity 0.3s ease;
}
.nav__logo-img:hover { opacity: 0.6; }
.nav--transparent .nav__logo-img { filter: invert(1); }

.nav__link {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3.5px;
  color: var(--gray);
  transition: color 0.3s;
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--black);
  transform: scaleX(0);
  transition: transform 0.25s ease, background 0.4s ease;
}
.nav__link:hover,
.nav__link.is-active       { color: var(--black); }
.nav--transparent .nav__link:hover,
.nav--transparent .nav__link.is-active { color: var(--white); }
.nav__link.is-active::after,
.nav__link:hover::after    { transform: scaleX(1); }

/* ──────────────────────────────
   BRAND SECTION
────────────────────────────── */

/* На главной — герой уходит под прозрачную шапку */
body.page--home .brand { margin-top: 0; }

/* На остальных страницах — section отступает вниз */
.page-header { margin-top: var(--nav-h); }

.brand__photo { width: 100%; overflow: hidden; }
.brand__photo--hero      { height: 78vh; min-height: 520px; }
.brand__photo--secondary { height: 56vh; min-height: 380px; }

.brand__text {
  padding: 72px var(--pad);
  max-width: 640px;      /* не на всю ширину */
}

.brand__tagline,
.brand__body {
  font-size: 24px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--black);
}

.brand__tagline {
  margin-bottom: 20px;
}

/* ──────────────────────────────
   CATALOG SECTION
────────────────────────────── */
.catalog {
  padding: 72px 0 0;
  border-top: var(--border);
}

.catalog__loader {
  padding: 0 var(--pad);
}

.catalog__header {
  padding: 0 var(--pad);
  margin-bottom: 28px;
}

/* ──────────────────────────────
   CATALOG CATEGORY GROUP
────────────────────────────── */
.cat-group {
  margin-bottom: 0;
}

.cat-group__title {
  padding: 0 var(--pad);
  margin-bottom: 28px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 4px;
  color: var(--gray);
}

/* Product grid: 3 columns */
.catalog__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-left: var(--border);
}

/* ──────────────────────────────
   PRODUCT CARD
────────────────────────────── */
.product-card {
  cursor: pointer;
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--light);
  border-right: var(--border);
  border-bottom: var(--border);
  display: block;
}

.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.35s, transform 0.5s cubic-bezier(.25,.46,.45,.94);
}

/* Hover-оверлей "СМОТРЕТЬ" */
.product-card::after {
  content: 'СМОТРЕТЬ';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  color: transparent;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.35s, color 0.35s;
}

.product-card__info {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1;
  pointer-events: none;
}

.product-card__name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--black);
  margin-bottom: 4px;
}

.product-card__price {
  font-size: 11px;
  font-weight: 300;
  color: var(--black);
}

.product-card__price--sold {
  text-decoration: line-through;
  color: var(--gray);
}

.product-card__sold-label {
  display: block;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 2.5px;
  color: var(--gray);
  margin-top: 3px;
  text-transform: uppercase;
}
.product-card:hover img {
  opacity: 0.88;
  transform: scale(1.04);
}
.product-card:hover::after {
  background: rgba(0,0,0,0.2);
  color: var(--white);
}


/* пустая заглушка без фото */
.product-card__img-wrap--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border: var(--border);
}
.product-card__img-wrap--empty::before {
  content: '—';
  font-size: 20px;
  color: #ccc;
  z-index: 1;
}
.product-card__img-wrap--empty::after { display: none; }

/* ──────────────────────────────
   EDITORIAL IMAGES
────────────────────────────── */
.editorial {
  width: 100%;
  overflow: hidden;
  margin-bottom: 64px;
  height: 52vh;
  min-height: 360px;
}
.editorial--tall {
  height: 68vh;
  min-height: 480px;
}

/* ──────────────────────────────
   CLOSING SECTION
────────────────────────────── */
.closing {
  border-top: var(--border);
}
.closing__text {
  padding: 80px var(--pad);
  max-width: 640px;
}
.closing__text p {
  font-size: 24px;
  font-weight: 300;
  line-height: 1.5;
}
.closing__photo {
  height: 58vh;
  min-height: 400px;
  width: 100%;
  overflow: hidden;
}

/* ──────────────────────────────
   FOOTER
────────────────────────────── */
.footer {
  padding: 22px var(--pad);
  border-top: var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer span {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--gray);
}

/* ──────────────────────────────
   LOADING / EMPTY
────────────────────────────── */
.loading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 0;
}
.loading__dot {
  width: 7px; height: 7px;
  background: var(--black);
  border-radius: 50%;
  animation: beat 1.4s ease-in-out infinite;
}
@keyframes beat {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.2; transform: scale(0.6); }
}

.empty-state {
  grid-column: 1 / -1;
  padding: 96px 0;
  text-align: center;
}
.empty-state__text {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 5px;
  color: #c0c0c0;
}

/* ──────────────────────────────
   MODAL
────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.modal.is-open {
  pointer-events: all;
  opacity: 1;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.52);
  cursor: pointer;
}

.modal__panel {
  position: relative;
  background: var(--white);
  width: 100%;
  max-width: 880px;
  max-height: 90vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: var(--border);
  transform: translateY(24px);
  transition: transform 0.35s cubic-bezier(.25,.46,.45,.94);
}
.modal.is-open .modal__panel {
  transform: translateY(0);
}

.modal__close {
  position: absolute;
  top: 18px; right: 18px;
  background: none;
  border: none;
  width: 34px; height: 34px;
  font-size: 14px;
  color: var(--gray);
  transition: color 0.2s;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal__close:hover { color: var(--black); }

/* ── GALLERY (slider) ── */
.modal__gallery {
  background: var(--light);
  overflow: hidden;
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: stretch;
}

.gallery__slide {
  width: 100%;
  flex-shrink: 0;
}
.gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Prev / Next кнопки */
.gallery__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
  width: 40px; height: 40px;
  font-size: 18px;
  font-weight: 300;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  cursor: pointer;
  transition: background 0.2s;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}
.gallery__btn:hover {
  background: rgba(120, 120, 120, 0.28);
}
.gallery__btn--prev { left: 12px; }
.gallery__btn--next { right: 12px; }

/* Счётчик "2 / 5" */
.gallery__counter {
  position: absolute;
  bottom: 14px;
  right: 14px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--gray);
  background: rgba(255,255,255,0.85);
  padding: 4px 9px;
}

/* Точки-индикаторы */
.gallery__dots {
  position: absolute;
  bottom: 14px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}
.gallery__dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(0,0,0,0.2);
  transition: background 0.2s;
}
.gallery__dot.is-active {
  background: var(--black);
}

/* ── Modal info ── */
.modal__info {
  padding: 48px 44px 40px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.modal__category {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 4px;
  color: var(--gray);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.modal__name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1.3;
  margin-bottom: 16px;
}

.modal__price {
  font-size: 26px;
  font-weight: 300;
  margin-bottom: 24px;
}

.modal__desc {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--gray);
  flex: 1;
  margin-bottom: 32px;
}

.modal__price--sold {
  text-decoration: line-through;
  color: #c0c0c0;
}

.modal__sold-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  color: #c0c0c0;
  margin-bottom: 32px;
}

.modal__buy {
  display: block;
  text-align: center;
  background: var(--black);
  color: var(--white);
  padding: 16px 24px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  border: var(--border);
  transition: background 0.25s, color 0.25s;
}
.modal__buy:hover {
  background: var(--white);
  color: var(--black);
}
.modal__buy--disabled {
  background: var(--white);
  color: #c0c0c0;
  border-color: #e0e0e0;
  pointer-events: none;
  cursor: default;
}

/* ──────────────────────────────
   PAGE HEADER (Archive)
────────────────────────────── */
.page-header {
  padding: 72px var(--pad) 56px;
  border-bottom: var(--border);
}
.page-header__title {
  font-size: 56px;
  font-weight: 100;
  letter-spacing: 8px;
  line-height: 1;
}
.page-header__sub {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 4px;
  color: var(--gray);
  margin-top: 16px;
}

/* ──────────────────────────────
   ARCHIVE PRODUCTS
────────────────────────────── */
.archive-products {
  padding: 0;
}

.archive-cat-group {
  margin-bottom: 0;
}

.archive-cat-group__title {
  padding: 28px var(--pad) 20px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 4px;
  color: var(--gray);
  border-bottom: var(--border);
}

/* Сетка без пробелов */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.archive-card {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--light);
  cursor: pointer;
  position: relative;
  display: block;
}

.archive-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.35s, transform 0.5s cubic-bezier(.25,.46,.45,.94);
}

.archive-card::after {
  content: 'СМОТРЕТЬ';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  color: transparent;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.35s, color 0.35s;
}

.archive-card:hover img {
  opacity: 0.88;
  transform: scale(1.04);
}

.archive-card:hover::after {
  background: rgba(0,0,0,0.2);
  color: var(--white);
}

/* Бейдж "АРХИВ" в модалке */
.modal__archive-badge {
  margin-top: auto;
  padding-top: 20px;
  border-top: var(--border);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 4px;
  color: #bbb;
  text-align: center;
}

/* ──────────────────────────────
   RESPONSIVE
────────────────────────────── */
@media (max-width: 900px) {
  :root { --pad: 24px; }

  .catalog__grid  { grid-template-columns: repeat(2, 1fr); }
  .archive-grid   { grid-template-columns: repeat(2, 1fr); }

  .modal__panel   { grid-template-columns: 1fr; max-height: 92vh; }
  .modal__gallery { min-height: 280px; }
  .modal__info    { padding: 32px 28px; }
}

@media (max-width: 600px) {
  .catalog__grid  { grid-template-columns: 1fr; }
  .archive-grid   { grid-template-columns: repeat(2, 1fr); }
  .brand__tagline { font-size: 26px; }
  .closing__text p { font-size: 22px; }
  .page-header__title { letter-spacing: 3px; }
}

/* ──────────────────────────────
   ABOUT PAGE
────────────────────────────── */
.about {
  border-bottom: var(--border);
}

.about__block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: var(--border);
}
.about__block:last-child { border-bottom: none; }

.about__block--reverse .about__photo { order: 2; }
.about__block--reverse .about__text  { order: 1; }

.about__photo {
  border-right: var(--border);
  min-height: 480px;
  overflow: hidden;
}
.about__block--reverse .about__photo {
  border-right: none;
  border-left: var(--border);
}
.about__photo .ph { height: 100%; min-height: 480px; }

.about__text {
  padding: 72px var(--pad);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.about__heading {
  font-size: 32px;
  font-weight: 100;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.about__body {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--gray);
  max-width: 480px;
}

@media (max-width: 860px) {
  .about__block,
  .about__block--reverse .about__photo,
  .about__block--reverse .about__text {
    grid-template-columns: 1fr;
    order: unset;
  }
  .about__block { grid-template-columns: 1fr; }
  .about__photo, .about__block--reverse .about__photo {
    min-height: 300px;
    border-right: none;
    border-left: none;
    border-bottom: var(--border);
  }
  .about__photo .ph { min-height: 300px; }
}
