.product-card { position: relative; }
.product-open {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  padding: 0;
  cursor: pointer;
}
.product-open::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); }
.product-open:focus-visible { outline: 0; }
.product-open:focus-visible::after { outline: 3px solid var(--magenta); outline-offset: 3px; }
.product-card:hover .product-open { text-decoration: underline; text-underline-offset: 3px; }
.product-card-actions, .product-modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.product-card-actions { position: relative; margin-top: 6px; }
.product-card-actions .btn, .product-modal-actions .btn { min-height: 44px; padding: 9px 15px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.catalog-modal-open { overflow: hidden; }
.catalog-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(calc(100% - 32px), var(--dialog-width));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: clamp(20px, 3vw, 36px);
  padding-top: clamp(56px, 5vw, 66px);
  border: 0;
  border-radius: var(--r-lg);
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow);
  overflow: auto;
  overscroll-behavior: contain;
}
.catalog-modal::backdrop { background: rgb(7 42 99 / 57%); }
.catalog-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--blue);
  background: var(--mist);
  font-size: 25px;
  cursor: pointer;
}
.product-dialog { --dialog-width: 960px; }
.product-modal-grid { display: grid; gap: clamp(20px, 4vw, 40px); grid-template-columns: 1.1fr 1fr; }
.product-modal-info { grid-column: 2; grid-row: 1; min-width: 0; }
.product-modal-photos { grid-column: 1; grid-row: 1; min-width: 0; }
.product-modal-info > small, .product-code { color: var(--grey); }
.product-modal-info h2, .sample-dialog h2 { color: var(--blue); font-size: clamp(26px, 5vw, 39px); line-height: 1.14; }
.product-modal-info h3 { color: var(--blue); font-size: 18px; margin: 16px 0 8px; }
.product-modal-info dl { margin: 0; }
.product-modal-info dl div {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
}
.product-modal-info dd { margin: 0; overflow-wrap: anywhere; }
.product-modal-info p + p { margin-top: 8px; }
.product-modal-actions { margin-top: 18px; }
.product-modal-photos figure { margin: 0 0 16px; }
.product-modal-photos img { max-height: min(420px, 60dvh); width: 100%; object-fit: contain; border-radius: var(--r); background: var(--mist); }
.product-modal-photos figcaption { color: var(--grey); font-size: .875rem; margin-top: 4px; }
.sample-dialog { --dialog-width: 620px; }
.sample-product { color: var(--blue); margin: 8px 0 16px; overflow-wrap: anywhere; }
.sample-dialog .fgrid { margin-bottom: 18px; }
.sample-dialog .fine { color: var(--grey); font-size: .875rem; margin-top: 8px; }
.sample-contact { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 12px; color: var(--blue); }
@media (max-width: 700px) {
  .product-modal-grid { grid-template-columns: minmax(0, 1fr); }
  .product-modal-info, .product-modal-photos { grid-column: auto; grid-row: auto; }
  .catalog-modal { width: min(calc(100% - 20px), var(--dialog-width)); max-height: calc(100dvh - 20px); }
}
