.product-categories {
  --category-ink: #20241d;
  --category-muted: #50554b;
  --category-olive: #3e4e31;
  background: #f8f8f4;
  color: var(--category-ink);
  padding-block: clamp(49px, 5.3vw, 88px);
  scroll-margin-block-start: clamp(48px, 5vw, 72px);
}

.product-categories-inner {
  margin-inline: min(var(--hero-gutter), max(56px, calc((100% - 1320px) / 2))) var(--stage-edge);
  display: grid;
  grid-template-columns: minmax(250px, .41fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(27px, 4vw, 66px);
}

.product-categories-intro { padding-block-start: clamp(18px, 2.4vw, 42px); }

.product-categories .product-categories-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--category-olive);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .09em;
  line-height: 1.2;
  text-transform: uppercase;
}

.product-categories-eyebrow svg { flex: none; width: 19px; height: 19px; }

.product-categories .product-categories-intro h2 {
  max-width: 390px;
  margin-block-start: 19px;
  font-size: clamp(36px, 3.13vw, 54px);
  font-weight: 580;
  letter-spacing: -.052em;
  line-height: 1.04;
  text-wrap: balance;
}

.product-categories .product-categories-lead {
  max-width: 330px;
  margin-block-start: 20px;
  color: var(--category-muted);
  font-size: 16px;
  line-height: 1.55;
}

.product-categories-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-block-start: clamp(38px, 4.25vw, 67px);
}

.product-categories .product-categories-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 47px;
  padding: 9px 15px 9px 17px;
  border-radius: 9px;
  background: var(--category-olive);
  color: #fff;
  font-size: 14px;
  font-weight: 670;
  transition: background-color .2s;
}

.product-categories .product-categories-cta:hover { background: #2e3e25; }
.product-categories-cta img { filter: invert(1); }

.product-categories .product-categories-calculator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 47px;
  padding: 5px 14px 5px 6px;
  border: 1px solid #dbe1d3;
  border-radius: 24px;
  background: #eef1e9;
  color: var(--category-olive);
  font-size: 14px;
  font-weight: 670;
  white-space: nowrap;
  transition: background-color .2s, border-color .2s;
}

.product-categories-calculator-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: #dce5d4;
  color: var(--category-olive);
}

.product-categories .product-categories-calculator:hover {
  border-color: #b3c2aa;
  background: #e1e9db;
}

.product-categories .product-categories-calculator:focus-visible {
  outline: 2px solid var(--category-olive);
  outline-offset: 2px;
}

.product-categories-deck {
  min-width: 0;
  container: category-deck / inline-size;
}

.product-category-selector:not([hidden]) {
  display: flex;
  gap: 7px;
  margin-block-end: 10px;
  padding: 2px 2px 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #a4ac9e transparent;
}

.product-category-selector button {
  flex: 0 0 96px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  min-height: 68px;
  padding: 6px;
  border: 1px solid #d6ded1;
  border-radius: 9px;
  background: #e9ede6;
  color: #314332;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.15;
  text-align: center;
}

.product-category-selector button[aria-pressed="true"] {
  border-color: var(--category-olive);
  background: var(--category-olive);
  color: #fff;
}

.product-category-selector button:focus-visible {
  outline: 2px solid var(--category-olive);
  outline-offset: 1px;
}

.product-category-selector button svg { width: 19px; height: 19px; }

.product-category-selector:not([hidden]) + .product-categories-grid > li:not(.product-category-wide) {
  display: none;
}

.product-category-compact { display: none; }

.product-categories .product-categories-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(11px, 1.2vw, 18px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-categories-grid > li { min-width: 0; display: flex; }

.product-categories .product-category-card {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: end;
  width: 100%;
  min-height: clamp(360px, 34vw, 520px);
  overflow: hidden;
  border-radius: clamp(13px, 1.35vw, 22px);
  background: linear-gradient(150deg, #fff2 0%, transparent 48%),
    linear-gradient(180deg, var(--category-tint, #57664d), var(--category-shade, #303b2e));
  color: #fff;
}

.product-category-card:focus-visible {
  outline: 2px solid #f4f8ed;
  outline-offset: -4px;
}

.product-category-card::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 37%, #151b1854 52%, #121713d7 73%, #121713fb 100%);
  content: "";
  transition: opacity .2s ease;
}

.product-categories .product-category-photo {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% center;
  transition: transform .42s cubic-bezier(.22, .7, .24, 1);
}

.product-categories [data-category="strip"] .product-category-photo { object-position: 52% center; }
.product-categories [data-category="folding"] .product-category-photo { object-position: 61% center; }
.product-category-card:hover .product-category-photo { transform: scale(1.045); }

.product-categories [data-category="welding"] {
  --category-tint: #6c624f;
  --category-shade: #383329;
}

.product-categories [data-category="gate"] {
  --category-tint: #58636a;
  --category-shade: #30393d;
}

.product-categories :is([data-category="welding"], [data-category="gate"]) .product-category-photo {
  object-position: 82% center;
}

.product-category-copy {
  position: relative;
  width: 100%;
  display: grid;
  align-content: start;
  grid-template-rows: auto auto minmax(3.9em, auto);
  padding: 16px 19px 20px;
  font-size: 13px;
}

.product-category-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fafbf5;
  color: var(--category-olive);
}

.product-category-mark svg { width: 23px; height: 23px; }

.product-categories .product-category-copy h3 {
  margin-block: 13px 6px;
  font-size: clamp(18px, 1.48vw, 24px);
  font-weight: 670;
  letter-spacing: -.025em;
  line-height: 1.12;
}

.product-category-copy p {
  color: #ecede8;
  font-size: inherit;
  line-height: 1.3;
}

@media (max-width: 1180px) {
  .product-categories-inner {
    width: min(calc(100% - 76px), 980px);
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .product-categories-intro { padding-block-start: 0; }
  .product-categories-actions { margin-block-start: 22px; }
}

@media (hover: hover) and (pointer: fine) {
  @container category-deck (min-width: 690px) {
    .product-category-selector:not([hidden]) { display: none; }

    .product-categories .product-categories-grid {
      display: flex;
      gap: clamp(8px, 1.1cqw, 13px);
    }

    .product-categories-grid > li {
      flex: 0 0 clamp(64px, 10cqw, 108px);
      transition: flex-grow .44s cubic-bezier(.25, .7, .25, 1);
    }

    .product-category-selector:not([hidden]) + .product-categories-grid > li:not(.product-category-wide) {
      display: flex;
    }

    .product-categories-grid > .product-category-wide { flex-grow: 1; }
    .product-categories .product-category-card { border-radius: clamp(9px, 1.3cqw, 18px); }

    .product-category-compact {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      justify-content: end;
      align-items: center;
      gap: 14px;
      padding: 15px 0 18px;
      background: linear-gradient(180deg, #10171330, #10171340 32%, #10171395 53%, #101713de);
      pointer-events: none;
      transition: opacity .15s ease;
    }

    .product-category-compact-name {
      writing-mode: vertical-rl;
      transform: rotate(180deg);
      font-size: clamp(12px, 1.45cqw, 15px);
      font-weight: 650;
      line-height: 1;
      white-space: nowrap;
    }

    .product-category-compact .product-category-mark {
      width: 27px;
      height: 27px;
    }

    .product-category-compact .product-category-mark svg { width: 17px; height: 17px; }
    .product-category-wide .product-category-compact { opacity: 0; }

    .product-category-copy { transition: opacity .18s ease .14s; }
    .product-categories-grid > li:not(.product-category-wide) .product-category-copy,
    .product-categories-grid > li:not(.product-category-wide) .product-category-card::after { opacity: 0; }

    .product-categories-grid > li:not(.product-category-wide) .product-category-copy {
      visibility: hidden;
      transition-delay: 0s;
    }
  }
}

@media (max-width: 680px) {
  .product-categories-inner { width: calc(100% - 40px); }
  .product-categories .product-categories-grid { gap: 13px; }
  .product-categories .product-category-card { min-height: clamp(265px, 73vw, 375px); }
  .product-category-card::after {
    background: linear-gradient(180deg, transparent 28%, #151b1854 49%, #121713d7 71%, #121713fb 100%);
  }
  .product-category-copy { min-height: 159px; grid-template-rows: auto auto 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .product-categories-grid > li,
  .product-category-card::after,
  .product-categories :is(.product-category-photo, .product-category-compact, .product-category-copy, .product-categories-cta, .product-categories-calculator) {
    transition: none;
  }
}

.hsb-calculator-dialog .rgcalc.blcalc :is(.rgcalc-form, #blcalcFields) {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 760px) {
  .hsb-calculator-dialog .rgcalc.blcalc .rgcalc-row { grid-template-columns: minmax(0, 1fr); }
  .hsb-calculator-dialog .rgcalc.blcalc .rgcalc-label { flex-wrap: wrap; gap: 4px 8px; }
}

@media (orientation: landscape) and (max-height: 510px) {
  .bl-hs-main .hsb-calculator-dialog { height: calc(100dvh - 20px); }
  .bl-hs-main .hsb-calculator-header { padding: 8px 14px; }
  .bl-hs-main .hsb-calculator-header h2 { font-size: 20px; }
  .bl-hs-main .hsb-calculator-body { padding: 10px 14px; }
}

@media (orientation: landscape) and (max-height: 510px) and (min-width: 540px) {
  .bl-hs-main .hsb-calculator-dialog .rgcalc.blcalc .rgcalc-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bl-hs-main .hsb-calculator-dialog .rgcalc.blcalc .rgcalc__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
