/* Category and project gallery */
.mabe-category-top-row {
  align-items: stretch;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 284px minmax(0, 1fr);
  margin-bottom: 0;
}

.mabe-category-sidebar-col {
  display: flex;
  flex-direction: column;
}

.mabe-category-sidebar-col .catalog-sidebar {
  height: 100%;
  max-width: 100%;
}

.mabe-category-hero-col {
  display: flex;
  flex-direction: column;
}

.catalog-category-hero-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
  display: grid;
  gap: 1.75rem;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 1fr);
  height: 100%;
  overflow: hidden;
  padding: 1.85rem 2rem;
}

.catalog-category-hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.catalog-hero-eyebrow {
  align-items: center;
  color: #cd0005;
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 800;
  gap: 8px;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.catalog-hero-dash {
  background: #cd0005;
  border-radius: 2px;
  display: inline-block;
  height: 3px;
  width: 24px;
}

.catalog-hero-title {
  color: #0f172a;
  font-size: clamp(1.9rem, 2.7vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 0.85rem;
  text-transform: none;
}

.catalog-hero-punchline {
  color: #1e293b;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.catalog-hero-description {
  color: #64748b;
  font-size: 0.94rem;
  line-height: 1.6;
  margin-bottom: 1.35rem;
}

.catalog-hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.catalog-hero-contact-btn {
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.75rem 1.35rem;
}

.catalog-category-hero-visual {
  align-self: stretch;
  border-radius: 14px;
  min-height: 280px;
  max-height: 380px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.catalog-category-hero-visual img,
.catalog-category-hero-visual > .mabe-catalog-image-placeholder {
  display: block;
  height: 100% !important;
  max-height: 380px;
  min-height: 280px;
  object-fit: cover;
  width: 100%;
}

.catalog-category-products {
  margin-top: 0;
  margin-bottom: 2rem;
  padding: 0;
  scroll-margin-top: 90px;
}

.catalog-category-products-heading {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.catalog-products-main-title {
  color: #0f172a;
  font-size: clamp(1.45rem, 2.2vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
  text-transform: none;
}

.catalog-category-heading-meta {
  align-items: center;
  display: flex;
  gap: 12px;
}

.catalog-category-product-count-badge {
  background: #f1f5f9;
  border-radius: 9999px;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  white-space: nowrap;
}

.catalog-category-nav-controls {
  display: flex;
  gap: 6px;
}

.catalog-nav-btn {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.75rem;
  height: 32px;
  justify-content: center;
  transition: all 0.18s ease;
  width: 32px;
}

.catalog-nav-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.catalog-category-products-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  scroll-margin-top: 90px;
  width: 100%;
}

.catalog-category-product-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.catalog-category-product-card:hover {
  border-color: var(--mabe-line);
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
  transform: translateY(-4px);
}

.catalog-category-product-card > a {
  display: block;
  height: 185px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.catalog-category-product-card > a img,
.catalog-category-product-card > a > .mabe-catalog-image-placeholder {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  width: 100%;
}

.catalog-category-product-card:hover > a img {
  transform: scale(1.04);
}

.catalog-category-product-card .project-item-info {
  background: #ffffff !important;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.2rem 1.35rem 1.35rem !important;
}

.catalog-category-product-card .project-item-info-content {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.catalog-category-product-card .project-item-title {
  color: #0f172a;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.6rem;
  text-transform: none;
}

.catalog-category-product-card .project-item-title a {
  color: #0f172a !important;
  text-decoration: none !important;
}

.catalog-category-product-card .project-item-title a:hover {
  color: #cd0005 !important;
}

.catalog-category-product-card .project-cat {
  color: #64748b !important;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1.1rem;
  flex: 1;
}

.catalog-category-product-card .learn-more {
  align-items: center;
  color: #cd0005 !important;
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 700;
  gap: 6px;
  margin-top: auto;
  text-decoration: none !important;
  transition: gap 0.2s ease, color 0.2s ease;
}

.catalog-category-product-card:hover .learn-more {
  color: #a80004 !important;
  gap: 9px;
}

.mabe-category-bottom-cta {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.03);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding: 1.5rem 2rem;
}

.mabe-category-bottom-cta-left {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 1.5rem;
  min-width: 280px;
}

.mabe-cta-icon-circle {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  color: #334155;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 1.35rem;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.mabe-cta-divider {
  background: #e2e8f0;
  height: 38px;
  width: 1px;
}

.mabe-cta-text .mabe-cta-title {
  color: #0f172a;
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.mabe-cta-desc {
  color: #64748b;
  font-size: 0.88rem;
}

.mabe-cta-btn {
  align-items: center;
  border: 1.5px solid #cd0005;
  border-radius: 10px;
  color: #cd0005;
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 700;
  gap: 6px;
  padding: 0.65rem 1.4rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mabe-cta-btn:hover {
  background: #cd0005;
  border-color: #cd0005;
  color: #ffffff;
  transform: translateY(-2px);
}

.catalog-category-grid .project-item-info {
  padding: 1.15rem 1.25rem 1.35rem;
}

.catalog-category-grid .project-cat {
  min-height: 0;
}

.catalog-category-cta {
  align-items: center;
  border-top: 1px solid var(--mabe-line);
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
}

.catalog-category-cta strong,
.catalog-category-cta span {
  display: block;
}

.catalog-category-cta strong {
  color: var(--mabe-ink);
  font-size: 1rem;
}

.catalog-category-cta span {
  color: var(--mabe-muted);
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

.mabe-project-gallery-heading {
  margin-bottom: clamp(1.5rem, 3vw, 2.4rem);
}

.mabe-project-gallery-heading h2 {
  color: var(--mabe-ink);
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1.08;
  margin: 0.35rem 0 0;
  text-transform: none;
}

.mabe-project-gallery {
  display: grid;
  gap: 14px;
  grid-auto-flow: dense;
  grid-auto-rows: minmax(165px, 1fr);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mabe-project-gallery-item {
  background: #eef2f5;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  display: block;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.mabe-project-gallery-item.is-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.mabe-project-gallery-item img,
.mabe-project-gallery-item > .mabe-catalog-image-placeholder {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
  width: 100%;
}

.mabe-project-gallery-item:hover img {
  transform: scale(1.025);
}

.mabe-project-gallery-expand {
  align-items: center;
  background: rgba(15, 23, 42, 0.78);
  border-radius: 999px;
  bottom: 14px;
  color: #ffffff;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  opacity: 0;
  position: absolute;
  right: 14px;
  transform: translateY(5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  width: 40px;
}

.mabe-project-gallery-item:hover .mabe-project-gallery-expand,
.mabe-project-gallery-item:focus-visible .mabe-project-gallery-expand {
  opacity: 1;
  transform: translateY(0);
}

.mabe-project-gallery-item:focus-visible {
  outline: 3px solid var(--mabe-accent);
  outline-offset: 3px;
}

.mabe-project-gallery-empty {
  background: #eef2f5;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  min-height: 300px;
  overflow: hidden;
}

.mabe-project-gallery-empty > * {
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  width: 100%;
}

/* Project gallery lightbox: keep one stable viewing frame so navigation stays
   fixed while each source image keeps its native size whenever it already fits. */
#cboxOverlay {
  backdrop-filter: blur(9px);
  background: rgba(5, 8, 12, 0.92);
}

#colorbox {
  outline: none;
}

#cboxWrapper {
  overflow: visible !important;
}

#cboxContent {
  background: transparent;
  margin-top: 0;
  overflow: visible;
}

#cboxLoadedContent {
  align-items: center;
  background:
    radial-gradient(circle at center, #242b33 0%, #151b22 58%, #0b0f14 100%);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  display: flex;
  justify-content: center;
  overflow: hidden !important;
}

#cboxLoadedContent .cboxPhoto {
  background: transparent;
  float: none;
  margin: 0 !important;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

#cboxCurrent,
#cboxTitle {
  backdrop-filter: blur(8px);
  background: rgba(11, 15, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #ffffff;
  line-height: 1;
  z-index: 4;
}

#cboxCurrent {
  left: 16px;
  padding: 9px 12px;
  right: auto;
  top: 16px;
  width: auto;
}

#cboxTitle {
  bottom: 16px;
  left: 16px;
  max-width: calc(100% - 96px);
  overflow: hidden;
  padding: 10px 14px;
  right: auto;
  text-overflow: ellipsis;
  top: auto;
  white-space: nowrap;
}

#cboxPrevious,
#cboxNext,
#cboxClose {
  align-items: center;
  backdrop-filter: blur(8px);
  background: rgba(11, 15, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #ffffff;
  display: flex;
  font-size: 0;
  justify-content: center;
  margin: 0;
  text-indent: 0;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  z-index: 5;
}

#cboxPrevious,
#cboxNext {
  height: 46px;
  margin-top: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
}

#cboxPrevious {
  left: 16px;
}

#cboxNext {
  right: 16px;
}

#cboxClose {
  height: 42px;
  right: 16px;
  top: 16px;
  width: 42px;
}

#cboxPrevious::before,
#cboxNext::before,
#cboxClose::before {
  display: block;
  font-family: Arial, sans-serif;
  font-weight: 400;
  line-height: 1;
}

#cboxPrevious::before {
  content: '\2039';
  font-size: 34px;
  transform: translateY(-1px);
}

#cboxNext::before {
  content: '\203A';
  font-size: 34px;
  transform: translateY(-1px);
}

#cboxClose::before {
  content: '\00D7';
  font-size: 26px;
}

#cboxPrevious:hover,
#cboxNext:hover,
#cboxClose:hover {
  background: var(--mabe-primary);
  border-color: var(--mabe-primary);
  color: #ffffff;
}

#cboxPrevious:focus-visible,
#cboxNext:focus-visible,
#cboxClose:focus-visible {
  outline: 3px solid var(--mabe-accent) !important;
  outline-offset: 3px;
}

@media (max-width: 575.98px) {
  #cboxLoadedContent {
    border-radius: 12px;
  }

  #cboxCurrent {
    left: 10px;
    top: 10px;
  }

  #cboxTitle {
    bottom: 10px;
    left: 10px;
    max-width: calc(100% - 72px);
  }

  #cboxPrevious,
  #cboxNext {
    height: 40px;
    width: 40px;
  }

  #cboxPrevious {
    left: 10px;
  }

  #cboxNext {
    right: 10px;
  }

  #cboxClose {
    height: 38px;
    right: 10px;
    top: 10px;
    width: 38px;
  }
}

.mabe-project-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1.5rem;
}

@media (max-width: 1199.98px) {
  .catalog-category-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-category-hero-card {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    padding: 1.75rem 1.75rem;
  }

  .catalog-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.catalog-category-projects-section {
  border-top: 1px solid var(--mabe-line);
}

.catalog-category-projects-subtitle {
  font-size: 0.92rem;
}

.catalog-category-projects-button {
  align-items: center;
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 700;
  gap: 0.35rem;
  justify-content: center;
  min-height: 40px;
  padding: 0.62rem 1rem;
  white-space: nowrap;
}

.catalog-category-projects-button i {
  transition: transform 0.18s ease;
}

.catalog-category-projects-button:hover i,
.catalog-category-projects-button:focus-visible i {
  transform: translateX(3px);
}

@media (max-width: 991.98px) {
  .mabe-hero-photo-container {
    aspect-ratio: 4 / 3;
    max-height: 380px;
  }

  .mabe-hero-main-row,
  .mabe-category-layout,
  .mabe-category-top-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .catalog-category-hero-card {
    grid-template-columns: 1fr;
    padding: 1.75rem 1.5rem;
    gap: 1.5rem;
  }

  .catalog-category-hero-visual {
    min-height: 260px;
  }

  .mabe-product-summary {
    order: 2;
  }

  .catalog-sidebar-column {
    order: 2;
  }

  .catalog-category-content,
  .catalog-category-hero-wrapper {
    order: 1;
  }

  .catalog-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-category-hero {
    grid-template-columns: 1fr;
  }

  .catalog-category-hero-media {
    min-height: 180px;
    order: -1;
  }

  .catalog-category-hero-media img,
  .catalog-category-hero-media > .mabe-catalog-image-placeholder {
    min-height: 180px;
  }

  .mabe-project-gallery {
    grid-auto-rows: 220px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mabe-project-gallery-item.is-featured {
    grid-column: span 2;
    grid-row: span 2;
  }

  .mabe-product-value-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .mabe-product-hero-card {
    padding: 28px 24px;
  }
}

@media (max-width: 767.98px) {
  .mabe-detail-block,
  .mabe-process-ribbon-block {
    margin-top: 18px;
  }

  .mabe-product-value-strip {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .catalog-category-intro {
    padding-bottom: 24px;
    padding-top: 14px;
  }

  .mabe-product-hero-card {
    border-radius: 16px;
    padding: 16px;
  }

  .mabe-hero-photo-container {
    aspect-ratio: 16 / 9;
    min-height: 200px;
    border-radius: 10px;
  }

  .mabe-hero-main-row {
    gap: 20px;
    margin-top: 18px;
  }

  .mabe-quick-specs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .mabe-product-guarantees-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-top: 16px;
  }

  .mabe-guarantee-item {
    border: none;
    padding: 0;
  }

  .mabe-trust-how-link {
    margin-top: 6px;
  }

  .catalog-category-grid {
    grid-template-columns: 1fr;
  }

  .catalog-category-products-grid {
    grid-template-columns: 1fr;
  }

  .catalog-category-products-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0;
  }

  .catalog-category-heading-meta {
    width: 100%;
    justify-content: space-between;
  }

  .catalog-category-products-grid .catalog-category-product-card > a {
    height: 190px;
    min-height: 190px;
  }

  .catalog-category-content h1,
  .catalog-category-summary,
  .catalog-category-description {
    overflow-wrap: anywhere;
  }

  .catalog-category-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-category-cta .btn {
    align-self: flex-start;
  }

  .mabe-project-detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .mabe-project-detail-actions .btn {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .mabe-project-gallery {
    grid-auto-rows: auto;
    grid-template-columns: 1fr;
  }

  .mabe-project-gallery-item,
  .mabe-project-gallery-item.is-featured {
    aspect-ratio: 4 / 3;
    grid-column: span 1;
    grid-row: span 1;
  }

  .mabe-project-gallery-expand {
    opacity: 1;
    transform: none;
  }
}

/* Selected catalog product details */
.catalog-category-product-card.is-active {
  background: #ffffff;
  border: 2px solid #cd0005;
  box-shadow: 0 6px 20px rgba(205, 0, 5, 0.12);
}

.catalog-category-product-card.is-active .project-item-info {
  background: #ffffff !important;
}

.catalog-product-details {
  margin-top: 1.5rem;
  width: 100%;
}

.catalog-product-details .mabe-detail-block {
  margin-top: 2rem;
  padding: 0;
}

.catalog-product-details .mabe-block-subtitle {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.catalog-product-details .mabe-process-ribbon-block {
  margin-top: 2rem;
}

@media (max-width: 991.98px) {
  .catalog-product-details {
    margin-top: 1rem;
  }
}
