:root {
  --black: #080808;
  --black2: #0f0e0e;
  --cream: #f1e5db;
  --paper: #e9ded4;
  --rose: #d9909b;
  --rose-deep: #aa6f78;
  --muted: #9e9390;
  --line: rgba(241,229,219,.16);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--black);
  color: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

.container {
  width: min(1380px, calc(100% - 56px));
  margin-inline: auto;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--rose);
  font-weight: 500;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,8,8,.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 78px;
  display: grid;
  grid-template-columns: 205px 1fr auto;
  align-items: center;
  gap: 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: 184px;
  text-decoration: none;
}

.brand img {
  width: 100%;
  max-height: 60px;
  object-fit: contain;
  object-position: left center;
}

.nav {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 2.5vw, 38px);
}

.nav a {
  position: relative;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .08em;
  color: #c7bbb7;
  padding: 30px 0 25px;
}

.nav a:hover,
.nav a.active {
  color: var(--rose);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 16px;
  width: 0;
  height: 1px;
  background: var(--rose);
  transition: .25s;
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.round-link {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(241,229,219,.28);
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: var(--cream);
  transition: .25s;
}

.round-link:hover {
  border-color: var(--rose);
  color: var(--rose);
}

.menu-btn {
  display: none;
  background: transparent;
  border: 0;
  width: 42px;
  height: 42px;
  color: var(--cream);
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 24px;
  height: 1px;
  background: currentColor;
  margin: 6px auto;
}


/* =========================================================
   HERO КАТАЛОГА
   ========================================================= */

.catalog-hero {
  padding: 48px 0;
  background:
    radial-gradient(
      circle at 72% 30%,
      rgba(217,144,155,.10),
      transparent 30%
    ),
    linear-gradient(
      125deg,
      #080808 0%,
      #0a0909 62%,
      #120e0f 100%
    );

  border-bottom: 1px solid var(--line);
}

.catalog-hero-grid {
  display: grid;
  grid-template-columns:
    minmax(0,1fr)
    minmax(360px,520px);

  align-items: stretch;
  gap: clamp(36px,5vw,82px);
  min-height: 300px;
}

.catalog-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 0;
}

.catalog-hero h1 {
  font-family: var(--serif);
  font-size: clamp(64px,6.4vw,98px);
  font-weight: 400;
  line-height: .86;
  letter-spacing: -.045em;
  margin: 16px 0 20px;
}

.catalog-hero p {
  color: #a99d99;
  max-width: 650px;
  font-size: 14px;
  line-height: 1.8;
}

.hero-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 30px;
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #cdbfba;
  text-decoration: none;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(241,229,219,.28);
  padding-bottom: 5px;
}

.back-home:hover {
  color: var(--rose);
  border-color: var(--rose);
}

.catalog-hero-art {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid rgba(241,229,219,.14);
  background: #171313;
}

.catalog-hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter:
    saturate(.82)
    contrast(1.06)
    brightness(.78);

  transform: scale(1.01);
}

.catalog-hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;

  background:
    linear-gradient(
      90deg,
      rgba(8,8,8,.52),
      transparent 42%
    ),
    linear-gradient(
      180deg,
      transparent 45%,
      rgba(8,8,8,.42)
    );

  pointer-events: none;
}

.catalog-hero-art::after {
  content: attr(data-index);
  position: absolute;
  z-index: 2;
  right: 20px;
  bottom: -16px;

  font-family: var(--serif);
  font-size: 112px;
  line-height: 1;
  color: rgba(241,229,219,.13);
  letter-spacing: -.07em;
}


/* =========================================================
   ВКЛАДКИ КАТЕГОРИЙ
   ========================================================= */

.category-tabs {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(11,10,10,.97);
  position: sticky;
  top: 78px;
  z-index: 50;
  backdrop-filter: blur(12px);
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs a {
  flex: 0 0 auto;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 17px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: #9f928e;
  transition: .25s;
}

.tabs a:hover,
.tabs a.active {
  color: #24191a;
  background: var(--rose);
  border-color: var(--rose);
}


/* =========================================================
   КАТАЛОГ
   ========================================================= */

.catalog-main {
  padding: 44px 0 100px;
  background: #0a0909;
}

.catalog-meta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 22px;

  color: #847975;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 16px;
}

.gallery-group {
  min-width: 0;
  border: 1px solid rgba(241,229,219,.13);
  background: #100e0e;
  cursor: pointer;
  transition: .35s;
  overflow: hidden;
  outline: none;
}

.gallery-group:hover,
.gallery-group:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(217,144,155,.58);
  box-shadow: 0 24px 60px rgba(0,0,0,.34);
}

.image-stage {
  position: relative;
  aspect-ratio: 4/5;

  background:
    radial-gradient(
      circle at 50% 38%,
      #f6f1ed,
      #dfd2c9 78%
    );

  overflow: hidden;
}

.thumbnail {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition:
    transform .55s ease,
    filter .4s ease;
}

.gallery-group:hover .thumbnail {
  transform: scale(1.025);
  filter: brightness(1.02);
}

.card-info {
  padding: 16px 17px 17px;
  border-top: 1px solid rgba(241,229,219,.1);

  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 7px 14px;
  align-items: end;
}

.gallery-group h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 23px;
  line-height: 1.05;
  color: var(--cream);
  word-break: break-word;
}

.price {
  color: var(--rose);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
}

.card-hint {
  grid-column: 1/-1;
  color: #746a67;
  font-size: 8px;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: 3px;
}


/* =========================================================
   LIGHTBOX
   ========================================================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;

  background: rgba(4,4,4,.96);
  backdrop-filter: blur(14px);

  display: grid;
  place-items: center;

  visibility: hidden;
  opacity: 0;

  transition: .25s;
  padding: 24px;
}

.lightbox.active {
  visibility: visible;
  opacity: 1;
}

.lightbox-content {
  width: min(760px,68vw);

  display: grid;
  grid-template-rows: auto auto;
  gap: 12px;
  place-items: center;
}

.lightbox-image-wrap {
  position: relative;
  width: 100%;
  height: min(520px,66vh);

  overflow: hidden;

  background: #ece4de;
  border: 1px solid rgba(241,229,219,.14);

  box-shadow: 0 28px 90px rgba(0,0,0,.55);
}

.lightbox img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;

  object-fit: cover;
  object-position: center 56%;

  background: #f0e6df;
}

.lightbox-meta {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 16px;

  color: #9e918d;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;

  padding: 0 2px;
}

.lightbox-meta strong {
  color: var(--cream);
  font-weight: 500;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;

  border: 1px solid rgba(241,229,219,.3);
  background: rgba(10,9,9,.84);
  color: var(--cream);

  border-radius: 50%;

  width: 48px;
  height: 48px;

  display: grid;
  place-items: center;

  cursor: pointer;
  font-size: 25px;
  transition: .2s;
  z-index: 3;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: #211b1a;
  background: var(--rose);
  border-color: var(--rose);
}

.lightbox-close {
  right: 28px;
  top: 28px;
}

.lightbox-prev {
  left: max(22px, calc(50% - 455px));
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: max(22px, calc(50% - 455px));
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev[hidden],
.lightbox-next[hidden] {
  display: none !important;
}


/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 38px;
  background: #080808;
}

.footer-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;

  color: #766b68;
  font-size: 11px;
}

.footer-logo {
  width: 142px;
  opacity: .82;
  justify-self: center;
}

.footer-links {
  justify-self: end;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer a {
  color: #9e918d;
  text-decoration: none;
}

.footer a:hover {
  color: var(--rose);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1180px) {

  .container {
    width: min(100% - 40px,1180px);
  }

  .catalog-hero-grid {
    grid-template-columns:
      minmax(0,1fr)
      minmax(300px,420px);
  }

  .gallery {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }

  .header-inner {
    grid-template-columns: 170px 1fr auto;
  }

  .nav {
    gap: 16px;
  }

  .nav a {
    font-size: 10px;
  }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 860px) {

  body.menu-open {
    overflow: hidden;
  }

  /*
    ВАЖНО:
    шапка на телефоне теперь FLEX.
    Лого слева, кнопка меню строго справа.
  */

  .site-header .header-inner {
    height: 70px;

    display: flex !important;
    align-items: center;
    justify-content: space-between;

    width: 100%;

    grid-template-columns: none !important;
    gap: 16px;
  }

  .site-header .brand {
    width: 145px;
    flex: 0 0 145px;
  }

  .site-header .header-actions {
    margin-left: auto;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    flex: 0 0 auto;
  }

  .header-actions .round-link {
    display: none;
  }

  .site-header .menu-btn {
    display: block;

    flex: 0 0 42px;

    width: 42px;
    height: 42px;

    margin-left: auto;
  }

  /*
    Старая desktop nav на мобильном скрыта ниже,
    потому что используется отдельный drawer.
  */

  .category-tabs {
    top: 70px;
  }

  .catalog-hero {
    padding: 64px 0 48px;
  }

  .catalog-hero-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .catalog-hero-art {
    display: none;
  }

  .catalog-hero-copy {
    padding: 0;
  }

  .catalog-hero h1 {
    font-size: clamp(58px,13vw,82px);
  }

  .gallery {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .image-stage {
    aspect-ratio: 1/1;
  }

  .footer-row {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-links,
  .footer-logo {
    justify-self: center;
  }


  /* LIGHTBOX MOBILE */

  .lightbox {
    padding: 10px;
  }

  .lightbox-content {
    width: 94vw;
    max-width: 680px;
    gap: 8px;
  }

  .lightbox-image-wrap {
    height: 82vh;
    max-height: 760px;

    background: #f0e6df;
    border: 0;
  }

  .lightbox img {
    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: center;
  }

  .lightbox-close {
    right: 12px;
    top: 12px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-prev,
  .lightbox-next,
  .lightbox-close {
    width: 42px;
    height: 42px;
  }

  .lightbox-meta {
    padding: 0 4px;
    font-size: 9px;
  }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 560px) {

  .container {
    width: calc(100% - 24px);
  }

  .catalog-hero h1 {
    font-size: clamp(52px,16vw,72px);
  }

  .catalog-hero p {
    font-size: 12px;
  }

  .catalog-main {
    padding-top: 34px;
  }

  .gallery {
    gap: 8px;
  }

  .card-info {
    padding: 12px;
    grid-template-columns: 1fr;
  }

  .gallery-group h3 {
    font-size: 20px;
  }

  .price {
    font-size: 11px;
  }

  .card-hint {
    display: none;
  }

  .thumbnail {
    padding: 8px;
  }

  .catalog-meta {
    font-size: 9px;
  }

  .catalog-meta span:last-child {
    display: none;
  }

  .lightbox-meta {
    font-size: 8px;
  }
}


/* =========================================================
   ПОДВЕСКИ
   ========================================================= */

.pendants-page .gallery {
  grid-template-columns: repeat(3,minmax(0,1fr));
}

@media (max-width: 860px) {

  .pendants-page .gallery {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}


/* =========================================================
   SEO-ТЕКСТ ПОД КАТАЛОГОМ
   ========================================================= */

.catalog-seo-copy {
  padding: 70px 0 90px;

  background: #0c0b0b;
  border-top: 1px solid var(--line);
}

.catalog-seo-inner {
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: 60px;
  align-items: start;
}

.catalog-seo-copy h2 {
  font-family: var(--serif);
  font-size: clamp(38px,4vw,58px);
  font-weight: 400;
  line-height: .95;
}

.catalog-seo-copy p {
  color: #9e918d;
  font-size: 13px;
  line-height: 1.9;
  max-width: 760px;
}

.catalog-seo-copy a {
  color: var(--rose);
  text-decoration: none;
  border-bottom: 1px solid rgba(217,144,155,.4);
}


/* =========================================================
   MOBILE DRAWER
   Выезжающая панель справа
   ========================================================= */

.mobile-drawer,
.menu-backdrop {
  display: none;
}

@media (max-width: 860px) {

  /*
    Старое горизонтальное меню на телефоне полностью скрываем.
    Оно больше не участвует в layout.
  */

  .site-header .nav {
    display: none !important;
  }


  /* ПАНЕЛЬ */

  .mobile-drawer {
    display: flex;

    position: fixed;

    z-index: 1300;

    top: 0;
    right: 0;
    bottom: 0;

    width: min(86vw,370px);

    background: #0b0a0a;

    border-left: 1px solid rgba(241,229,219,.14);

    box-shadow:
      -28px 0 80px rgba(0,0,0,.5);

    padding: 26px 26px 34px;

    flex-direction: column;

    transform: translateX(104%);

    transition:
      transform .32s cubic-bezier(.2,.75,.2,1);

    overflow-y: auto;
  }

  body.menu-open .mobile-drawer {
    transform: translateX(0);
  }


  /* ЗАТЕМНЕНИЕ САЙТА */

  .menu-backdrop {
    display: block;

    position: fixed;

    z-index: 1250;

    inset: 0;

    background: rgba(0,0,0,.62);

    opacity: 0;

    pointer-events: none;

    transition: opacity .28s ease;
  }

  body.menu-open .menu-backdrop {
    opacity: 1;
    pointer-events: auto;
  }


  /* ВЕРХ DRAWER */

  .drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 18px;

    padding-bottom: 28px;

    border-bottom: 1px solid var(--line);
  }

  .drawer-logo {
    width: 145px;
  }

  .drawer-logo img {
    width: 100%;
    height: auto;
  }

  .drawer-close {
    width: 46px;
    height: 46px;

    border: 1px solid rgba(241,229,219,.28);

    border-radius: 50%;

    background: transparent;

    color: var(--cream);

    font-size: 31px;
    line-height: 1;

    cursor: pointer;
  }


  /* ССЫЛКИ */

  .mobile-nav {
    display: flex;
    flex-direction: column;

    padding: 25px 0 22px;
  }

  .mobile-nav a {
    font-family: var(--serif);

    font-size: 35px;
    line-height: 1;

    text-decoration: none;

    padding: 13px 2px;

    border-bottom:
      1px solid rgba(241,229,219,.09);

    color: var(--cream);
  }

  .mobile-nav a:hover,
  .mobile-nav a.active {
    color: var(--rose);
  }


  /* КОНТАКТЫ */

  .drawer-actions {
    margin-top: auto;

    display: grid;

    gap: 9px;

    padding-top: 20px;
  }

  .drawer-contact {
    font-size: 11px;

    color: #8f8380;

    line-height: 1.65;

    margin-bottom: 8px;
  }

  .drawer-contact a {
    color: #c9bbb6;
    text-decoration: none;
  }


  /*
    Когда drawer открыт,
    старый hamburger скрываем.
    Закрытие выполняется через × внутри панели.
  */

  body.menu-open .menu-btn {
    opacity: 0;
    pointer-events: none;
  }


  /* SEO блок */

  .catalog-seo-inner {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}


/* =========================================================
   MOBILE DRAWER — SMALL PHONE
   ========================================================= */

@media (max-width: 560px) {

  .mobile-drawer {
    width: min(90vw,350px);

    padding:
      20px
      20px
      28px;
  }

  .mobile-nav a {
    font-size: 32px;
  }

  .catalog-seo-copy {
    padding: 55px 0 70px;
  }
}