:root {
  --brand-badge: url("/assets/img/svg/TPM_Badge.svg");
  --brand-logo: url("/assets/img/svg/headerlogo-new-dark.svg");
  --bs-gradient-inv: linear-gradient(0deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
}

@media (max-width: 450px) {
  .float-image, .float-image.right {
    float: none;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 1.5rem auto;
    display: block;
    shape-outside: none;
  }
}

@media (min-width: 576px) {
  .card-body p {
    display: block;
  }
}

.container {
  --bs-gutter-x: 1rem;
}

@media (min-width: 768px) {
  .container {
    --bs-gutter-x: 2rem;
  }
}

@media (min-width: 1200px) {
  .container {
    --bs-gutter-x: 3rem;
  }
}

@media (max-width: 575.98px) {
  .float-image.right {
    margin: 0 0 .8rem 1rem;
  }
}

@media (max-width: 575.98px) {
  .float-image, .float-image.right {
    width: 62%;
    min-width: 200px;
    margin: 0 1rem .8rem 0;
  }
}

#navSidebar::-webkit-scrollbar {
  width: 4px;
}

#navSidebar::-webkit-scrollbar-track {
  background: transparent;
}

#navSidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

#navSidebar.open {
  transform: translateX(0);
}

h4.sidebar-header {
  margin: 0;
  padding: 0.7rem 0.75rem 0.6rem;
  font-family: 'ADLaM Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background-color: rgba(33, 37, 41, 0.99);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-section {
  display: flex;
  align-items: center;
}

.sidebar-section > span {
  display: block;
  padding: 0.2rem 0.25rem 0.1rem;
  font-size: 0.7rem !important;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255, 255, 255, 0.42);
  font-weight: 600;
}

.sidebar-link, #navSidebar {
  --bs-text-opacity: 1;
  color: rgba(var(--bs-light-rgb),var(--bs-text-opacity));
  text-decoration: none;
}

.sidebar-link {
  display: flex;
  min-height: 2rem;
  transition: background 0.13s, color 0.13s;
}

.sidebar-link:hover, .sidebar-link:active {
  background: rgba(255, 255, 255, 0.10);
  color: #fff !important;
}

#navSidebar {
  position: fixed !important;
  top: 6rem;
  bottom: 70px;
  left: 0;
  z-index: 1045;
  width: 180px;
  padding-left: .25rem;
  transform: translateX(-100%);
  transition: transform 0.27s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overflow-x: hidden;
}

.link-thumb {
  border-radius: 6px;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background-color: #fff;
  margin-left: .25rem;
  margin-right: .25rem;
  padding: .1rem;
  object-fit: contain;
}

.sidebar-exp {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  border-radius: 6px;
}

/* Main link or filter-btn fills the row, pushing expand btn to the right */

.sidebar-exp > .sidebar-link, .sidebar-exp > .filter-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.25rem 0.35rem;
  justify-content: flex-start;
  text-align: left;
}

#burgerSearch {
  height: 45px;
}

.nav-icon {
  font-size: 24px;
}

button.sidebar-expand-btn {
  flex-shrink: 0;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none;
  padding: 0.5rem 0.55rem;
  color: rgba(255, 255, 255, 0.38);
  line-height: 1;
  cursor: pointer;
  border-radius: 4px !important;
  transition: color 0.15s, background 0.15s;
  align-self: start;
}

button.sidebar-expand-btn:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08) !important;
}

button.sidebar-expand-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 1px;
}

.sidebar-exp.open > button.sidebar-expand-btn {
  color: rgba(255, 255, 255, 0.72);
}

.sidebar-sub {
  display: none;
  flex-direction: column;
  width: 100%;
}

.sidebar-exp.open > .sidebar-sub {
  display: flex;
}

.sidebar-sub > .sidebar-link {
  font-size: 0.88rem;
  min-height: 36px;
  width: 100%;
  color: rgba(255, 255, 255, 0.62) !important;
  border-left: 2px solid rgba(255, 255, 255, 0.10);
  border-radius: 0 4px 4px 0;
  padding: 0.25rem 0.4rem 0.25rem 0.55rem;
  justify-content: flex-start;
  text-align: left;
}

.sidebar-sub > .sidebar-link:hover {
  color: #fff !important;
  border-left-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-link.filter-active {
  background: rgba(33, 91, 51, 0.35);
  color: #fff !important;
  border-left: 3px solid var(--bs-primary);
  padding-left: calc(0.5rem - 3px);
}

.sidebar-link.filter-active img {
  filter: brightness(1.3);
}

button.sidebar-expand-btn .sec-exp-plus, button.sidebar-expand-btn .sec-exp-min {
  transform: none;
  transition: opacity 0.15s;
}

button.sidebar-expand-btn .sec-exp-min {
  display: none;
}

.sidebar-exp.has-filter > button.sidebar-expand-btn {
  color: var(--bs-primary) !important;
}

.sidebar-exp.open > button.sidebar-expand-btn .sec-exp-plus {
  display: none;
}

.sidebar-exp.open > button.sidebar-expand-btn .sec-exp-min {
  display: block;
}

.sidebar-mid {
  display: none;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin-top: 0.1rem;
}

.sidebar-exp.open > .sidebar-mid {
  display: flex;
}

/* Label inside a mid-level header row */

.sidebar-mid > span {
  flex: 1 1 0;
  min-width: 0;
  align-self: center;
  padding: 0.3rem 0.25rem 0.2rem 0.85rem;
  font-size: 0.68rem !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.38);
  font-weight: 600;
}

@media (max-width: 649.98px) {
  #navButt {
    min-width: 120px;
  }
}

@media (max-width: 767.98px) {
  #searchBar {
    width: 72px;
    max-width: 420px;
    transition: width 0.3s ease;
    transform-origin: left center;
    padding-right: 0;
  }
}

@media (max-width: 767.98px) {
  .custom-navbar.search-active .container > .col {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767.98px) {
  .custom-navbar.search-active #brand, .custom-navbar.search-active #navButt {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  .custom-navbar.search-active #searchInput {
    display: block !important;
    flex-shrink: 1 !important;
    min-width: 30px;
  }
}

@media (max-width: 767.98px) {
  .custom-navbar.search-active #searchBar {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 767.98px) {
  .custom-navbar.search-active #burgerSearch {
    padding-right: 50px;
  }
}

@media (min-width: 768px) {
  #burgerSearch {
    padding-right: 30%;
  }
}

@media (min-width: 650px) {
  #navButt {
    min-width: 206px;
  }
}

@media (max-width: 767.98px) {
  .float-image {
    width: 55%;
    min-width: 240px;
    margin: 0 1rem .8rem 0;
  }
}

@media (max-width: 767.98px) {
  #navButt ul {
    flex-direction: column;
  }
}

@media (max-width: 767.98px) {
  .float-image.right {
    margin: 0 0 .8rem 1rem;
  }
}

@media (max-width: 767.98px) {
  .map-container iframe {
    height: 250px;
  }
}

@media (max-width: 767.98px) {
  .thumbnail {
    height: 60px;
  }
}

@media (max-width: 767.98px) {
  .thumbnail-container .col {
    min-width: 70px;
    max-width: 120px;
  }
}

@media (max-width: 767.98px) {
  #searchInput {
    font-size: 14px;
  }
}

@media (max-width: 767.98px) {
  #swiper-1 {
    height: 12rem;
  }
}

@media (min-width: 768px) {
  #swiper-1 {
    height: 16rem;
  }
}

@media (max-width: 985.98px) {
  #brandBadge {
    display: block;
  }
}

@media (max-width: 985.98px) {
  #brandLogo {
    display: none;
  }
}

@media (min-width: 986px) {
  #brandBadge {
    display: none;
  }
}

@media (min-width: 986px) {
  #brandLogo {
    display: block;
  }
}

@media (min-width: 1200px) {
  .image-container .bg {
    max-width: 85%;
  }
}

@media (min-width: 1200px) {
  #snowCarousel .carousel-item {
    height: 34rem;
  }
}

@media (min-width: 1600px) {
  .image-container .bg {
    max-width: 75%;
  }
}

@media (min-width: 1600px) {
  #snowCarousel .carousel-item {
    height: 36rem;
  }
}

#searchBar {
  justify-self: start;
}

#brand {
  justify-self: center;
  flex: 1;
}

#navButt {
  justify-self: end;
  margin-right: 2rem;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

#brandBadge {
  background: var(--brand-badge) no-repeat center;
  background-size: contain;
  width: 70px;
  height: 60px;
}

#brandLogo {
  background: var(--brand-logo) no-repeat center;
  background-size: contain;
  min-width: 200px;
  min-height: 60px;
}

.config-block {
  background: var(--bs-focus-ring-color);
  border-radius: 6px;
}

.custom-navbar {
  background-image: var(--bs-gradient)!important;
  --bs-bg-opacity: .90;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  background-color: rgba(var(--bs-dark-rgb),var(--bs-bg-opacity))!important;
  z-index: 4;
  height: 96px;
  overflow: hidden;
}

.custom-navbar .container {
  max-width: 100% !important;
  padding-left: 3% !important;
  padding-right: 3% !important;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.custom-navbar-ext {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  background-color: rgba(33, 37, 41, 0.9);
  background-image: var(--bs-gradient-inv) !important;
  z-index: 4;
}

.custom-navbar .navbar-brand, .custom-navbar .nav-link, .custom-navbar .btn {
  opacity: 1;
  background-color: transparent !important;
}

/* Navigation icon states */

.nav-link.active img.active-icon.d-md-inline-block {
  display: inline-block !important;
}

.nav-link img.default-icon.d-md-inline-block {
  display: inline-block !important;
}

.nav-link.active img.default-icon {
  display: none !important;
}

.nav-link img.active-icon {
  display: none !important;
}

.nav-link img.d-none {
  display: none !important;
}

.nav-link:not(.active):hover img.default-icon {
  display: none !important;
}

.nav-link:not(.active):hover img.active-icon {
  display: inline-block !important;
}

.portfolio-item {
  padding: .75rem;
}

.navbar-nav {
  flex-direction: row;
}

.nav-item span {
  display: flex;
  border: 1px outset var(--bs-body-bg);
  text-align: center;
  font-family: 'ADLaM Display', serif;
  font-size: 14px;
  color: var(--bs-body-bg);
  background-color: #091512;
}

.nav-item {
  text-align: center;
  margin-left: 0.25rem !important;
  margin-right: 0.25rem !important;
}

.help-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #6c757d;
  color: white;
  text-align: center;
  font-size: 12px;
  line-height: 18px;
  cursor: help;
  margin-left: 8px;
}

.help-icon:hover {
  background-color: #495057;
}

.image-container {
  position: relative;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-container .bg {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.image-container .g40overlay {
  position: absolute;
  top: 28%;
  left: 23%;
  width: 28%;
  height: auto;
  max-width: 240px;
  min-width: 90px;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.image-container .e85overlay {
  position: absolute;
  top: 68%;
  left: 74%;
  width: 35%;
  height: auto;
  max-width: 240px;
  min-width: 90px;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.map-container {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.map-container iframe {
  width: 100%;
  height: 350px;
  border: 0;
  border-radius: 10px;
}

.thumbnail {
  height: 80px;
  object-fit: scale-down;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.8;
  border: 2px solid transparent;
  border-radius: 4px;
}

.thumbnail:hover {
  opacity: 1;
  border-color: #007bff;
  transform: scale(1.05);
}

.thumbnail.active {
  opacity: 1;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* ===== GALLERY WRAPPER (NEW) ===== */

.thumbnail-gallery-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-width: 2px;
  border-color: var(--bs-secondary-color);
  border-radius: 6px;
}

/* ===== THUMBNAIL CONTAINER (UPDATED) ===== */

.thumbnail-container {
  display: flex !important;
  flex-wrap: nowrap;
  gap: 0.5rem;
  padding: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  width: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.thumbnail-container::-webkit-scrollbar {
  height: 4px;
}

.thumbnail-container::-webkit-scrollbar-track {
  background: transparent;
}

.thumbnail-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

/* Ensure thumbnails don't shrink in flex layout */

.thumbnail-container .col {
  flex: 0 0 auto;
  min-width: 100px;
  max-width: 150px;
  text-align: center;
}

.gallery-nav {
  cursor: pointer;
  user-select: none;
  display: inline-block;
  transition: opacity 0.2s;
}

.gallery-nav:hover {
  opacity: 0.7;
}

.social {
  text-align: center;
}

/* Newsarticle Formatting */

.float-image {
  width: 34%;
  max-width: 100%;
  height: auto;
  float: left;
  margin: 0 1rem .8rem 0;
  shape-outside: inset(0 round 8px);
  clip-path: inset(0 round 8px);
  border-radius: 8px;
}

.float-image.right {
  float: right;
  margin: 0 0 .8rem 1rem;
  shape-outside: inset(0 round 8px);
  clip-path: inset(0 round 8px);
  border-radius: 8px;
}

.about-section::after {
  content: "";
  display: block;
  clear: both;
}

.cutout {
  shape-outside: polygon();
  clip-path: polygon();
}

/* end of Newsarticle Formatting */

.team-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  padding: 2rem 1rem;
  justify-items: center;
}

.teamcard {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  text-align: center;
  max-width: 320px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.teamcard:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.teamcard img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.teamcard h3 {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.2rem;
}

.teamcard p {
  color: #666;
  font-size: 0.95rem;
}

.card-body p {
  display: none;
}

.bio card {
  width: min-content;
}

/* Apply to all card rows */

.row:has(.card) > .col {
  display: flex;
}

.row:has(.card) .col > a, .row .col > .card {
  display: flex;
  flex: 1;
  width: 100%;
}

.row .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.row .card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* If you have lists in cards, push them to bottom */

.row .card-body ul {
  margin-top: auto;
}

.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Breadcrumb styling */

#breadcrumbBar {
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  margin: 0;
  padding-left: 3.5%;
  font-size: .8rem;
  line-height: 1.5;
  pointer-events: none;
}

#breadcrumbBar .breadcrumb-item {
  pointer-events: auto;
}

#breadcrumbBar .breadcrumb-item a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.70);
}

#breadcrumbBar .breadcrumb-item a:hover {
  color: #fff;
  text-decoration: underline;
}

#breadcrumbBar .breadcrumb-item.active, #breadcrumbBar .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.42);
}

.bs-icon {
  --bs-icon-size: .75rem;
  display: flex;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  font-size: var(--bs-icon-size);
  width: calc(var(--bs-icon-size) * 2);
  height: calc(var(--bs-icon-size) * 2);
  color: var(--bs-primary);
}

.bs-icon-xs {
  --bs-icon-size: 1rem;
  width: calc(var(--bs-icon-size) * 1.5);
  height: calc(var(--bs-icon-size) * 1.5);
}

.bs-icon-sm {
  --bs-icon-size: 1rem;
}

.bs-icon-md {
  --bs-icon-size: 1.5rem;
}

.bs-icon-lg {
  --bs-icon-size: 2rem;
}

.bs-icon-xl {
  --bs-icon-size: 2.5rem;
}

.bs-icon.bs-icon-primary {
  color: var(--bs-white);
  background: var(--bs-primary);
}

.bs-icon.bs-icon-primary-light {
  color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), .2);
}

.bs-icon.bs-icon-semi-white {
  color: var(--bs-primary);
  background: rgba(255, 255, 255, .5);
}

.bs-icon.bs-icon-rounded {
  border-radius: .5rem;
}

.bs-icon.bs-icon-circle {
  border-radius: 50%;
}

.col > a {
  text-decoration: none;
}

/* Product Page styling */

.form-control {
  padding: .25rem .25rem;
}

/* Search & Catalog */

#defaultView .col {
  display: flex;
}

#defaultView .col > a {
  display: flex;
  flex: 1;
  width: 100%;
  text-decoration: none;
}

#defaultView .card {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
}

#defaultView .card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

#defaultView .card img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  object-position: center;
}

#searchInput {
  min-width: 40px;
  transition: min-width 0.3s ease;
  transform-origin: right;
}

#searchInput:focus {
  min-width: 120px;
}

/* Ice Landing Page */

#snowCarousel {
  position: relative;
  overflow: hidden;
}

#snowCarousel .carousel-item {
  height: 32vh;
  position: relative;
}

#snowCarousel .carousel-item > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
}

#snowCarousel .container {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#swiper-1 .swiper-slide {
  height: 100% !important;
}

#swiper-1 .swiper-slide img {
  height: 100% !important;
  object-fit: cover;
}

/* Main Configurator Container */

.configurator-container {
  border-radius: 8px;
  padding: 0.75rem;
}

/* Diagram/Image Container - Sticky on Desktop */

.configurator-diagram {
  position: sticky;
  top: 6rem;
}

.configurator-container h4 {
  font-weight: 600;
  padding-bottom: 1rem;
  position: sticky;
  top: 6rem;
  background-color: #ffffff;
  z-index: 5;
}

.spec-group {
  border-radius: 6px;
  background-color: #f0fff0;
  padding: .75rem;
  margin-bottom: 1em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.spec-group legend {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0 0.5rem;
  margin-bottom: 1rem;
  width: auto;
}

.spec-group .form-group:last-child {
  margin-bottom: 0;
}

/* Form Elements */

.config-form .form-label {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.config-form .form-select, .config-form .form-control, .config-form input[type="text"], .config-form input[type="number"], .config-form textarea {
  border-radius: 4px;
  padding: 0.625rem 0.875rem;
  font-size: 0.95rem;
}

/* Button Groups */

.config-form .btn-group {
  margin-bottom: 0;
}

.config-form .btn {
  border-radius: 4px;
  font-weight: 500;
  padding: 0.625rem 1rem;
  background-color: #ffffff;
}

/* Utility class for even button distribution */

.flex-grow-1 {
  flex: 1 !important;
}

/* Pricing/Display Section */

.config-pricing {
  padding: 0;
  background-color: lightgray;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.config-pricing h5 {
  font-weight: 600;
  margin-bottom: 0;
}

/* Info Box */

.config-notes {
  padding: 1rem;
  border-radius: 4px;
}

/* Form Helper Text */

.config-form .form-text {
  font-size: 0.875rem;
  display: block;
  margin-top: 0.25rem;
}

/* ===== RESPONSIVE CONFIGURATOR =====
   Mobile-first responsive adjustments
   ==================================== */

@media (max-width: 768px) {
  .configurator-container {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 768px) {
  .configurator-diagram {
    position: static;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 768px) {
  .configurator-diagram img, .configurator-diagram svg {
    max-height: 300px;
  }
}

@media (max-width: 768px) {
  .spec-group {
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .config-form .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}

/* ===== END CONFIGURATOR STYLES ===== */

/* Card Title Spacing */

.card-title {
  text-align: left;
}

/* ===== CATALOG MODE TOGGLE ===== */

/* Icon visibility by state — machines is default */

/* Label base */

/* Active label glows yellow */

.stage-card {
  align-items: center;
  text-align: center;
}

.sidebar-nav {
}

