/**
 * Table of Contents
 * 
 * 1. Menu Category Navigation
 *    1.1. Menu Categories Container
 *    1.2. Scrollbar Styling
 * 2. Category Tabs
 *    2.1. Basic Tab Styling
 *    2.2. Empty Categories
 *    2.3. Active Tab State
 * 3. Product Categories and Items
 *    3.1. Product Category Container
 *    3.2. Scroll Container
 *    3.3. Product Item Layout
 *    3.4. Product Content Styling
 * 4. Pagination
 *    4.1. Dot Pagination
 *    4.2. Numeric Pagination
 * 5. Animations and Effects
 *    5.1. Fade In Animation
 *    5.2. Spin Animation
 * 6. Loading Indicators
 * 7. WooCommerce Sidebar Specific Styles
 * 8. Responsive Styles
 */

/* ========================================
 * 1. Menu Category Navigation
 * ======================================== */
/* 1.1. Menu Categories Container */
.sidebar-category-tabs .menu-categories {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 10px 0;
  scrollbar-width: thin;
  margin-bottom: 15px;
  -ms-overflow-style: none;
}

/* 1.2. Scrollbar Styling */
.sidebar-category-tabs .menu-categories::-webkit-scrollbar {
  height: 8px;
}

.sidebar-category-tabs .menu-categories::-webkit-scrollbar-thumb {
  background-color: #f4a261;
  border-radius: 4px;
}

.sidebar-category-tabs .menu-categories::-webkit-scrollbar-track {
  background-color: #f0f0f0;
}

/* ========================================
 * 2. Category Tabs
 * ======================================== */
/* 2.1. Basic Tab Styling */
.sidebar-category-tabs .category-tab {
  padding: 10px 20px;
  background-color: #f4a261;
  border: none;
  color: white;
  cursor: pointer;
}

/* 2.2. Empty Categories */
.sidebar-category-tabs .category-tab.empty-category {
  opacity: 0.7;
  background-color: #ccc;
  cursor: pointer;
}

.sidebar-category-tabs .category-tab .product-count {
  font-size: 0.8em;
  margin-left: 5px;
  opacity: 0.8;
}

.sidebar-category-tabs .category-tab.empty-category:hover {
  opacity: 0.9;
  background-color: #b3b3b3;
}

/* 2.3. Active Tab State */
.sidebar-category-tabs .category-tab.active {
  background-color: #e76f51;
  transform: scale(1.05);
  transition: all 0.3s ease;
}

/* ========================================
 * 3. Product Categories and Items
 * ======================================== */
/* 3.1. Product Category Container */
.sidebar-category-tabs .product-category {
  display: none;
}

/* 3.2. Scroll Container */
.sidebar-category-tabs .scroll-container {
  height: 450px;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}

.sidebar-category-tabs .scroll-snap-helper {
  height: 100vh;
  scroll-snap-align: start;
}

/* 3.3. Product Item Layout */
.sidebar-category-tabs .product-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 400px;
  padding: 10px 10px 0 10px;
  background-color: #000;
  color: #fff;
  border-radius: 10px;
  overflow: hidden;
  animation: fadeIn 0.5s ease-in-out;
  margin-bottom: 30px;
  margin-top: 15px;
}

.sidebar-category-tabs .product-item img {
  flex: 2;
  width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* 3.4. Product Content Styling */
.sidebar-category-tabs .product-item .product-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  text-align: center;
}

.sidebar-category-tabs .product-item h2 {
  font-size: 1.5rem;
  margin: 10px 0;
}

.sidebar-category-tabs .product-item p {
  font-size: 1rem;
  margin: 10px 0;
}

.sidebar-category-tabs .product-item button,
.sidebar-category-tabs .product-item a {
  padding: 10px 20px;
  background-color: #f4a261;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  line-height: normal;
}

.sidebar-category-tabs .product-item button:hover {
  background-color: #e76f51;
}

/* ========================================
 * 4. Pagination
 * ======================================== */
/* 4.1. Dot Pagination */
.sidebar-category-tabs .dot-pagination {
  position: absolute;
  top: 115px;
  left: 30px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 10;
}

.sidebar-category-tabs .dot {
  width: 10px;
  height: 10px;
  background-color: #ccc;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.sidebar-category-tabs .dot.dot-number {
  font-size: 0.8em;
  display: flex;
  justify-content: center;
  width: 22px;
  height: 22px;
  align-items: center;
}

.sidebar-category-tabs .dot.active {
  background-color: #f4a261;
  transform: scale(1.2);
  outline: 2px solid #e76f51;
  box-shadow: 0 0 10px rgba(244, 162, 97, 0.8);
}

/* 4.2. Numeric Pagination */
.sidebar-category-tabs .numeric-pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
  position: absolute;
  left: 30px;
  top: 90px;
  z-index: 10;
}

.sidebar-category-tabs .numeric-pagination .page-number {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f4a261;
  color: white;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sidebar-category-tabs .numeric-pagination .page-number.active {
  background-color: #e76f51;
  transform: scale(1.1);
}

/* ========================================
 * 5. Animations and Effects
 * ======================================== */
/* 5.1. Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 5.2. Spin Animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
 * 6. Loading Indicators
 * ======================================== */
.sidebar-category-tabs .loading-icon {
  text-align: center;
  margin: 20px 0;
}

.sidebar-category-tabs .loading-icon img {
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

/* ========================================
 * 7. WooCommerce Sidebar Specific Styles
 * ======================================== */
.sidebar-category-tabs {
  max-width: 355px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.sidebar-category-tabs .menu-categories {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 10px 0;
  scrollbar-width: thin;
  margin-bottom: 15px;
  -ms-overflow-style: none;
}

.sidebar-category-tabs .menu-categories::-webkit-scrollbar {
  height: 8px;
}

.sidebar-category-tabs .menu-categories::-webkit-scrollbar-thumb {
  background-color: #f4a261;
  border-radius: 4px;
}

.sidebar-category-tabs .menu-categories::-webkit-scrollbar-track {
  background-color: #f0f0f0;
}

.sidebar-category-tabs .category-tab {
  padding: 10px 20px;
  background-color: #f4a261;
  border: none;
  color: white;
  cursor: pointer;
}

.sidebar-category-tabs .scroll-container {
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.sidebar-category-tabs .scroll-container::-webkit-scrollbar {
  height: 8px;
}

.sidebar-category-tabs .product-item {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  background-color: #000;
  color: #fff;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 15px;
}

/* ========================================
 * 8. Responsive Styles
 * ======================================== */
@media screen and (min-width: 768px) {
  .sidebar-category-tabs {
    max-width: 400px;
  }
}
