/* Всегда показываем кнопку под карточкой */
.ddk-preorder-wrap { margin-top: 12px; }
.ddk-preorder-wrap .btn { width: 100%; max-width: 280px; }

/* ===== Модалка ===== */
.ddk-modal[aria-hidden="true"] { display: none; }
.ddk-modal { position: fixed; inset: 0; z-index: 99999; }
.ddk-modal__overlay{
  position: absolute; inset: 0;
  background: rgba(0,0,0,.45);
  -webkit-backdrop-filter: saturate(120%) blur(2px);
          backdrop-filter: saturate(120%) blur(2px);
}
.ddk-modal__dialog{
  position: relative;
  max-width: 640px;
  margin: 5dvh auto;
  padding: 24px 22px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  font-family: inherit;
  color: #1f2328;
}

/* Кнопка закрытия – справа */
.ddk-modal__close{
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  left: auto !important;
  z-index: 2;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 0;
  background: #f2f3f5;
  cursor: pointer;
  font-size: 20px; line-height: 34px;
  color: #333;
  box-shadow: 0 1px 0 rgba(0,0,0,.04) inset;
  transform: none !important;
}

.ddk-modal__title{ margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.ddk-modal__subtitle{ margin: 0 0 14px; color: #666; font-size: 15px; }

.ddk-modal__actions{
  display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 14px;
}

.ddk-chip{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 12px; text-decoration: none;
  background: #f6f7f9; color: #111; border: 1px solid #e6e8eb; font-weight: 600;
}
.ddk-chip:hover{ background: #eef0f3; }
.ddk-chip--primary{ background: #111; color: #fff; border-color: #111; }
.ddk-chip--primary:hover{ filter: brightness(1.05); }
.ddk-ico{ display: inline-flex; width: 18px; height: 18px; }

.ddk-modal__divider{
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: #8a8f98; margin: 12px 0;
}
.ddk-modal__divider::before, .ddk-modal__divider::after{
  content: ""; flex: 1; height: 1px; background: #eceef1;
}

/* Форма */
.ddk-form{ margin-top: 6px; }
.ddk-field{ display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.ddk-field span{ font-size: 13px; color: #444; }
.ddk-form input, .ddk-form textarea{
  width: 100%; border: 1px solid #e1e5ea; border-radius: 12px; padding: 11px 12px;
  outline: 0; transition: border-color .15s ease, box-shadow .15s ease;
  font-size: 14px;
}
.ddk-form input:focus, .ddk-form textarea:focus{
  border-color: #c4d2ff; box-shadow: 0 0 0 3px rgba(43,114,255,.15);
}
.ddk-submit{ margin-top: 10px; }
.ddk-form__note{ margin-top: 8px; font-size: 12px; color: #8a8f98; }

/* Блокируем прокрутку фона при открытой модалке */
.ddk-modal-open{ overflow: hidden; }

/* Woodmart: чтобы кнопка не пряталась в hover-зоне */
.wd-hover-icons .ddk-preorder-wrap{ margin-top: 12px; }

/* ===== Адаптив ===== */
@media (max-width: 640px){
  .ddk-modal__dialog{
    width: 92vw;
    margin: 4vh auto;
    padding: 18px 14px;
    border-radius: 18px;
  }
  .ddk-modal__title{ font-size: 18px; }
  .ddk-modal__subtitle{ font-size: 14px; }
  .ddk-chip{ width: 100%; justify-content: center; }
  .ddk-preorder-wrap .btn{ max-width: 100%; }
  .ddk-modal__close{ top: 6px !important; right: 6px !important; }
}
