/* ItemsSection.css */


/* Main container with full height */
/* ItemsSection.css - Updated for full page scroll */

/* Category link styles */
.category-link {
  display: block;
  width: 100%;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}

/* Active/Pressed state - IMMEDIATE feedback */
.category-link:active {
  transform: scale(0.97);
  opacity: 0.7;
  background-color: rgba(0, 0, 0, 0.03);
  border-radius: 4px;
}

/* Ripple effect on click */
.category-link::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(249, 115, 22, 0.3); /* orange-500 with opacity */
  opacity: 0;
  border-radius: 100%;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: 50% 50%;
}

.category-link:active::after {
  animation: ripple 0.4s ease-out;
}

@keyframes ripple {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.5;
  }
  100% {
    transform: translate(-50%, -50%) scale(20);
    opacity: 0;
  }
}

/* Subtle hover effect */
.category-link:hover {
  background-color: rgba(0, 0, 0, 0.02);
  padding-left: 4px;
  transition: all 0.2s ease;
}

/* Loading indicator for slow navigation (only shows after 300ms) */
.category-link.loading {
  cursor: progress;
  position: relative;
}

.category-link.loading::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #f97316, #fbbf24, #f97316);
  background-size: 200% 100%;
  animation: loadingShimmer 1.2s ease-in-out infinite;
}

@keyframes loadingShimmer {
  0% { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

/* Main container with full height */
.full-page-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Hide scrollbar for all elements */
.hide-scrollbar::-webkit-scrollbar {
  display: none !important;
}

.hide-scrollbar {
  -ms-overflow-style: none !important;  /* IE and Edge */
  scrollbar-width: none !important;      /* Firefox */
}

/* Content area should grow and be scrollable */
.content-area {
  flex: 1;
  overflow-y: auto;
}

/* Hide scrollbar for better look */
.hide-scrollbar {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.hide-scrollbar::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Desktop sidebar scrollbar */
.sidebar-scrollbar {
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-scrollbar::-webkit-scrollbar {
  width: 5px;
}

/* Track */
.sidebar-scrollbar::-webkit-scrollbar-track {
  box-shadow: inset 0 0 5px #c8c5c5;
  border-radius: 10px;
}

/* Handle */
.sidebar-scrollbar::-webkit-scrollbar-thumb {
  background: #bababa;
  border-radius: 10px;
}

.sidebar-scrollbar a,
.sidebar-scrollbar a:visited,
.sidebar-scrollbar a:hover,
.sidebar-scrollbar a:active {
  color: inherit !important;
  text-decoration: none !important;
}

/* Scrollable container for the main content */
#scrollable-container {
  height: calc(100vh - 150px);
}

/* Mobile responsive */
@media (max-width: 767px) {
  #scrollable-container {
    height: calc(100vh - 120px);
  }
  
  .sidebar-scrollbar {
    max-height: none;
  }
}

/* Tablet responsive adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
  #scrollable-container {
    height: calc(100vh - 160px);
  }
}

/* Desktop responsive adjustments */
@media (min-width: 1025px) {
  #scrollable-container {
    height: calc(100vh - 180px);
  }
}

/* Mobile sidebar styles */
@media (max-width: 767px) {
  .mobile-category-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: white;
    z-index: 1000;
    transition: left 0.3s ease-in-out;
    overflow-y: auto;
    padding: 1rem;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }

  .mobile-category-sidebar.active {
    left: 0;
  }

  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Mobile product grid adjustments */
  .product-grid-container .grid {
    gap: 0.5rem !important;
  }

  /* Mobile infinite scroll container */
  #scrollable-container {
    height: calc(100vh - 180px) !important;
  }
}

/* Tablet responsive adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
  .product-grid-container .grid {
    gap: 1rem !important;
  }

  #scrollable-container {
    height: calc(100vh - 200px) !important;
  }
}

/* Desktop responsive adjustments */
@media (min-width: 1025px) {
  #scrollable-container {
    height: 80vh !important;
  }
}

/* Responsive typography */
@media (max-width: 640px) {
  .mobile-header-title {
    font-size: 1rem;
  }

  .mobile-count-text {
    font-size: 0.875rem;
  }
}

/* Touch-friendly button sizes */
@media (max-width: 767px) {
  button,
  a {
    min-height: 44px;
    min-width: 44px;
  }

  .mobile-sidebar-button {
    padding: 12px;
  }
}

/* Prevent horizontal scroll on mobile */
@media (max-width: 767px) {
  body {
    overflow-x: hidden;
  }

  .mobile-category-sidebar {
    -webkit-overflow-scrolling: touch;
  }
}

/* Mobile filter dropdown */
@media (max-width: 767px) {
  .mobile-filter-dropdown {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    max-height: 70vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
  }

  @keyframes slideUp {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }
}

/* Responsive image adjustments */
@media (max-width: 767px) {
  .product-image-container {
    height: 160px !important;
  }

  .product-image {
    object-fit: cover !important;
  }
}

/* Loading state adjustments for mobile */
@media (max-width: 767px) {
  .mobile-loader {
    padding: 2rem 0;
  }
}

/* No data found image responsive */
@media (max-width: 767px) {
  .no-data-image {
    max-width: 200px !important;
    height: auto;
  }
}

/* Mobile load more button */
.mobile-load-more {
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* Prevent text overflow on mobile */
@media (max-width: 767px) {
  .truncate-mobile {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Improved touch targets for mobile */
@media (max-width: 767px) {
  .touch-target {
    padding: 12px 16px;
    margin: 4px 0;
  }
}

/* Mobile horizontal scroll for categories */
@media (max-width: 767px) {
  .mobile-horizontal-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .mobile-horizontal-scroll::-webkit-scrollbar {
    display: none;
  }
}

/* Responsive spacing */
@media (max-width: 767px) {
  .mobile-spacing {
    padding: 0.75rem;
  }
}