/* Catalog Plugin Styles */

.catalog-wrapper {
  position: relative;
  width: 100%;
}

.catalog-sidebar-toggle {
  display: none;
  position: absolute;
  top: 20px;
  left: 20px;
  /* z-index: 1001; */
  width: 40px;
  height: 40px;
  background-color: #333;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.catalog-sidebar-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.catalog-sidebar-toggle:hover {
  background-color: #555;
}

.catalog-sidebar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.catalog-sidebar-toggle.active span:nth-child(2) {
  opacity: 0;
}

.catalog-sidebar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

.catalog-container {
  display: flex;
  gap: 20px;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Sidebar */
.catalog-sidebar {
  width: 280px;
  flex-shrink: 0;
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: all 0.3s ease;
}

.catalog-sidebar-header {
  background-color: #fff;
  color: #333;
  padding: 15px 15px;
  font-weight: 600;
  display: flex;
  /* justify-content: space-between; */
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 0;
  border-bottom: 2px solid #e0e0e0;
  border-radius: 0;
  font-size: 16px;
}

.catalog-sidebar-header::before {
  content: "☰";
  font-size: 18px;
}

.catalog-sidebar-close {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 32px;
  height: 32px;
  position: relative;
  flex-shrink: 0;
}

.catalog-sidebar-close span {
  display: block;
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: #333;
  border-radius: 2px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.catalog-sidebar-close span:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
}

.catalog-sidebar-close span:nth-child(2) {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.catalog-sidebar-close:hover span {
  background-color: #666;
}

/* Overlay backdrop */
.catalog-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0);
  z-index: 999;
  transition: background-color 0.3s ease;
  pointer-events: none;
}

.catalog-overlay.active {
  background-color: rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

.catalog-accordion-item {
  margin-bottom: 0;
  border: none;
  border-radius: 0;
  margin-bottom: 0;
}

.catalog-accordion-button {
  width: 100%;
  padding: 15px 15px;
  background-color: transparent;
  border: none;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
  color: #002f50;
  transition: background-color 0.2s;
  border-radius: 0;
}

.catalog-accordion-button:hover {
  background-color: #f9f9f9;
}

.catalog-accordion-button::after {
  content: "+";
  font-size: 22px;
  font-weight: 300;
  transition: transform 0.2s;
  color: #999;
  line-height: 1;
}

.catalog-accordion-button.collapsed::after {
  content: "+";
  transform: rotate(0deg);
}

.catalog-accordion-button:not(.collapsed)::after {
  content: "−";
}

.catalog-accordion-body {
  display: none;
  padding: 0;
  background-color: transparent;
  border-top: none;
  border-radius: 0;
}

.catalog-accordion-body.show {
  display: block;
}

.catalog-accordion-body a {
  display: block;
  padding: 12px 15px;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s;
  border-bottom: 1px solid #f0f0f0;
}

.catalog-accordion-body a:hover {
  background-color: #f5f5ff;
  color: #0052a3;
  padding-left: 20px;
}

/* Main Content */
.catalog-main-content {
  flex: 1;
}

.catalog-page-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 30px;
  margin-top: 0;
}

.catalog-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.catalog-category-card,
.catalog-subcategory-card {
  background-color: #fff;
  border-radius: 4px;
  overflow: hidden;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.catalog-category-card:hover,
.catalog-subcategory-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.catalog-category-card-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  width: 100%;
  height: 200px;
  background-color: #f5f5f5;
  overflow: hidden;
}

.catalog-category-card-images.single {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.catalog-category-card-images.three > :nth-child(1) {
  grid-row: 1 / 3;
}

.catalog-category-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border: 1px solid #e0e0e0;
}

.catalog-category-card-title {
  padding: 15px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: #333;
  background-color: #fff;
  flex-shrink: 0;
}

.catalog-subcategory-card-image-container {
  width: 100%;
  height: 200px;
  background-color: #f5f5f5;
  overflow: hidden;
}

.catalog-subcategory-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border: 1px solid #e0e0e0;
}

.catalog-subcategory-card-name {
  padding: 15px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: #333;
  background-color: #fff;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .catalog-wrapper {
    padding-top: 60px;
  }

  .catalog-sidebar-toggle {
    display: flex;
  }

  .catalog-overlay {
    display: block;
  }

  .catalog-container {
    flex-direction: column;
    padding: 20px;
  }

  .catalog-sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow-y: auto;
  }

  .catalog-sidebar.active {
    left: 0;
  }

  .catalog-sidebar-close {
    display: block;
  }

  .catalog-categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .catalog-main-content {
    margin-left: 0;
  }
}

/* Skeleton Loaders */
@keyframes skeleton-loading {
  0% {
    background-color: #e0e0e0;
  }
  50% {
    background-color: #f0f0f0;
  }
  100% {
    background-color: #e0e0e0;
  }
}

.catalog-accordion-skeleton {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px 0;
}

.catalog-accordion-skeleton .skeleton-item {
  height: 40px;
  background-color: #e0e0e0;
  border-radius: 4px;
  animation: skeleton-loading 1.5s infinite;
}

.catalog-categories-grid-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.catalog-categories-grid-skeleton .skeleton-card {
  border-radius: 8px;
  overflow: hidden;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.skeleton-card::before {
  content: "";
  display: block;
  width: 100%;
  height: 200px;
  background-color: #e0e0e0;
  animation: skeleton-loading 1.5s infinite;
}

.skeleton-card::after {
  content: "";
  display: block;
  height: 40px;
  background-color: #e0e0e0;
  margin: 10px;
  border-radius: 4px;
  animation: skeleton-loading 1.5s infinite;
}

@media (max-width: 768px) {
  .catalog-categories-grid-skeleton {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}
