/* Форма Двери - Изолированные стили */
/* CSS загружен - тест */
.doors-form-container {
  max-width: 650px;
  margin: 30px auto;
  padding: 20px;
  background: #f8f8f8;
  border-radius: 4px;
}

/* Инструкция */
.doors-form-container .doors-instruction {
  text-align: center;
  margin-bottom: 30px;
  font-size: 18px;
  line-height: 1.6;
  color: #333;
  padding: 20px;
  background: #fff;
  border-radius: 4px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.doors-form-container .doors-instruction span {
  color: #e74c3c;
  font-weight: bold;
  font-size: 20px;
}

/* Контейнер дверей */
.doors-form-container .doors-wrapper {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: nowrap;
}

/* Контейнер для двери и скидки */
.doors-form-container .door-container {
  perspective: 1000px;
  -webkit-perspective: 1000px;
  position: relative;
  flex: 1;
  max-width: 160px;
  /* aspect ratio matching the door */
  aspect-ratio: 160 / 345;
}

/* Дверь с фоном */
.doors-form-container .door {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transform-origin: left center;
  -webkit-transform-origin: left center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #e5e5e5;
  z-index: 3;
  border-radius: 2px;
}

.doors-form-container .door-1 {
  background-image: url('../images/door-1.webp');
  background-color: #ffd029;
  background-blend-mode: multiply;
}

.doors-form-container .door-2 {
  background-image: url('../images/door-2.webp');
  background-color: #0d4080;
  background-blend-mode: multiply;
}

.doors-form-container .door-3 {
  background-image: url('../images/door-3.webp');
  background-color: #637831;
  background-blend-mode: multiply;
}

/* Состояние открытой двери */
.doors-form-container .door.opened {
  transform: rotateY(-90deg) !important;
  -webkit-transform: rotateY(-90deg) !important;
  transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1) !important;
  -webkit-transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1) !important;
}

/* Альтернативная анимация для тестирования */
.doors-form-container .door.test-animation {
  transform: rotateY(-90deg) !important;
  -webkit-transform: rotateY(-90deg) !important;
  transition: transform 1s ease-in-out !important;
  -webkit-transition: transform 1s ease-in-out !important;
}

/* Удаляем .door-img если есть */
.doors-form-container .door-img {
  display: none !important;
}

/* Ручка двери */
.doors-form-container .door-handle {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 40px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}

/* Контейнер скидки — позаду дверей */
.doors-form-container .door-discount-container {
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 8px;
  z-index: 1;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Скидка под дверью */
.doors-form-container .door-discount {
  font-size: 220%;
  font-weight: bold;
  color: #e74c3c;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Форма заказа */
.doors-form-container .doors-order-section {
  display: none;
  padding: 10px;

}

.doors-form-container .doors-order-section.show {
  display: block;
  animation: fadeInUp 0.5s ease-out;
}

/* Заголовок формы */
.doors-form-container .form-header {
  text-align: center;
  margin-bottom: 25px;
}

.doors-form-container .green-text {
  color: #27ae60;
  font-size: 18px;
  font-weight: bold;
  margin: 10px 0;
}

/* Секция продукта */
.doors-form-container .product-section {
  text-align: center;
  margin-bottom: 30px;
}

.doors-form-container .product {
  position: relative;
  display: inline-block;
}

.doors-form-container .prod_img {
  max-width: 200px;
  height: auto;
  border-radius: 10px;
}

/* Стили цен */
.doors-form-container .product .priceс {
  position: absolute;
  background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
  padding: 10px;
  border-radius: 15px;
  transform: rotate(-10deg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  width: 220px;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  bottom: 0px;
  right: 10px;
  -webkit-transform: rotate(-10deg);
  -moz-transform: rotate(-10deg);
  -ms-transform: rotate(-10deg);
  -o-transform: rotate(-10deg);
}

.doors-form-container .product .discountс {
  color: #000;
  font-weight: bold;
  font-size: 18px;
  margin: 0 0 5px 0;
  display: block;
}

.doors-form-container .product .price_old {
  color: #666;
  text-decoration: line-through;
  font-size: 16px;
  margin: 5px 0;
}

.doors-form-container .product .price_main {
  color: #000;
  font-size: 28px;
  font-weight: bold;
  margin: 5px 0 0 0;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

/* Тело формы */
.doors-form-container .form-body {
  margin-top: 20px;
}

.doors-form-container .deadline-text {
  text-align: center;
  margin-bottom: 25px;
  font-size: 16px;
  line-height: 1.5;
}

.doors-form-container .timer {
  display: inline-block;
  font-size: 24px;
  font-weight: bold;
  color: #e74c3c;
  margin: 10px 0;
}

.doors-form-container .time-remains {
  background: #e74c3c;
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  margin: 0 2px;
}

/* Поля ввода */
.doors-form-container .form-inputs {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.doors-form-container .form-inputs input {
  padding: 15px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.doors-form-container .form-inputs input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* Кнопка отправки */
.doors-form-container .submit-button {
  width: 100%;
  padding: 15px;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
  text-transform: uppercase;
}

.doors-form-container .submit-button:hover {
  background: #c0392b;
}

/* Сноска */
.doors-form-container .footnote {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin-top: 15px;
  font-style: italic;
}

/* Попап окно */
.doors-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.doors-popup-overlay.show {
  display: flex;
  animation: fadeIn 0.3s ease-out;
}

.doors-popup-window {
  background: white;
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.doors-close-popup {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  transition: color 0.3s ease;
}

.doors-close-popup:hover {
  color: #333;
}

.doors-popup-heading {
  font-size: 24px;
  font-weight: bold;
  color: #27ae60;
  margin-bottom: 15px;
}

.doors-popup-text {
  font-size: 20px;
  color: #333;
  line-height: 28px;
}

.doors-popup-button {
  display: inline-block;
  padding: 12px 30px;
  background: #27ae60;
  color: white !important;
  ;
  text-decoration: none !important;
  border-radius: 6px;
  font-weight: bold;
  transition: background 0.3s ease;
}

.doors-popup-button:hover {
  background: #229954;
}

/* Анимации */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}



@media (max-width: 768px) {
  .doors-form-container {
    padding: 10px;
  }

  .doors-form-container .doors-wrapper {
    gap: 8px;
  }

  .doors-form-container .door-discount-container {
    width: 100%;
    height: 100%;
  }

  .doors-form-container .doors-instruction {
    font-size: 16px;
    padding: 15px;
  }

  .doors-form-container .doors-order-section {
    padding: 20px;
  }

  .doors-form-container .green-text {
    font-size: 16px;
  }



  .doors-form-container .product .priceс {
    width: 180px;
    padding: 8px;
  }

  .doors-form-container .price_main {
    font-size: 24px;
  }

  .doors-form-container .form-inputs input {
    padding: 12px;
  }

  .doors-form-container .submit-button {
    padding: 12px;
    font-size: 16px;
  }

  .doors-popup-window {
    padding: 30px 20px;
  }



}

@media (max-width: 480px) {

  .doors-form-container {
    padding: 5px;
  }

  .doors-form-container .doors-wrapper {
    gap: 4px;
  }

  .doors-form-container .door-discount-container {
    width: 100%;
    height: 100%;
  }

  .doors-form-container .door-discount {
    font-size: 16px;
  }

  .doors-form-container .doors-instruction {
    font-size: 14px;
    padding: 10px;
  }

  .doors-form-container .doors-order-section {
    padding: 15px;
  }

  .doors-form-container .green-text {
    font-size: 15px;
  }



  .doors-form-container .timer {
    font-size: 20px;
  }

  .doors-form-container .form-inputs input {
    padding: 10px;
    font-size: 14px;
  }

  .doors-form-container .submit-button {
    padding: 10px;
    font-size: 14px;
  }

  .doors-popup-window {
    padding: 25px 15px;
  }


  .doors-popup-text {
    font-size: 18px;
  }
}