/* ===========================================================================
   Shared filter-grid styles — used by any Isotope-filtered page:
   Brochures, Manuals, Presentations, AssociateLinks, Release Notes, etc.
   =========================================================================== */

/* Filter buttons — dark-blue by default, orange when active/hover */
.mcs-filter-btn {
  background-color: #002e57;
  color: #fff;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.mcs-filter-btn:hover,
.mcs-filter-btn:focus,
.mcs-filter-btn.is-active {
  background-color: #ff8c00;
  color: #002e57;
}

.mcs-filter-btn:active {
  transform: translateY(1px);
}

/* Sidebar → vertical stack on ≥md; horizontal wrap on <md */
@media (min-width: 768px) {
  .mcs-filter-btn {
    width: 100%;
    white-space: normal;   /* allow labels to wrap inside the narrow column */
    font-size: 0.78rem;
    padding: 0.28rem 0.5rem;
    line-height: 1.15;
  }

  /* Tighter card container so the sidebar takes less horizontal + vertical room */
  .filter-button-group .card-body {
    padding: 0.35rem !important;
  }
  .filter-button-group .card.textbkg {
    font-size: 0.85rem !important;
    padding-top: 0.15rem !important;
    padding-bottom: 0.15rem !important;
    margin-bottom: 0.4rem !important;
  }
  .filter-button-group .d-flex {
    gap: 0.2rem !important;
  }

  /* Sidebar sticks to the top of the viewport as the page scrolls (desktop only).
     The 90px offset clears the fixed navbar; the max-height + overflow lets long
     filter lists scroll internally when the menu is taller than the viewport. */
  .filter-button-group {
    position: sticky;
    top: 90px;
    align-self: flex-start;        /* required so the sticky col isn't stretched by the row */
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    z-index: 1;
  }

  /* Subtle scrollbar for the sticky menu */
  .filter-button-group::-webkit-scrollbar {
    width: 6px;
  }
  .filter-button-group::-webkit-scrollbar-thumb {
    background: rgba(0, 46, 87, 0.3);
    border-radius: 3px;
  }
  .filter-button-group::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 46, 87, 0.55);
  }
}

/* Grid card styling shared across pages */
.product-item {
  border: 1px solid #ebebeb;
  border-radius: 4px;
  position: relative;
  background: #fff;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.product-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.product-img {
  position: relative;
  overflow: hidden;
}

.product-img img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.product-img:hover::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.08);
  z-index: 1;
}

/* Mobile tightening */
@media (max-width: 767.98px) {
  .filter-button-group .card-body {
    padding: 0.5rem;
  }
  .mcs-filter-btn {
    font-size: 0.78rem;
    padding: 0.3rem 0.55rem;
  }
  #product-list > [class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

@media (max-width: 375px) {
  .mcs-filter-btn {
    font-size: 0.72rem;
    padding: 0.25rem 0.45rem;
  }
}
