.filter-bar {
  overflow-x: scroll;
  overflow-y: scroll;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

/* Filter buttons — column layout (icon on top, label below) for both top bar and sidebar */

.filter-btn {
  display: flex;
  flex: 0 0 auto;
  padding-top: .25rem;
  width: 4.5rem;
  overflow: hidden;
}

nav.filter-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.filter-icon.selected {
  opacity: 1;
  border-color: #0d6efd;
  background-color: #e7f3ff;
}

.filter-icon i {
  font-size: 24px;
  color: #495057;
}

.filter-icon.selected i {
  color: #0d6efd;
}

.filter-toggle {
  background: linear-gradient(45deg, #0d6efd, #0056b3);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.filter-toggle.active {
  background: linear-gradient(45deg, #198754, #146c43);
}

.filter-label {
  text-align: center;
  color: var(--bs-body-bg);
  white-space: nowrap;
  overflow: hidden;
  display: block;
}

.filter-btn.selected, .filter-btn.filter-active {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
  border-left: 3px solid var(--bs-primary);
  padding-left: calc(0.35rem - 3px);
}

.filter-btn.selected img, .filter-btn.filter-active img {
  filter: brightness(1.3);
}

.product-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, calc(50% - 10px)), 1fr));
  gap: 2em;
  align-items: stretch;
}

@media (max-width: 745px) {
  .product-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 1em;
    align-items: stretch;
  }
}

.product-card {
  transition: all 0.3s ease;
  text-decoration: none !important;
}

.product-card.hidden {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-card .card {
  position: relative;
  height: 100%;
  max-width: 25rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card .card-hover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 2;
}

.product-card:hover .card-hover-overlay {
  opacity: 1;
}

.product-card .card-body {
  flex: 0 0 auto;
  overflow: hidden;
}

.product-card .card-footer {
  margin-top: auto;
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
}

.product-card img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: contain;
}

.price-wrapper {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.price-label {
  font-size: 0.7rem;
  opacity: 0.7;
}

.results-count {
  color: #6c757d;
  font-style: italic;
}

#Content {
  max-width: 90%;
}

#productDisplay > h2 {
  text-align: start;
  margin-bottom: 0px;
}

#productDisplay > span {
  display: block;
  text-align: left;
}

.product-page-content, .product-line, .gen-page {
  padding-top: 1rem;
  margin-bottom: 5rem;
  margin-left: 5%;
  margin-right: 5%;
  max-width: 90vw;
  transition: margin-left 0.27s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.27s cubic-bezier(0.4, 0, 0.2, 1);
}

#navSidebar.open ~ .product-page-content, #navSidebar.open ~ .product-line {
  margin-left: 180px;
  max-width: calc(98vw - 180px);
  transition: margin-left 0.27s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.27 cubic-bezier(0.4, 0, 0.2, 1);
}

.main-product-image-container {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  max-height: 400px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: transparent;
}

.main-product-image {
  width: 100%;
  max-height: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: block;
}

.main-product-image:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.product-layer-image {
  border: none !important;
  border-radius: 8px;
  object-fit: contain;
}

.svg-arrow {
  position: absolute;
  top: 85%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  filter: drop-shadow(1px 1px 2px rgba(42, 49, 16, 0.5));
}

.svg-arrow.visible {
  opacity: 0.5;
  visibility: visible;
}

.svg-arrow.visible:hover {
  opacity: .8;
}

.svg-arrow:hover {
  opacity: .8;
}

.svg-arrow-prev {
  left: 4%;
}

.svg-arrow-next {
  right: 4%;
}

.svg-arrow path {
  fill: white;
}

#productDesc {
  font-size: 14px;
}

.description-excerpt p {
  line-clamp: 7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
  overflow: hidden;
  position: relative;
  margin-bottom: 0rem;
  z-index: 1;
}

.description-excerpt {
  position: relative;
}

.fade-overlay {
  position: absolute;
  top: 8em;
  height: 2.5em;
  background: linear-gradient( rgba(248,249,250,0), rgba(248,249,250,1) );
  pointer-events: none;
  z-index: 2;
}

.description-full {
  display: none;
}

.toggle-text {
  position: relative;
  font-size: 0.9rem;
  color: var(--bs-link-color);
  cursor: pointer;
  z-index: 3;
}

.options-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  margin-bottom: 1rem;
}

.options-label {
  align-self: start;
  flex-shrink: 0;
  white-space: nowrap;
}

.options-options {
  display: flex;
  gap: 1rem;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
}

.options-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  line-height: 1;
}

.options-item input[type="radio"] {
  margin: 0;
}

.options-item {
  position: relative;
}

.options-item:hover .options-name {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* FIXED: Added styling for hose length radio buttons to show active state */

#hoseSelect input[type="radio"] {
  position: static;
  opacity: 1;
  pointer-events: auto;
  accent-color: #0d6efd;
  cursor: pointer;
}

#hoseSelect .options-item {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background-color 0.15s ease;
}

#hoseSelect .options-item.active {
  background-color: rgba(13, 110, 253, 0.1);
}

#hoseSelect .options-item:hover {
  background-color: rgba(13, 110, 253, 0.05);
}

#colorSelect input[type="radio"], #wheelSelect input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.options-item:hover .swatches {
  transform: scale(1.1);
}

.options-item input[type="radio"]:checked + .swatches {
  border-color: #0d6efd;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.35);
}

.options-name {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  background: #000;
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.options-item.swatches.wheel img {
  width: 48px;
  height: auto;
  border-radius: 4px;
  border: 2px solid transparent;
}

.options-item.active img, .options-item:hover img {
  border-color: #0d6efd;
}

.options-item.swatches.wheel.active img, .options-item.swatches.wheel:has(input[type="radio"]:checked) img {
  transform: scale(1.1);
  filter: drop-shadow(0 0 4px rgba(13, 110, 253, 0.95));
}

.swatches {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  box-sizing: border-box;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.swatches.blue {
  background: #2b6b7f;
}

.swatches.black {
  background: #111;
}

.swatches.red {
  background: #8c1d18;
}

.swatches.white {
  background: #f5f5f5;
  border-color: #ccc;
}

.swatches.green {
  background: #2f6f3e;
}

.swatches.yellow {
  background: #e2b400;
}

.swatches.custom {
  background: repeating-linear-gradient( 45deg, #ca0a0a, #afc207 5px, #087924 5px, #130b86 10px );
  color: #333;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.color-disclaimer {
  display: none;
  opacity: 0.7;
  font-size: 10px;
}

body.custom-color-active .color-disclaimer {
  display: inline-block;
}

.image-disclaimer {
  position: absolute;
  bottom: 8px;
  right: 10px;
  color: #000;
  padding: 4px 6px;
  pointer-events: none;
}

/* ===== PRODUCT SCROLLER ===== */

.scroller-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 16px;
  height: 15em;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 2px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.2) transparent;
}

.scroller-track::-webkit-scrollbar {
  height: 6px;
}

.scroller-track::-webkit-scrollbar-track {
  background: transparent;
}

.scroller-track::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 3px;
}

.scroller-track .product-card {
  flex: 0 0 180px;
  width: 180px;
  display: block;
  scroll-snap-align: start;
}

.scroller-track .product-card .card {
  max-width: none;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.scroller-track .product-card .card-img-top {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: contain;
  background: var(--bs-body-bg);
}

.scroller-track .product-card .card-title {
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
}

.scroller-track .product-card .card-subtitle {
  font-size: 0.75rem;
}

.scroller-track .product-card .card-text {
  font-size: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.scroller-search-input {
  max-width: 240px;
  min-width: 120px;
}

.scroller-count {
  font-size: 0.85em;
  white-space: nowrap;
}

.scroller-track .price {
  font-weight: 700;
  color: #198754;
}

