/* SATORI / Работы — единая версия стилей каталога.
   Удалены конфликтовавшие друг с другом размеры и многочисленные переопределения. */
.studio-catalog .portfolio-originals[hidden] { display: none !important; }

/* Название и вступление: один спокойный текстовый блок под навигацией. */
.studio-catalog .page-head {
  display: block;
  padding-top: 17px;
  padding-bottom: 0;
}
.studio-catalog .page-head .kicker {
  margin: 0;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.studio-catalog .page-head h1 {
  margin: 5px 0 0 !important;
  font-family: "Instrument Sans", "Segoe UI", Arial, sans-serif;
  font-size: clamp(34px, 3.9vw, 50px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.05em;
}
.studio-catalog .page-head > p:last-child {
  margin: 7px 0 0;
  max-width: 77ch;
  color: #625b57;
  font-size: 14px;
  line-height: 1.42;
}
.studio-catalog .catalog-projects-section { padding: 10px 0 68px; }

/* Один счётчик и стрелки только над карточками. */
.studio-catalog .portfolio-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 13px;
}
.studio-catalog .portfolio-toolbar-kicker,
.studio-catalog .portfolio-project-index {
  margin: 0;
  color: var(--wine, #70263e);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .16em;
}
.studio-catalog .portfolio-toolbar-hint { display: none; }
.studio-catalog .portfolio-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}
.studio-catalog .portfolio-project-counter {
  min-width: 82px;
  margin-right: 7px;
  color: #514745;
  font: 600 12px/1.2 "Instrument Sans", sans-serif;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.studio-catalog .portfolio-arrow {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  min-width: 39px;
  padding: 0;
  flex: 0 0 39px;
  border: 1px solid #d6bfc5;
  border-radius: 50%;
  background: transparent;
  color: var(--wine, #70263e);
  font: 22px/1 "Segoe UI", sans-serif;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.studio-catalog .portfolio-arrow:hover:not(:disabled) {
  background: var(--wine, #70263e);
  color: #fff;
}
.studio-catalog .portfolio-arrow:disabled { opacity: .3; cursor: default; }

/* Ровно три компактные карточки; на планшете две, на телефоне одна. */
.studio-catalog .portfolio-project-track {
  display: flex;
  gap: 16px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.studio-catalog .portfolio-project-track::-webkit-scrollbar { display: none; }
.studio-catalog .portfolio-project-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 calc((100% - 32px) / 3);
  width: calc((100% - 32px) / 3);
  min-width: 0;
  height: 400px;
  overflow: hidden;
  border: 1px solid #e0d6d1;
  border-radius: 16px;
  background: #fbf8f5;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  scroll-margin-top: 86px;
}

/* Светильник целиком, а по краям — мягкий фон из того же снимка. */
.studio-catalog .portfolio-project-media {
  position: relative;
  isolation: isolate;
  display: block;
  flex: 0 0 202px;
  width: 100%;
  height: 202px;
  min-height: 0;
  overflow: hidden;
  background: #e5dfdb;
}
.studio-catalog .portfolio-project-media::before {
  content: "";
  display: block;
  position: absolute;
  inset: -25px;
  z-index: 0;
  background-image: var(--portfolio-cover-url);
  background-position: center;
  background-size: cover;
  filter: blur(20px) saturate(.8);
  opacity: .65;
  transform: scale(1.06);
  pointer-events: none;
}
.studio-catalog .portfolio-project-media::after {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(248,244,241,.16);
  pointer-events: none;
}
.studio-catalog .portfolio-project-cover {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 6px 9px;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  touch-action: pan-y;
}
.studio-catalog .portfolio-project-cover img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}
.studio-catalog .portfolio-photo-count {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: 6px 10px;
  border-radius: 100px;
  background: rgba(251,248,246,.94);
  color: #40343a;
  font-size: 11px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  pointer-events: none;
}
.studio-catalog .portfolio-photo-navigation,
.studio-catalog .portfolio-photo-arrow { display: none !important; }

/* Текст и кнопки всегда остаются внутри карточки. */
.studio-catalog .portfolio-project-copy {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  justify-content: flex-start;
  min-width: 0;
  min-height: 0;
  padding: 13px 15px 14px;
}
.studio-catalog .portfolio-project-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 0;
  max-height: 48px;
  margin: 5px 0 6px;
  color: #26201f;
  font-family: "Instrument Sans", "Segoe UI", Arial, sans-serif;
  font-size: clamp(19px, 1.9vw, 24px);
  font-weight: 650;
  line-height: 1.14;
  letter-spacing: -.04em;
}
.studio-catalog .portfolio-project-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0;
  max-width: 100%;
  color: #6e625e;
  font-size: 12px;
  line-height: 1.42;
}
.studio-catalog .portfolio-project-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 9px;
  margin-top: auto;
  padding-top: 12px;
  border: 0;
}
.studio-catalog .portfolio-project-like,
.studio-catalog .portfolio-gallery-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
  min-height: 40px;
  padding: 7px 6px;
  border: 1px solid var(--wine, #70263e);
  border-radius: 100px;
  color: var(--wine, #70263e);
  background: transparent;
  font: 650 12px/1.2 "Instrument Sans", "Segoe UI", sans-serif;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.studio-catalog .portfolio-project-like {
  background: var(--wine, #70263e);
  color: #fff;
}
.studio-catalog .portfolio-project-like:hover { background: var(--wine-hover, #87344d); }
.studio-catalog .portfolio-gallery-link:hover { background: #f5e6eb; }
.studio-catalog .portfolio-project-like::before,
.studio-catalog .portfolio-gallery-link::before,
.studio-catalog .portfolio-project-like::after,
.studio-catalog .portfolio-gallery-link::after { content: none !important; display: none !important; }
.studio-catalog .portfolio-arrow:focus-visible,
.studio-catalog .portfolio-project-track:focus-visible,
.studio-catalog .portfolio-project-cover:focus-visible,
.studio-catalog .portfolio-project-like:focus-visible,
.studio-catalog .portfolio-gallery-link:focus-visible {
  outline: 2px solid var(--wine, #70263e);
  outline-offset: 3px;
}

@media (max-width: 1030px) {
  .studio-catalog .portfolio-project-card {
    flex: 0 0 calc((100% - 16px) / 2);
    width: calc((100% - 16px) / 2);
    height: 422px;
  }
  .studio-catalog .portfolio-project-media { flex-basis: 225px; height: 225px; }
}
@media (max-width: 660px) {
  .studio-catalog .page-head { padding-top: 13px; }
  .studio-catalog .page-head h1 { font-size: clamp(32px, 8vw, 43px); }
  .studio-catalog .page-head > p:last-child { font-size: 13px; }
  .studio-catalog .catalog-projects-section { padding-top: 9px; }
  .studio-catalog .portfolio-toolbar { margin-bottom: 10px; }
  .studio-catalog .portfolio-toolbar-kicker { font-size: 9px; }
  .studio-catalog .portfolio-project-counter { min-width: 66px; margin-right: 3px; font-size: 11px; }
  .studio-catalog .portfolio-arrow { flex-basis: 36px; width: 36px; height: 36px; min-width: 36px; font-size: 19px; }
  .studio-catalog .portfolio-project-track { gap: 12px; }
  .studio-catalog .portfolio-project-card {
    flex: 0 0 100%;
    width: 100%;
    height: 450px;
  }
  .studio-catalog .portfolio-project-media { flex: 0 0 244px; height: 244px; }
  .studio-catalog .portfolio-project-copy { padding: 15px 16px 16px; }
  .studio-catalog .portfolio-project-title { font-size: 23px; }
}
@media (max-width: 355px) {
  .studio-catalog .portfolio-project-like,
  .studio-catalog .portfolio-gallery-link { font-size: 11px; padding-inline: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  .studio-catalog .portfolio-arrow { transition: none; }
}

/* Photo gallery: native dialog for focus handling and Escape to close. */
dialog.portfolio-viewer {
  width: min(1200px, calc(100vw - 38px));
  max-width: none;
  height: min(94dvh, 910px);
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #574950;
  border-radius: 20px;
  background: #1b181b;
  color: #fff9f6;
  box-shadow: 0 20px 80px rgba(0,0,0,.3);
}
dialog.portfolio-viewer::backdrop {
  background: rgba(15,12,16,.91);
  backdrop-filter: blur(5px);
}
.portfolio-viewer-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.portfolio-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px clamp(16px, 3vw, 30px);
}
.portfolio-viewer-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .19em;
  color: #c8a5ad;
}
.portfolio-viewer-title {
  margin-top: 4px;
  font: 600 clamp(19px, 2.4vw, 28px)/1.18 "Instrument Sans", -apple-system, sans-serif;
  letter-spacing: -.03em;
  color: #fff9f6;
}
.portfolio-viewer-close {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  border: 1px solid #6f5961;
  border-radius: 50%;
  color: #fff;
  background: #33272e;
  font: 29px/1 sans-serif;
  cursor: pointer;
}
.portfolio-viewer-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
  padding: 8px 60px;
  background: #111011;
  touch-action: pan-y;
}
.portfolio-viewer-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.portfolio-viewer-back, .portfolio-viewer-forward {
  position: absolute;
  z-index: 1;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 43px;
  height: 50px;
  padding: 0;
  border: 1px solid #67535b;
  border-radius: 12px;
  color: #fff;
  background: rgba(40,30,36,.86);
  font: 37px/1 sans-serif;
  cursor: pointer;
}
.portfolio-viewer-back { left: 12px; }
.portfolio-viewer-forward { right: 12px; }
.portfolio-viewer-back:disabled, .portfolio-viewer-forward:disabled { opacity: .24; cursor: default; }
.portfolio-viewer-footer {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 13px clamp(16px, 3vw, 30px) 16px;
  min-width: 0;
}
.portfolio-viewer-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
  font-size: 12px;
  color: #d1c7c9;
  font-variant-numeric: tabular-nums;
}
.portfolio-viewer-original { color: #e3bdc8; white-space: nowrap; }
.portfolio-viewer-thumbnails {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  flex: 1 1 auto;
  min-width: 0;
  scrollbar-width: thin;
}
.portfolio-viewer-thumbnail {
  flex: 0 0 50px;
  width: 50px;
  height: 58px;
  padding: 2px;
  border: 2px solid transparent;
  border-radius: 7px;
  overflow: hidden;
  background: #524952;
  cursor: pointer;
}
.portfolio-viewer-thumbnail[aria-current="true"] { border-color: #f4ced7; }
.portfolio-viewer-thumbnail img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 3px; }
.portfolio-viewer-like {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: 10px 20px;
  background: #782b46;
  border-radius: 100px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
.portfolio-viewer button:focus-visible,
.portfolio-viewer a:focus-visible { outline: 2px solid #ffbbd0; outline-offset: 3px; }
@media (max-width: 720px) {
  dialog.portfolio-viewer {
    width: calc(100vw - 12px);
    height: calc(100dvh - 12px);
    border-radius: 13px;
  }
  .portfolio-viewer-stage { padding: 6px 40px; }
  .portfolio-viewer-back, .portfolio-viewer-forward {
    width: 32px;
    height: 43px;
    font-size: 29px;
    border-radius: 9px;
  }
  .portfolio-viewer-back { left: 4px; }
  .portfolio-viewer-forward { right: 4px; }
  .portfolio-viewer-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px 15px 17px;
  }
  .portfolio-viewer-meta { grid-column: 1; grid-row: 1; }
  .portfolio-viewer-like { grid-column: 2; grid-row: 1; padding-inline: 15px; }
  .portfolio-viewer-thumbnails { grid-column: 1 / -1; grid-row: 2; width: 100%; }
}

/* Individually framed project covers – original photographs, not generated replacements. */
/* The screenshots were intended as composition references. The website retains
   original project photos; focal positions make the light fixtures prominent. */
.studio-catalog #catalog-chandeliers .portfolio-project-cover--featured img {
  object-fit: cover;
  object-position: center 66%;
}
.studio-catalog #satori-project-2 .portfolio-project-cover--featured img {
  object-fit: cover;
  object-position: center 62%;
}
.studio-catalog #catalog-flowers .portfolio-project-cover--featured img {
  object-fit: cover;
  object-position: center 79%;
}
/* Full-size viewing and subsequent gallery images continue to use contain. */
