/* Модальное окно карточки товара (produktsiya.html) */
.product-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.product-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.product-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 10, 10, 0.58);
  cursor: pointer;
}

.product-modal__sheet {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 32px));
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 48px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.product-modal__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 40px 40px 36px;
  gap: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.product-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: #333333;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}

.product-modal__close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.05);
}

.product-modal__close:focus-visible {
  outline: 2px solid #6f160c;
  outline-offset: 2px;
}

.product-modal__badge-wrap {
  position: relative;
  margin-bottom: 20px;
}

.product-modal__badge {
  display: inline-block;
  padding: 10px 22px 10px 20px;
  border-radius: 999px;
  background: #5d1f1a;
  color: #ffffff;
  font-family: var(--heading-font-family);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.product-modal__title {
  margin: 0 0 20px;
  font-family: var(--heading-font-family);
  font-size: clamp(22px, 4.2vw, 28px);
  font-weight: 600;
  line-height: 1.2;
  color: #000000;
  letter-spacing: 0.02em;
}

.product-modal__meta {
  margin: 0 0 12px;
  font-family: var(--heading-font-family);
  font-size: 15px;
  line-height: 1.5;
  color: #888888;
}

.product-modal__meta strong {
  color: #555555;
  font-weight: 600;
}

.product-modal__image-wrap {
  margin-top: 24px;
  border-radius: 28px;
  overflow: hidden;
  background: #f4f4f4;
  flex-shrink: 0;
}

.product-modal__image-wrap img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
  object-fit: cover;
}

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

[data-product-id].product-card-hit {
  cursor: pointer;
}

[data-product-id].product-card-hit:focus-visible {
  outline: 2px solid #6f160c;
  outline-offset: 4px;
}

@media (max-width: 600px) {
  .product-modal__dialog {
    padding: 52px 20px 22px;
  }

  .product-modal__close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    font-size: 26px;
  }
}
