.image-details {
    max-width: 1920px;
    margin-top: 110px;
margin-bottom: 206px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    opacity: 0;
    
}
.content-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  transition: opacity 0.3s ease-in-out;
}
.image-details.ready {
  opacity: 1;
}
.image-container {
  flex: 1 1 40%;
max-width: 80%;
}
.image-container img {
  width: 100%;
  height: auto;
}
.image-container h1 {
color: #353535;
      margin-left: 50px;
    font-size: 30px;
}

/* Стиль для блоков с medium size и year */
#under-fotorama {
        font-size: 21;
    display: flex;
    justify-content: space-between;
}
.medium-size-block {
    float: left;
    margin-right: 20px;
}

.year-block {
    float: right;
}

/* Дополнительные стили, если нужно */
#dynamic-description {
        margin-top: 10px;
    width: 100%;
    display: flex;
    flex-direction: row;
    /* gap: 10px; */
    flex-wrap: wrap;
    align-content: stretch;
    justify-content: space-between;
}



.below-image-container {
font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 5px;
}



.description-technique {
    padding: 5px;
}


.bottom-align {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100px;
  background-color: #ffffff;
  margin-bottom: 10px;
}

.regular-text {
  margin-bottom: 10px;
}

.image-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 25px;
}

.content-container {
  display: flex;
  gap: 20px;
}

.contact-button {
    align-self: flex-start;
    width: 160;
    padding: 10px 20px;
    background-color: #716f6f;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: inset 0 0 0 rgba(0, 0, 0, 0);
    transition: background-color 0.3s, box-shadow 0.3s;
}

.contact-button:hover {
    background-color: #5f5d5d;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
}





@media (max-width: 820px) {
    body {
        display: block !important;
      }
    .image-details {
      margin-top: 20px;
      gap: 15px;
      padding: 0 10px;
    }
  
    .content-container {
      max-width: 100%;
    }
  
    .image-container {
        margin-top: 10%;
      max-width: 100%;
    }
  
    .image-container h1 {
      font-size: 20px;
      margin-left: 0;
      text-align: center;
    }
  
    #under-fotorama {
      font-size: 16px;
      flex-direction: column;
      align-items: center;
      margin-top: 10px;
      gap: 8px;
    }
  
    .medium-size-block,
    .year-block {
      text-align: center;
    }
  
    #dynamic-description {
      flex-direction: column;
      align-items: center;
      gap: 10px;
    }
  
    .below-image-container {
      align-items: center;
      text-align: center;
    }
  
    .contact-button {
      align-self: center;
      width: 140px;
      font-size: 14px;
    }
  }
  
  @media (max-width: 480px) {

    .image-container h1 {
      font-size: 18px;
    }
    body {
        display: block !important;
      }
    .contact-button {
      width: 120px;
      padding: 8px 15px;
    }
  
    .description-location,
    .description-technique {
      font-size: 13px;
      text-align: center;
    }
  }
  
  @media (max-width: 360px) {
    .image-container h1 {
      font-size: 16px;
    }
    body {
        display: block !important;
      }
    .contact-button {
      width: 100%;
      font-size: 13px;
    }
  }
  .related-slider {
  width: 100%;
  max-width: 1320px;
  margin: 70px auto 90px;
  padding: 0 32px;
  box-sizing: border-box;
}

.related-slider__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  border-top: 1px solid rgba(38, 33, 26, 0.14);
  padding-top: 30px;
  margin-bottom: 26px;
}

.related-slider__head h2 {
  margin: 0;
  padding: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 400;
  color: #2a261f;
}

.related-slider__controls {
  display: flex;
  gap: 10px;
}

.related-slider__btn {
  width: 42px;
  height: 42px;

  border: 1px solid rgba(122, 106, 77, 0.35);
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.7);
  color: #2c2822;

  font-size: 30px;
  line-height: 1;
  cursor: pointer;

  transition: background .2s ease, opacity .2s ease, transform .2s ease;
}

.related-slider__btn:hover {
  background: #fff;
  transform: translateY(-1px);
}

.related-slider__btn:disabled {
  opacity: 0.28;
  cursor: default;
  transform: none;
}

.related-slider__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.related-slider__viewport::-webkit-scrollbar {
  display: none;
}

.related-slider__track {
  display: flex;
  gap: 28px;
  align-items: stretch;
}

.related-card {
  flex: 0 0 calc((100% - 84px) / 4);
  min-width: 0;
}

.related-card__image {
  display: block;
  overflow: hidden;
  background: #e8e1d6;
}

.related-card__image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.related-card:hover .related-card__image img {
  transform: scale(1.035);
}

.related-card__body {
  padding-top: 13px;
}

.related-card__body h3 {
  margin: 0 0 9px;
  padding: 0;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 400;
  color: #2c2822;
}

.related-card__links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.related-card__links a {
  font-size: 13px;
  color: #7a6a4d;
  text-decoration: none;
  border-bottom: 1px solid rgba(122, 106, 77, 0.35);
}

.related-card__links a:hover {
  color: #2c2822;
  border-color: rgba(44, 40, 34, 0.55);
}

@media (max-width: 1000px) {
  .related-card {
    flex-basis: calc((100% - 28px) / 2);
  }
}

@media (max-width: 640px) {
  .related-slider {
    padding: 0 16px;
    margin: 50px auto 70px;
  }

  .related-slider__head {
    padding-top: 24px;
    margin-bottom: 20px;
  }

  .related-slider__head h2 {
    font-size: 28px;
  }

  .related-slider__btn {
    width: 38px;
    height: 38px;
    font-size: 26px;
  }

  .related-slider__track {
    gap: 18px;
  }

  .related-card {
    flex-basis: 78%;
  }
}
/* ===== Related works: всегда снизу отдельным блоком ===== */

.image-details {
  width: 100%;
  flex: 0 0 100%;
}

.related-slider {
  flex: 0 0 100%;
  width: 100%;
  max-width: 1320px;
  margin: 70px auto 90px;
  padding: 0 32px;
  box-sizing: border-box;
  clear: both;
}

/* чтобы слайдер не залезал в блок подробностей */
.image-details + .related-slider {
  margin-top: 60px;
}
.product-open-button-inline {
  text-decoration: none;
  box-sizing: border-box;
  text-align: center;
}
.purchase-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.product-open-button-inline {
  text-decoration: none;
  box-sizing: border-box;
  text-align: center;
}

.product-open-button-inline.is-unavailable {
  background-color: #b8b8b8;
  color: #ffffff;
  border-color: #a8a8a8;
  box-shadow: none;
}

.product-open-button-inline.is-unavailable:hover {
  background-color: #a9a9a9;
  color: #ffffff;
}

.product-availability-note {
  font-size: 14px;
  color: #777;
  font-style: italic;
}
.product-page {
  width: 100%;
  background: #f7f4ee;
  color: #26231f;
}

.product-layout {
  max-width: 1320px;
  margin: 0 auto;
  padding: 120px 32px 90px;

  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(330px, 0.82fr);
  gap: clamp(34px, 5vw, 76px);
  align-items: start;
}

.product-media {
  min-width: 0;
}

.product-fotorama {
  width: 100%;
}

.product-info {
  min-width: 0;
  position: sticky;
  top: 110px;

  padding: 34px 34px 38px;

  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(38, 33, 26, 0.12);
  box-shadow: 0 18px 50px rgba(38, 33, 26, 0.08);
}

.product-back {
  display: inline-block;
  margin-bottom: 28px;
  color: #777067;
  text-decoration: none;
  font-size: 14px;
}

.product-label {
  margin: 0 0 12px;
  padding: 0;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #777067;
}

.product-title {
  margin: 0 0 28px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
  font-weight: 400;
  color: #2a261f;
}

.product-specs {
  margin: 24px 0 30px;
  border-top: 1px solid rgba(38, 33, 26, 0.12);
  border-bottom: 1px solid rgba(38, 33, 26, 0.12);
}

.product-spec-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(38, 33, 26, 0.08);
}

.product-spec-row:last-child {
  border-bottom: 0;
}

.product-spec-label {
  font-size: 13px;
  color: #8a8175;
}

.product-spec-value,
.product-spec-value p,
.product-spec-value h3,
.product-spec-value div {
  margin: 0;
  padding: 0;
  font-size: 15px;
  line-height: 1.45;
  color: #2c2822;
}

.product-sale-note,
.product-delivery {
  margin-bottom: 24px;
}

.product-sale-note h2,
.product-delivery h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 400;
  color: #2a261f;
}

.product-sale-note p,
.product-delivery p {
  margin: 0;
  padding: 0;
  font-size: 15px;
  line-height: 1.65;
  color: #5d574f;
}

.product-buy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 46px;
  padding: 0 26px;

  border: 1px solid rgba(122, 106, 77, 0.45);
  border-radius: 999px;

  background: #fff;
  color: #2c2822;

  font-family: inherit;
  font-size: 15px;
  cursor: pointer;

  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.product-buy-button:hover {
  background: #f7f4ee;
  border-color: rgba(122, 106, 77, 0.75);
  transform: translateY(-1px);
}

/* ===== Подбор фона под изображением ===== */

.product-mockup-block {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid rgba(38, 33, 26, 0.12);
}

.product-mockup-title {
  margin: 0 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 400;
  color: #2a261f;
}

.product-mockup {
  --art-width: 34%;
  --art-top: 50%;
  --art-left: 50%;
  --art-offset-x: 0px;
  --art-offset-y: -50px;

  width: 100%;
}

/* ===== Настройки положения картины в подборе фона ===== */
/* Здесь можешь отдельно править размер и позицию для каждого типа */

.product-mockup.size-mini {
  --art-width: 22%;
  --art-top: 34%;
  --art-left: 50%;
  --art-offset-x: 0px;
  --art-offset-y: -50px;
}

.product-mockup.size-small {
  --art-width: 28%;
  --art-top: 34%;
  --art-left: 50%;
  --art-offset-x: 0px;
  --art-offset-y: -50px;
}

.product-mockup.size-medium {
  --art-width: 37%;
  --art-top: 34%;
  --art-left: 50%;
  --art-offset-x: 0px;
  --art-offset-y: -50px;
}

.product-mockup.size-big {
  --art-width: 60%;
  --art-top: 34%;
  --art-left: 50%;
  --art-offset-x: 0px;
  --art-offset-y: -50px;
}

.product-mockup__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #ece6dd;
  border: 1px solid rgba(38, 33, 26, .12);
}

.product-mockup__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-mockup__art {
  position: absolute;
  left: var(--art-left);
  top: var(--art-top);
  width: var(--art-width);
  max-width: none;

  transform:
    translate(-50%, -50%)
    translate(var(--art-offset-x), var(--art-offset-y))
    scale(var(--art-scale));

  transform-origin: center center;

  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.product-mockup__picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.product-mockup__swatch {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(38, 33, 26, .16);
  padding: 0;
  cursor: pointer;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.product-mockup__swatch:hover {
  transform: translateY(-1px);
}

.product-mockup__swatch.is-active {
  border-color: rgba(122, 106, 77, .65);
  box-shadow: 0 0 0 2px rgba(122, 106, 77, .16);
}

/* ===== Mobile ===== */

@media (max-width: 900px) {
  .product-layout {
    grid-template-columns: 1fr;
    padding: 95px 16px 70px;
    gap: 34px;
  }

  .product-info {
    position: static;
    padding: 26px 20px 30px;
  }

  .product-mockup__swatch {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 560px) {
  .product-title {
    font-size: 36px;
  }

  .product-spec-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}
.product-mockup {
  --art-scale: 1;
}

.product-mockup.has-paspartu {
  --art-scale: 1.4;
}