/* Catalog cards v5 — clean white photography, compact specifications and an
   icon-only purchase action. Loaded after the shared catalog styles. */
.catalog-page .product-grid {
  gap: 22px;
  align-items: stretch;
}

/* The static markup remains as an offline fallback, but is never shown while
   the current catalogue is being fetched and rendered. */
.catalog-page--loading .catalog-main {
  position: relative;
}
.catalog-page--loading .product-grid,
.catalog-page--loading .catalog-empty {
  display: none;
}
.catalog-page--loading .catalog-main::after {
  content: 'Загружаем каталог';
  display: grid;
  min-height: 360px;
  place-items: center;
  color: #777;
  font-size: 14px;
}

/* Filtered products stay first; the rest of the assortment remains visible
   below a quiet brand-colour divider. */
.catalog-page .catalog-filter-divider {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 34px auto minmax(80px, 1fr);
  align-items: center;
  gap: 12px;
  margin: 10px 0 0;
  color: #676767;
}

.catalog-page .catalog-filter-divider::before {
  content: "";
  width: 34px;
  height: 2px;
  border-radius: 999px;
  background: rgba(242, 100, 34, 0.72);
}

.catalog-page .catalog-filter-divider::after {
  content: "";
  grid-column: 3;
  grid-row: 1;
  height: 2px;
  border-radius: 999px;
  background: rgba(242, 100, 34, 0.72);
}

.catalog-page .catalog-filter-divider__title {
  grid-column: 2;
  grid-row: 1;
  color: #222;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.catalog-page .catalog-filter-divider__note {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.catalog-page .product-card {
  display: flex;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(242, 100, 34, 0.2);
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(24, 24, 24, 0.055);
  transition: border-color 200ms ease;
}

.catalog-page .product-card:hover {
  transform: none;
  border-color: #f26422;
  box-shadow: 0 10px 30px rgba(24, 24, 24, 0.055);
}

.catalog-page .product-card__photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #fff;
  border: 0;
  border-radius: 0;
}

.catalog-page .product-card__photo-link:focus-visible,
.catalog-page .product-card__name a:focus-visible,
.catalog-page .product-card__btn:focus-visible,
.catalog-page .length-chip:focus-visible {
  outline: 3px solid rgba(242, 100, 34, 0.38);
  outline-offset: -3px;
}

.catalog-page .product-card__photo img {
  width: 100%;
  height: 100%;
  padding: 0;
  object-fit: contain;
  transform: scale(1.08);
  transition: transform 220ms ease;
}

.catalog-page .product-card:hover .product-card__photo img {
  transform: scale(1.08);
}

.catalog-page .product-card__tag {
  top: 14px;
  left: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(23, 23, 23, 0.12);
}

.catalog-page .product-card__body {
  min-width: 0;
  padding: 20px;
}

.catalog-page .product-card__cat {
  margin: 0 0 8px;
  color: #df5315;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.075em;
}

.catalog-page .product-card__name {
  min-height: 2.45em;
  margin: 0 0 17px;
  color: var(--gw-text);
  font-size: 19px;
  font-weight: 780;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.catalog-page .product-card__name a {
  color: inherit;
  text-decoration: none;
}

.catalog-page .product-card__name a:hover { color: #d94f11; }

/* Specifications read as light chips, never as a lined table. */
.catalog-page .product-card__attrs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.catalog-page .product-card__attrs li,
.catalog-page .product-card__attrs li:nth-child(odd),
.catalog-page .product-card__attrs li:nth-child(-n + 2) {
  display: flex;
  min-width: 0;
  min-height: 62px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  padding: 11px 12px;
  background: #fff;
  border: 1px solid #e7e8ea;
  border-radius: 12px;
}

.catalog-page .product-card__attrs span {
  max-width: 100%;
  overflow: hidden;
  color: #777a7f;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-page .product-card__attrs strong {
  color: #1d1d1f;
  font-size: 14px;
  font-weight: 820;
  line-height: 1.15;
}

.catalog-page .product-card__lengths {
  gap: 6px;
  margin: 0 0 10px;
}

.catalog-page .length-chip {
  min-width: 40px;
  min-height: 38px;
  justify-content: center;
  padding: 0 11px;
  color: #4d5054;
  background: #f6f6f6;
  border: 0;
  border-radius: 10px;
  font-size: 11px;
}

.catalog-page .length-chip:hover {
  color: #d94f11;
  background: #fff1e9;
}

.catalog-page .length-chip.is-active {
  color: #fff;
  background: var(--gw-orange);
}

.catalog-page .product-card__article {
  margin: 0 0 15px;
  color: #85888d;
  font-size: 10px;
  line-height: 1.4;
}

.catalog-page .product-card__article-code {
  color: #55595e;
  overflow-wrap: anywhere;
}

.catalog-page .product-card__buy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: auto;
  padding-top: 0;
  border: 0;
}

.catalog-page .product-card__price {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.catalog-page .product-card__price span {
  color: #777b80;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.catalog-page .product-card__price strong {
  color: #1d1d1f;
  font-size: 24px;
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1;
}

.catalog-page .product-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  padding: 0 14px;
  color: #fff;
  background: var(--gw-orange);
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.catalog-page .product-card__btn::after {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10h12M11 5l5 5-5 5'/%3E%3C/svg%3E");
  transition: transform 160ms ease;
}

.catalog-page .product-card__btn:hover {
  background: #d94f11;
}

.catalog-page .product-card__btn:hover::after {
  transform: translateX(2px);
}

.catalog-page .product-card__btn:active {
  transform: scale(0.98);
}

@media (max-width: 860px) {
  .catalog-page .product-grid { gap: 14px; }

  .catalog-page .product-card {
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(24, 24, 24, 0.05);
  }

  .catalog-page .product-card:hover {
    transform: none;
    box-shadow: 0 8px 24px rgba(24, 24, 24, 0.05);
  }

  .catalog-page .product-card__photo {
    aspect-ratio: 1.22 / 1;
    background: #fff;
  }

  .catalog-page .product-card__photo img {
    transform: scale(1.12);
  }

  .catalog-page .product-card:hover .product-card__photo img { transform: scale(1.12); }

  .catalog-page .product-card__tag {
    top: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
    padding: 5px 8px;
    font-size: 8px;
  }

  .catalog-page .product-card__body { padding: 17px; }

  .catalog-page .product-card__cat { display: none; }

  .catalog-page .product-card__name {
    min-height: 0;
    margin-bottom: 14px;
    font-size: 18px;
    line-height: 1.22;
  }

  .catalog-page .product-card__name a {
    display: block;
    overflow: visible;
    text-overflow: clip;
    -webkit-box-orient: initial;
    -webkit-line-clamp: unset;
  }

  .catalog-page .product-card__attrs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 17px;
    border: 0;
  }

  .catalog-page .product-card__attrs li,
  .catalog-page .product-card__attrs li:nth-child(odd),
  .catalog-page .product-card__attrs li:nth-child(-n + 2) {
    display: none;
    min-height: 58px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e7e8ea;
    border-radius: 11px;
  }

  .catalog-page .product-card__attrs li:nth-child(1),
  .catalog-page .product-card__attrs li:nth-child(3) { display: flex; }

  .catalog-page .product-card__attrs span { font-size: 9px; }

  .catalog-page .product-card__attrs strong {
    flex: none;
    font-size: 14px;
  }

  .catalog-page .product-card__lengths,
  .catalog-page .product-card__article { display: none; }

  .catalog-page .product-card__buy {
    gap: 12px;
    padding-top: 0;
    border: 0;
  }

  .catalog-page .product-card__price { display: flex; }

  .catalog-page .product-card__price span {
    display: block;
    font-size: 8px;
  }

  .catalog-page .product-card__price strong { font-size: 22px; }

  .catalog-page .product-card__btn {
    width: auto;
    min-width: 0;
    height: 42px;
    min-height: 42px;
    border-radius: 999px;
  }
}

@media (max-width: 600px) {
  .catalog-page .product-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .catalog-page .catalog-filter-divider {
    grid-template-columns: 24px auto minmax(40px, 1fr);
    gap: 8px;
    margin-top: 4px;
  }

  .catalog-page .catalog-filter-divider::before {
    width: 24px;
  }

  .catalog-page .catalog-filter-divider__title {
    font-size: 14px;
  }

  .catalog-page .product-card__photo { aspect-ratio: 1.34 / 1; }

  .catalog-page .product-card__photo img { transform: scale(1.1); }

  .catalog-page .product-card:hover .product-card__photo img { transform: scale(1.1); }

  .catalog-page .product-card__body { padding: 18px 20px 20px; }

  .catalog-page .product-card__name {
    margin-bottom: 16px;
    font-size: 21px;
  }

  .catalog-page .product-card__attrs li,
  .catalog-page .product-card__attrs li:nth-child(1),
  .catalog-page .product-card__attrs li:nth-child(3) {
    min-height: 64px;
    padding: 11px 12px;
  }

  .catalog-page .product-card__attrs span { font-size: 10px; }

  .catalog-page .product-card__attrs strong { font-size: 16px; }

  .catalog-page .product-card__price strong { font-size: 25px; }

  .catalog-page .product-card__btn {
    min-height: 44px;
    height: 44px;
    padding: 0 14px;
  }

  .catalog-page .how-order__left .btn {
    order: 3;
    width: 100%;
    min-height: 48px;
    margin-top: 2px;
  }
}

@media (max-width: 340px) {
  .catalog-page .product-card__body { padding: 14px; }

  .catalog-page .product-card__name { font-size: 16px; }

  .catalog-page .product-card__attrs span { font-size: 8px; }

  .catalog-page .product-card__attrs strong { font-size: 13px; }

  .catalog-page .product-card__price strong { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .catalog-page .product-card,
  .catalog-page .product-card__photo img,
  .catalog-page .product-card__btn { transition: none; }
}
