/* ═══════════════════════════════════════════════
   modal.css — Модальное окно карточки товара
════════════════════════════════════════════════ */
/* ── Вариант модалки только с фото (Портфолио) ── */
.product-modal--photo-only .product-modal__box {
    display: block;
    background: transparent;
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: none;
    border-radius: 0;
}

.product-modal--photo-only .product-modal__image {
    min-height: 0;
    background: transparent;
}

.product-modal--photo-only .product-modal__image img {
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}
.product-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.product-modal.is-open {
  display: flex;
}

.product-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(30, 43, 29, 0.72);
  opacity: 0;
  animation: modalFadeIn 0.3s ease forwards;
}

.product-modal__box {
  position: relative;
  z-index: 2;
  background: var(--color-white);
  width: 100%;
  max-width: 960px;
  max-height: 88vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  border-radius: 4px;
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  animation: modalBoxIn 0.35s ease forwards;
}

@keyframes modalFadeIn {
  to { opacity: 1; }
}

@keyframes modalBoxIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.product-modal__image {
  position: relative;
  background: var(--color-dark);
  min-height: 360px;
}

.product-modal__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-modal__content {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
}

.product-modal__title {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 28px;
  color: var(--color-dark);
}

.product-modal__specs {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  border-top: 1px solid var(--color-mid);
}

.product-modal__specs li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-mid);
  font-family: var(--font-body);
  font-size: 14px;
}

.product-modal__specs li > span:first-child {
  color: var(--color-muted);
  flex-shrink: 0;
}

.product-modal__specs-value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.product-modal__specs-value b {
  font-weight: 500;
  color: var(--color-text);
}

.product-modal__specs-value small {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 300;
  color: var(--color-muted);
}

.product-modal__desc {
  margin: 20px 0 32px;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text);
}

.product-modal__cta {
  margin-top: auto;
  display: inline-block;
  text-align: center;
  padding: 16px 32px;
  background: var(--color-dark);
  color: var(--color-white);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.3s ease;
}

.product-modal__cta:hover {
  background: var(--color-accent);
}

.product-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(246, 248, 245, 0.9);
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: var(--color-dark);
  cursor: pointer;
  transition: background 0.3s ease;
}

.product-modal__close:hover {
  background: var(--color-white);
}

/* ── Адаптив ── */
@media (max-width: 768px) {
  .product-modal__box {
    grid-template-columns: 1fr;
    max-height: 92vh;
  }

  .product-modal__image {
    min-height: 240px;
  }

  .product-modal__content {
    padding: 32px 24px;
  }

  .product-modal__title {
    font-size: 22px;
  }
}
.product-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(246, 248, 245, 0.9);
  color: var(--color-dark);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.product-modal__nav:hover {
  background: var(--color-white);
}

.product-modal__nav--prev { left: 24px; }
.product-modal__nav--next { right: 24px; }

.product-modal__nav.is-hidden {
  display: none;
}

@media (max-width: 768px) {
  .product-modal__nav {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .product-modal__nav--prev { left: 8px; }
  .product-modal__nav--next { right: 8px; }
}
