* {
  user-select: none;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none;     /* IE10+ */
}

a {
  all: unset;
}


html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  
}

html, body {
  touch-action: manipulation; /* запрещает дабл-тап зум */
}

canvas#three-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 0;
    touch-action: none;
  -ms-touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

a {
  line-height: 0;
}

h3 {
  margin: 0;
}
body {
  margin: 0;
  font-family: "Gilroy", sans-serif;
  /* background: red; */
  overflow: hidden;
  background-color: #a0a0a0;
}
::-webkit-scrollbar {
  width: 0px;
  height: 0px;
  /* display: none; */
}

::-webkit-scrollbar-thumb {
  background-color: grey;
}

/* Меню  */
.side-menu {
  position: fixed;
  /* top: 20px;  */
  left: 20px;
  top: 110px;
  width: 70px;
  /* height: 100%; */
  background: #fff;
  border-right: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 16px 0;
  z-index: 10;
  border-radius: 16px;
  overflow: hidden;
  border: 0;
  transition: all 0.3s ease;
}
.menu-item {
  width: 100%;
  text-align: center;
  padding: 12px 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #4c4c4c;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s ease;
}

.menu-item svg g {
  transition: all 0.3s ease ;
}
.menu-item.active {
  color: #2196f3;
}
.menu-item.active svg g {
  fill: #2196f3;
}
.menu-item:hover {
  color: #2196f3;
}
.menu-item:hover svg g {
  fill:#2196f3;
}

/* Правое меню */

.right-panel {
  /* position: relative; */
  margin-left: 20px;
  margin-top: 20px;
  padding: 0px 12px;
  border-radius: 16px;
  position: absolute;
  width: 15%;
  top: 90px;
  left: 90px;
  /* right: 0;
  bottom: 0; */
  overflow-y: auto;
  background: #fff;
  z-index: 1;
  max-height: calc(100vh - 130px);
  display: flex;
  flex-direction: column;
  height: auto;
}

/* Кнопки меню */

.tab-panel {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow-y: auto;
}
.tab-panel.active {
  display: block;
  opacity: 1;
}

/* Пункт - МОДЕЛИ */

.tab-model-btn {
  padding-top: 12px;
  padding-bottom: 15px;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
}

.model-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, #fafafa, #f8f8f8);
  padding: 6px;
  /* margin: 6px; */
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  text-align: center;
  width: auto;
  height: auto;
  box-sizing: border-box;
  overflow: hidden;
  transition: all 0.3s ease;
  border: #eee 1px solid;
  color: #191919;
  height: 100px;
}
.model-button img {
  /* margin-top: -10px; */
  width: auto;
  height: 60px;
  /* max-height: 150px; */
  object-fit: fill;
  display: block;
}
.model-button div {
  /* margin-top: -20px; */
  font-weight: 600;
}
.model-button:hover {
  background: #2196f3;
  color: #fff;
  border-color: #2196f3;
}
.model-button.active-model {
  background: #2196f3;
  color: #fff;
  border-color: #2196f3;
}
.btn {
  padding: 6px 12px;
  background: #2196f3;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 6px;
}
.checkbox-group {
  margin: 10px 0;
}

/* ЭКСПОРТ ПДФ */

.pdf-progress-bar {
  position:absolute;
  left:0; 
  top:0; 
  bottom:0;
  width:0%; 
  background:#2196f3;
  /* opacity:1; */
  z-index:1;
  transition:width 0.2s;
  pointer-events:none;
}
.pdf-progress-text {
  position:absolute;
  left:50%; 
  top:50%; 
  transform:translate(-50%,-50%);
  color:#fff; 
  z-index:2;
  font-weight:bold;
}
/* #exportPDFBtn {

} */

/* Пункт - ОФОРМЛЕНИЕ */

/* Загрузка логотипа */

.upload-box {
  border: 1px dashed #2196f3;
  border-radius: 12px;
  background-color: #dbeefd;
  padding: 20px;
  /* width: 320px; */
  margin-bottom: 20px;
}

.custom-upload {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.custom-upload input[type="file"] {
  display: none;
}

.custom-upload img {
  width: 30px;
  position: relative;
}

.upload-btn {
  display: inline-block;
  padding: 5px 0;
  background-color: #2196f3;
  color: #fff;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-content: space-between;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
}

.remove-btn {
  background-color: #f32121;
  cursor: pointer;
}

.template-btn {
  opacity: 1;
}

/* Смена цвета */

.color-picker-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
}
.color-picker {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 300px;
}

.color-picker label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f4f4f4;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 12px;
}

.color-picker label.hidden {
  display: none !important;
}

.label-text {
  font-weight: 400;
  color: #000;
  width: 100%;
}

.color-picker input[type="color"] {
  border: none;
  width: 40px;
  height: 30px;
  cursor: pointer;
  padding: 0;
  background: none;
}

/* НИЖНЯЯ ПАНЕЛЬ */

.bottom-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 999;
  align-items: center;
  height: 48px;
}

.bottom-window {
  background-color: white;
  padding: 8px 10px;
  border-radius: 8px;
  /* height: 48px; */
  align-items: center;
  display: flex;
  flex-direction: row;
  box-shadow: 0 4px 8px #0000001a;
}

.bottom-window svg {
  display: none;
}

.zoom-controls {
  display: flex;
  gap: 6px;
}

.zoom-btn {
  font-size: 18px;
  font-weight: 600;
  /* padding: 12px; */
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s;
  width: 32px;
  height: 32px;
  color: #4c4c4c;
}
.zoom-btn:hover {
  background: #f0f0f0;
}

.export-btn {
  font-size: 14px;
  /* padding: 9px; */
  border: none;
  border-radius: 6px;
  background: transparent;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
  height: 32px;
  color: #4c4c4c;
  text-wrap: nowrap;
}
.export-btn:hover {
  color: #2196f3;
}

.export-btn.active {
  color: #2196f3;
}
.line-vertical {
  /* border-right: 1px #dbdbdb solid; */
  margin: 0 5px;
  height: 32px;
  width: 1px;
  background-color: #dbdbdb;
}

  .bottom-bar .export-btn svg {
    display: none;              /* прячем иконку */
  }


/* ПРАВАЯ ПАНЕЛЬ */
.right-bar {
  position: fixed;
  top: 53%;
  right: 20px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
  align-items: center;
}

.right-window {
  background-color: white;
  padding: 8px 10px;
  border-radius: 8px;
  /* height: 48px; */
  align-items: center;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 8px #0000001a;
  gap: 5px;
}

.move-btn {
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.move-btn:hover {
  background: #f0f0f0;
}

.move-btn.selected {
  background: #f0f0f0;
}

.unselected {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: auto;
}

#unlock-access.unselected {
    display:none;
}

#offset.unselected {
    display: none;
}

#offset {
    display: block;
}

.model-button.unselected {
  filter: blur(3px);
}

.model-button.unselected:hover {
  background: #2196f3;
}

.unselected:hover {
  background: none;
}

.line-horizontal {
  width: 32px;
  height: 1px;
  background-color: #dbdbdb;
  margin: 5px 0;
}

/* ХЕДЕР */
.header {
  position: fixed;
  top: 20px;
  right: 20px;
  left: 20px;
  height: 70px;
  /* width: calc(100vw - 100px); */
  width: auto;
  background: #fff;
  z-index: 9999;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  padding: 0 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Левая часть */
.header-left {
  display: flex;
  align-items: center;
  gap: 30px;
}
.header-left a {
  height: 100%;
  align-items: center;
  display: flex;
}
.header_logo {
  position: relative;
  height: 70%;
}
.header_nav {
  display: flex;
  gap: 19px;
}

.header_link {
  font-family: 'Tilda Sans', sans-serif;
  position: relative;
  font-size: 20px;
  padding: 20px 10px;
  color: #011624;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 400;
  transition: all 0.3s ease;
}

.header_link:hover {
  color: #2196f3;
}

/* Правая часть */
.header-right {
  display: flex;
  align-items: center;
  gap: 30px;
}

.second_line {
  display: none;
}

.header_socials {
  display: flex;
  gap: 12px;
}

.header_socials img {
  height: 25px;
  width: 25px;
  transition: all 0.3s ease;
}

.header_socials img:hover{
  transform: scale(1.1);
}

.header_contacts {
  font-family: 'Tilda Sans', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  white-space: nowrap;
}

.header_tel a {
  color: #000;
  text-decoration: none;
  font-weight: 400;
  font-size: 20px;
}

.header_time {
  opacity: 0.5;
  font-size: 14px;
  font-weight: 400;
}

/* Кнопка */
.header_callback {
  width: 190px;
  background: linear-gradient(0.25turn,rgba(57,149,215,1) 0%,rgba(104,187,248,1) 100%);
  color: #fff;
  border: none;
  border-radius: 15px;
  padding: 15px 25px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.3s ease;
  text-wrap: nowrap;
}

/* ЯЗЫК */
.lang-switcher {
  position: relative;
  width: 40px;
  height: 40px;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-button {
  position: relative;
  background: none;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  padding: 0;
  z-index: 999;
  width: 30px;
  height: 30px;
}

.lang-button img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: white;
  z-index: 999;
  box-shadow: 0px 0px 6px rgba(57, 149, 215, 0.4);
  position: relative;
}

/* Вращение глобуса */
.lang-button.active img {
  animation: rotate360 0.5s ease;
}

@keyframes rotate360 {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Выпадающее меню */
.lang-dropdown {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) scaleY(0.5);
  transform-origin: top center;
  background: #cccccc84;
  opacity: 0;
  border-radius: 20px;
  padding: 50px 5px 5px; /* верх - под глобус */
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 99;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.lang-dropdown.active {
  transform: translateX(-50%) scaleY(1);
  opacity: 1;
  pointer-events: auto;
}

/* Анимация флагов */
.lang-dropdown button {
  background: none;
  border: none;
  cursor: pointer;
  margin: 2px 0;
  padding: 0;
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.lang-dropdown.active button:nth-child(1) {
  transition-delay: 0.1s;
}
.lang-dropdown.active button:nth-child(2) {
  transition-delay: 0.2s;
}
.lang-dropdown.active button:nth-child(3) {
  transition-delay: 0.3s;
}

.lang-dropdown.active button {
  transform: translateY(0);
  opacity: 1;
}

.lang-dropdown img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

/* ТУЛТИПЫ */

.tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.tooltip {
  position: absolute;
  bottom: 125%; /* над кнопкой */
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 1000;
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.tooltip-wrapper:hover .tooltip {
  opacity: 1;
}

.tooltip kbd {
  background: #555;
  color: #eee;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 11px;
  font-family: monospace;
  margin-left: 6px;
}

/* ПОДСКАЗКА СПРАВА */

.model-helper {
  position: fixed;
  right: 20px;
  top: 110px;
  width: 402px;
  height: 213px;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  z-index: 95;
  display: flex;
  flex-direction: column;
}

.model-helper .scroll-content {
  flex: 1;
  overflow-y: auto;
  /* padding: 15px 15px 15px 20px; */
  box-sizing: border-box;
  position: relative;
}

.model-helper .scroll-content::-webkit-scrollbar {
  width: 3px;
}

.scroll-content::-webkit-scrollbar-thumb {
  background-color: #2196f3;
  border-radius: 50px;
  /* margin: 20px; */
}

.scroll-content {
  /* flex: 1; */
  overflow-y: auto;
  padding: 15px 15px 15px 15px;
  position: relative;
  z-index: 1;
}

/* Общий fade-эффект */
.top-fade,
.bottom-fade {
  position: absolute;
  left: 0;
  width: 100%;
  height: 40px;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 2;
  opacity: 1;
}

.top-fade {
  top: 0;
  background: linear-gradient(to bottom, white, rgba(255,255,255,0));
}

.bottom-fade {
  bottom: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0), white);
}

.fade-hidden {
  opacity: 0;
}

.catalog-btn {
  background: linear-gradient(90deg, rgba(57,149,215,1), rgba(104,187,248,1));
  background-size: 200% 100%;
  background-position: left center;
  transition: all 0.3s ease;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-top: 10px;
}

.catalog-btn:hover {
  background-position: right center;
}

.model-helper svg {
  position: absolute;
  top: 14px;
  left: 15px;
}

/* МЕД КНОПКИ */

#med-class-buttons {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#classA {
  border: 1px solid pink;
  background-color: white;
  color: black;
}

#classB {
  border: 1px solid pink;
  background-color: rgb(255, 255, 0);
  color: black;
}

#classV {
  border: 1px solid pink;
  background-color: red;
  color: white;
}

/* ПЕРЕКЛЮЧЕНИЕ РУЧКИ */

.toggle-handle {
  display: flex;
  justify-content: space-between;
  flex-direction: row-reverse;
  align-items: center;
  background: #f4f4f4;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 15px;
}

.toggle-handle input {
  transform: scale(1.2);
  box-shadow: none;
}

/* ВИДЖЕТ */

 .contact-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
}

#contact-toggle {
  display: none;
}

.contact-button {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #3ba5df;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  z-index: 2;
  overflow: hidden;
}

.contact-button img {
  width: 50px;
  height: 50px;
  transition: opacity 0.3s ease;
}

.contact-button .close-icon {
  position: absolute;
  font-size: 36px;
  font-weight: 300;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, color 0.3s ease;
}

#contact-toggle:checked + .contact-button {
  background-color: #fff;
}

#contact-toggle:checked + .contact-button img {
  opacity: 0;
}

#contact-toggle:checked + .contact-button .close-icon {
  opacity: 1;
  color: #000;
  pointer-events: auto;
}

.contact-options {
  position: relative;
}

.contact-link {
  position: absolute;
  right: 4px;
  bottom: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(0);
  transition: transform 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* .contact-link.phone    { background-color: #000; }
.contact-link.whatsapp { background-color: #27D061; }
.contact-link.email    { background-color: #000; } */

#contact-toggle:checked ~ .contact-options .contact-link.phone {
  transform: translateY(-70px);
  opacity: 1;
  transition-delay: 0.05s;
}
#contact-toggle:checked ~ .contact-options .contact-link.whatsapp {
  transform: translateY(-130px);
  opacity: 1;
  transition-delay: 0.1s;
}
#contact-toggle:checked ~ .contact-options .contact-link.email {
  transform: translateY(-190px);
  opacity: 1;
  transition-delay: 0.15s;
}
.contact-link a svg {
  width: 50px;
}

/* МОБИЛЬНЫЙ ХЕДЕР */

.header_hamburger {
  display: none;
}

.burger {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.line1, 
.line2, 
.line3 {
  height: 2px;
  background: linear-gradient(0.25turn, rgba(57,149,215,1) 0%, rgba(104,187,248,1) 100%);
  border-radius: 15px;
  transition: all 0.3s ease;
}

.line1, .line3 {
  width: 20px;
}

.line1 {
  align-self: flex-end;
}

.line2 {
  width: 32px;
}

.line3 {
  align-self: flex-start; /* или flex-end, если тебе нужно справа */
}

.menu-open .line1 {
  transform: translateX(-12px);
}

.menu-open .line3 {
  transform: translateX(12px)
}


.mobile-menu {
  scale: 0.9;
  position: fixed;
  top: 70px;
  right: 9px;
  width: 80%;
  max-width: 200px;
  /* height: 100vh; */
  background: #fff;
  box-shadow: -4px 0 12px rgba(0,0,0,0.1);
  transform: translateX(130%);
  transition: transform .3s ease;
  overflow-y: auto;
  z-index: 1001;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 15px;
}

body.menu-open .mobile-menu {
  transform: translateX(0);
}

.mobile-menu_langs {
  display: flex;
  flex-direction: row;
  justify-content: center;
  margin-bottom: 20px;
}

.mobile-menu_langs button {
  background: none;
  border: none;
}

.mobile-menu_langs button img {
  width: 20px;
  height: 20px;
  border-radius: 50px;
  box-shadow: -4px 0 12px rgba(0,0,0,0.1);
}

.mobile-menu_nav .header_link {
  padding: 10px;
}

.mobile-menu_nav {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.mobile-menu_social {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.mobile-menu_social a img {
  width: 25px;
  height: 25px;
}

.mobile-menu .header_callback {
  width: 100%;
  padding: 10px 20px;
  margin-bottom: 20px;
}

.mobile-menu_contacts {
  display: flex;
  flex-direction: column;
  justify-content: left;
  align-items: left;
  gap: 20px;
}

.mobile-menu_contacts .header_tel {
  display: flex;
  flex-direction: row;
  align-self: start;
}

.mobile-menu_contacts .header_tel a {
  align-items: center;
  display: inline-flex;
  font-size: 16px;
  justify-content: center;
}

.mobile-menu_contacts .header_tel img {
  /* vertical-align:baseline; */
  margin-right: 20px;
  width: 20px;
  height: 20px;
}

.helper-widget {
  position: fixed;
  width: 56px;
  height: 56px;
  z-index: 1000;
  display: none;
}

/* Сам чекбокс скрываем, но он остаётся кликабельным */
.helper-widget input {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

/* Иконка под ним */
.helper-widget svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 56px;
  height: 56px;
  fill: #43a4ee;
  transition: fill 0.3s;
  z-index: 1;
  border: 0;
}

#tab-iml, #tab-offset {
    padding-bottom: 12px;
}

@media (min-width:1200px) and (max-width:1900px) {
  .header-left {
    gap: 15px;
    width:50%;
  }

  .header_link {
    /* padding: 10px 0; */
    font-size: 18px;
  }

  .header_nav {
    gap: 0px;
  }

  .model-helper {
    height: 200px;
  }

  .header_callback {
    padding: 13px 15px;
  }

  .header_contacts {
    scale: 0.9;
    position: relative;
    top: 2px;
  }

  .header-right {
    gap: 10px;
  }

  .header_socials {
    scale: 0.95;
    gap: 7px;
  }
}

@media (max-width: 1420px) {
  .header_nav {
    display: none;
  }

  .header_socials {
    display: none;
  }

  .lang-switcher {
    display: none;
  }

  .header-right .header_callback {
    display: none;
  }

  .header_hamburger {
    border: none;
    background: none;
    overflow: hidden;
    width: 70px;
    height: 50px;
    cursor: pointer;
    align-items: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 0;
  }

  .burger {
    scale: 1.7;
  }

  .tab-model-btn {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1200px) {
    
    .toggle-handle input {
        position: relative;
        bottom: 10px;
    }
    
    .header-left {
        width: 30%;
    }

  .side-menu {
    top: 40%;
    transform:translateY(-40%);
    width: 60px;
    border-radius: 8px;
  }

  .menu-item[data-tab="models"] svg {
    width: 30px !important;
    height: 30px !important;
  }

  .menu-item[data-tab="colors"] svg {
    width: 20px !important;
    height: 20px !important;
  }

  .menu-item[data-tab="iml"] svg {
    width: 25px !important;
    height: 25px !important;
  }

  .menu-item[data-tab="colors"], .menu-item[data-tab="iml"] {
    gap: 5px;
  }

  .tooltip {
    display: none;
  }

  .right-bar {
    width: 60px;
    top: 45%;
    transform: translateY(-45%);
    
  }

  .right-panel {
    width: calc(100vw - 40px);
    height: 160px;
    top: auto;
    bottom: 20px;
    left: 20px;
    margin: 0;
    flex-direction: row;
    display: flex;
    padding: 0;
    z-index: 20;
    background: none;
  }

  .right-panel::before {
    content: "";
    position: absolute;
    right: 0;
    top: 40px;
    width: 15px;
    height: 15px;
    background-color: #c3c3c3;
    z-index: 10;
  }

  .right-panel::after {
    content: "";
    position: absolute;
    right: 0;
    top: 43px;
    width: 15px;
    height: 15px;
    background-color: white;
    z-index: 10;
    border-top-right-radius: 15px;
  }

  .tab-panel.active.scrollArea {
    position: relative;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 12px;
    background: none;
    width: 100%;
  }

  .tab-panel.active {
    width: 100%;
  }

  .tab-panel.active {
    background-color: white;
  overscroll-behavior-x: none;
  overscroll-behavior-y: contain;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  }

  .model-category {
    flex: 0 0 auto;
    display: grid;
    grid-template-rows: auto 1fr;
    padding: 0;
  }

  .model-category:first-child {
    border-radius: 0 0 0 15px;
  }

  .model-category .tab-model-btn {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(1, auto);
    grid-auto-columns: minmax(100px, max-content);
    gap: 12px;
    justify-content: start;
    overflow: visible;
    padding-top: 15px;
    padding-left: 12px;
    padding-right: 12px;
    background: white;
  }

  .tab-model-btn.last-models {
    display: flex;
    flex-direction: row;
  }
  
  .tab-panel.active.scrollArea .panel-sub_header {
    position: sticky;
    overflow: visible;
    left: 0;
    top: 10px;
    z-index: 15;
    background: #fff;
    transition: none;
    padding-top: 5px !important;
    padding-bottom: 15px;
    padding-left: 20px;
    padding-right: 20px;
    width: fit-content;
    border-top-right-radius: 15px;
    border-top-left-radius: 15px;
    font-size: 17px;
  }

  /* .tab-panel.active.scrollArea .panel-sub_header::before {
    content: "";
    position: absolute;
    left: 100%;
    bottom: 0;
    width: 20px;
    height: 20px;
    background-color: white;
    mask-image: linear-gradient(to top, black, black),
    radial-gradient(circle 15px at center, green 80%, transparent 81%);
    mask-size: 12px 12px, 100%;
    mask-position: bottom left, center;
    mask-repeat: no-repeat, repeat;
    mask-composite: subtract;
  } */
/* 
  .tab-panel.active.scrollArea .panel-sub_header::after {
    content: "";
    position: absolute;
    right: 100%;
    bottom: 0;
    width: 20px;
    height: 20px;
    background-color: white;
    mask-image: linear-gradient(to top, red, red),
    radial-gradient(circle 15px at center, green 80%, transparent 81%);
    mask-size: 12px 12px, 100%;
    mask-position: bottom right, center;
    mask-repeat: no-repeat, repeat;
    mask-composite: subtract;
  } */

  .sticky-header {
    position: sticky;
    left: 0;
    top: 0;
    z-index: 10;
    background: #fff;
    padding: 15px 12px;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
  }

  .fadeBottom, .fadeTop {
    display: none;
  }

  .model-button {
    height: 90px;
    min-width: 100px;
    max-width: 100px;
    font-size: 13px;
  }

  .bottom-bar {
    bottom: 220px;
  }

  .contact-widget {
    bottom: 175px;
    right: 20px;
  }

  .bottom-window svg {
    display: block;
  }

  .bottom-window span {
    display: none;
  }

  .model-helper {
    position: fixed;
    display: flex;
    opacity: 0;
    transition: all 0.3s ease;
    right: 96px;
    left: 96px;
    width: auto;
    /* width: calc(100vw - 40px); */
    max-height: 210px;
    pointer-events: none;
  }

  .helper-widget {
    position: absolute;
    display: flex;
    top: 110px;
    right: 20px;
    }

  .helper-widget svg {
    width: 56px;
    height: 56px;
    border-radius: 100px;
  }
  
  .model-helper.open {
    display: flex;
    opacity: 1;
    pointer-events: auto;
  }

  .color-picker {
    flex-direction: row;
    padding-left: 15px;
    max-width: max-content;
  }

  .color-picker label {
    white-space: nowrap;
    display: flex;
    flex-direction: column;
  }

  .color-picker input[type="color"] {
    width: 100%;
  }

  .tab-panel.active#tab-iml {
    position: relative;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 15px;
    padding-top: 15px !important;
    padding-left: 15px;
    padding-bottom: 15px;
    padding-right: 15px;
    height: 90px;
    top: 43px;
    border-radius: 15px;
    z-index: 20;
    overflow-x:auto;
    white-space: nowrap;
  }
  
  #tab-iml .upload-box,
  #tab-iml .toggle-handle {
    flex: 0 0 auto;
  }

  .tab-panel.active#tab-colors {
    position: relative;
    display: flex;
    flex-direction: row;
    padding-left: 15px;
    padding-bottom: 15px;
    z-index: 20;
    height: 90px;
    top: 43px;
    border-radius: 15px;
    gap: 15px;
  }

  #med-class-buttons {
    flex-direction: row;
    margin: 0 !important;
    gap: 15px;
    width: 100%;
  }

  #med-class-buttons .panel-sub_header {
    display: none !important;
  }

  #classA, #classB, #classV {
    margin: 0;
    width: 100%;
  }

  #med-class-buttons .upload-btn {
    flex: 1;
    text-align: center;
    justify-content: center;
    align-items: center;
    display: flex;
    padding: 10px 0;
  }

  .toggle-handle {
    margin: 0;
    flex-direction: column-reverse;
  }
  
  .color-picker input[type="color"] {
    height: 50%;
    border-radius: 15px;
  }

  .upload-box {
    margin-bottom: 0;
    padding: 10px 15px;
    gap: 10px;
  }

  .upload-btn {
    margin-top: 8px;
    padding: 10px 15px;
  }

  .upload-btn img {
    width: 20px;
    height: 20px;
  }

  .upload-box div {
    display: flex;
    flex-direction: row;
    gap: 15px;
  }

  .toggle-handle span {
    text-wrap: wrap;
    max-width: 100%;
  }

  .second_line {
    display: block !important;
  }

  .bottom-window:first-child {
    display: none;
  }

  .bottom-bar {
    display: none;
  }

  #toggleLidBtn span,
  #toggleValveBtn span,
  #transparentBodyBtn span,
  #exportPDFBtn span {
    display: none;
  }

  #toggleLidBtn,
  #toggleValveBtn,
  #transparentBodyBtn,
  #exportPDFBtn {
    border: 0;
    background: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    padding: 0;
  }

  #toggleLidBtn svg,
  #toggleValveBtn svg,
  #transparentBodyBtn svg,
  #exportPDFBtn svg {
    width: 30px;
    height: 30px;
  }

  .tab-model-btn.last-models {
    border-top-right-radius: 15px;
  }

  .models-container {
    border-radius: 50px;
    z-index: 50;
    overflow: hidden;
  }

  .right-bar .zoom-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0 12px 0 10px;
    gap: 0;
    top: 10px;
    left: 10px;
    right: 10px;
    overflow: visible;
    /* flex-wrap: wrap; */
  }

  .header-right {
    gap: 5px;
    min-width: 1px;
    z-index: 9999;
    flex-shrink: 0;     
  }
  
  .header-left {
      width: 30%;
  }

  .header_logo {
    scale: 0.9;
  }

  .header_tel a{
    font-size: 15px;
  }

  .header_time {
    font-size: 12px;
  }

  .mobile-menu {
    scale: 0.82;
    top: 29px;
    right: -12px;
  }

  .side-menu {
    scale: 0.9;
    left: 10px;
    top: 39%;
    transform: translateY(-45%);
  }

  .right-bar {
    scale: 0.9;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
  }

  .right-panel {
    height: 140px;
    z-index: 0;
    bottom: 10px;
    left: 10px;
    right: 10px;
    width: auto;
  }
  
  .right-panel::after, .right-panel::before {
      top:53px;
      z-index: 5;
      height: 10px;
  }

 .model-category .tab-model-btn {
    position: relative;
    padding: 10px;
    z-index: 50 !important;
  }
  
  .model-category {
      z-index: 50;
  }

  .model-button {
    height: 70px;
    min-width: 90px;
    max-width: 100px;
  }

  .model-button img {
    width: 40px;
    height: 40px;
  }

  .tab-panel.active {
    top: 10px;
  }
  
  .color-picker label{
      gap: 5px;
      max-width: 150px;
      height: 50px;
  }
  
  .template-btn {
      text-wrap: nowrap;
  }
  
  .upload-box {
      padding: 5px 10px;
      height: 60px;
  }
  
  #tab-iml .toggle-handle {
      height: 60px;
      padding: 5px 10px;
  }
      
  
  .tab-panel.active#tab-iml {
      display: flex;
      flex-direction: row;
      gap: 10px; /* ✅ Расстояние между логотипами */
        padding: 15px;

    }

  
  .upload-box span {
      font-size: 14px;
  }
  
  .upload-btn {
      padding: 5px 10px;
  }
  
  .contact-widget {
      scale: 0.9;
      bottom: 105px;
      right: 7px;
  }
  
  .helper-widget {
      scale: 0.9;
      right: 7px;
      top: 88px;
  }
  
  .model-helper {
      right: 65px;
      left: 74px;
      top: 88px;
  }
  
  #med-class-buttons {
      height: 72px;
  }

  canvas#three-canvas {
    width: 100% !important;
    height: 100% !important;
  }
  
  .label-text {
      font-size: 14px;
  }
  
    .burger {
    scale: 1.3;
  }
}

/* Модальное окно запроса пароля */
.custom-prompt-backdrop {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.custom-prompt {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  width: 90%;
  max-width: 350px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  font-family: "Gilroy", sans-serif;
  text-align: center;
}

.custom-prompt h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
  text-align: left;
}

.custom-prompt h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  color: #333;
  opacity: 0.8;
  text-align: left;
}

.custom-prompt a {
  color: #2196f3;
  cursor: pointer;
}

.custom-prompt input {
  width: 100%;
  padding: 10px;
  margin: 16px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  box-sizing: border-box; 
}

.custom-prompt input:focus {
  border: 2px #2196f3 solid;
}


.custom-prompt-buttons {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding-top: 10px;
}

.custom-prompt-buttons button {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

#customPromptOk {
  background-color: #2196f3;
  color: white;
}

#customPromptCancel {
  background-color: #eee;
  color: #333;
}
