.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;
}

.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(200px, calc(50% - 10px)), 1fr));
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 745px) {
  .product-gallery {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 10px;
    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%;
}

/* ===== 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;
}

