/* endless depressed — макет */

:root{
  --bg:          #000000;
  --fg:          #e9e9e9;
  --muted:       #5a5a5a;
  --muted-dim:   #313131;
  --line:        #171717;
  --ph:          #080808;

  --fs-micro:    10px;
  --ls-micro:    .14em;

  --pad-x:       28px;
  --pad-y:       26px;
}

*,
*::before,
*::after{ box-sizing: border-box; }

html{ -webkit-text-size-adjust: 100%; }

body{
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-micro);
  line-height: 1.6;
  text-transform: lowercase;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

a{
  color: inherit;
  text-decoration: none;
  transition: color .25s ease, opacity .25s ease;
}

a:hover{ color: var(--muted); }

::selection{ background: #1f1f1f; color: #fff; }


/* ─── шапка ─────────────────────────────────────────── */

.head{
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 24px;
  padding: var(--pad-y) var(--pad-x);
  background: linear-gradient(to bottom, #000 62%, rgba(0,0,0,0));
}

.logo{
  display: flex;
  flex-direction: column;
  font-family: "Cormorant Garamond", "Didot", Georgia, serif;
  font-weight: 300;
  font-size: 21px;
  line-height: .98;
  letter-spacing: .01em;
}

.logo__b{
  padding-left: .08em;
  color: var(--muted);
}

.logo:hover .logo__b{ color: var(--fg); }

.nav{
  display: flex;
  gap: 22px;
  padding-top: 5px;
  color: var(--muted);
}

.nav .is-current{ color: var(--fg); }

.cart{
  justify-self: end;
  padding: 5px 0 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  transition: color .25s ease;
}

.cart:hover{ color: var(--fg); }

.cart__count{ margin-left: 6px; }


/* ─── сетка товаров ─────────────────────────────────── */

main{
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  padding: 150px var(--pad-x) 64px;
}

.grid{
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 70px 120px;
  justify-items: center;
}

.card{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.card__media{
  display: block;
  width: clamp(150px, 20vw, 235px);
}

/* заглушка под фото — заменить на <img> */
.ph{
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--ph);
  border: 1px solid var(--line);
  transition: border-color .35s ease, background .35s ease;
}

.ph__label{
  position: absolute;
  inset: auto auto 10px 12px;
  color: var(--muted-dim);
  letter-spacing: .2em;
}

.card__media:hover .ph{
  background: #0d0d0d;
  border-color: #2a2a2a;
}

.card__meta{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
}

.card__title{
  margin: 0;
  font-size: var(--fs-micro);
  font-weight: 300;
  letter-spacing: var(--ls-micro);
}

.card__note{
  margin: 0;
  color: var(--muted-dim);
}

.card__price{
  margin: 0;
  color: var(--muted);
}

.rub{ color: var(--muted-dim); }


/* ─── надпись внизу ─────────────────────────────────── */

.mantra{
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 var(--pad-x) 12px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: center;
  text-transform: none;
  user-select: none;
}

.mantra p{
  margin: 0;
  transition: color .7s ease;
}

.mantra__a{
  font-size: clamp(13px, 1.7vw, 20px);
  color: #191919;
}

.mantra__b{
  font-size: clamp(10px, 1vw, 12px);
  color: #1d1d1d;
}

.mantra:hover .mantra__a{ color: #2e2e2e; }
.mantra:hover .mantra__b{ color: #353535; }


/* ─── контакты ──────────────────────────────────────── */

.links{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.link{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  text-transform: none;
  transition: color .25s ease;
}

.link:first-child{ color: var(--fg); }

.link:hover{ color: var(--fg); }


/* ─── подвал ────────────────────────────────────────── */

.foot{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: var(--pad-y) var(--pad-x);
  color: var(--muted);
}

.foot__col{ display: flex; align-items: center; gap: 20px; }
.foot__col--end{ color: var(--muted-dim); }

.tg{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
}

.tg:hover{ color: var(--fg); }

.ico{
  width: 14px;
  height: 14px;
  display: block;
  flex: 0 0 auto;
}


/* ─── адаптив ───────────────────────────────────────── */

@media (max-width: 760px){
  :root{ --pad-x: 18px; --pad-y: 18px; }

  .head{
    grid-template-columns: 1fr auto;
    row-gap: 18px;
  }

  .nav{
    order: 3;
    grid-column: 1 / -1;
    padding-top: 0;
  }

  main{ padding: 130px var(--pad-x) 48px; }

  .grid{
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .card__media{ width: clamp(170px, 55vw, 240px); }

  .foot{
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}


/* ─── фото товара ───────────────────────────────────── */

.ph--photo{
  background: #060606;
  overflow: hidden;
}

.shot{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05) brightness(.9);
  transition: opacity .55s ease, filter .55s ease, transform .9s ease;
}

.shot--alt{ opacity: 0; }

.shot.is-color,
.qv__shot.is-color{ filter: contrast(1.04) brightness(.96); }

.card__media:hover .shot.is-color{ filter: contrast(1.06) brightness(1.06); }

.card__media:hover .shot{
  filter: grayscale(1) contrast(1.08) brightness(1.04);
  transform: scale(1.015);
}

.card__media:hover .shot--alt{ opacity: 1; }


/* ─── быстрый просмотр ──────────────────────────────── */

.qv{
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 58px var(--pad-x);
  background: rgba(0,0,0,.97);
  animation: qv-in .35s ease both;
}

.qv[hidden]{ display: none; }

@keyframes qv-in{ from{ opacity: 0 } to{ opacity: 1 } }

.qv__close{
  position: absolute;
  top: var(--pad-y);
  right: var(--pad-x);
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  transition: color .25s ease;
}

.qv__close:hover{ color: var(--fg); }

.qv__inner{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  align-items: center;
  gap: 54px;
  width: 100%;
  max-width: 940px;
  margin: auto 0;
}

.qv__inner--wide{
  grid-template-columns: minmax(0, 1fr) 330px;
  max-width: 1010px;
}

.qv__gallery{
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.qv__stage{
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  height: min(62vh, 540px);
  aspect-ratio: 1 / 1;
  background: #060606;
  border: 1px solid var(--line);
  overflow: hidden;
}

.qv__stage--empty{
  position: relative;
  color: var(--muted-dim);
}

.qv__stage--empty .ph__label{
  position: static;
  letter-spacing: .2em;
}

.qv__stage img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(1) contrast(1.05);
  animation: shot-in .4s ease both;
}

@keyframes shot-in{ from{ opacity: 0 } to{ opacity: 1 } }

.qv__thumbs{
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.qv__thumbs::-webkit-scrollbar{ display: none; }

.thumb{
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  opacity: .4;
  transition: opacity .25s ease, border-color .25s ease;
}

.thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  display: block;
}

.thumb:hover{ opacity: .75; }

.thumb.is-active{
  opacity: 1;
  border-color: #2e2e2e;
}

.qv__info{
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.qv__title{
  margin: 0;
  font-size: var(--fs-micro);
  font-weight: 300;
  letter-spacing: var(--ls-micro);
}

.qv__price{
  margin: 0;
  color: var(--muted);
}

.qv__desc{
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qv__note{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: auto 0;
  text-align: center;
}

.qv__state{
  margin: 0;
  color: var(--muted-dim);
}

.qv__order{
  margin: 18px 0 0;
  color: var(--muted);
  text-transform: none;
}

.qv__story{
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 15px;
  line-height: 1.66;
  letter-spacing: 0;
  text-transform: none;
  color: #8a8a8a;
}

.qv__sizes{ display: flex; gap: 6px; }

.size{
  min-width: 30px;
  padding: 7px 0;
  border: 1px solid var(--line);
  background: none;
  color: var(--muted);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  transition: border-color .25s ease, color .25s ease;
}

.size:hover{ color: var(--fg); border-color: #2e2e2e; }

.size.is-active{
  color: #000;
  background: var(--fg);
  border-color: var(--fg);
}

.qv__add{
  align-self: flex-start;
  padding: 10px 22px;
  border: 1px solid #2e2e2e;
  background: none;
  color: var(--fg);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  transition: background .3s ease, color .3s ease;
}

.qv__add:hover{ background: var(--fg); color: #000; }

@media (max-width: 860px){
  .qv{ padding: 56px var(--pad-x) 28px; }

  .qv__inner,
  .qv__inner--wide{
    grid-template-columns: 1fr;
    gap: 26px;
    max-width: 420px;
  }

  .qv__stage{ height: auto; width: 100%; }

  .qv__info{ gap: 14px; }
}
