.page-catalog {
  padding: 40px 0 0;
  min-height: 60vh;
}
/* uniform grids */
.page-catalog .category-grid,
.page-catalog .catalog-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.page-catalog .category-card,
.page-catalog .catalog-product-card {
  min-width: 0;
}
.page-catalog .category-card img,
.page-catalog .catalog-product-card img {
  max-width: 100%;
}

/* На корневом каталоге отделяем последний ряд разделов от следующего блока. */
#cats-grid {
  margin-bottom: 48px;
}

.catalog-breadcrumbs {
  color: var(--muted, #6b7688);
  font-size: 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.catalog-breadcrumbs a {
  color: var(--muted, #6b7688);
  text-decoration: none;
}
.catalog-breadcrumbs a:hover {
  color: var(--navy, #19366a);
}
.breadcrumb-current {
  color: #0b1a33;
  font-weight: 600;
}
.catalog-breadcrumbs span {
  color: var(--muted, #6b7688);
}
.catalog-title {
  font-size: 42px;
  font-weight: 800;
  color: #0b1a33;
  margin: 0 0 36px;
  letter-spacing: -.8px;
}
.catalog-list-search { display: flex; gap: 10px; max-width: 620px; margin: -8px 0 28px; }
.catalog-list-search input { flex: 1; min-width: 0; height: 48px; padding: 0 15px; border: 1px solid #cbd2dc; border-radius: 4px; font: inherit; color: #172e58; }
.catalog-list-search button { min-height: 48px; padding: 0 24px; border: 1px solid #dc000c; border-radius: 4px; background: #dc000c; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.catalog-list-search button:hover { background: #b6000a; border-color: #b6000a; }
.catalog-cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}
.catalog-cat-card {
  background: #fff;
  border: 1px solid #eef1f6;
  border-radius: 14px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.catalog-cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,.1);
}
.catalog-cat-card-img {
  height: 200px;
  background: #f7f8fa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.catalog-cat-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}
.catalog-cat-card-body {
  padding: 18px 20px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.catalog-cat-card-body h3 {
  font-size: 18px;
  font-weight: 700;
  color: #0b1a33;
  margin: 0 0 6px;
}
.catalog-cat-card-body .count {
  font-size: 13px;
  color: var(--muted, #6b7688);
  margin-bottom: 12px;
}
.catalog-cat-card-body .cat-link {
  margin-top: auto;
  color: var(--navy, #19366a);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.catalog-cat-card-body .cat-link:hover {
  color: var(--red, #e30613);
}
.catalog-section-title {
  font-size: 28px;
  font-weight: 800;
  color: #0b1a33;
  margin: 0 0 24px;
}
.catalog-products-grid {
  margin-bottom: 32px;
}
.catalog-product-card {
  background: #fff;
  border: 1px solid #eef1f6;
  border-radius: 14px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.catalog-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,.1);
}
.catalog-product-img {
  height: 220px;
  background: #f7f8fa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.catalog-product-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}
.catalog-product-badges {
  position: absolute;
  z-index: 2;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-width: calc(100% - 20px);
  pointer-events: none;
}
.catalog-product-badges--top-left { top: 10px; left: 10px; }
.catalog-product-badges--top-right { top: 10px; right: 10px; justify-content: flex-end; }
.catalog-product-badges--bottom-left { bottom: 10px; left: 10px; }
.catalog-product-badges--bottom-right { right: 10px; bottom: 10px; justify-content: flex-end; }
.catalog-product-badge {
  min-height: 24px;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 6px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: 0 2px 8px rgba(11,26,51,.14);
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.catalog-product-badge.hit {
  background: #e30613;
  color: #fff;
}
.catalog-product-badge.action {
  background: #f5a623;
  color: #fff;
}
.catalog-product-body {
  padding: 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.catalog-product-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: #0b1a33;
  margin: 0 0 10px;
  line-height: 1.3;
}
.catalog-product-specs {
  font-size: 14px;
  color: var(--muted, #6b7688);
  margin: 0 0 14px;
  line-height: 1.5;
  list-style: none;
  padding: 0;
}
.catalog-product-specs li {
  margin-bottom: 4px;
}
.catalog-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: auto;
}
.catalog-product-actions .button {
  flex: 0 0 auto;
  max-width: 100%;
  font-size: 14px;
  padding: 10px 16px;
}
.catalog-loading {
  text-align: center;
  padding: 60px 0;
  color: var(--muted, #6b7688);
  font-size: 16px;
}
.catalog-loadmore {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 24px 0 40px;
}
.catalog-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #eef1f6;
  border-top-color: var(--red, #e30613);
  border-radius: 50%;
  animation: catalog-spin .7s linear infinite;
}
@keyframes catalog-spin {
  to { transform: rotate(360deg); }
}

/* ---- skeleton loading ---- */
.skel {
  background: #e2e5ea;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.skel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
  animation: skelShimmer 1.4s infinite;
}
@keyframes skelShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.skel-cat-card {
  height: 260px;
  grid-column: span 1;
}
.skel-prod-card {
  height: 200px;
  grid-column: span 1;
}
.skel-breadcrumb {
  width: 200px;
  height: 16px;
  margin-bottom: 12px;
}
.skel-title {
  width: 340px;
  height: 36px;
  margin-bottom: 32px;
}
.skel-prod-hero {
  height: 420px;
  margin-bottom: 40px;
}
.skel-prod-section {
  height: 180px;
  margin-bottom: 24px;
}
.skel-prod-wide {
  height: 260px;
  margin-bottom: 24px;
}
@media (max-width: 768px) {
  .skel-cat-card { height: 180px; }
  .skel-prod-card { height: 150px; }
  .skel-title { width: 220px; height: 28px; }
  .skel-prod-hero { height: 260px; }
}

/* ---- описание товара и страницы (prose) ---- */
.prod-description, .page-content {
  color: #3a4049;
  font-size: 15px;
  line-height: 1.8;
}
.prod-description strong, .page-content strong {
  color: #1a1f26;
  font-weight: 600;
}
.prod-description ul, .page-content ul {
  padding: 0;
  list-style: none;
  margin: 20px 0;
}
.prod-description li, .page-content li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
}
.prod-description li::before, .page-content li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #df362d;
}
.prod-description p, .page-content p {
  margin: 0 0 16px;
}
.page-content { min-width: 0; }
.page-content img, .page-content video { max-width: 100%; height: auto; }
.page-content iframe { max-width: 100%; }
.page-content table { display: block; max-width: 100%; overflow-x: auto; }
.page-header-cta { margin: 18px 0 32px; }
.page-header-cta-btn { border: 0; border-radius: 6px; background: #f41019; color: #fff; padding: 12px 22px; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; transition: background .15s, transform .15s; }
.page-header-cta-btn:hover { background: #d80d15; transform: translateY(-1px); }
.prod-description br + br, .page-content br + br {
  display: none;
}
.prod-description > *:first-child, .page-content > *:first-child {
  margin-top: 0;
}
@media (max-width: 768px) {
  .prod-description, .page-content {
    font-size: 14px;
  }
}

/* ---- сворачиваемое описание ---- */
.prod-description-wrap {
  max-height: 320px;
  overflow: hidden;
  position: relative;
}
.prod-description-wrap.expanded {
  max-height: none;
  overflow: visible;
}
.prod-description-wrap::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(transparent, #f4f5f7);
  pointer-events: none;
  transition: opacity 0.3s;
}
.prod-description-wrap.expanded::after {
  opacity: 0;
}
.prod-desc-toggle {
  display: block;
  margin: 16px auto 0;
  padding: 10px 28px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  color: #505762;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.prod-desc-toggle:hover {
  border-color: #df362d;
  color: #df362d;
}
@media (max-width: 768px) {
  .prod-description-wrap {
    max-height: 260px;
  }
}

/* ---- hero slider for homepage blocks ---- */
.homepage-blocks .hero-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.homepage-blocks .hero-slides {
  display: flex;
  transition: transform 0.5s ease;
}
.homepage-blocks .hero-slide {
  flex: 0 0 100%;
  min-height: 420px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
@media (width <= 680px) {
  .homepage-blocks .hero-slide { min-height: 260px; }
}

/* 769-1024: 3 columns */
@media (width <= 1024px) {
  .page-catalog .container {
    width: calc(100% - 40px);
  }
  .page-catalog .category-grid,
  .page-catalog .catalog-products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .catalog-title {
    font-size: 30px;
    margin: 0 0 28px;
  }
  .catalog-section-title {
    font-size: 24px;
  }
  .catalog-product-img {
    height: 190px;
  }
}

/* < 911: кнопки товаров в колонку */
@media (width <= 911px) {
  .catalog-product-actions {
    flex-direction: column;
    gap: 8px;
  }
  .catalog-product-actions .button {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* 600-768: 2 columns */
@media (width <= 768px) {
  /* меню аккордеон */
  .main-nav,
  .phone,
  .brand-divider,
  .brand-sany { display: none !important; }
  .menu-button { margin-left: auto; display: block !important; }
  .header-inner { min-height: 56px; }
  .brand-company-logo { width: 160px; }
  .header-brand-group { margin: 0 auto; }
  .menu-bar {
    z-index: 10;
    background: #22417a;
    max-height: 0;
    transition: max-height .3s ease-out;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    overflow: hidden;
  }
  .menu-bar.is-open { max-height: 500px; }
  .menu-bar .main-nav {
    color: #fff;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
    min-height: auto;
    padding: 10px 0;
    font-size: 16px;
    display: flex !important;
  }
  .menu-bar .main-nav a {
    color: #fff;
    text-align: center;
    width: 100%;
    padding: 8px 0;
  }
  .page-catalog .container {
    width: calc(100% - 40px);
  }
  .page-catalog .category-grid,
  .page-catalog .catalog-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .catalog-title {
    font-size: 28px;
    margin: 0 0 22px;
  }
  .catalog-section-title {
    font-size: 22px;
    margin: 36px 0 16px;
  }
  .catalog-product-img {
    height: 170px;
  }
  .catalog-product-body h3 {
    font-size: 15px;
  }
  .catalog-product-specs {
    font-size: 13px;
  }
}

/* < 600: 1 column */
@media (width <= 600px) {
  .catalog-list-search { margin: -2px 0 22px; }
  .catalog-list-search button { padding: 0 16px; }
  .page-catalog .container {
    width: calc(100% - 32px);
  }
  .page-catalog {
    padding: 24px 0 0;
  }
  .page-catalog .category-grid,
  .page-catalog .catalog-products-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .catalog-breadcrumbs {
    font-size: 12px;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
  }
  .catalog-title {
    font-size: 24px;
    margin: 0 0 18px;
    letter-spacing: -.4px;
  }
  .catalog-section-title {
    font-size: 20px;
    margin: 32px 0 14px;
  }
  .catalog-product-img {
    height: 200px;
  }
  .catalog-product-body {
    padding: 14px;
  }
  .catalog-product-body h3 {
    font-size: 16px;
    margin: 0 0 6px;
  }
  .catalog-product-specs {
    font-size: 14px;
    margin: 0 0 12px;
  }
  .catalog-product-actions {
    flex-direction: column;
    gap: 8px;
  }
  .catalog-product-actions .button {
    width: 100%;
    text-align: center;
    justify-content: center;
    font-size: 14px;
    padding: 10px 14px;
  }
  .catalog-loading {
    padding: 40px 0;
    font-size: 14px;
  }
}

/* ---- contacts tabs ---- */
.ct-tabs {
  display: flex;
  gap: 32px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}
.ct-tab-nav {
  flex: 0 0 260px;
  background: #f7f9fb;
  border-right: 1px solid #e0e0e0;
  padding: 8px 0;
  max-height: 600px;
  overflow-y: auto;
}
.ct-tab-btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  border: 0;
  background: none;
  text-align: left;
  font-size: 15px;
  color: #585757;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.ct-tab-btn:hover { background: rgba(0,0,0,.04); }
.ct-tab-btn.active {
  background: #fff;
  color: #df362d;
  font-weight: 600;
  border-right: 3px solid #df362d;
}
.ct-tab-content {
  flex: 1;
  padding: 24px 32px;
  min-height: 400px;
}
.ct-tab-panel { display: none; }
.ct-tab-panel.active { display: block; }
.ct-tab-label { flex: 1; }
.ct-chevron {
  display: none;
  flex: none;
  width: 9px;
  height: 9px;
  margin-left: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s;
}

/* ---- contact branch card ---- */
.ct-branch {
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}
.ct-branch:last-child { border-bottom: 0; }
.ct-addr {
  display: block;
  font-size: 15px;
  color: #1a1f26;
  margin-bottom: 8px;
}
.ct-phone, .ct-email {
  display: block;
  font-size: 15px;
  color: #df362d;
  text-decoration: none;
  margin-bottom: 4px;
}
.ct-email { color: #3a4049; }
.ct-phone:hover, .ct-email:hover { text-decoration: underline; }
.ct-map {
  display: inline-block;
  font-size: 14px;
  color: #0066cc;
  text-decoration: none;
  margin-top: 6px;
}
.ct-map:hover { text-decoration: underline; }
.ct-map-box {
  margin-top: 16px;
  height: 360px;
  border-radius: 8px;
  overflow: hidden;
  background: #f4f5f7;
}

@media (max-width: 768px) {
  .ct-tabs {
    display: block;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
  }
  .ct-tab-item { border-bottom: 1px solid #e0e0e0; }
  .ct-tab-item:last-child { border-bottom: 0; }
  .ct-tab-btn {
    display: flex;
    align-items: center;
    width: 100%;
    white-space: normal;
    text-align: left;
    padding: 15px 18px;
    font-size: 15px;
    border: 0;
    background: #fff;
    color: #1a1f26;
  }
  .ct-tab-btn.active {
    border-right: 0;
    background: #fafafa;
    color: #df362d;
  }
  .ct-chevron { display: inline-block; }
  .ct-tab-btn.active .ct-chevron { transform: rotate(-135deg); }
  .ct-tab-panel { padding: 4px 18px 18px; }
  .ct-map-box { height: 260px; }
}
  .catalog-spinner {
    width: 28px;
    height: 28px;
    border-width: 2px;
  }
.catalog-category-description { margin: 32px 0 64px; color: #4e596b; line-height: 1.6; }
.catalog-category-description p { margin: 0 0 12px; }
.catalog-category-description table { width: 100%; border-collapse: collapse; }
.catalog-category-description th, .catalog-category-description td { border: 1px solid #dfe3ea; padding: 8px 10px; text-align: left; }
