/* =========================================================
   СТРАНИЦА КАТАЛОГА (catalog.php) — сетка категорий
   ========================================================= */

.page-catalog-list .container {
  max-width: 1440px;
  margin: 40px auto 20px;
  padding: 0 20px;
  text-align: center;
}

.page-catalog-list h2 {
  font-size: 36px;
  font-weight: 300;
  text-transform: uppercase;
}

.page-catalog-list .icons-block {
  width: 100%;
  max-width: 1440px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  height: auto;
  margin: 20px auto 40px;
  flex-wrap: wrap;
  gap: 16px;
}
#ico-fish-5 {
  opacity: 0;
  pointer-events: none;
}
.page-catalog-list .icons-cat {
  display: flex;
  align-items: flex-end;
  min-height: 140px;
  padding: 18px;
  background: #fff;
  text-decoration: none;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    background 0.2s;
  border: 1px solid lightgray;
}

.page-catalog-list .icons-cat:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.page-catalog-list .icons-cat p {
  margin: 0;
  color: #242424;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

/* Рыбные карточки-заготовки — визуально отличаются, чтобы не спутать */
.page-catalog-list .icons-cat--placeholder {
  background: #f4f6f9;
  border: 2px dashed #c4ccd6;
  align-items: center;
  justify-content: center;
}

.page-catalog-list .icons-cat--placeholder:hover {
  background: #edf0f5;
  transform: none;
  box-shadow: none;
}

.page-catalog-list .icons-cat--placeholder p {
  color: #9aa5b1;
}

@media (max-width: 1100px) {
  .page-catalog-list .icons-block {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 760px) {
  .page-catalog-list .icons-block {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 460px) {
  .page-catalog-list .icons-block {
    grid-template-columns: 1fr;
  }
}

.ask-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.ask-modal-bg.is-open {
  display: flex;
}

.ask-modal {
  background: #fff;
  border-radius: 8px;
  padding: 32px;
  width: 420px;
  max-width: calc(100vw - 40px);
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.ask-modal h3 {
  margin: 0 0 6px;
  color: #2c3e50;
  font-size: 20px;
}

.ask-modal__product {
  font-size: 13px;
  color: #7f8c8d;
  margin: 0 0 20px;
}

.ask-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #bdc3c7;
}

.ask-modal__close:hover {
  color: #c0392b;
}

.ask-field {
  margin-bottom: 14px;
}

.ask-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #34495e;
  margin-bottom: 5px;
}

.ask-field input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
}

.ask-field input:focus {
  outline: none;
  border-color: #e67e22;
}

.ask-submit {
  width: 100%;
  padding: 11px;
  background: #e67e22;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.2s;
}

.ask-submit:hover {
  background: #d35400;
}

.desc-text h1,
.desc-text h2,
.desc-text h3,
.desc-text h4 {
  color: #2c3e50;
  font-weight: 600;
  line-height: 1.3;
}

.desc-text h1 {
  margin: 24px 0 12px;
  font-size: 20px;
}

.desc-text h2 {
  margin: 22px 0 10px;
  font-size: 18px;
}

.desc-text h3 {
  margin: 22px 0 10px;
  font-size: 17px;
}

.desc-text h4 {
  margin: 18px 0 8px;
  font-size: 15px;
}

.desc-text h1:first-child,
.desc-text h2:first-child,
.desc-text h3:first-child,
.desc-text h4:first-child {
  margin-top: 0;
}

.desc-text p {
  margin: 0 0 12px;
  line-height: 1.5;
}

.desc-text figure {
  margin: 0 0 16px;
}

.desc-text figure.table {
  overflow-x: auto;
}

.desc-text table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 14px;
}

.desc-text table td,
.desc-text table th {
  border: 1px solid #e0e0e0;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.desc-text table tr:first-child td,
.desc-text table tr:first-child th {
  background: #f5f6f7;
  font-weight: 600;
}

/* Таблицы без явных границ (менеджер убрал их в редакторе) — не рисуем свои поверх авторских */
.desc-text table[style*="border-style:none"] td,
.desc-text table[style*="border-style: none"] td,
.desc-text table[style*="border-style:none"] th,
.desc-text table[style*="border-style: none"] th {
  border: none;
}

.desc-text img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 6px 0;
}

.desc-text ul,
.desc-text ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

.desc-text li {
  margin-bottom: 4px;
  line-height: 1.5;
}

.desc-text strong,
.desc-text b {
  font-weight: 600;
}

.desc-text blockquote {
  margin: 0 0 12px;
  padding: 8px 14px;
  border-left: 3px solid #ddd;
  color: #666;
}

/* ---- Цена + кнопка одиночного товара в одну строку ---- */
.price-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border: 1px solid #c5c5c5;
  padding: 10px 10px 10px 20px;
  margin-top: -1px;
}

.price-cta__price {
  min-width: 0;
}

.price-cta .cta-row {
  margin-top: 0;
}

.cta-row {
  margin-top: 16px;
}

.cta-underline {
  font: inherit;
  min-width: 154px;
  font-size: 16px;
  line-height: 1.3;
  cursor: pointer;
  display: inline-block;
  background: none;
  border: 0;
  padding: 10px 40px;
  margin: 0;
  width: auto;
  height: auto;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.3s ease;
  background: #545454;
}

.cta-underline:hover {
  color: #fff;
  background: #f2851a;
}

.cta-underline:disabled {
  cursor: default;
  opacity: 0.55;
}

.variant-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 10px 10px 10px 20px;
  border-top: 1px solid #c5c5c5;
}
.variants-list {
  font-size: 16px;
  font-weight: 400;
  margin: -1px 0 0;
  border: 1px solid #c5c5c5;
}
.old {
  text-decoration: line-through;
  color: #999;
  font-weight: 400;
  margin-right: 6px;
}
.old-one {
  text-decoration: line-through;
  color: #999;
  font-size: 18px;
  margin-right: 10px;
  font-weight: 400;
}
.real {
  font-weight: 600;
  color: #e74c3c;
  font-size: 18px;
}
.variants {
  background: #f9f9f9;
  padding: 14px 20px;
  color: #545456;
  border-bottom: 1px solid #eee;
}
.product-tabs {
  margin-top: 20px;
}

:root {
  --dop-h: 60px; /* высота допменю */
}

.page-product .cn-crumbs-sticky {
  max-width: none;
  margin: 0;
  padding: 10px 0 14px;
  position: sticky;
  top: var(--dop-h);
  z-index: 49;
  background: #fff;
}

.page-catalog .cn-top {
  position: sticky;
  top: var(--dop-h);
  z-index: 49;
  background: #fff;
  padding-top: 20px;
}

.page-catalog .cn-top::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 20px;
  background: #fff;
  border-bottom: 1px solid #c5c5c5;
}

/* На узких экранах крошки не липнут (не съедают высоту) */
@media (max-width: 900px) {
  .page-product .cn-crumbs-sticky {
    position: static;
    padding-bottom: 0;
  }
  .page-catalog .cn-top {
    position: static;
  }
  .page-catalog .cn-top::after {
    display: none;
  }
}

@media (max-width: 680px) {
  .variant-row {
    justify-content: flex-end;
  }
}
