/* Категории теперь ссылки, а не кнопки */

.catalog-category[aria-current="page"] {
  background: #edf2ff;
  color: var(--blue-dark);
}

.catalog-category[aria-current="page"] .category-count {
  background: #fff;
}

.catalog-shortcut[aria-current="page"] {
  border-color: var(--blue);
}

.catalog-category,
.catalog-shortcut {
  text-decoration: none;
}

.catalog-heading h1 {
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.catalog-heading > p {
  flex: 0 1 410px;
}

.catalog-results {
  padding-top: 28px;
}

/* Подробности доступны даже без JavaScript */

.product-inline-details {
  margin: 0 0 20px;
  font-size: 13px;
}

.product-inline-details > summary {
  color: var(--blue-dark);
  font-weight: 600;
  line-height: 1.5;
  text-underline-offset: 3px;
}

.product-inline-details > summary:hover {
  text-decoration: underline;
}

.product-inline-copy {
  margin-top: 14px;
  color: #616978;
  line-height: 1.7;
}

.product-inline-copy h3 {
  margin-top: 18px;
  font-size: 15px;
}

.product-inline-copy ul {
  padding-left: 20px;
}

.catalog-dialogs-ready .product-card {
  cursor: pointer;
}

.product-card a,
.product-card summary {
  cursor: pointer;
}

/* Popup описания */

.product-modal {
  width: min(800px, calc(100% - 32px));
}

.product-modal-content {
  padding: 36px;
}

.product-modal .request-modal-close {
  z-index: 2;
}

.request-modal-close {
  font-size: 28px;
  line-height: 1;
}

.product-modal #product-modal-art .product-art {
  height: 220px;
  margin-bottom: 24px;
}

.product-modal #product-modal-title {
  margin: 0 0 18px;
  padding-right: 28px;
  font-size: clamp(25px, 3.5vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.7px;
  overflow-wrap: anywhere;
}

.product-modal #product-modal-description {
  color: #626b7d;
  font-size: 18px;
  line-height: 1.7;
}

.product-modal-details {
  color: #596171;
  font-size: 16px;
  line-height: 1.8;
}

.product-modal-details h3 {
  margin: 26px 0 14px;
  color: var(--ink);
  font-size: 21px;
  letter-spacing: -0.3px;
}

.product-modal-details ul {
  padding-left: 22px;
}

.product-modal-details li {
  margin-bottom: 8px;
}

.product-detail-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.product-modal-bottom {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.product-modal-bottom .product-price {
  font-size: 30px;
}

.product-modal-bottom .product-price-note {
  min-height: 0;
  font-size: 13px;
}

.product-modal-bottom .button {
  width: 100%;
}

@media (max-width: 850px) {
  .catalog-heading > p {
    flex: auto;
  }
}

@media (max-width: 540px) {
  .product-modal {
    width: calc(100% - 24px);
  }

  .product-modal-content {
    padding: 28px 22px;
  }

  .product-modal #product-modal-art .product-art {
    height: 180px;
  }

  .product-modal #product-modal-description {
    font-size: 16px;
  }

  .product-modal-details {
    font-size: 15px;
  }
}

/* Выравнивание нижней части карточек в одном ряду */
.catalog-page .product-card > .product-inline-details {
  margin-top: auto;
  margin-bottom: 20px;
}

/* Свободное место теперь располагается перед «Подробнее»,
   а не между ним и ценой */
.catalog-page .product-card > .product-bottom {
  margin-top: 0;
}