/* Skeleton Container */
.skeleton-container {
  width: 100%;
}

/* Hide loading spinner when skeleton is showing */
.skeleton-container + .load-more-loading {
  display: none !important;
}

.skeleton-container .loading-spinner {
  display: none !important;
}

/* Category Filter Bar */
.category-filter-container {
  position: relative;
  width: 100%;
}

.category-scroll-container {
  overflow-x: auto;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
  scroll-behavior: smooth;
  position: relative;
  width: 100%;
}

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

.category-buttons {
  display: flex;
  gap: 12px;
  min-width: max-content;
  flex-wrap: nowrap;
  align-items: flex-start;
}

.category-btn {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #000;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  word-break: break-word;
  width: auto;
  max-width: 190px;
  text-align: center;
  line-height: 1.3;
  height: 56px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-align: left;
}

.category-btn:hover {
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, .1);
}

.category-btn.active {
  background: white;
  border: 1px solid #000;
  color: #000;
  font-weight: 600;
}

.category-loading {
  padding: 8px 16px;
  font-size: 14px;
  color: #6c757d;
  font-style: italic;
}

/* Navigation Buttons */
.nav-btn {
  position: absolute;
  top: 30%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1 !important;
  font-size: 20px;
  font-weight: bold;
  color: #000 !important;
  border-radius: 50%;
  pointer-events: none;
  background: #fff;
  box-shadow: 0 4px 7px 0 rgba(0, 0, 0, .1);
  border: 1px solid rgba(0, 0, 0, .05);
  pointer-events: auto;
  -webkit-user-select: none;
  user-select: none;
  transition: -webkit-transform .15s ease;
  transition: transform .15s ease;
  transition: transform .15s ease, -webkit-transform .15s ease;
  top: 28px;
}

.nav-btn:hover {
  transform: translateY(-50%) scale(1.1);
}

.nav-left {
  left: -30px;
}

.nav-right {
  right: -30px;
}

.nav-right svg, .nav-left svg  {
  width: 16px;
}

.nav-right svg {
  margin-left: -1px;
}

.nav-left svg {
  margin-left: 0px;
  transform: rotate(180deg);
}

/* Navigation Arrow Icons */
.nav-arrow-icon {
  margin-top: -5px;
}

.skeleton-product-grid{
  padding: 0 !important;
}

/* Skeleton Container */
.skeleton-container {
  width: 100%;
}

/* Hide loading spinner when skeleton is showing */
.skeleton-container + .load-more-loading {
  display: none !important;
}

.skeleton-container .loading-spinner {
  display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .category-filter-container {
    padding: 0 20px;
    margin-bottom: 15px;
  }

  .category-buttons {
    gap: 8px;
    padding: 0 10px;
    flex-wrap: nowrap;
  }

  .category-btn {
    padding: 6px 12px;
    font-size: 12px;
    max-width: 100px;
    min-height: 32px;
  }

  .nav-btn {
    width: 28px;
    height: 28px;
  }
  
  .skeleton-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 0 15px;
  }
  
  .skeleton-image {
    height: 150px;
  }
  
  .skeleton-content {
    padding: 10px;
  }
  
  .skeleton-text {
    height: 10px;
    margin-bottom: 6px;
  }
}

/* Load More Loading Styles */
.load-more-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  margin: 20px 0;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #fb7701;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

.loading-text {
  font-size: 14px;
  color: #6c757d;
  margin: 0;
  font-weight: 500;
}

.no-more-data {
  display: flex;
  justify-content: center;
  padding: 40px 20px;
  margin: 20px 0;
}

.no-more-text {
  font-size: 14px;
  color: #6c757d;
  margin: 0;
  font-style: italic;
  text-align: center;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive for load more */
@media (max-width: 768px) {
  .load-more-loading {
    padding: 30px 15px;
    margin: 15px 0;
  }
  
  .loading-spinner {
    width: 32px;
    height: 32px;
    border-width: 2px;
    margin-bottom: 12px;
  }
  
  .loading-text {
    font-size: 12px;
  }
  
  .no-more-data {
    padding: 30px 15px;
    margin: 15px 0;
  }
  
  .no-more-text {
    font-size: 12px;
  }
}