body {
  background: #f8f8f8;
}

.page-3d {
  padding: 54px 0 64px;
}
.page-3d__container {
  display: flex;
  flex-direction: column;
  gap: 34px;
}
.page-3d__title {
  margin: 0;
  font-family: var(--TildaSans);
  font-weight: 600;
  font-size: 40px;
  line-height: 1.12;
  color: #1a1a1a;
}
.page-3d__title-short {
  display: none;
}
.page-3d__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 24px;
}

.door3d-card {
  display: flex;
  flex-direction: column;
  width: calc((100% - 48px) / 3);
  max-width: 424px;
  background: #fff;
  border: 1px solid #e7e9ec;
  border-radius: 10px;
  overflow: hidden;
}
.door3d-card__preview {
  position: relative;
  flex: 0 0 300px;
  height: 300px;
  background: #f1f3f7;
  overflow: hidden;
}
.door3d-card__preview::before {
  content: "";
  position: absolute;
  left: 42px;
  top: -60px;
  z-index: 0;
  width: 340px;
  height: 210px;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0) 72%);
}
.door3d-card__canvas-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.door3d-card__canvas-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.door3d-card__photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  padding: 30px 42px 38px;
  box-sizing: border-box;
}
.door3d-card__scene {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.door3d-card__door {
  position: absolute;
  left: 50%;
  top: 30px;
  transform: translateX(-50%);
  filter: drop-shadow(0 14px 11px rgba(8, 13, 23, 0.35));
}
.door3d-card__door--single {
  width: 109px;
  height: 232px;
}
.door3d-card__door--double {
  width: 190px;
  height: 232px;
}
.door3d-card__door--half {
  width: 160px;
  height: 232px;
}
.door3d-card__frame {
  position: absolute;
  inset: 0;
  background: #23282f;
  border-radius: 5px;
}
.door3d-card__leaf {
  position: absolute;
  background: #c9ccd1;
  border-radius: 3px;
  overflow: hidden;
}
.door3d-card__door--single .door3d-card__leaf {
  left: 8px;
  top: 8px;
  width: 93px;
  height: 216px;
}
.door3d-card__door--double .door3d-card__leaf--left {
  left: 14px;
  top: 14px;
  width: 80px;
  height: 204px;
}
.door3d-card__door--double .door3d-card__leaf--right {
  left: 96px;
  top: 14px;
  width: 80px;
  height: 204px;
}
.door3d-card__door--half .door3d-card__leaf--left {
  left: 12px;
  top: 12px;
  width: 88px;
  height: 208px;
}
.door3d-card__door--half .door3d-card__leaf--right {
  left: 104px;
  top: 12px;
  width: 44px;
  height: 208px;
}
.door3d-card__shine {
  position: absolute;
  left: 6px;
  top: 0;
  width: 13px;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
}
.door3d-card__handle {
  position: absolute;
  top: 44%;
  width: 5px;
  height: 30px;
  border-radius: 2.5px;
  background: #c7ccd3;
}
.door3d-card__leaf:not(.door3d-card__leaf--right) .door3d-card__handle {
  right: 8px;
}
.door3d-card__leaf--right .door3d-card__handle {
  left: 8px;
}
.door3d-card__shadow {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 1;
  width: 184px;
  height: 26px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(8, 13, 23, 0.22) 0%, rgba(8, 13, 23, 0) 70%);
  pointer-events: none;
}
.door3d-card__badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px 5px 8px;
  border-radius: 7px;
  background: rgba(16, 20, 27, 0.55);
  color: #fff;
  font-family: var(--TildaSans);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}
.door3d-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  padding: 18px 20px;
}
.door3d-card__info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.door3d-card__head {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.door3d-card__category {
  margin: 0;
  font-family: var(--TildaSans);
  font-size: 12px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 0.72px;
  color: var(--primary);
}
.door3d-card__name {
  margin: 0;
  font-family: var(--TildaSans);
  font-size: 18px;
  font-weight: 600;
  line-height: normal;
  color: #1a1a1a;
}
.door3d-card__meta {
  margin: 0;
  font-family: var(--TildaSans);
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  color: #8a929b;
}
.door3d-card__sizes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.door3d-card__sizes-label {
  margin: 0;
  font-family: var(--TildaSans);
  font-size: 14px;
  font-weight: 500;
  line-height: normal;
  color: #232324;
}
.door3d-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.door3d-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 13px 16px;
  border: none;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  font-family: var(--TildaSans);
  font-size: 15px;
  font-weight: 500;
  line-height: normal;
  cursor: pointer;
  transition: filter 0.2s ease;
}
.door3d-card__btn img {
  display: block;
  width: 16px;
  height: 16px;
}
.door3d-card__btn:hover {
  filter: brightness(1.05);
}

.door3d-chip {
  position: relative;
  cursor: pointer;
}
.door3d-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.door3d-chip__text {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border-radius: 9px;
  background: #f4f4f4;
  border: 1px solid transparent;
  font-family: var(--TildaSans);
  font-size: 16px;
  line-height: 1.2;
  color: #000;
  white-space: nowrap;
  user-select: none;
}
input:checked + .door3d-chip__text {
  background: var(--primary);
  border-color: var(--primary);
  color: #f8f8f8;
  font-weight: 500;
  font-size: 15px;
}

.door3d-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.door3d-modal[hidden] {
  display: none;
}
.door3d-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 18, 24, 0.72);
  cursor: pointer;
}
.door3d-modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 40px;
  width: 100%;
  max-width: 1080px;
  max-height: calc(100vh - 48px);
  padding: 30px;
  background: #f8f8f8;
  border-radius: 20px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}
.door3d-modal__grabber {
  display: none;
}
.door3d-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #e1e4e9;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 8px -2px rgba(15, 23, 36, 0.14);
  cursor: pointer;
}
.door3d-modal__viewer {
  position: relative;
  flex: 0 0 490px;
  width: 490px;
  height: 700px;
  max-height: calc(100vh - 108px);
  background: #eaeef4;
  border-radius: 14px;
  overflow: hidden;
}
.door3d-modal__viewer-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  font-family: var(--TildaSans);
  font-size: 12px;
  font-weight: 500;
  color: #6b7480;
}
.door3d-modal__viewer-badge img {
  display: block;
  width: 14px;
  height: 14px;
}
.door3d-modal__stage {
  position: absolute;
  inset: 0;
  cursor: grab;
  user-select: none;
}
.door3d-modal__stage:active {
  cursor: grabbing;
}
.door3d-modal__canvas-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.door3d-modal__canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.door3d-modal__model-status {
  position: absolute;
  left: 50%;
  bottom: 88px;
  z-index: 3;
  transform: translateX(-50%);
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #6b7480;
  font-family: var(--TildaSans);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.door3d-modal__model {
  position: absolute;
  left: 50%;
  top: 105px;
  width: 200px;
  height: 470px;
  transform: translateX(-50%) perspective(900px) rotateY(0deg);
  transform-style: preserve-3d;
  filter: drop-shadow(6px 22px 14px rgba(8, 13, 23, 0.4));
  transition: transform 0.05s linear;
}
.door3d-modal__model-frame {
  position: absolute;
  inset: 0;
  background: #23282f;
  border-radius: 6px;
}
.door3d-modal__model-leaf {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 172px;
  height: 442px;
  background: #808080;
  border-radius: 4px;
  overflow: hidden;
}
.door3d-modal__model-shine {
  position: absolute;
  left: 10px;
  top: 0;
  width: 22px;
  height: 100%;
  background: rgba(255, 255, 255, 0.12);
}
.door3d-modal__model-handle {
  position: absolute;
  top: 48%;
  right: 14px;
  width: 8px;
  height: 42px;
  border-radius: 3px;
  background: #b8bcc2;
}
.door3d-modal__floor {
  position: absolute;
  left: 50%;
  bottom: 62px;
  width: 280px;
  height: 58px;
  transform: translateX(-50%);
  border: 1.5px dashed rgba(0, 113, 216, 0.35);
  border-radius: 50%;
  box-sizing: border-box;
}
.door3d-modal__reset {
  position: absolute;
  right: 20px;
  bottom: 24px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  box-shadow: 0 3px 8px -2px rgba(15, 23, 36, 0.14);
  cursor: pointer;
}
.door3d-modal__reset img {
  display: block;
  width: 20px;
  height: 20px;
}
.door3d-modal__hint {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #6b7480;
  font-family: var(--TildaSans);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.door3d-modal__panel {
  flex: 1 1 490px;
  min-width: 0;
  height: 700px;
  max-height: calc(100vh - 108px);
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 6px;
}
.door3d-modal__panel-inner {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding-bottom: 8px;
  min-height: 100%;
}
.door3d-modal__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.door3d-modal__category {
  margin: 0;
  font-family: var(--TildaSans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.65px;
  color: var(--primary);
}
.door3d-modal__title {
  margin: 0;
  font-family: var(--TildaSans);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.18;
  color: #1a1a1a;
}
.door3d-modal__description {
  margin: 0;
  font-family: var(--TildaSans);
  font-size: 14px;
  color: #8a929b;
}
.door3d-modal__config--hidden {
  display: none !important;
}
.door3d-modal__group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.door3d-modal__label {
  margin: 0;
  font-family: var(--TildaSans);
  font-size: 18px;
  font-weight: 500;
  color: #232324;
}
.door3d-modal__buy {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 30px;
  border-radius: 10px;
  background: #f4f4f4;
}
.door3d-modal__buy-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.door3d-modal__buy-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.door3d-modal__price-label {
  margin: 0 0 5px;
  font-family: var(--TildaSans);
  font-size: 16px;
  color: #232324;
}
.door3d-modal__price {
  margin: 0;
  font-family: var(--TildaSans);
  font-size: 32px;
  font-weight: 600;
  color: #1a1a1a;
}
.door3d-modal__stock {
  margin: 0;
  font-family: var(--TildaSans);
  font-size: 16px;
  font-weight: 500;
  color: #8ec67a;
}
.door3d-modal__qty-label {
  margin: 0 0 5px;
  font-family: var(--TildaSans);
  font-size: 16px;
  color: #232324;
}
.door3d-modal__cart, .door3d-modal__quick {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 11px 25px;
  border-radius: 9px;
  font-family: var(--TildaSans);
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}
.door3d-modal__cart {
  border: none;
  background: var(--primary);
  color: #f8f8f8;
}
.door3d-modal__cart--disabled {
  opacity: 0.55;
  pointer-events: none;
}
.door3d-modal__quick {
  border: 1px solid #f0f5ff;
  background: #fcfcfc;
  color: var(--primary);
}

.door3d-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.door3d-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 2px 2px 4px;
  overflow: visible;
}

.door3d-color {
  position: relative;
  cursor: pointer;
  flex: 0 0 auto;
}
.door3d-color input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.door3d-color__swatch {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  border: 1.5px solid #cacccf;
  box-sizing: border-box;
}
.door3d-color--rainbow .door3d-color__swatch {
  background-image: linear-gradient(90deg, #ff3030 0%, #e8ff45 33%, #59f7ff 60%, #e84aff 100%);
}
input:checked + .door3d-color__swatch {
  border-color: var(--primary);
  border-width: 2px;
  box-shadow: none;
}
.door3d-color--blocked {
  opacity: 0.35;
  pointer-events: none;
}

.door3d-chip--blocked {
  opacity: 0.35;
  pointer-events: none;
}

.door3d-glazing {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.door3d-glazing__item {
  position: relative;
  cursor: pointer;
}
.door3d-glazing__item input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.door3d-glazing__thumb {
  display: block;
  width: 55px;
  height: 55px;
  border-radius: 6px;
  border: 1.5px solid transparent;
  overflow: hidden;
  box-sizing: border-box;
}
.door3d-glazing__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.door3d-glazing__item input:checked + .door3d-glazing__thumb {
  border-color: var(--primary);
}

.door3d-services {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.door3d-service {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.door3d-service input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.door3d-service__box {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  border: 1px solid #abb5be;
  border-radius: 2px;
  background: #fff;
  box-sizing: border-box;
}
input:checked + .door3d-service__box {
  border-color: var(--primary);
  background: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 6.2L4.8 8.5L9.5 3.5' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.door3d-service__text {
  font-family: var(--MontSerrat, Montserrat, sans-serif);
  font-size: 16px;
  color: #343a40;
}

.door3d-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 150px;
  height: 50px;
  padding: 8px;
  border: 1px solid #e6e6e6;
  border-radius: 170px;
  background: #fff;
  box-sizing: border-box;
}
.door3d-qty__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 170px;
  background: #f7f5f9;
  cursor: pointer;
}
.door3d-qty__value {
  font-family: var(--TildaSans);
  font-size: 16px;
  color: #1a1a1a;
}

body.door3d-modal-open {
  overflow: hidden;
}

@media (max-width: 1199px) {
  .door3d-card {
    width: calc((100% - 24px) / 2);
    max-width: none;
  }
  .door3d-modal__dialog {
    gap: 24px;
    padding: 20px;
  }
  .door3d-modal__viewer {
    flex-basis: 420px;
    width: 420px;
  }
}
@media (max-width: 767px) {
  .page-3d {
    padding: 20px 0 24px;
  }
  .page-3d__container {
    gap: 14px;
  }
  .page-3d__title {
    font-size: 28px;
    padding-top: 6px;
    padding-bottom: 4px;
  }
  .page-3d__title-full {
    display: none;
  }
  .page-3d__title-short {
    display: inline;
  }
  .page-3d__grid {
    flex-direction: column;
    gap: 14px;
  }
  .door3d-card {
    width: 100%;
    max-width: none;
    min-height: 0;
  }
  .door3d-card__preview {
    flex: 0 0 222px;
    height: 222px;
  }
  .door3d-card__preview::before {
    left: 29px;
    top: -52px;
    width: 300px;
    height: 180px;
  }
  .door3d-card__photo {
    padding: 23px 29px 30px;
  }
  .door3d-card__door {
    top: 23px;
  }
  .door3d-card__door--single {
    width: 80px;
    height: 170px;
  }
  .door3d-card__door--double {
    width: 140px;
    height: 170px;
  }
  .door3d-card__door--half {
    width: 118px;
    height: 170px;
  }
  .door3d-card__door--single .door3d-card__leaf {
    left: 6px;
    top: 6px;
    width: 68px;
    height: 158px;
  }
  .door3d-card__door--double .door3d-card__leaf--left {
    left: 10px;
    top: 10px;
    width: 58px;
    height: 150px;
  }
  .door3d-card__door--double .door3d-card__leaf--right {
    left: 72px;
    top: 10px;
    width: 58px;
    height: 150px;
  }
  .door3d-card__door--half .door3d-card__leaf--left {
    left: 8px;
    top: 8px;
    width: 64px;
    height: 154px;
  }
  .door3d-card__door--half .door3d-card__leaf--right {
    left: 76px;
    top: 8px;
    width: 34px;
    height: 154px;
  }
  .door3d-card__handle {
    height: 22px;
    width: 3px;
  }
  .door3d-card__shadow {
    bottom: 6px;
    width: 150px;
    height: 22px;
  }
  .door3d-card__badge {
    top: 12px;
    right: 12px;
  }
  .door3d-card__body {
    flex: 0 0 auto;
    gap: 12px;
    justify-content: flex-start;
    padding: 14px 16px 16px;
  }
  .door3d-card__head {
    gap: 4px;
  }
  .door3d-card__category {
    font-size: 11px;
    letter-spacing: 0.66px;
  }
  .door3d-card__name {
    font-size: 17px;
  }
  .door3d-card__meta {
    font-size: 13px;
  }
  .door3d-modal {
    align-items: flex-end;
    padding: 0;
  }
  .door3d-modal__overlay {
    background: rgba(14, 18, 24, 0.55);
  }
  .door3d-modal__dialog {
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: none;
    max-height: calc(100vh - 72px);
    height: calc(100vh - 72px);
    padding: 0;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    box-shadow: none;
  }
  .door3d-modal__grabber {
    display: block;
    position: absolute;
    top: 9px;
    left: 50%;
    z-index: 4;
    width: 40px;
    height: 5px;
    transform: translateX(-50%);
    border-radius: 3px;
    background: #cdd3db;
  }
  .door3d-modal__viewer {
    flex: 0 0 318px;
    width: 100%;
    height: 318px;
    max-height: none;
    border-radius: 0;
  }
  .door3d-modal__close {
    top: 24px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }
  .door3d-modal__model {
    top: 44px;
    width: 116px;
    height: 236px;
  }
  .door3d-modal__model-leaf {
    left: 8px;
    top: 8px;
    width: 100px;
    height: 220px;
  }
  .door3d-modal__floor {
    bottom: 40px;
    width: 196px;
    height: 44px;
  }
  .door3d-modal__reset {
    right: 14px;
    bottom: 14px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
  .door3d-modal__reset img {
    width: 18px;
    height: 18px;
  }
  .door3d-modal__hint {
    bottom: 14px;
    gap: 6px;
    padding: 6px 13px 6px 11px;
    font-size: 11px;
  }
  .door3d-modal__panel {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    max-height: none;
    min-height: 0;
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .door3d-modal__panel-inner {
    gap: 24px;
    padding: 16px 16px 28px;
  }
  .door3d-modal__title {
    font-size: 22px;
  }
  .door3d-modal__buy {
    gap: 18px;
    padding: 22px 20px;
  }
  .door3d-modal__price-label, .door3d-modal__qty-label, .door3d-modal__stock {
    font-size: 15px;
  }
  .door3d-modal__price {
    font-size: 30px;
  }
}
