@media screen and (min-width: 1201px) {
    ::-webkit-scrollbar-thumb {
        background: #82c400;
        border-radius: 10px;
    }
    ::-webkit-scrollbar {
        width: 5px;
        height: 5px;
        background: #DBDBDB;
    }
}

body {
    font-size: 1.1111111111111112vw;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

@media screen and (min-width: 1920px) {
  body {
    font-size: 21.333333333333332px;
  }
}

.container {
  max-width: 1920px;
}

/* Выравнивание секции описания по левому краю */
.container.desprod {
  grid-template-columns: minmax(0, 1fr);
  place-items: start;
  align-items: start;
}

.container.desprod .textpromobtn {
  width: 100%;
  max-width: 100%;
  grid-row-gap: 1.5em;
}

.container.desprod .rich-text-block--detail {
  font-size: 1em;
  margin-top: 0;
}

@media screen and (max-width: 479px) {
  .container.desprod {
    grid-template-columns: 1fr;
  }

  .container.desprod .textpromobtn {
    grid-row-gap: 4vw;
  }

  .container.desprod .rich-text-block--detail {
    font-size: 14px;
  }
}

.rich-text-block {
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    --rich-text-line-height: 135%;
    --rich-text-block-spacing: 0.85em;
    --rich-text-list-item-spacing: 0.4em;
}

.rich-text-block > :first-child {
    margin-top: 0;
}

.rich-text-block > :last-child {
    margin-bottom: 0;
}

.rich-text-block p,
.rich-text-block ul,
.rich-text-block ol,
.rich-text-block blockquote {
    margin: 0 0 var(--rich-text-block-spacing);
}

.rich-text-block ul,
.rich-text-block ol {
    padding-left: 1.35em;
}

.rich-text-block li {
    margin-bottom: var(--rich-text-list-item-spacing);
}

.rich-text-block li:last-child {
    margin-bottom: 0;
}

.rich-text-block p,
.rich-text-block li {
    font-family: inherit;
    font-size: inherit;
    line-height: var(--rich-text-line-height);
    color: inherit;
}

.rich-text-block span,
.rich-text-block a,
.rich-text-block strong,
.rich-text-block em,
.rich-text-block u,
.rich-text-block s {
    font-family: inherit;
    color: inherit;
}

.rich-text-block h2,
.rich-text-block h3,
.rich-text-block h4 {
    color: var(--ofram_black);
    font-family: inherit;
    line-height: 120%;
    margin: 1.1em 0 0.5em;
}

.rich-text-block--primary {
    color: var(--ofram_black);
}

.rich-text-block--muted {
    color: #6c6c6c;
}

.rich-text-block--detail {
    margin-top: 0.5em;
}

.rich-text-block--recommended {
    margin-top: 0;
}

.rich-text-block--spacing-compact {
    --rich-text-line-height: 125%;
    --rich-text-block-spacing: 0.65em;
    --rich-text-list-item-spacing: 0.25em;
}

.rich-text-block--spacing-normal {
    --rich-text-line-height: 135%;
    --rich-text-block-spacing: 0.85em;
    --rich-text-list-item-spacing: 0.4em;
}

.rich-text-block--spacing-relaxed {
    --rich-text-line-height: 150%;
    --rich-text-block-spacing: 1.05em;
    --rich-text-list-item-spacing: 0.55em;
}

.info-choice-btn .btn.primerka {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 120%;
}

.info-choice-btn #ar-button[style*="display: block"] {
    display: flex !important;
}

.options .div-block {
    align-items: stretch;
}

.options .div-block > .cardoption {
    height: auto;
    min-height: 15em;
}

.options .div-block > .cardoption > .cardoption.icon {
    width: 2.5em;
    height: 2.5em;
    min-height: 0;
    flex: 0 0 auto;
}

@media screen and (max-width: 479px) {
    .info-choice-btn .btn.primerka,
    .mobbuttons .btn.line {
        box-sizing: border-box;
        height: 2.13em;
        padding-top: 0;
        padding-bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 120%;
    }

    .mobbuttons .toggle-3d[style*="display: block"] {
        display: flex !important;
    }

    .options .div-block > .cardoption > .cardoption.icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        padding: 6px;
    }
}

.options .div-block > .cardoption .rich-text-block {
    padding-bottom: 1.25em;
}

.color-circle.ncs-pal {
  background: conic-gradient(from 0deg, red, yellow, lime, aqua, blue, magenta, red);
  border: none;
}

@media screen and (max-width: 479px) {
  body {
    font-size: 5.322222222222223px;
  }
}

.search-window {
  display: none;
  opacity: 0;
    transition: opacity 0.3s ease;
}

.search-window.show {
    display: flex;
    opacity: 1;
}

.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
}

.color-option {
    position: relative;
}

.color-option input[type="radio"] {
    display: none;
}

.color-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 0.5em;
    border-radius: 0.5em;
    transition: background-color 0.3s;
}

.color-option input[type="radio"]:checked + label {
    background-color: rgba(0, 0, 0, 0.1);
}

.color-circle {
    width: 3em;
    height: 3em;
    border-radius: 50%;
    margin-bottom: 0.5em;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.color-name {
    font-size: 0.75em;
    text-align: center;
    color: var(--ofram_black);
    font-weight: 400;
    line-height: 120%;
}

.color-circle.ncs-ral {
    background: conic-gradient(red, yellow, green, cyan, blue, magenta, red);
    border: none;
}

.colorandmodelblock {
    overflow: hidden;
    max-width: 100%;
}

.door-picker-container {
    position: relative;
    max-width: 100%;
    overflow: hidden;
}

.door-picker {
    display: flex;
    flex-wrap: nowrap;
    gap: 1em;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 15px;
}

.door-picker::-webkit-scrollbar {
    display: none;
}

.door-option {
    flex: 0 0 auto;
    position: relative;
}

.door-option input[type="radio"] {
    display: none;
}

.door-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 0.5em;
    border-radius: 0.5em;
    transition: background-color 0.3s;
}

.door-option input[type="radio"]:checked + label {
    background-color: rgba(0, 0, 0, 0.1);
}

.door-image {
    height: 13.4em;
    width: auto;
    margin-bottom: 0.5em;
}

.door-name {
    font-size: 0.75em;
    text-align: center;
    color: var(--ofram_black);
    font-weight: 400;
    line-height: 120%;
}

.scroll-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 3em;
    height: 3em;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.scroll-left {
    left: 0.5em;
}

.scroll-right {
    right: 0.5em;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    width: 4em;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    display: block;
}

.gradient-left {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0));
}

.gradient-right {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,1), rgba(255,255,255,0));
}

.scroll-button:hover {
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.05);
}

.scroll-button:active {
    transform: translateY(-50%) scale(0.95);
}

.door-picker-container:hover .scroll-button {
    opacity: 1;
}

.door-picker-container .scroll-button {
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

#shareButtons {
    display: flex;
    gap: 1em;
    justify-content: flex-end;
}

.share-button {
    width: 2em;
    height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.share-button:hover {
    transform: scale(1.1);
}

.share-button img, .share-button svg {
    width: 100%;
    height: 100%;
}

#copy-link svg {
    width: 60%;
    height: 60%;
    stroke: #333;
}

.viber-button {
    display: none !important;
}

.price-info-icon {
    display: inline-block;
    margin-left: 0.5em;
    margin-right: 0.5em; 
    cursor: help;
    vertical-align: middle;
    color: #82c400;
    width: 1em;
    height: 1em;
}

.price-info-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.5;
}

.price-info-icon:hover {
    color: #6ba300;
}

@media screen and (max-width: 479px) {
    #shareButtons {
        gap: 1vw;
    }

  .share-button {
        width: 8vw;
        height: 8vw;
    }

  .color-circle {
        width: 8vw;
        height: 8vw;
    }

  .color-name {
        font-size: 12px;
        line-height: 1.25;
    }

  .door-image {
        height: 45vw;
    }

  .door-name {
        font-size: 12px;
        line-height: 1.25;
    }

  .colorsdoor {
        display: flex;
        flex-direction: column;
        gap: 1vw;
        max-height: 80vh;
        overflow-y: auto;
    }

  .color-picker {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start;
        gap: 3vw;
    }

  .color-option {
        width: auto;
    }

  .color-option label {
        flex-direction: column;
        align-items: center;
    }

  .color-circle {
        margin-bottom: 0.5em;
    }

  .scroll-button {
        width: 8vw;
        height: 8vw;
        font-size: 4vw;
    }

  #shareButtons {
        gap: 3vw;
        justify-content: center;
        width: 100%;
    }

  .share-button {
        width: 8vw;
        height: 8vw;
    }

  .viber-button {
        display: flex !important;
    }

    .price-info-icon {
        width: 4vw;
    }

    .container.product .btn.shop {
        font-size: 14px;
        line-height: 1.2;
    }
}

.pricerub {
    white-space: nowrap;
}

.image-container {
  position: relative;
  transition: opacity 0.3s ease;
  max-width: 100%;
  width: 100%;
  height: auto;
  display: flex;
  justify-content: center;
}

.choiceimagedoor {
  max-width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  margin: 0 auto;
}

.model-3d-iframe {
  width: 100%;
  height: 500px;
  border: none;
  margin: 0 auto;
}

.imagekv {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 1em;
}

/* Настройки для desktop карусели — картинки полностью видны со скруглением */
.desktop-images-slider,
.desktop-images-slider .mask,
.desktop-images-slider .w-slider-mask {
  border-radius: 1em;
  height: auto;
}

/* На десктопе карусель подгоняется под картинку (без навязанных пропорций) */
.slider.desktop-images-slider,
.slider.desktop-images-slider .mask,
.slider.desktop-images-slider .w-slider-mask,
.slider.desktop-images-slider .desktop-slide {
  aspect-ratio: auto;
  height: auto;
}

/* На мобилке общий .slider навязывает aspect-ratio 9/16 и оставляет серое поле.
   Задаём карусели стабильное соотношение и заполняем кадр целиком (без серого). */
@media screen and (max-width: 479px) {
  .slider.desktop-images-slider {
    aspect-ratio: 3 / 2;
    height: auto;
  }
  .slider.desktop-images-slider .w-slider-mask,
  .slider.desktop-images-slider .desktop-slide {
    height: 100%;
  }
  .slider.desktop-images-slider .imagekv {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* Стили для кнопок поделиться */
#shareButtons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 0;
}

.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #f5f5f5;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.share-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.share-button:active {
  transform: translateY(-1px);
}

.share-button img,
.share-button svg {
  width: 28px;
  height: 28px;
  transition: transform 0.3s ease;
  display: block;
}

.share-button:hover img,
.share-button:hover svg {
  transform: scale(1.1);
}

/* Специфичные стили для каждой соцсети */
#whatsapp:hover {
  background-color: #e8f5e9;
}

#telegram:hover {
  background-color: #e3f2fd;
}

#viber:hover {
  background-color: #f3e5f5;
}

#vk:hover {
  background-color: #e3f2fd;
}

#odnoklassniki:hover {
  background-color: #fff3e0;
}

#copy-link:hover {
  background-color: #e0e0e0;
}

@media screen and (max-width: 479px) {
  #shareButtons {
    gap: 8px;
  }

  .share-button {
    width: 36px;
    height: 36px;
  }

  .share-button img,
  .share-button svg {
    width: 24px;
    height: 24px;
  }
}
