/* Товарное окно поверх каталога. Каркас только здесь, карточка — стили самой страницы. */
.gd-sheet {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.gd-sheet[hidden] { display: none !important; }
.gd-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 22, 22, .46);
}
.gd-sheet__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1160px, 100%);
  height: min(910px, calc(100vh - 32px));
  max-height: min(910px, calc(100vh - 32px));
  background: #fff;
  color: #1c1c1c;
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(20, 20, 20, .18);
  overflow: hidden;
}
.gd-sheet__bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 6px 10px 6px 8px;
  background: #fff;
  border-bottom: 1px solid #eceae6;
}
.gd-sheet__back,
.gd-sheet__x {
  appearance: none;
  border: 0;
  background: transparent;
  color: #1c1c1c;
  font: 600 15px/1.2 Montserrat, "Montserrat Fallback", sans-serif;
  min-height: 44px;
  cursor: pointer;
}
.gd-sheet__back { padding: 0 12px; }
.gd-sheet__x {
  width: 44px;
  height: 44px;
  border-radius: 22px;
  font-size: 28px;
  line-height: 1;
}
.gd-sheet__back:focus-visible,
.gd-sheet__x:focus-visible {
  outline: 2px solid #1c1c1c;
  outline-offset: 2px;
}
.gd-sheet__scroll {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  container-type: size;
  padding-bottom: 96px;
  -webkit-overflow-scrolling: touch;
}
.gd-sheet__loading {
  margin: 48px 24px;
  color: #555;
  font: 500 16px/1.45 Montserrat, "Montserrat Fallback", sans-serif;
}
.gd-sheet img { max-width: 100%; }
body.gd-sheet-open { overflow: hidden; }
body.gd-sheet-open .mob-bottom-bar { display: none !important; }
body.gd-sheet-open > .mosaic-wrap h1 {
  white-space: revert;
  overflow: revert;
  text-overflow: revert;
}

body.gd-sheet-open .gd-sheet .gdv2-dock {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 6 !important;
  display: flex !important;
  width: auto !important;
}
body.gd-sheet-open .gd-sheet .gdv2-dock.is-hidden {
  display: flex !important;
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

body.gd-sheet-open .gd-sheet a.back,
body.gd-sheet-open .gd-sheet a.pe-back,
body.gd-sheet-open .gd-sheet a.op-back { display: none !important; }

body.gd-sheet-open .gd-sheet .card::before,
body.gd-sheet-open .gd-sheet .card::after {
  content: none !important;
  display: none !important;
}

body.gd-sheet-open .gd-sheet h2.gd-sheet-title:not(.gdv2-product-title):not(.phpHiddenTitle) {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(30px, 2vw + 24px, 42px) !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.03em !important;
  margin: 0 0 16px !important;
  color: #1c1c1c;
  text-transform: none;
}
body.gd-sheet-open.ds-pilot .gd-sheet h2.gd-sheet-title:not(.gdv2-product-title):not(.phpHiddenTitle) {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(30px, 2vw + 24px, 42px) !important;
  font-weight: 500 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.03em !important;
}
body.gd-sheet-open.op-page .gd-sheet h2.gd-sheet-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(30px, 2vw + 24px, 42px) !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  margin: 10px 0 8px !important;
  letter-spacing: -0.03em !important;
}
body.gd-sheet-open.gd-product.gdv2-on .gd-sheet .layout > .photoCol + div > h2.gd-sheet-title,
body.gd-sheet-open.ds-pilot.gd-product.gdv2-on .gd-sheet .layout > .photoCol + div > h2.gd-sheet-title,
body.gd-sheet-open.op-page.gdv2-on .gd-sheet .op-layout > main > h2.gd-sheet-title,
body.gd-sheet-open.phpHiddenProduct.gdv2-on .gd-sheet h2.gd-sheet-title {
  order: 2 !important;
}
@media (max-width: 900px) {
  body.gd-sheet-open.ds-pilot .gd-sheet h2.gd-sheet-title:not(.gdv2-product-title):not(.phpHiddenTitle) { font-size: clamp(30px, 2vw + 24px, 34px) !important; }
}
@media (max-width: 767px) {
  body.gd-sheet-open .gd-sheet h2.gd-sheet-title:not(.gdv2-product-title):not(.phpHiddenTitle) {
    font-size: clamp(30px, 2vw + 24px, 34px) !important;
    line-height: 1.2 !important;
  }
  body.gd-sheet-open.ds-pilot .gd-sheet h2.gd-sheet-title:not(.gdv2-product-title):not(.phpHiddenTitle) { font-size: clamp(30px, 2vw + 24px, 34px) !important; }
  body.gd-sheet-open.op-page .gd-sheet h2.gd-sheet-title { font-size: clamp(30px, 2vw + 24px, 34px) !important; }
}

@media (max-width: 1023px) {
  .gd-sheet { padding: 0; }
  .gd-sheet__dialog {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }
  body.gd-sheet-open .gd-sheet .photoCol,
  body.gd-sheet-open .gd-sheet .phpHiddenPhotoCol,
  body.gd-sheet-open .gd-sheet .op-photo,
  body.gd-sheet-open .gd-sheet .gdv2-gallery-col {
    position: static !important;
    top: auto !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
  }
  body.gd-sheet-open .gd-sheet .photoBox,
  body.gd-sheet-open .gd-sheet .op-photo-frame,
  body.gd-sheet-open .gd-sheet .gdv2-gallery,
  body.gd-sheet-open .gd-sheet .phpHiddenPhoto,
  body.gd-sheet-open .gd-sheet .photoBox.phpHiddenPhoto {
    height: 400px !important;
    max-height: 400px !important;
  }
}

@media (min-width: 1024px) {
  body.gd-sheet-open .gd-sheet .photoCol,
  body.gd-sheet-open .gd-sheet .phpHiddenPhotoCol,
  body.gd-sheet-open .gd-sheet .op-photo,
  body.gd-sheet-open .gd-sheet .gdv2-gallery-col {
    position: sticky !important;
    top: 0 !important;
    align-self: start !important;
    max-height: calc(100cqh - 96px);
    overflow: auto;
  }
  body.gd-sheet-open .gd-sheet .photoBox,
  body.gd-sheet-open .gd-sheet .op-photo-frame,
  body.gd-sheet-open .gd-sheet .phpHiddenPhoto,
  body.gd-sheet-open .gd-sheet .photoBox.phpHiddenPhoto {
    height: auto !important;
    max-height: min(640px, calc(100cqh - 96px)) !important;
  }
}
