/* Каталог: использует существующие .Head, .title-row, .arrow и .redbutton */
.catalog-section { background: #f9f5f3; padding: 64px 3.5% 70px; }
.catalog-inner { max-width: 1460px; margin: 0 auto; }
.catalog-title-row { gap: clamp(12px, 3vw, 38px); margin-bottom: 32px; }
.catalog-heading { text-align: center; font-size: clamp(34px, 4.4vw, 65px) !important; line-height: 1.05 !important; }
.catalog-title-row .arrow { width: clamp(50px, 11vw, 170px); height: auto; }
.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 26px); }
.catalog-card { min-width: 0; display: flex; flex-direction: column; }
.catalog-image { aspect-ratio: 1 / 1.06; background: #fff; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.catalog-image img { width: 100%; height: 100%; object-fit: contain; }
.catalog-card-body { display: flex; flex-direction: column; flex: 1; padding-top: 12px; }
.catalog-name { color: var(--red); font-family: Montserrat, Arial, sans-serif; font-weight: 600; font-size: clamp(16px, 1.45vw, 22px); line-height: 1.15; min-height: 2.3em; }
.catalog-description { font-family: Montserrat, Arial, sans-serif; color: var(--ink); font-size: clamp(15px, 1.4vw, 21px); line-height: 1.18; margin: 5px 0 12px; }
.catalog-button.redbutton { width: 100%; max-width: none; margin-top: auto; padding: 8px 10px; font-size: clamp(13px, 1.1vw, 16px); border-radius: 9px; text-align: center; }
@media (max-width: 850px) { .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 18px; } .catalog-name { min-height: 0; } }
@media (max-width: 520px) { .catalog-section { padding: 40px 5% 50px; } .catalog-title-row { gap: 8px; } .catalog-heading { font-size: clamp(25px, 7vw, 36px) !important; } .catalog-title-row .arrow { width: 35px; } .catalog-grid { gap: 22px 12px; } .catalog-image { aspect-ratio: 1 / 1.12; } .catalog-name { font-size: 14px; } .catalog-description { font-size: 13px; } .catalog-button.redbutton { font-size: 12px; padding: 9px 5px; white-space: normal; } }

.catalog-section { position: relative; isolation: auto; z-index: 1; }
.catalog-inner { position: relative; z-index: 3; }
.delivery-section { position: relative; z-index: 1; }
.delivery-inner { position: relative; z-index: 3; }

/* Описание товара поверх фотографии при наведении, фокусе или касании.
   Если текст в MIGX не задан, фотография остаётся без наложения. */
.catalog-image-reveal {
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: inherit;
}

.catalog-image-reveal:focus-visible {
  outline: 3px solid #B7171F;
  outline-offset: 3px;
}

.catalog-hover-panel {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 1.5vw, 22px);
  border-radius: inherit;
  background: #982e36;
  color: #fff;
  opacity: 0;
  visibility: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  transition: opacity .2s ease, visibility .2s ease;
}

.catalog-hover-copy {
  display: block;
  width: 100%;
  max-height: 100%;
  margin: auto 0;
  color: #fff;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: clamp(12px, 1.15vw, 16px);
  font-weight: 400;
  line-height: 1.22;
  text-align: center;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* Современные браузеры: пустое описание не закрывает фотографию. */
.catalog-hover-panel:has(.catalog-hover-copy:empty) {
  display: none;
}

.catalog-image-reveal:hover .catalog-hover-panel,
.catalog-image-reveal:focus .catalog-hover-panel,
.catalog-image-reveal:focus-visible .catalog-hover-panel {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 850px) {
  .catalog-hover-panel { padding: 12px; }
  .catalog-hover-copy { font-size: clamp(11px, 1.75vw, 15px); }
}

@media (max-width: 520px) {
  .catalog-hover-panel { padding: 8px; }
  .catalog-hover-copy { font-size: 11px; line-height: 1.16; }
}

@media (prefers-reduced-motion: reduce) {
  .catalog-hover-panel { transition: none; }
}
