.product-card {
  cursor: pointer;
}

.product-card:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.product-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(7, 28, 23, 0.62);
}

.product-modal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  width: min(940px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--paper);
  box-shadow: 0 24px 80px rgba(7, 28, 23, 0.28);
}

.product-modal-close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.product-modal-image {
  display: grid;
  place-items: center;
  min-height: 520px;
  padding: 42px;
  background: #e8eee4;
}

.product-modal-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 500px;
  object-fit: contain;
}

.product-modal-copy {
  padding: 64px 58px 52px;
}

.product-modal-copy h2 {
  margin: 12px 0 10px;
  font-family: Georgia, serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.2;
}

.product-modal-amount {
  margin: 0 0 30px;
  color: #71817b;
  font-size: 12px;
}

.product-modal-description {
  padding-top: 24px;
  border-top: 1px solid #d8ded9;
}

.product-modal-description p {
  color: #4f655b;
  font-size: 14px;
  line-height: 1.75;
}

.product-modal-buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid #d8ded9;
}

.product-modal-buy strong {
  font-size: 20px;
}

.product-modal-buy .button {
  white-space: nowrap;
}

.product-modal-close:focus-visible,
.product-modal-buy button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .product-modal-overlay {
    place-items: start center;
    padding: 10px;
  }

  .product-modal {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .product-modal-image {
    min-height: 300px;
    height: 40vh;
    padding: 25px;
  }

  .product-modal-copy {
    padding: 34px 24px 30px;
  }

  .product-modal-copy h2 {
    font-size: 28px;
  }

  .product-modal-buy {
    align-items: stretch;
    flex-direction: column;
  }

  .product-modal-buy .button {
    width: 100%;
  }
}

/* Rich product card v4 */
.product-card .product-info::after { content: 'Подробнее →'; display: block; margin-top: 16px; color: #557064; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.product-modal { grid-template-columns: minmax(330px, .92fr) minmax(420px, 1.08fr); width: min(1080px, 100%); background: #f8f7f2; }
.product-modal-visual { display: flex; flex-direction: column; justify-content: center; min-height: 680px; padding: 56px 42px 32px; background: #e5ebe1; }
.product-modal-visual > p { margin: 14px 0 0; color: #687970; font-size: 11px; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.product-modal-image { position: relative; min-height: 480px; height: auto; padding: 26px; border: 0; background: rgba(255,255,255,.35); cursor: zoom-in; }
.product-modal-image img { width: 100%; height: 460px; max-height: none; object-fit: contain; transition: transform .18s ease; }
.product-modal-image > span { position: absolute; right: 12px; bottom: 12px; padding: 8px 10px; background: rgba(248,247,242,.92); color: #355247; font-size: 10px; letter-spacing: .04em; }
.product-modal-image.is-zoomed { overflow: auto; cursor: zoom-out; }
.product-modal-image.is-zoomed img { transform: scale(1.45); }
.product-modal-copy { padding: 66px 62px 52px; }
.product-modal-copy h2 { font-size: clamp(32px,3vw,43px); line-height: 1.12; }
.product-modal-intro { margin: 0; color: #2e493f; font-family: Georgia,serif; font-size: 19px; line-height: 1.55; }
.product-modal-details { margin: 16px 0 0; color: #53685f; font-size: 14px; line-height: 1.75; }
.product-modal-section { margin-top: 26px; padding-top: 22px; border-top: 1px solid #d8ded9; }
.product-modal-section h3 { margin: 0 0 12px; color: #173a2e; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.product-modal-section p { margin: 0; color: #4f655b; font-size: 14px; line-height: 1.7; }
.product-modal-section ul { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 0; padding: 0; list-style: none; }
.product-modal-section li { display: flex; gap: 8px; color: #4f655b; font-size: 13px; line-height: 1.45; }
.product-modal-section li span { color: #96783f; }
.product-modal-usage { padding: 20px; border: 0; background: #edf1e9; }
.product-modal-note { margin: 24px 0 0; padding-left: 13px; border-left: 2px solid #b79a60; color: #718078; font-size: 11px; line-height: 1.55; }
.product-modal-buy { align-items: end; }
.product-modal-buy > div { display: grid; gap: 4px; }
.product-modal-buy small { color: #71817b; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.product-modal-buy strong { font-size: 22px; }

@media (max-width: 800px) {
  .product-modal { grid-template-columns: 1fr; max-height: none; overflow: visible; }
  .product-modal-visual { min-height: auto; padding: 40px 24px 22px; }
  .product-modal-image { min-height: 310px; padding: 18px; }
  .product-modal-image img { height: 300px; }
  .product-modal-copy { padding: 38px 26px 32px; }
  .product-modal-copy h2 { padding-right: 26px; font-size: 31px; }
  .product-modal-section ul { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) { .product-modal-image img { transition: none; } }
