/* =============================================
 * jQuery Horizontal Scroll Plugin CSS
 * Adapted for Products in Demand Section
 * ============================================= */

/* Container for horizontal scroll - Products in Demand */
#products_horiz_container_outer {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin: 20px 0;
  cursor: grab;
  touch-action: pan-x; /* Allow horizontal panning, prevent vertical scroll */
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  padding: 0 !important; /* Override browser default ul padding */
  margin-left: 0 !important; /* Override browser default ul margin */
}

#products_horiz_container_outer:active {
  cursor: grabbing;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  #products_horiz_container_outer {
    cursor: default; /* Remove cursor on touch devices */
  }
}

#products_horiz_container_inner {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 0 !important; /* Override browser default ul padding */
  margin: 0 !important; /* Override browser default ul margin */
}

#products_horiz_container {
  list-style: none;
  padding: 0 !important; /* Override browser default ul padding */
  margin: 0 !important; /* Override browser default ul margin */
  white-space: nowrap;
  position: relative;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  gap: 20px;
}

#products_horiz_container.no-transition {
  transition: none;
}

#products_horiz_container li {
  display: inline-block;
  vertical-align: top;
  white-space: normal;
  flex-shrink: 0;
}

#products_horiz_container li:last-child {
  margin-right: 0;
}

/* Scrollbar styling for Products in Demand */
#products_scrollbar {
  width: 100%;
  height: 40px;
  position: relative;
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#products_track {
  width: 300px;
  height: 12px;
  background-color: rgba(229, 57, 53, 0.15); /* Light pink/gray background */
  position: relative;
  border-radius: 6px;
  cursor: pointer;
}

#products_dragBar {
  width: 80px;
  height: 16px; /* Taller than the track */
  background-color: var(--color-primary); /* Primary color */
  position: absolute;
  top: -2px; /* Extends above and below the track */
  left: 0;
  border-radius: 8px; /* More rounded corners */
  cursor: grab;
  box-shadow: 0 2px 8px rgba(229, 57, 53, 0.3);
  z-index: 2; /* Ensure it's above the track */
}

#products_dragBar:active {
  cursor: grabbing;
}

#products_left_scroll,
#products_right_scroll {
  display: none; /* Hide scroll arrows as per current design */
}

/* Ensure product cards maintain their styles within the carousel */
#products_horiz_container .product-card {
  /* Inherit all existing product-card styles from main.css */
  min-width: 280px; /* Ensure cards have consistent width */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #products_track {
    width: 250px;
    height: 10px;
    border-radius: 5px;
  }
  
  #products_dragBar {
    width: 65px;
    height: 14px;
    top: -2px;
    border-radius: 7px;
  }
  
  #products_horiz_container .product-card {
    min-width: 240px;
  }
}

@media (max-width: 480px) {
  #products_track {
    width: 200px;
    height: 8px;
    border-radius: 4px;
  }
  
  #products_dragBar {
    width: 50px;
    height: 12px;
    top: -2px;
    border-radius: 6px;
  }
  
  #products_horiz_container .product-card {
    min-width: 200px;
  }
} 